From 6f4f4ccb16d91c9ab11f65bc9c01faafa6004f5c Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Mon, 15 Feb 2021 17:45:41 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20ContactDetail=20route?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #50 --- src/App.svelte | 3 +- src/components/ContactDetail.svelte | 285 ++++++++++++++++++++++++++++ 2 files changed, 287 insertions(+), 1 deletion(-) create mode 100644 src/components/ContactDetail.svelte diff --git a/src/App.svelte b/src/App.svelte index afecf3e6..aef1c587 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -54,6 +54,7 @@ import Privacy from "./components/Privacy.svelte"; import ResetPassword from "./components/ResetPassword.svelte"; import Contacts from "./components/Contacts.svelte"; +import ContactDetail from "./components/ContactDetail.svelte"; store.init(); registerSW(); @@ -125,7 +126,7 @@ import Contacts from "./components/Contacts.svelte"; - + diff --git a/src/components/ContactDetail.svelte b/src/components/ContactDetail.svelte new file mode 100644 index 00000000..aa9fe042 --- /dev/null +++ b/src/components/ContactDetail.svelte @@ -0,0 +1,285 @@ + + +{#await promise} + Loading contact details... +{:then} +
+
+
+ +
+
+
+ {original_data.firstname} + {original_data.middlename || ''} + {original_data.lastname} + + {#if store.state.jwtinfo.userdetails.permissions.includes('CONTACT:DELETE')} + {#if delete_triggered} + + + {/if} + {#if !delete_triggered} + + {/if} + {/if} + {#if !delete_triggered} + + {/if} + +
+ +
+ + + {#if !isFirstnameValid} + + {$_('first-name-is-required')} + + {/if} +
+
+ + +
+
+ + + {#if !isLastnameValid} + + {$_('last-name-is-required')} + + {/if} +
+
+ + + {#if !isEmailValid} + + {$_('valid-email-is-required')} + + {/if} +
+
+ + +
+
+ {$_('groups')} + +
+
+{:catch error} + +{/await}