-
- 0"
+ class="table-auto w-full text-left whitespace-no-wrap"
+ >
+
+ "
+ >
-
+ "
+ >
Name
|
-
+ "
+ >
{{ $t("amount_per_kilometer_in_eur") }}
|
-
+ "
+ >
{{ $t("current_total_amount_in_eur") }}
|
@@ -375,18 +538,24 @@
- €
+ €
|
- €
+ €
|
@@ -394,48 +563,61 @@
{{ $t("total") }} |
- €
+ )
+ .toFixed(2)
+ .toLocaleString('de-DE', { valute: 'EUR' })
+ "
+ >€
|
- €
+ )
+ .toFixed(2)
+ .toLocaleString('de-DE', { valute: 'EUR' })
+ "
+ >€
|
-
-
+ "
+ >
+
{{ $t("no_sponsorings_for_you_were_recorded_yet") }}
@@ -457,18 +639,16 @@ import bwipjs from "bwip-js";
function textToBase64Barcode(text) {
var canvas = document.createElement("canvas");
- bwipjs.toCanvas(canvas,
- {
- bcid: config.codeformat || 'code39',
- text: text,
- scale: 3,
- height: 10,
- // width: 10,
- includetext: true,
- textxalign: 'center',
- backgroundcolor: 'ffffff'
- }
- )
+ bwipjs.toCanvas(canvas, {
+ bcid: config.codeformat || "code39",
+ text: text,
+ scale: 3,
+ height: 10,
+ // width: 10,
+ includetext: true,
+ textxalign: "center",
+ backgroundcolor: "ffffff",
+ });
return canvas.toDataURL("image/png");
}
@@ -484,8 +664,8 @@ const state = reactive({
group: "",
activetab: "profile",
delete_active: false,
- fullobject: {}
-})
+ fullobject: {},
+});
const toast = useToast();
const props = defineProps({
token: String,
@@ -502,9 +682,10 @@ axios
state.group = data.group;
state.sponsorings = data.distanceDonations;
state.fullobject = data;
- state.barcode = textToBase64Barcode(data.id);
+ state.barcode = textToBase64Barcode(data.id ?? "???");
})
.catch((error) => {
+ toast.clear();
toast.error("Profil konnte nicht geladen werden...");
});
axios
@@ -530,15 +711,18 @@ axios
toast.error("Profil konnte nicht geladen werden...");
});
function delete_me() {
+ toast.clear();
toast("Profil wird gelöscht...");
let url = `${config.baseurl}api/runners/me/${accesstoken}?force=true`;
axios
.delete(url)
.then(() => {
+ toast.clear();
toast("Alle Daten gelöscht!");
location.replace(`${config.baseurl_selfservice}`);
})
.catch((error) => {
+ toast.clear();
toast.error("Profil konnte nicht gelöscht werden...");
});
}
@@ -565,29 +749,33 @@ function get_certificate() {
} else {
var fileURL = window.URL.createObjectURL(
new Blob([response.data], { type: "application/pdf" })
- );
+ );
var fileLink = document.createElement("a");
fileLink.href = fileURL;
fileLink.setAttribute("download", "Certificate.pdf");
document.body.appendChild(fileLink);
-
+
fileLink.click();
fileLink.remove();
+ toast.clear();
toast("Urkunde generiert!", { type: TYPE.SUCCESS });
}
})
.catch((err) => {
console.error(err);
- toast.error("An error occured while generating your certificate");
+ toast.clear();
+ toast.error("Urkunde konnte nicht generiert werden...");
});
}
function get_registration() {
+ toast.clear();
toast("Registrierungscode wird generiert...");
var a = document.createElement("a");
a.href = state.barcode;
a.download = "LfK23_Registrierungscode.png";
a.click();
+ toast.clear();
toast("Registrierungscode generiert!", { type: TYPE.SUCCESS });
}
\ No newline at end of file