Merge pull request 'Know Production Bugs 🐞' (#109) from bugfix/107-prod_issues into dev
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #109
This commit is contained in:
commit
d2050b5948
@ -5,6 +5,7 @@
|
||||
store.init();
|
||||
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
|
||||
import Footer from "../general/Footer.svelte";
|
||||
import isEmail from "validator/es/lib/isEmail";
|
||||
import Toastify from "toastify-js";
|
||||
// ------
|
||||
let username = config.default_username || "";
|
||||
@ -36,10 +37,19 @@
|
||||
text: $_("login_is_checked"),
|
||||
duration: 500,
|
||||
}).showToast();
|
||||
AuthService.authControllerLogin({
|
||||
username,
|
||||
password,
|
||||
})
|
||||
let postdata = {};
|
||||
if (isEmail(username)) {
|
||||
postdata = {
|
||||
email: username,
|
||||
password,
|
||||
};
|
||||
} else {
|
||||
postdata = {
|
||||
username,
|
||||
password,
|
||||
};
|
||||
}
|
||||
AuthService.authControllerLogin(postdata)
|
||||
.then(async (result) => {
|
||||
await localForage.setItem("logindata", result);
|
||||
OpenAPI.TOKEN = result.access_token;
|
||||
|
@ -74,20 +74,12 @@
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
) || donation.donor.middlename
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
) || donation.donor.lastname
|
||||
) || donation.donor.lastname
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
) || donation.runner?.firstname
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
) || donation.runner?.middlename
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
) || donation.runner?.lastname
|
||||
|
@ -88,11 +88,7 @@
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
) || donor.middlename
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
) || donor.lastname
|
||||
) || donor.lastname
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
|
@ -19,6 +19,11 @@
|
||||
export let current_runners;
|
||||
export let import_modal_open;
|
||||
$: searchvalue = "";
|
||||
$: importButtonEnabled =
|
||||
recent_processed &&
|
||||
(!(selected_org_or_team == "" || selected_org_or_team == null) ||
|
||||
!(passed_org?.id == null || passed_org?.id == 0) ||
|
||||
!(passed_team?.id == null || passed_team?.id == 0));
|
||||
const dispatch = createEventDispatcher();
|
||||
function cancelModal() {
|
||||
json_output = [];
|
||||
@ -44,7 +49,10 @@
|
||||
groups = groups.concat(orgs);
|
||||
RunnerTeamService.runnerTeamControllerGetAll().then((val) => {
|
||||
const teams = val.map((r) => {
|
||||
return { label: `${r.parentGroup.name} > ${r.name}`, value: `TEAM_${r.id}` };
|
||||
return {
|
||||
label: `${r.parentGroup.name} > ${r.name}`,
|
||||
value: `TEAM_${r.id}`,
|
||||
};
|
||||
});
|
||||
groups = groups.concat(teams);
|
||||
});
|
||||
@ -120,6 +128,13 @@
|
||||
.catch((err) => {
|
||||
toast.hideToast();
|
||||
recent_processed = true;
|
||||
Toastify({
|
||||
text: $_("error-during-import"),
|
||||
duration: 500,
|
||||
backgroundColor:
|
||||
"linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)",
|
||||
}).showToast();
|
||||
cancelModal();
|
||||
});
|
||||
}
|
||||
if (opened_from === "TeamDetail") {
|
||||
@ -137,6 +152,13 @@
|
||||
.catch((err) => {
|
||||
toast.hideToast();
|
||||
recent_processed = true;
|
||||
Toastify({
|
||||
text: $_("error-during-import"),
|
||||
duration: 500,
|
||||
backgroundColor:
|
||||
"linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)",
|
||||
}).showToast();
|
||||
cancelModal();
|
||||
});
|
||||
}
|
||||
if (opened_from === "RunnerOverview") {
|
||||
@ -160,6 +182,13 @@
|
||||
.catch((err) => {
|
||||
toast.hideToast();
|
||||
recent_processed = true;
|
||||
Toastify({
|
||||
text: $_("error-during-import"),
|
||||
duration: 500,
|
||||
backgroundColor:
|
||||
"linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)",
|
||||
}).showToast();
|
||||
cancelModal();
|
||||
});
|
||||
}
|
||||
if (selected_org_or_team.includes("TEAM_")) {
|
||||
@ -182,6 +211,13 @@
|
||||
.catch((err) => {
|
||||
toast.hideToast();
|
||||
recent_processed = true;
|
||||
Toastify({
|
||||
text: $_("error-during-import"),
|
||||
duration: 500,
|
||||
backgroundColor:
|
||||
"linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)",
|
||||
}).showToast();
|
||||
cancelModal();
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -195,7 +231,7 @@
|
||||
use:focusTrap
|
||||
use:clickOutside
|
||||
on:click_outside={() => {
|
||||
import_modal_open = false;
|
||||
cancelModal();
|
||||
}}>
|
||||
<div
|
||||
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||
@ -349,6 +385,8 @@
|
||||
</table>
|
||||
</div>
|
||||
<button
|
||||
disabled={!importButtonEnabled}
|
||||
class:opacity-50={!importButtonEnabled}
|
||||
on:click={importAction}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
|
||||
|
@ -178,7 +178,7 @@
|
||||
generateSponsoringContract('de');
|
||||
}}
|
||||
type="submit"
|
||||
class="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900 inline-flex"
|
||||
class="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"
|
||||
role="menuitem">
|
||||
{$_('german')}
|
||||
</button>
|
||||
@ -187,7 +187,7 @@
|
||||
generateSponsoringContract('en');
|
||||
}}
|
||||
type="submit"
|
||||
class="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900 inline-flex"
|
||||
class="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"
|
||||
role="menuitem">
|
||||
{$_('english')}
|
||||
</button>
|
||||
@ -249,11 +249,7 @@
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
) || runner.middlename
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
) || runner.lastname
|
||||
) || runner.lastname
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
|
@ -81,10 +81,6 @@
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
) || scan.runner?.firstname
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
) || scan.runner?.middlename
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
searchvalue.toLowerCase()
|
||||
|
@ -86,7 +86,7 @@
|
||||
<div class="mt-2 mb-6">
|
||||
<label
|
||||
for="token"
|
||||
class="block text-sm font-medium text-gray-700">Token</label>
|
||||
class="block text-sm font-medium text-gray-700">{$_('token')}</label>
|
||||
<div on:click={copy} class="inline-flex">
|
||||
<p
|
||||
name="token"
|
||||
|
@ -45,6 +45,7 @@
|
||||
"change-your-password-here": "Hier kannst du dein Passwort ändern",
|
||||
"changing-your-password": "Passwort wird geändert",
|
||||
"city": "Stadt",
|
||||
"click-to-copy-token-to-clipboard": "Klicke auf den Token, um ihn in deine Zwischenablage zu kopieren",
|
||||
"close": "Schließen",
|
||||
"configure-the-tracks-and-minimum-lap-times": "Bearbeite die Tracks und ihre minimale Rundenzeit",
|
||||
"confirm": "Bestätigen",
|
||||
@ -62,6 +63,7 @@
|
||||
"contact-is-not-a-member-in-any-group": "Kontakt gehört zu keiner Gruppe",
|
||||
"contacts": "Kontakte",
|
||||
"contacts-are-being-loaded": "Kontakte werden geladen ...",
|
||||
"copied-token-to-clipboard": "Token wurde in die Zwischenablage kopiert",
|
||||
"count_organizations": "Organisationen (Anzahl)",
|
||||
"count_teams": "Teams (Anzahl)",
|
||||
"create": "Erstellen",
|
||||
@ -124,6 +126,7 @@
|
||||
"description-optional": "Beschreibung (optional)",
|
||||
"deselect-all": "Alle abwählen",
|
||||
"details": "Details",
|
||||
"disabled": "deaktiviert",
|
||||
"distance": "Distanz",
|
||||
"distance-donation": "Sponsoring",
|
||||
"distance-in-km": "Distanz (in KM)",
|
||||
@ -151,7 +154,10 @@
|
||||
"edit-permissions": "Berechtigungen bearbeiten",
|
||||
"email_address_or_username": "E-Mail-Adresse/ Benutzername",
|
||||
"enabled": "aktiviert",
|
||||
"enabled_large": "Disabled",
|
||||
"english": "Englisch",
|
||||
"error-during-import": "Fehler beim Importieren",
|
||||
"error-whyile-copying-to-clipboard": "Fehler beim Kopieren in die Zwischenablage",
|
||||
"error_on_login": "😢Fehler beim Login",
|
||||
"erteilte": "Direkt erteilte",
|
||||
"everything-concerning-your-profile": "Alles zu deinem Profil",
|
||||
@ -256,6 +262,7 @@
|
||||
"permissions": "Berechtigungen",
|
||||
"permissions-updated": "Berechtigungen aktualisiert!",
|
||||
"phone": "Telefon",
|
||||
"please-copy-the-token-and-store-it-somewhere-save": "Bitte kopiere dir den Token und bewahre ihn gut auf.",
|
||||
"please-provide-a-password": "Bitte gebe ein Passwort an...",
|
||||
"please-provide-the-nessecary-information-to-add-a-new-donor": "Bitte mach die Notwendigen Angaben, um eine neue Sponsor:in zu erstellen",
|
||||
"please-provide-the-nessecary-information-to-create-a-new-donation": "Bitte gebe alle für das Sponsoring notwendigen Daten an.",
|
||||
@ -268,6 +275,7 @@
|
||||
"please-provide-the-required-information-to-add-a-new-team": "Bitte gebe alle nötigen Informationen an, im das neue Team zu erstellen.",
|
||||
"please-provide-the-required-information-to-add-a-new-track": "Bitte die benötigten Informationen angeben.",
|
||||
"please-provide-the-required-information-to-add-a-new-user": "Bitte gebe alle nötigen Informationen an, im die neue Benutzer:in zu erstellen.",
|
||||
"please-provide-the-required-information-to-create-a-new-scanstation": "Bitte gebe alle für eine Scannerstation notwendigen Informationen an",
|
||||
"please-request-a-new-reset-mail": "Bitte eine neue Passwortreset-Mail anfordern...",
|
||||
"privacy": "Datenschutz",
|
||||
"privacy-loading": "Datenschutzerklärung lädt...",
|
||||
@ -297,6 +305,8 @@
|
||||
"scans": "Scans",
|
||||
"scans-are-being-loaded": "Scans werden geladen",
|
||||
"scanstation": "Scanner Station",
|
||||
"scanstation-added": "Station wurde erstellt",
|
||||
"scanstation-is-being-added": "Scannerstation wird angelegt...",
|
||||
"scanstations": "Scanner Stationen",
|
||||
"scanstations-are-being-loaded": "Scannerstationen werden geladen...",
|
||||
"search-for-an-organization-by-name-or-id": "Suche eine Organisation (via Name oder Id)",
|
||||
@ -323,6 +333,7 @@
|
||||
"teams-are-being-loaded": "Teams werden geladen ...",
|
||||
"the-provided-phone-number-is-invalid-less-than-br-greater-than-please-enter-a-valid-international-number": "Die angegebene Telefonnummer ist nicht korrekt. <br /> Bitte gebe eine Telefonnummer im internationalen Format an...",
|
||||
"the-scans-distance-must-be-greater-than-0m": "Die Distanz muss größer als 0m sein.",
|
||||
"the-scanstations-api-token-will-only-get-displayed-once-you-wont-be-able-to-change-or-view-it-again": "Der Scannerstation Token wird nur einmal angezeigt - du kannst ihn nicht ändern oder ihn dir nochmal anzeigen lassen!",
|
||||
"there-are-no-contacts-added-yet": "Es wurden noch keine Kontakte hinzugefügt.",
|
||||
"there-are-no-donations-yet": "Es gibt noch keine Sponsorings",
|
||||
"there-are-no-donors-yet": "Es gibt noch keine Sponsor:innen",
|
||||
@ -334,6 +345,7 @@
|
||||
"there-are-no-users-added-yet": "Es wurden noch keine Benutzer hinzugefügt.",
|
||||
"this-might-take-a-moment": "Das könnte einen kleinen Moment dauern",
|
||||
"this-scanstation-is": "Diese Station ist",
|
||||
"token": "Token",
|
||||
"total-distance": "gelaufene Strecke",
|
||||
"total-donation-amount": "Gesamtbetrag",
|
||||
"total-donations": "Spendensumme",
|
||||
|
@ -45,6 +45,7 @@
|
||||
"change-your-password-here": "Change your password here",
|
||||
"changing-your-password": "Changing your password",
|
||||
"city": "City",
|
||||
"click-to-copy-token-to-clipboard": "Click to copy the token to your clipboard",
|
||||
"close": "Close",
|
||||
"configure-the-tracks-and-minimum-lap-times": "configure the tracks & minimum lap times",
|
||||
"confirm": "Confirm",
|
||||
@ -62,6 +63,7 @@
|
||||
"contact-is-not-a-member-in-any-group": "Contact is not a member in any group",
|
||||
"contacts": "Contacts",
|
||||
"contacts-are-being-loaded": "contacts are being loaded...",
|
||||
"copied-token-to-clipboard": "Copied token to clipboard",
|
||||
"count_organizations": "# Organizations",
|
||||
"count_teams": "# Teams",
|
||||
"create": "Create",
|
||||
@ -124,6 +126,7 @@
|
||||
"description-optional": "Description (optional)",
|
||||
"deselect-all": "deselect all",
|
||||
"details": "Details",
|
||||
"disabled": "disabled",
|
||||
"distance": "Distance",
|
||||
"distance-donation": "distance donation",
|
||||
"distance-in-km": "Distance in km",
|
||||
@ -151,7 +154,10 @@
|
||||
"edit-permissions": "edit permissions",
|
||||
"email_address_or_username": "Email / username",
|
||||
"enabled": "enabled",
|
||||
"enabled_large": "Enabled",
|
||||
"english": "English",
|
||||
"error-during-import": "Error during import",
|
||||
"error-whyile-copying-to-clipboard": "Error while copying to clipboard",
|
||||
"error_on_login": "Error on login",
|
||||
"erteilte": "Directly granted",
|
||||
"everything-concerning-your-profile": "Everything concerning your profile",
|
||||
@ -256,6 +262,7 @@
|
||||
"permissions": "Permissions",
|
||||
"permissions-updated": "Permissions updated!",
|
||||
"phone": "Phone",
|
||||
"please-copy-the-token-and-store-it-somewhere-save": "Please copy the token and store it somewhere safe.",
|
||||
"please-provide-a-password": "Please provide a password...",
|
||||
"please-provide-the-nessecary-information-to-add-a-new-donor": "Please provide the nessecary information to add a new donor",
|
||||
"please-provide-the-nessecary-information-to-create-a-new-donation": "Please provide the nessecary information to create a new donation",
|
||||
@ -268,6 +275,7 @@
|
||||
"please-provide-the-required-information-to-add-a-new-team": "Please provide the required information to add a new team.",
|
||||
"please-provide-the-required-information-to-add-a-new-track": "Please provide the required information to add a new track.",
|
||||
"please-provide-the-required-information-to-add-a-new-user": "Please provide the required information to add a new user.",
|
||||
"please-provide-the-required-information-to-create-a-new-scanstation": "Please provide the required information to create a new scanstation",
|
||||
"please-request-a-new-reset-mail": "Please request a new reset mail...",
|
||||
"privacy": "Privacy",
|
||||
"privacy-loading": "Privacy loading...",
|
||||
@ -297,6 +305,8 @@
|
||||
"scans": "Scans",
|
||||
"scans-are-being-loaded": "Scans are being loaded",
|
||||
"scanstation": "Scanstation",
|
||||
"scanstation-added": "Scanstation added",
|
||||
"scanstation-is-being-added": "Adding scanstation...",
|
||||
"scanstations": "Scanstations",
|
||||
"scanstations-are-being-loaded": "Loading scanstations...",
|
||||
"search-for-an-organization-by-name-or-id": "Search for an organization (by name or id)",
|
||||
@ -323,6 +333,7 @@
|
||||
"teams-are-being-loaded": "teams are being loaded...",
|
||||
"the-provided-phone-number-is-invalid-less-than-br-greater-than-please-enter-a-valid-international-number": "the provided phone number is invalid.<br />please enter a valid international number...",
|
||||
"the-scans-distance-must-be-greater-than-0m": "The scan's distance must be greater than 0m",
|
||||
"the-scanstations-api-token-will-only-get-displayed-once-you-wont-be-able-to-change-or-view-it-again": "The scanstation api token will only get displayed once - you won't be able to change or view it again!",
|
||||
"there-are-no-contacts-added-yet": "There are no contacts added yet.",
|
||||
"there-are-no-donations-yet": "There are no donations yet",
|
||||
"there-are-no-donors-yet": "There are no donors yet",
|
||||
@ -334,6 +345,7 @@
|
||||
"there-are-no-users-added-yet": "There are no users added yet.",
|
||||
"this-might-take-a-moment": "This might take a moment 👀",
|
||||
"this-scanstation-is": "This scanstation is",
|
||||
"token": "Token",
|
||||
"total-distance": "total distance",
|
||||
"total-donation-amount": "total donation amount",
|
||||
"total-donations": "total donations",
|
||||
|
Loading…
x
Reference in New Issue
Block a user