diff --git a/src/App.svelte b/src/App.svelte index e88cfdea..afecf3e6 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -53,6 +53,7 @@ import Imprint from "./components/Imprint.svelte"; import Privacy from "./components/Privacy.svelte"; import ResetPassword from "./components/ResetPassword.svelte"; +import Contacts from "./components/Contacts.svelte"; store.init(); registerSW(); @@ -119,6 +120,14 @@ import ResetPassword from "./components/ResetPassword.svelte"; + + + + + + + + diff --git a/src/components/AddContactModal.svelte b/src/components/AddContactModal.svelte new file mode 100644 index 00000000..85115dea --- /dev/null +++ b/src/components/AddContactModal.svelte @@ -0,0 +1,406 @@ + + +{#if modal_open} +
{ + modal_open = false; + }}> +
+ +
+{/if} diff --git a/src/components/AddRunnerModal.svelte b/src/components/AddRunnerModal.svelte index 32c0da99..fe4cc642 100644 --- a/src/components/AddRunnerModal.svelte +++ b/src/components/AddRunnerModal.svelte @@ -36,7 +36,7 @@ $: firstname_input_value = ""; $: processed_last_submit = true; $: isPhoneValidOrEmpty = - isMobilePhone( + phone_input_value.includes("+")&&isMobilePhone( phone_input_value .replaceAll("(", "") .replaceAll(")", "") @@ -258,7 +258,7 @@ {#if !isPhoneValidOrEmpty} - {$_('the-provided-phone-number-is-invalid-less-than-br-greater-than-please-enter-a-valid-international-number')} + {@html $_('the-provided-phone-number-is-invalid-less-than-br-greater-than-please-enter-a-valid-international-number')} {/if}
diff --git a/src/components/ContactOverview.svelte b/src/components/ContactOverview.svelte new file mode 100644 index 00000000..fcf45b6f --- /dev/null +++ b/src/components/ContactOverview.svelte @@ -0,0 +1,168 @@ + + +{#if store.state.jwtinfo.userdetails.permissions.includes('TEAM:GET')} + {#await promise} + + {:then} + {#if current_teams.length === 0} + + {:else} + +
+ + + + + + + + + + + {#each current_teams as t} + {#if Object.values(t) + .toString() + .toLowerCase() + .includes(searchvalue)} + + + + + {#if active_deletes[t.id] === true} + + {:else} + + {/if} + + {/if} + {/each} + +
+ Name + + {$_('organization')} + + Contact + + Action +
+
+
+
+ {t.name} +
+
+
+
+
+
+
+ {#if t.parentGroup} + {t.parentGroup.name} + {:else}no organization specified{/if} +
+
+
+
+
+
+
+ {#if t.contact} + {JSON.stringify(t.contact)} + {:else}no contact specified{/if} +
+
+
+
+ + + + Edit + {#if store.state.jwtinfo.userdetails.permissions.includes('TEAM:DELETE')} + + {/if} +
+
+ {/if} + {:catch error} +
+ + {$_('general_promise_error')} + {error} + +
+ {/await} +{/if} diff --git a/src/components/Contacts.svelte b/src/components/Contacts.svelte new file mode 100644 index 00000000..f15451f9 --- /dev/null +++ b/src/components/Contacts.svelte @@ -0,0 +1,30 @@ + + +
+ + {$_('contacts')} + {#if store.state.jwtinfo.userdetails.permissions.includes('USER:CREATE')} + + {/if} + + +
+ +{#if store.state.jwtinfo.userdetails.permissions.includes('USER:CREATE')} + +{/if} diff --git a/src/components/ContactsOverview.svelte b/src/components/ContactsOverview.svelte new file mode 100644 index 00000000..6984475d --- /dev/null +++ b/src/components/ContactsOverview.svelte @@ -0,0 +1,171 @@ + + +{#if store.state.jwtinfo.userdetails.permissions.includes('TEAM:GET')} + {#await promise} + + {:then} + {#if current_contacts.length === 0} + + {:else} + {JSON.stringify(current_contacts)} + +
+ + + + + + + + + + + {#each current_contacts as t} + {#if Object.values(t) + .toString() + .toLowerCase() + .includes(searchvalue)} + + + + + {#if active_deletes[t.id] === true} + + {:else} + + {/if} + + {/if} + {/each} + +
+ Name + + Groups + + Address + + Action +
+
+
+
+ {t.firstname} + {t.middlename || ''} + {t.lastname} +
+
+
+
+
+
+
+ {#if t.groups.length>0} + {#each t.groups as g} + {#if g.responseType==="RUNNERORGANIZATION"} + {g.name} + {:else} + {g.name} + {/if} + {/each} + {:else}no groups{/if} +
+
+
+
+
+
+
+ {#if t.contact} + {JSON.stringify(t.contact)} + {:else}no contact specified{/if} +
+
+
+
+ + + + Edit + {#if store.state.jwtinfo.userdetails.permissions.includes('TEAM:DELETE')} + + {/if} +
+
+ {/if} + {:catch error} +
+ + {$_('general_promise_error')} + {error} + +
+ {/await} +{/if} diff --git a/src/components/Dashboard.svelte b/src/components/Dashboard.svelte index 23de2d92..72ffc38d 100644 --- a/src/components/Dashboard.svelte +++ b/src/components/Dashboard.svelte @@ -122,6 +122,13 @@ {$_('tracks')} {/if} + + + {$_('contacts')} + please enter a valid international number...", - "this-might-take-a-moment": "This might take a moment πŸ‘€", - "total-distance": "total distance", - "total-donations": "total donations", - "total-scans": "total scans", - "track-added": "Track added", - "track-data-is-being-loaded": "Track data is being loaded", - "track-is-being-added": "Track is being added...", - "track-length-in-m": "Track Length in m", - "track-name": "Track name", - "tracks": "Tracks", - "updating-runner": "Updating runner...", - "updating-user": "updating user...", - "user-updated": "User updated", - "username": "Username", - "users": "Users", - "valid-email-is-required": "valid email is required", - "welcome_wavinghand": "Welcome πŸ‘‹", - "you-can-now-use-your-new-password-to-log-in-to-your-account": "You can now use your new password to log in to your account! πŸŽ‰", - "your_profile": "Your Profile" -} \ No newline at end of file + "404message": "Sorry, the page you are looking for could not be found.", + "404title": "Error 404", + "about": "About", + "action": "Action", + "add-your-first-track": "Add your first track", + "address": "Address", + "application_name": "Lauf fΓΌr Kaya! - Admin", + "author": "Author", + "bitte-bestaetige-diese-laeufer-fuer-den-import": "Please confirm these runners for import", + "browse": "Browse", + "by": "by", + "cancel": "Cancel", + "cannot-reset-your-password-directly": "Bummer. We unfortunately cannot reset your password directly. Please send us a mail and confirm your identity", + "changelog": "Changelog", + "close": "Close", + "confirm-delete": "Confirm Delete", + "confirm-deletion": "Confirm Deletion", + "contact": "Contact", + "contact-information": "Contact Information", + "count_organizations": "# Organizations", + "count_teams": "# Teams", + "create": "Create", + "create-a-new-runner": "Create a new Runner", + "create-a-new-track": "Create a new Track", + "create-organization": "Create Organization", + "create-user": "Create User", + "credits": "Credits", + "csv_import__class": "Class", + "csv_import__firstname": "Firstname", + "csv_import__lastname": "Lastname", + "csv_import__middlename": "Middlename", + "csv_import__team": "Team", + "dashboard-greeting": "hello there", + "dashboard-title": "Dashboard", + "datatable": { + "search": "πŸ” Search...", + "sort_column_ascending": "Sort column ascending", + "sort_column_descending": "Sort column descending", + "previous": "Previous", + "next": "Next", + "page": "Page", + "showing": "Showing", + "records": "Records", + "of": "of", + "to": "to", + "loading": "Loading...", + "no_matching_records_found": "No matching records found", + "an_error_happened_while_fetching_the_data": "An error happened while fetching the data" + }, + "delete": "Delete", + "delete-organization": "Delete Organization", + "delete-runner": "Delete Runner", + "delete-team": "Delete Team", + "delete-user": "Delete User", + "dependency_name": "Name", + "distance": "Distance", + "distance-in-km": "Distance in km", + "dont-have-your-email-connected": "Don't have your email connected?", + "dont-panic-were-resetting-it": "Don't panic, we're resetting it ✌", + "drag-and-drop-your-files-or": "Drag & Drop your files or", + "e-mail-adress": "E-Mail Adress", + "edit-permissions": "edit permissions", + "email_address_or_username": "Email / username", + "error_on_login": "Error on login", + "faq": "FAQ", + "filepond__abort": "Abort", + "filepond__cancel": "Cancel", + "filepond__error-during-load": "Error during load", + "filepond__error-during-remove": "Error during remove", + "filepond__error-during-revert": "Error during revert", + "filepond__error-during-upload": "Error during upload", + "filepond__field-contains-invalid-files": "Field contains invalid files", + "filepond__loading": "Loading", + "filepond__remove": "Remove", + "filepond__retry": "Retry", + "filepond__size-not-available": "Size not available", + "filepond__tap-to-cancel": "tap to cancel", + "filepond__tap-to-retry": "tap to retry", + "filepond__tap-to-undo": "tap to undo", + "filepond__undo": "Undo", + "filepond__upload": "Upload", + "filepond__upload-cancelled": "Upload cancelled", + "filepond__upload-complete": "Upload complete", + "filepond__uploading": "Uploading", + "filepond__waiting-for-size": "Waiting for size", + "first-name": "First name", + "first-name-is-required": "First Name is required", + "forgot_password?": "Forgot your password?", + "general-stats": "General Stats", + "general_promise_error": "😒 Error", + "go-to-login": "Go To Login", + "goback": "Go Home", + "group": "Group", + "groups": "Groups", + "hallo": "hello", + "icon-image-credits": "We also want to thank these projects for illustrations and icons:", + "import-runners": "Import runners", + "import__target-organization": "Target Organization", + "imprint": "Imprint 🧾", + "imprint-loading": "Imprint loading...", + "installed-version": "Installed version", + "invalid-mail-reset": "the provided email is invalid", + "last-name": "Last name", + "last-name-is-required": "Last Name is required", + "lfk-is-os": "The \"Lauf fΓΌr Kaya!\" Frontend is (like all other projects for the \"LfK!\" Also) an open source project.", + "license": "License", + "licenses-are-being-loaded": "Licenses are being loaded...", + "loading-runners": "loading runners...", + "log_in": "Log in", + "log_in_to_your_account": "Log in to your account", + "login_is_checked": "Login is being checked...", + "logout": "Logout", + "mail-validation-in-progress": "mail validation in progress...", + "manage-admin-users": "manage admin users", + "middle-name": "Middle name", + "minimum-lap-time-in-s": "minimum lap time in s", + "name": "Name", + "new-password": "New password", + "no-license-text-could-be-found": "No license text could be found 😒", + "no-tracks-added-yet": "there are no tracks added yet.", + "organization": "Organization", + "organizations": "Organizations", + "orgs": "Orgs", + "oss_credit_description": "We use a lot of open source software on these projects, and would like to thank the following projects and contributors who help make open source great!", + "password": "Password", + "password-is-required": "Password is required", + "password-reset-failed": "Password reset failed!", + "password-reset-in-progress": "Password Reset in Progress...", + "password-reset-successful": "Password Reset successful!", + "permissions": "Permissions", + "phone": "Phone", + "please-provide-a-password": "Please provide a password...", + "please-provide-the-required-csv-xlsx-file": "Please provide the required csv/ xlsx file", + "please-provide-the-required-information-to-add-a-new-runner": "Please provide the required information to add a new runner.", + "please-provide-the-required-information-to-add-a-new-track": "Please provide the required information to add a new track.", + "please-request-a-new-reset-mail": "Please request a new reset mail...", + "privacy": "Privacy πŸ”’", + "privacy-loading": "Privacy loading...", + "profile-picture": "Profile Picture", + "read-license": "Read License", + "register": "Register", + "repo_link": "Link", + "request-a-new-reset-mail": "Request a new reset mail", + "reset-my-password": "Reset my password", + "reset-password": "Reset your password", + "runner-import": "Runner Import", + "runner-updated": "Runner updated!", + "runnerimport_verify_runners_org": "Please confirm these runners for import into the organization \"{org_name}\"", + "runners": "Runners", + "save-changes": "Save Changes", + "send-a-mail-to-lfk-odit-services": "send a mail to lfk@odit.services", + "settings": "Settings", + "signout": "Sign out", + "stats-are-being-loaded": "stats are being loaded...", + "successful-password-reset": "Successful password reset!", + "team": "Team", + "team-name": "Team name", + "teams": "Teams", + "the-provided-phone-number-is-invalid-less-than-br-greater-than-please-enter-a-valid-international-number": "the provided phone number is invalid.
please enter a valid international number...", + "this-might-take-a-moment": "This might take a moment πŸ‘€", + "total-distance": "total distance", + "total-donations": "total donations", + "total-scans": "total scans", + "track-added": "Track added", + "track-data-is-being-loaded": "Track data is being loaded", + "track-is-being-added": "Track is being added...", + "track-length-in-m": "Track Length in m", + "track-name": "Track name", + "tracks": "Tracks", + "updating-runner": "Updating runner...", + "updating-user": "updating user...", + "user-updated": "User updated", + "username": "Username", + "users": "Users", + "valid-email-is-required": "valid email is required", + "welcome_wavinghand": "Welcome πŸ‘‹", + "you-can-now-use-your-new-password-to-log-in-to-your-account": "You can now use your new password to log in to your account! πŸŽ‰", + "your_profile": "Your Profile", + "contacts": "Contacts", + "create-a-new-contact": "Create a new contact" +}