Highlight und neue ID
This commit is contained in:
@@ -128,17 +128,17 @@
|
||||
|
||||
const zurueck = {
|
||||
[Enums.Ausweisart.VerbrauchsausweisWohnen]:
|
||||
`/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?uid=${ausweis.uid}`,
|
||||
`/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?uid=${ausweis.id}`,
|
||||
[Enums.Ausweisart.VerbrauchsausweisGewerbe]:
|
||||
`/energieausweis-erstellen/verbrauchsausweis-gewerbe?uid=${ausweis.uid}`,
|
||||
`/energieausweis-erstellen/verbrauchsausweis-gewerbe?uid=${ausweis.id}`,
|
||||
[Enums.Ausweisart.BedarfsausweisWohnen]:
|
||||
`/energieausweis-erstellen/bedarfsausweis-wohnen?uid=${ausweis.uid}`,
|
||||
`/energieausweis-erstellen/bedarfsausweis-wohnen?uid=${ausweis.id}`,
|
||||
[Enums.Ausweisart.GEGNachweisWohnen]:
|
||||
`/angebot-anfragen/geg-nachweis-wohnen-anfragen?uid=${ausweis.uid}`,
|
||||
`/angebot-anfragen/geg-nachweis-wohnen-anfragen?uid=${ausweis.id}`,
|
||||
[Enums.Ausweisart.GEGNachweisGewerbe]:
|
||||
`/angebot-anfragen/geg-nachweis-gewerbe-anfragen?uid=${ausweis.uid}`,
|
||||
`/angebot-anfragen/geg-nachweis-gewerbe-anfragen?uid=${ausweis.id}`,
|
||||
[Enums.Ausweisart.BedarfsausweisGewerbe]:
|
||||
`/angebot-anfragen/bedarfsausweis-gewerbe-anfragen?uid=${ausweis.uid}`,
|
||||
`/angebot-anfragen/bedarfsausweis-gewerbe-anfragen?uid=${ausweis.id}`,
|
||||
}[ausweisart];
|
||||
|
||||
async function anfordern() {
|
||||
@@ -237,11 +237,11 @@
|
||||
window.history.pushState(
|
||||
{},
|
||||
"",
|
||||
`${location.pathname}?uid=${ausweis.uid}`
|
||||
`${location.pathname}?uid=${ausweis.id}`
|
||||
);
|
||||
|
||||
localStorage.clear();
|
||||
window.location.href = `/speichern-erfolgreich?uid=${ausweis.uid}`
|
||||
window.location.href = `/speichern-erfolgreich?uid=${ausweis.id}`
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,10 +294,10 @@
|
||||
}
|
||||
|
||||
try {
|
||||
let uid: string, checkout_url: string | undefined;
|
||||
let id: string, checkout_url: string | undefined;
|
||||
|
||||
if (rechnung) {
|
||||
const result = await api.rechnung._uid.PATCH.fetch({
|
||||
const result = await api.rechnung._id.PATCH.fetch({
|
||||
bezahlmethode: aktiveBezahlmethode,
|
||||
abweichende_versand_adresse: abweichende_versand_adresse,
|
||||
empfaenger: empfaenger,
|
||||
@@ -312,14 +312,14 @@
|
||||
versand_zusatzzeile: versand_zusatzzeile
|
||||
}, {
|
||||
params: {
|
||||
uid: rechnung.uid
|
||||
id: rechnung.id
|
||||
},
|
||||
headers: {
|
||||
Authorization: `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`,
|
||||
},
|
||||
})
|
||||
|
||||
uid = result.uid
|
||||
id = result.id
|
||||
checkout_url = result.checkout_url
|
||||
} else {
|
||||
const result = await api.rechnung.PUT.fetch(
|
||||
@@ -339,7 +339,7 @@
|
||||
versand_plz: versand_plz,
|
||||
versand_ort: versand_ort,
|
||||
telefon: telefon,
|
||||
ausweis_uid: ausweis.uid
|
||||
ausweis_id: ausweis.id
|
||||
},
|
||||
{
|
||||
headers: {
|
||||
@@ -348,7 +348,7 @@
|
||||
}
|
||||
);
|
||||
|
||||
uid = result.uid;
|
||||
id = result.id;
|
||||
checkout_url = result.checkout_url;
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
localStorage.clear();
|
||||
|
||||
if (aktiveBezahlmethode === Enums.Bezahlmethoden.rechnung) {
|
||||
window.location.href = `/payment/success?r=${uid}&a=${ausweis.uid}`;
|
||||
window.location.href = `/payment/success?r=${id}&a=${ausweis.id}`;
|
||||
} else {
|
||||
window.location.href = checkout_url as string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user