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]', {
|
||||
content: response.data.result ? 'Dieser Termin ist voraussichtlich verfügbar' : 'Dieser Termin ist leider nicht buchbar',
|
||||
showOnCreate: true,
|
||||
|
@ -105,12 +107,15 @@ Alpine.data('form', () => ({
|
|||
behaviour: 'smooth',
|
||||
});
|
||||
this.sending = false;
|
||||
_paq.push(['trackEvent', 'anfrage', 'submitted']);
|
||||
} catch (e) {
|
||||
this.sending = false;
|
||||
if (!e instanceof axios.AxiosError || !e.response || !e.response.data || !e.response.data['X_WINTER_ERROR_FIELDS']) {
|
||||
_paq.push(['trackEvent', 'anfrage', 'submitInternalError']);
|
||||
throw e;
|
||||
}
|
||||
const errors = e.response.data['X_WINTER_ERROR_FIELDS'];
|
||||
_paq.push(['trackEvent', 'anfrage', 'submitValidationFailed']);
|
||||
Object.keys(errors).forEach((k) => {
|
||||
errors[k].forEach((msg) => error(msg));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue