Compare commits

..

13 Commits
0.8.5 ... 0.8.6

Author SHA1 Message Date
c3c95bf291 🚀RELEASE v0.8.6
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-25 18:32:22 +01:00
d2050b5948 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
Reviewed-on: #109
2021-03-25 17:30:27 +00:00
6b92405bae Removed middlename search from all files that had it
ref #107
2021-03-25 18:19:44 +01:00
49e87ccb15 Now disabled search by middlename as a quick workaround 🐞
ref #107
2021-03-25 18:16:12 +01:00
50fffef13b Fixed conflicting css
ref #107
2021-03-25 18:06:28 +01:00
82b1811971 Sorted translations 👀
ref #107
2021-03-25 18:00:11 +01:00
aeadef60bb Fixed missing translations for scanstations🌍
ref #107
2021-03-25 17:59:50 +01:00
a1ab65a0e9 Sorted translations🌍
ref #107
2021-03-25 17:49:13 +01:00
17e0805fe6 Errors now toast errors
ref #107
2021-03-25 17:48:54 +01:00
ddd9c396b6 Fixed runner import getting triggered with invalid information
ref #107
2021-03-25 17:46:14 +01:00
ef49e507c1 Fixed outsideclick not clearing import modal🛠
ref #107
2021-03-25 17:34:25 +01:00
fbe74a5d80 Commented out the buggy runner search to prevent bad UX
ref #107
2021-03-25 17:31:53 +01:00
076893981f Fixed mail login bug🐞📧
ref #107
2021-03-25 17:27:38 +01:00
12 changed files with 104 additions and 34 deletions

View File

@ -2,8 +2,26 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [0.8.6](https://git.odit.services/lfk/frontend/compare/0.8.5...0.8.6)
- Merge pull request 'Know Production Bugs 🐞' (#109) from bugfix/107-prod_issues into dev [`d2050b5`](https://git.odit.services/lfk/frontend/commit/d2050b5948890a6077cbb41d82d1a6a1d1106652)
- Errors now toast errors❌ [`17e0805`](https://git.odit.services/lfk/frontend/commit/17e0805fe64f6d181f55b81afa502ee6443ebabe)
- Sorted translations 👀 [`82b1811`](https://git.odit.services/lfk/frontend/commit/82b1811971b974b686e7618b8a381e1589c168f6)
- Fixed missing translations for scanstations🌍 [`aeadef6`](https://git.odit.services/lfk/frontend/commit/aeadef60bbe71da09bb569d20ca7377645beba7f)
- Sorted translations🌍 [`a1ab65a`](https://git.odit.services/lfk/frontend/commit/a1ab65a0e975c02c01c603bf6d95a79ada1caa0b)
- Fixed runner import getting triggered with invalid information [`ddd9c39`](https://git.odit.services/lfk/frontend/commit/ddd9c396b6bfd39a7b1627d4975151943b367ebf)
- Removed middlename search from all files that had it [`6b92405`](https://git.odit.services/lfk/frontend/commit/6b92405bae21e78d694601cbc0b33eed56ef4533)
- Fixed mail login bug🐞📧 [`0768939`](https://git.odit.services/lfk/frontend/commit/076893981ff4f7f17330746c561acc570339adac)
- Now disabled search by middlename as a quick workaround 🐞 [`49e87cc`](https://git.odit.services/lfk/frontend/commit/49e87ccb15a7ed5edea22a3c3e235f7bee07d3f4)
- Fixed conflicting css [`50fffef`](https://git.odit.services/lfk/frontend/commit/50fffef13b8fce885964d8ac277b4ca24d944b2b)
- Commented out the buggy runner search to prevent bad UX [`fbe74a5`](https://git.odit.services/lfk/frontend/commit/fbe74a5d8090553a35576a17c97019939cf4f386)
- Fixed outsideclick not clearing import modal🛠 [`ef49e50`](https://git.odit.services/lfk/frontend/commit/ef49e507c175510eeb466d33f222755fac8a2a0b)
#### [0.8.5](https://git.odit.services/lfk/frontend/compare/0.8.4...0.8.5)
> 20 March 2021
- 🚀RELEASE v0.8.5 [`e838e6f`](https://git.odit.services/lfk/frontend/commit/e838e6f321bef1565a7e4316890a3c600b242e5a)
- Fixed dupliacate mutation 🐞 [`91dd525`](https://git.odit.services/lfk/frontend/commit/91dd5256e9545f62e4342ae5477c36262d6e3401)
#### [0.8.4](https://git.odit.services/lfk/frontend/compare/0.8.3...0.8.4)

View File

@ -14,7 +14,7 @@
</head>
<body>
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.8.5-RELEASE_INFO</span>
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.8.6-RELEASE_INFO</span>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script src="/env.js"></script>
<script defer type="module" src="/_dist_/index.js"></script>

View File

@ -1,6 +1,6 @@
{
"name": "@odit/lfk-frontend",
"version": "0.8.5",
"version": "0.8.6",
"scripts": {
"i18n-order": "node order.js",
"dev:all": "yarn prebuild && snowpack dev",

View File

@ -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;

View File

@ -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

View File

@ -88,11 +88,7 @@
.toLowerCase()
.includes(
searchvalue.toLowerCase()
) || donor.middlename
.toLowerCase()
.includes(
searchvalue.toLowerCase()
) || donor.lastname
) || donor.lastname
.toLowerCase()
.includes(
searchvalue.toLowerCase()

View File

@ -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">

View File

@ -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()

View File

@ -81,10 +81,6 @@
.includes(
searchvalue.toLowerCase()
) || scan.runner?.firstname
.toLowerCase()
.includes(
searchvalue.toLowerCase()
) || scan.runner?.middlename
.toLowerCase()
.includes(
searchvalue.toLowerCase()

View File

@ -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"

View File

@ -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",

View File

@ -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",