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}