From 94756b16ecaf01d0f78074c953881d826cd828a4 Mon Sep 17 00:00:00 2001 From: Joshua <> Date: Sun, 10 Dec 2023 14:32:37 +0100 Subject: [PATCH] Added function delete all meters for customer --- admin_cli/run.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/admin_cli/run.py b/admin_cli/run.py index 46bd35c..c448442 100644 --- a/admin_cli/run.py +++ b/admin_cli/run.py @@ -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() @@ -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: