Skip to content

Commit

Permalink
Added function delete all meters for customer
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua committed Dec 10, 2023
1 parent 403a2c8 commit 94756b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions admin_cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ def center_text(text, width):
click.echo(" " * menu_indent + "2. " + Fore.YELLOW + "Kundenportale auflisten")
click.echo(" " * menu_indent + "3. " + Fore.YELLOW + "Kundenportal löschen")
click.echo(" " * menu_indent + "4. " + Fore.YELLOW + "Smartmeter auflisten")
click.echo(" " * menu_indent + "5. " + Fore.RED + "Beenden" + Style.RESET_ALL)
click.echo(" " * menu_indent + "4. " + Fore.YELLOW + "Smartmeter löschen")
click.echo(" " * menu_indent + "6. " + Fore.RED + "Beenden" + Style.RESET_ALL)
click.echo(" " * menu_indent + "=" * menu_width)

choice = click.prompt(Fore.CYAN + "Bitte wählen Sie eine Option (1-5)")
choice = click.prompt(Fore.CYAN + "Bitte wählen Sie eine Option (1-6)")

if choice == "1":
api.new_customer_portals()
Expand All @@ -60,6 +61,9 @@ def center_text(text, width):
customer_UID = input("Bitte geben Sie die Kunden-UID ein: ")
api.list_smart_meters_of_customer(customer_UID)
elif choice == "5":
customer_UID = input("Bitte geben Sie die Kunden-UID ein: ")
api.delete_smart_meters_of_customer(customer_UID)
elif choice == "6":
click.echo(Fore.RED + "Programm wird beendet.")
break
else:
Expand Down

0 comments on commit 94756b1

Please sign in to comment.