Add events
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
b2968c8cfc
commit
20d53177d4
|
@ -76,6 +76,8 @@ Alpine.data('form', () => ({
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
_paq.push(['trackEvent', 'anfrage', 'dateValidated', 'result', response.data.result]);
|
||||||
|
|
||||||
tippy('[data-tippy-target]', {
|
tippy('[data-tippy-target]', {
|
||||||
content: response.data.result ? 'Dieser Termin ist voraussichtlich verfügbar' : 'Dieser Termin ist leider nicht buchbar',
|
content: response.data.result ? 'Dieser Termin ist voraussichtlich verfügbar' : 'Dieser Termin ist leider nicht buchbar',
|
||||||
showOnCreate: true,
|
showOnCreate: true,
|
||||||
|
@ -105,12 +107,15 @@ Alpine.data('form', () => ({
|
||||||
behaviour: 'smooth',
|
behaviour: 'smooth',
|
||||||
});
|
});
|
||||||
this.sending = false;
|
this.sending = false;
|
||||||
|
_paq.push(['trackEvent', 'anfrage', 'submitted']);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.sending = false;
|
this.sending = false;
|
||||||
if (!e instanceof axios.AxiosError || !e.response || !e.response.data || !e.response.data['X_WINTER_ERROR_FIELDS']) {
|
if (!e instanceof axios.AxiosError || !e.response || !e.response.data || !e.response.data['X_WINTER_ERROR_FIELDS']) {
|
||||||
|
_paq.push(['trackEvent', 'anfrage', 'submitInternalError']);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
const errors = e.response.data['X_WINTER_ERROR_FIELDS'];
|
const errors = e.response.data['X_WINTER_ERROR_FIELDS'];
|
||||||
|
_paq.push(['trackEvent', 'anfrage', 'submitValidationFailed']);
|
||||||
Object.keys(errors).forEach((k) => {
|
Object.keys(errors).forEach((k) => {
|
||||||
errors[k].forEach((msg) => error(msg));
|
errors[k].forEach((msg) => error(msg));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue