adrema/resources/js/views/member/VForm.vue

174 lines
11 KiB
Vue
Raw Normal View History

2021-06-22 00:22:30 +02:00
<template>
2023-04-29 23:41:26 +02:00
<page-layout>
2023-05-20 02:38:38 +02:00
<template #toolbar>
2023-05-19 01:06:46 +02:00
<page-toolbar-button :href="meta.links.index" color="primary" icon="undo">zurück</page-toolbar-button>
2024-02-01 22:28:37 +01:00
<page-toolbar-button v-if="mode === 'edit'" :href="data.links.show" color="primary" icon="eye">anschauen</page-toolbar-button>
2023-05-20 02:38:38 +02:00
</template>
Update to vue 3 Squashed commit of the following: commit a91f51113b9680a0dd343aa8ab9b7bfaf6e8833b Author: Philipp Lang <privat@zoomyboy.de> Date: Thu Jul 6 13:55:42 2023 +0200 change toast position commit d99771122067d125404181580374e4497fa356b4 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 18:26:15 2023 +0200 Add tooltips commit c65efb92592a46b63d738a39c2205787bf8fc37a Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 18:01:20 2023 +0200 Add prettier commit fc0ecd6a6b93d867a498960d3c7613b087b3147e Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 17:57:56 2023 +0200 Fix toolbar button tooltip commit 4c2b2463ff9ab90a0f96a0909d5773c845962b38 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 17:39:38 2023 +0200 Fixed maildispatcher index button commit 33e46bb38880d16d236f6e4673d0a2efd58a3bff Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 17:37:40 2023 +0200 Fix mailgateway form commit ffb0a0ba120c447f162ea592cf87ec6ad51b4391 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 17:34:30 2023 +0200 Fix filter for Maildispatcher commit 64548178c0d65c5b69eee59cdafcf38d0d053a21 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 17:13:11 2023 +0200 Add back button to initialize commit 401d138e647e049058ee2821af7ee9e30d7786ec Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:42:21 2023 +0200 Fix settings success message commit 1e09006f5b73696e1fc0272dcb3112ea84392d2d Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:38:00 2023 +0200 Fix save button in Settings commit ad21a2a3bf28a61472c469fe64a704737bc54d69 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:32:11 2023 +0200 Fix event name commit cb7df3f5acc774b864a688a9e61cba9ac481fa7c Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:29:58 2023 +0200 Fix event name commit 46c52237de412397f88f4948a5617fb42fe7d142 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:27:17 2023 +0200 Fixed hasFlash messages commit 37b9e724cde5af7458be9847550334e62345e15b Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:27:00 2023 +0200 Fix pagination reload event commit a9be327a59680ff11d5f76356f64523fa06fd300 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:26:37 2023 +0200 Remove console log commit 39119c5be593074018cac883af45104f87a7640a Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:04:52 2023 +0200 Fix notification component in InstallLayout commit a867053cd1283ce5fed0139e2ab66de804d7657a Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 03:08:20 2023 +0200 Remove console log commit 637338ad3456232892966e2d43fd3587e739f10e Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 03:07:23 2023 +0200 Fix: import toasted commit d190f814a23584f2f1de500e49e3b137eb8f4cfc Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 03:07:05 2023 +0200 Update hasFlash toast commit 6cd96ef5eafbbb3db8c0d21869bf3c91557d758c Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 03:06:38 2023 +0200 Add toast notification on axios error commit 1ba3d221e7e5fa2fd19d3d316de45c3daa6bedf8 Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 01:34:40 2023 +0200 Fix save button in activity VForm commit 8089f8f0834a6dc64b959f2574e9fddcaa2724a8 Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 01:32:03 2023 +0200 Lint commit cba4f25d317eba277baf527e61d4a810bbe03107 Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 01:31:15 2023 +0200 Fix import for subactivity form commit 83bbf9c4c44aea7ff33869e8ae27b86dba59985f Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 15:44:33 2023 +0200 Drop leaflet map commit f8d1fe08fa146ae8c637873add8901a2f6e5b0b2 Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 15:29:51 2023 +0200 fix toolbar commit 44c48ec02b0a27e6296d5107fb53c99ad846aeb3 Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 14:28:49 2023 +0200 install new inertia middleware commit b9b9cde58918d40e530afa8786e54a0f9eba2b73 Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 13:49:33 2023 +0200 Update save button commit 8c1e9b143a2349bf33e934a21a039c8966d8e143 Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 13:40:06 2023 +0200 fix select commit 46b6418f84e9bfc4ec5ce1ab9e6b02669fe7227d Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 13:09:08 2023 +0200 update select commit ea274669fded1fb905c89cd20b62f672b8f7b57a Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 13:07:22 2023 +0200 fix switch commit 048f9f1324c5c54f13d45f0a819855bb8274df6f Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 12:15:38 2023 +0200 fix components commit e4700e06aaa912d519d0313e2f2e76288e12dd9b Author: Philipp Lang <privat@zoomyboy.de> Date: Thu Jun 22 16:34:44 2023 +0200 vue3 update commit 2b196f2bd285e843ca86cd624f0dadbefe759786 Author: Philipp Lang <privat@zoomyboy.de> Date: Thu Jun 22 13:08:55 2023 +0200 Add page title commit 30dfc5dca25b95ff5f25b976ae66c1ff350b0ebe Author: Philipp Lang <privat@zoomyboy.de> Date: Thu Jun 22 12:59:47 2023 +0200 Fix map commit 43f7d335f32691f1b02dcbbd4d01943dd4b7c752 Author: Philipp Lang <privat@zoomyboy.de> Date: Thu Jun 22 12:58:33 2023 +0200 Update inertia
2023-07-06 13:56:19 +02:00
<template #right>
2023-05-19 01:06:46 +02:00
<f-save-button form="memberedit"></f-save-button>
Update to vue 3 Squashed commit of the following: commit a91f51113b9680a0dd343aa8ab9b7bfaf6e8833b Author: Philipp Lang <privat@zoomyboy.de> Date: Thu Jul 6 13:55:42 2023 +0200 change toast position commit d99771122067d125404181580374e4497fa356b4 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 18:26:15 2023 +0200 Add tooltips commit c65efb92592a46b63d738a39c2205787bf8fc37a Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 18:01:20 2023 +0200 Add prettier commit fc0ecd6a6b93d867a498960d3c7613b087b3147e Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 17:57:56 2023 +0200 Fix toolbar button tooltip commit 4c2b2463ff9ab90a0f96a0909d5773c845962b38 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 17:39:38 2023 +0200 Fixed maildispatcher index button commit 33e46bb38880d16d236f6e4673d0a2efd58a3bff Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 17:37:40 2023 +0200 Fix mailgateway form commit ffb0a0ba120c447f162ea592cf87ec6ad51b4391 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 17:34:30 2023 +0200 Fix filter for Maildispatcher commit 64548178c0d65c5b69eee59cdafcf38d0d053a21 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 17:13:11 2023 +0200 Add back button to initialize commit 401d138e647e049058ee2821af7ee9e30d7786ec Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:42:21 2023 +0200 Fix settings success message commit 1e09006f5b73696e1fc0272dcb3112ea84392d2d Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:38:00 2023 +0200 Fix save button in Settings commit ad21a2a3bf28a61472c469fe64a704737bc54d69 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:32:11 2023 +0200 Fix event name commit cb7df3f5acc774b864a688a9e61cba9ac481fa7c Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:29:58 2023 +0200 Fix event name commit 46c52237de412397f88f4948a5617fb42fe7d142 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:27:17 2023 +0200 Fixed hasFlash messages commit 37b9e724cde5af7458be9847550334e62345e15b Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:27:00 2023 +0200 Fix pagination reload event commit a9be327a59680ff11d5f76356f64523fa06fd300 Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:26:37 2023 +0200 Remove console log commit 39119c5be593074018cac883af45104f87a7640a Author: philipp lang <philipp@aweos.de> Date: Sun Jul 2 00:04:52 2023 +0200 Fix notification component in InstallLayout commit a867053cd1283ce5fed0139e2ab66de804d7657a Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 03:08:20 2023 +0200 Remove console log commit 637338ad3456232892966e2d43fd3587e739f10e Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 03:07:23 2023 +0200 Fix: import toasted commit d190f814a23584f2f1de500e49e3b137eb8f4cfc Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 03:07:05 2023 +0200 Update hasFlash toast commit 6cd96ef5eafbbb3db8c0d21869bf3c91557d758c Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 03:06:38 2023 +0200 Add toast notification on axios error commit 1ba3d221e7e5fa2fd19d3d316de45c3daa6bedf8 Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 01:34:40 2023 +0200 Fix save button in activity VForm commit 8089f8f0834a6dc64b959f2574e9fddcaa2724a8 Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 01:32:03 2023 +0200 Lint commit cba4f25d317eba277baf527e61d4a810bbe03107 Author: philipp lang <philipp@aweos.de> Date: Sat Jul 1 01:31:15 2023 +0200 Fix import for subactivity form commit 83bbf9c4c44aea7ff33869e8ae27b86dba59985f Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 15:44:33 2023 +0200 Drop leaflet map commit f8d1fe08fa146ae8c637873add8901a2f6e5b0b2 Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 15:29:51 2023 +0200 fix toolbar commit 44c48ec02b0a27e6296d5107fb53c99ad846aeb3 Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 14:28:49 2023 +0200 install new inertia middleware commit b9b9cde58918d40e530afa8786e54a0f9eba2b73 Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 13:49:33 2023 +0200 Update save button commit 8c1e9b143a2349bf33e934a21a039c8966d8e143 Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 13:40:06 2023 +0200 fix select commit 46b6418f84e9bfc4ec5ce1ab9e6b02669fe7227d Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 13:09:08 2023 +0200 update select commit ea274669fded1fb905c89cd20b62f672b8f7b57a Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 13:07:22 2023 +0200 fix switch commit 048f9f1324c5c54f13d45f0a819855bb8274df6f Author: Philipp Lang <privat@zoomyboy.de> Date: Fri Jun 30 12:15:38 2023 +0200 fix components commit e4700e06aaa912d519d0313e2f2e76288e12dd9b Author: Philipp Lang <privat@zoomyboy.de> Date: Thu Jun 22 16:34:44 2023 +0200 vue3 update commit 2b196f2bd285e843ca86cd624f0dadbefe759786 Author: Philipp Lang <privat@zoomyboy.de> Date: Thu Jun 22 13:08:55 2023 +0200 Add page title commit 30dfc5dca25b95ff5f25b976ae66c1ff350b0ebe Author: Philipp Lang <privat@zoomyboy.de> Date: Thu Jun 22 12:59:47 2023 +0200 Fix map commit 43f7d335f32691f1b02dcbbd4d01943dd4b7c752 Author: Philipp Lang <privat@zoomyboy.de> Date: Thu Jun 22 12:58:33 2023 +0200 Update inertia
2023-07-06 13:56:19 +02:00
</template>
2023-11-24 14:46:18 +01:00
<form id="memberedit" class="flex grow relative" @submit.prevent="submit">
<ui-popup v-if="conflict === true" heading="Ein Konflikt ist aufgetreten">
2023-04-29 23:41:26 +02:00
<div>
2024-02-01 22:28:37 +01:00
<p class="mt-4">Dieses Mitglied wurde vorher bereits aktualisiert. Daher könnte ein Update zu Datenverlust führen.</p>
<p class="mt-2">Wir empfehlen, die Daten aus NaMi zunächst neu zu synchronisieren und dann die Änderungen hier in der Adrema erneut vorzunehmen.</p>
2023-04-29 23:41:26 +02:00
<div class="grid grid-cols-2 gap-3 mt-6">
2023-11-24 14:46:18 +01:00
<a href="#" class="text-center btn btn-primary" @click.prevent="resync">Neu synchronisieren</a>
<a href="#" class="text-center btn btn-danger" @click.prevent="forceWrite">Änderungen schreiben</a>
2023-04-29 23:41:26 +02:00
</div>
2022-04-29 00:23:28 +02:00
</div>
2023-05-19 01:06:46 +02:00
</ui-popup>
2022-04-29 00:23:28 +02:00
2023-04-29 23:41:26 +02:00
<!-- ***************************** Hauptbereich ****************************** -->
<div class="grow grid md:grid-cols-2 gap-3 p-3">
2023-05-19 01:06:46 +02:00
<ui-box heading="Stammdaten">
2023-04-29 23:41:26 +02:00
<div class="grid sm:grid-cols-2 gap-3">
<div class="grid grid-cols-2 gap-3">
2024-02-01 22:28:37 +01:00
<f-select id="gender_id" v-model="inner.gender_id" name="gender_id" :options="meta.genders" label="Geschlecht" size="sm"></f-select>
2023-04-29 23:41:26 +02:00
<f-text id="salutation" v-model="inner.salutation" size="sm" label="Anrede"></f-text>
</div>
2024-02-01 22:28:37 +01:00
<f-select id="nationality_id" v-model="inner.nationality_id" :options="meta.nationalities" label="Staatsangehörigkeit" name="nationality_id" size="sm"></f-select>
2023-04-29 23:41:26 +02:00
<f-text id="firstname" v-model="inner.firstname" size="sm" label="Vorname" required></f-text>
<f-text id="lastname" v-model="inner.lastname" size="sm" label="Nachname" required></f-text>
2023-07-24 16:55:07 +02:00
<f-text id="address" v-model="inner.address" size="sm" label="Adresse"></f-text>
2024-02-01 22:28:37 +01:00
<f-text id="further_address" v-model="inner.further_address" size="sm" label="Adresszusatz"></f-text>
2023-07-24 16:55:07 +02:00
<f-text id="zip" v-model="inner.zip" size="sm" label="PLZ"></f-text>
<f-text id="location" v-model="inner.location" size="sm" label="Ort"></f-text>
2023-11-24 14:46:18 +01:00
<f-text id="birthday" v-model="inner.birthday" type="date" size="sm" label="Geburtsdatum"></f-text>
2024-02-01 22:28:37 +01:00
<f-select id="region_id" v-model="inner.region_id" :options="meta.regions" name="region_id" label="Bundesland" size="sm"></f-select>
<f-select id="country_id" v-model="inner.country_id" :options="meta.countries" label="Land" name="country_id" size="sm" required></f-select>
<f-text id="other_country" v-model="inner.other_country" label="Andere Staatsangehörigkeit" size="sm"></f-text>
2023-02-27 22:40:47 +01:00
</div>
2023-05-19 01:06:46 +02:00
</ui-box>
<ui-box heading="Kontakt">
2023-04-29 23:41:26 +02:00
<div class="grid gap-3 sm:grid-cols-2">
<f-text id="main_phone" v-model="inner.main_phone" size="sm" label="Telefon (Eltern)"></f-text>
<f-text id="mobile_phone" v-model="inner.mobile_phone" size="sm" label="Handy (Eltern)"></f-text>
2024-02-01 22:28:37 +01:00
<f-text id="work_phone" v-model="inner.work_phone" size="sm" label="Tel geschäftlich (Eltern)"></f-text>
<f-text id="children_phone" v-model="inner.children_phone" size="sm" label="Telefon (Kind)"></f-text>
2023-04-29 23:41:26 +02:00
<f-text id="email" v-model="inner.email" size="sm" label="E-Mail"></f-text>
<f-text id="email_parents" v-model="inner.email_parents" size="sm" label="E-Mail eltern"></f-text>
<f-text id="fax" v-model="inner.fax" size="sm" label="Fax"></f-text>
2024-02-01 22:28:37 +01:00
<f-textarea id="letter_address" v-model="inner.letter_address" class="sm:col-span-2" rows="3" label="Brief-Adresse" size="sm"></f-textarea>
2022-04-28 23:20:41 +02:00
</div>
2023-05-19 01:06:46 +02:00
</ui-box>
<ui-box heading="System">
2023-04-29 23:41:26 +02:00
<div class="grid gap-3">
2024-02-01 22:28:37 +01:00
<f-select id="bill_kind" v-model="inner.bill_kind" :options="meta.billKinds" label="Rechnung versenden über" name="bill_kind" size="sm"></f-select>
<f-select id="subscription_id" v-model="inner.subscription_id" :options="meta.subscriptions" label="Beitrag" name="subscription_id" size="sm"></f-select>
2023-11-24 14:46:18 +01:00
<f-switch id="has_nami" v-model="inner.has_nami" size="sm" label="In Nami eintragen"></f-switch>
2024-02-01 22:28:37 +01:00
<f-switch id="send_newspaper" v-model="inner.send_newspaper" label="Mittendrin versenden" size="sm"></f-switch>
<f-text id="joined_at" v-model="inner.joined_at" class="sm:col-span-2" type="date" label="Eintrittsdatum" size="sm" required></f-text>
<f-textarea id="comment" v-model="inner.comment" rows="3" class="col-span-2" label="Kommentar" size="sm"></f-textarea>
<div v-if="mode === 'create' || (original.has_nami === false && inner.has_nami === true)" class="contents">
<f-select
id="first_activity_id"
v-model="inner.first_activity_id"
:options="meta.formCreateActivities"
label="Erste Tätigkeit"
name="first_activity_id"
size="sm"
required
></f-select>
<f-select
v-if="inner.first_activity_id"
id="first_subactivity_id"
2023-11-24 14:46:18 +01:00
v-model="inner.first_subactivity_id"
:options="meta.formCreateSubactivities[inner.first_activity_id]"
2024-02-01 22:28:37 +01:00
label="Erste Untertätigkeit"
name="first_subactivity_id"
size="sm"
required
></f-select>
2022-12-02 00:42:06 +01:00
</div>
2023-04-29 23:41:26 +02:00
</div>
2023-05-19 01:06:46 +02:00
</ui-box>
<ui-box heading="Prävention">
2023-05-09 09:46:04 +02:00
<div class="grid sm:grid-cols-[minmax(min-content,max-content)_minmax(min-content,max-content)] gap-2">
<div class="grid grid-cols-[minmax(min-content,max-content)_8rem] gap-1">
2023-04-29 23:41:26 +02:00
<f-switch id="has_efz" v-model="hasEfz" size="sm" label="Führungszeugnis eingesehen"></f-switch>
<div>
2024-02-01 22:28:37 +01:00
<f-text v-if="inner.efz !== null" id="efz" v-model="inner.efz" type="date" label="am" size="sm"></f-text>
2023-04-29 23:41:26 +02:00
</div>
<f-switch id="has_ps" v-model="hasPs" size="sm" label="Hat Präventionsschulung"></f-switch>
<div>
2024-02-01 22:28:37 +01:00
<f-text v-if="inner.ps_at !== null" id="ps_at" v-model="inner.ps_at" type="date" label="am" size="sm"></f-text>
2023-04-29 23:41:26 +02:00
</div>
2024-02-01 22:28:37 +01:00
<f-switch id="has_more_ps" v-model="hasMorePs" size="sm" label="Hat Vertiefungsschulung"></f-switch>
2023-04-29 23:41:26 +02:00
<div>
2024-02-01 22:28:37 +01:00
<f-text v-if="inner.more_ps_at !== null" id="more_ps_at" v-model="inner.more_ps_at" type="date" label="am" size="sm"></f-text>
2023-04-29 23:41:26 +02:00
</div>
2024-02-01 22:28:37 +01:00
<f-switch id="is_recertified" v-model="isRecertified" size="sm" label="Hat Rezertifizierung"></f-switch>
2023-04-29 23:41:26 +02:00
<div>
2024-02-01 22:28:37 +01:00
<f-text v-if="inner.recertified_at !== null" id="recertified_at" v-model="inner.recertified_at" type="date" label="am" size="sm"></f-text>
2023-04-29 23:41:26 +02:00
</div>
2024-02-01 22:28:37 +01:00
<f-switch id="has_without_education" v-model="hasWithoutEducation" label="Einsatz ohne Schulung" size="sm"></f-switch>
2023-04-29 23:41:26 +02:00
<div>
2024-02-01 22:28:37 +01:00
<f-text v-if="inner.without_education_at !== null" id="without_education_at" v-model="inner.without_education_at" type="date" label="am" size="sm"></f-text>
2023-11-24 13:28:54 +01:00
</div>
2024-02-01 22:28:37 +01:00
<f-switch id="has_without_efz" v-model="hasWithoutEfz" size="sm" label="Einsatz ohne EFZ"></f-switch>
2023-11-24 13:28:54 +01:00
<div>
2024-02-01 22:28:37 +01:00
<f-text v-if="inner.without_efz_at !== null" id="without_efz_at" v-model="inner.without_efz_at" type="date" label="am" size="sm"></f-text>
2023-04-29 23:41:26 +02:00
</div>
2022-12-02 00:42:06 +01:00
</div>
2023-04-29 23:41:26 +02:00
<div class="grid gap-1">
2023-11-24 14:46:18 +01:00
<f-switch id="has_svk" v-model="inner.has_svk" size="sm" label="SVK unterschrieben"></f-switch>
2024-02-01 22:28:37 +01:00
<f-switch id="has_vk" v-model="inner.has_vk" size="sm" label="Verhaltenskodex unterschrieben"></f-switch>
<f-switch id="multiply_pv" v-model="inner.multiply_pv" label="Multiplikator*in Präventionsschulung" size="sm"></f-switch>
<f-switch id="multiply_more_pv" v-model="inner.multiply_more_pv" label="Multiplikator*in Vertiefungsschulung" size="sm"></f-switch>
2022-12-02 00:42:06 +01:00
</div>
</div>
2023-05-19 01:06:46 +02:00
</ui-box>
2023-04-29 23:41:26 +02:00
</div>
</form>
</page-layout>
2021-06-22 00:22:30 +02:00
</template>
<script>
2022-04-28 23:20:41 +02:00
function issetComputed(val) {
return {
set(v) {
this.inner[val] = v ? '' : null;
},
get() {
return this.inner[val] !== null;
},
};
}
2021-06-22 00:22:30 +02:00
export default {
props: {
mode: {},
data: {},
2022-04-29 00:23:28 +02:00
conflict: {},
2023-05-02 23:13:00 +02:00
meta: {},
2021-06-22 00:22:30 +02:00
},
2023-11-24 14:46:18 +01:00
data: function () {
return {
2024-02-01 22:28:37 +01:00
original: {...this.data},
inner: {...this.data},
2023-11-24 14:46:18 +01:00
active: 0,
};
},
2021-06-22 00:22:30 +02:00
methods: {
submit() {
2023-03-07 09:49:06 +01:00
this.mode === 'create' ? this.$inertia.post(`/member`, this.inner) : this.$inertia.patch(`/member/${this.inner.id}`, this.inner);
2022-04-28 23:20:41 +02:00
},
2022-04-29 00:57:24 +02:00
resync() {
this.$inertia.get(`/member/${this.inner.id}/resync`);
},
2024-02-01 22:28:37 +01:00
forceWrite() {},
2022-04-29 00:23:28 +02:00
},
2021-06-22 00:22:30 +02:00
computed: {
2022-04-28 23:20:41 +02:00
hasEfz: issetComputed('efz'),
hasPs: issetComputed('ps_at'),
hasMorePs: issetComputed('more_ps_at'),
2023-11-24 13:28:54 +01:00
isRecertified: issetComputed('recertified_at'),
2022-04-28 23:20:41 +02:00
hasWithoutEfz: issetComputed('without_efz_at'),
hasWithoutEducation: issetComputed('without_education_at'),
2021-06-22 00:22:30 +02:00
},
};
</script>