From f1ab653bbd29d7f5e7994f6cafe90439e90c4ab4 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 27 May 2025 09:44:39 +0000
Subject: [PATCH 1/7] Initial plan for issue
From 97d8309805ef2e21bb0f97ce0aaa883e21032d86 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 27 May 2025 09:50:46 +0000
Subject: [PATCH 2/7] Add customer deletion functionality
Co-authored-by: timdeschryver <28659384+timdeschryver@users.noreply.github.com>
---
.../customer-details.component.css | 24 ++++++
.../customer-details.component.html | 24 +++++-
.../customer-details.component.spec.ts | 73 +++++++++++++++++-
.../customer-details.component.ts | 29 ++++++-
.../customer-management.service.ts | 4 +
.../DeleteCustomerTests.cs | 77 +++++++++++++++++++
.../Application/DeleteCustomer.cs | 42 ++++++++++
.../CustomerModule.cs | 1 +
8 files changed, 269 insertions(+), 5 deletions(-)
create mode 100644 Sandbox.Modules.CustomerManagement.Tests/DeleteCustomerTests.cs
create mode 100644 Sandbox.Modules.CustomerManagement/Application/DeleteCustomer.cs
diff --git a/Sandbox.AngularWorkspace/projects/sandbox-app/src/app/customer-management/customer-details/customer-details.component.css b/Sandbox.AngularWorkspace/projects/sandbox-app/src/app/customer-management/customer-details/customer-details.component.css
index e69de29..8717314 100644
--- a/Sandbox.AngularWorkspace/projects/sandbox-app/src/app/customer-management/customer-details/customer-details.component.css
+++ b/Sandbox.AngularWorkspace/projects/sandbox-app/src/app/customer-management/customer-details/customer-details.component.css
@@ -0,0 +1,24 @@
+.actions {
+ display: flex;
+ gap: 10px;
+ margin-bottom: 20px;
+}
+
+.confirmation-dialog {
+ border: 1px solid #ccc;
+ padding: 15px;
+ margin: 10px 0;
+ background-color: #f9f9f9;
+ border-radius: 5px;
+}
+
+.confirmation-actions {
+ display: flex;
+ gap: 10px;
+ margin-top: 10px;
+}
+
+.error {
+ color: red;
+ margin-top: 10px;
+}
diff --git a/Sandbox.AngularWorkspace/projects/sandbox-app/src/app/customer-management/customer-details/customer-details.component.html b/Sandbox.AngularWorkspace/projects/sandbox-app/src/app/customer-management/customer-details/customer-details.component.html
index 49c9d1b..af5cc49 100644
--- a/Sandbox.AngularWorkspace/projects/sandbox-app/src/app/customer-management/customer-details/customer-details.component.html
+++ b/Sandbox.AngularWorkspace/projects/sandbox-app/src/app/customer-management/customer-details/customer-details.component.html
@@ -2,7 +2,29 @@
@if (customer.hasValue() && customer.value(); as customer) {
Customer Details
-
Back to Overview
+
+
+ @if (showDeleteConfirmation()) {
+
+
Are you sure you want to delete this customer?
+
+
+
+
+ @if (deleteError()) {
+
{{ deleteError() }}
+ }
+
+ }