From a11c23ab989eea86376f9ab4a45c13260bc8cefe Mon Sep 17 00:00:00 2001 From: Denis Natusch Date: Wed, 15 Nov 2023 01:21:44 +0100 Subject: [PATCH] Make only enabled customers able to be removed --- src/main/java/catering/users/User.java | 4 ++++ src/main/resources/templates/customers.html | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/catering/users/User.java b/src/main/java/catering/users/User.java index 3a0de8b..870986c 100644 --- a/src/main/java/catering/users/User.java +++ b/src/main/java/catering/users/User.java @@ -59,6 +59,10 @@ public class User extends AbstractAggregateRoot { return id; } + public boolean isEnabled(){ + return userAccount.isEnabled(); + } + @Embeddable public static final class UserIdentifier implements Identifier, Serializable { diff --git a/src/main/resources/templates/customers.html b/src/main/resources/templates/customers.html index 78cf17a..72939ef 100644 --- a/src/main/resources/templates/customers.html +++ b/src/main/resources/templates/customers.html @@ -23,7 +23,10 @@ Musterkoch Aufträge Bearbeiten - Entfernen + + Entfernen + Deaktiviert +