Remove name prop from f-text component

This commit is contained in:
philipp lang 2024-06-28 12:43:05 +02:00
parent 1ef8cfdec8
commit dd4468808b
25 changed files with 160 additions and 156 deletions

View File

@ -6,7 +6,7 @@
</span> </span>
<div class="relative flex-none flex"> <div class="relative flex-none flex">
<input <input
:name="name" :id="id"
:type="type" :type="type"
:value="transformedValue" :value="transformedValue"
:disabled="disabled" :disabled="disabled"
@ -114,7 +114,7 @@ const props = defineProps({
}, },
modelValue: { modelValue: {
type: String, type: String,
default: () => '', required: true,
}, },
label: { label: {
type: String, type: String,
@ -136,10 +136,6 @@ const props = defineProps({
type: Number, type: Number,
default: () => undefined, default: () => undefined,
}, },
name: {
required: true,
type: String,
},
}); });
const focus = ref(false); const focus = ref(false);

View File

@ -5,15 +5,15 @@
<div class="prose prose-invert"> <div class="prose prose-invert">
<p>Bitte gib deine NaMi-Zugangsdaten ein,<br />um eine erste Synchronisation durchzuführen.</p> <p>Bitte gib deine NaMi-Zugangsdaten ein,<br />um eine erste Synchronisation durchzuführen.</p>
</div> </div>
<form @submit.prevent="check" class="grid gap-3 mt-5"> <form class="grid gap-3 mt-5" @submit.prevent="check">
<f-text v-model="values.mglnr" label="Mitgliedsnummer" name="mglnr" id="mglnr" type="tel" required></f-text> <f-text id="mglnr" v-model="values.mglnr" label="Mitgliedsnummer" type="tel" required></f-text>
<f-text v-model="values.password" type="password" label="Passwort" name="password" id="password" required></f-text> <f-text id="password" v-model="values.password" type="password" label="Passwort" required></f-text>
<ui-button class="mt-6" :is-loading="loading" type="submit">Weiter</ui-button> <ui-button class="mt-6" :is-loading="loading" type="submit">Weiter</ui-button>
</form> </form>
</div> </div>
<div v-if="step === 1" class="grid grid-cols-5 w-full gap-3"> <div v-if="step === 1" class="grid grid-cols-5 w-full gap-3">
<page-full-heading class="col-span-full !mb-0">Suchkriterien festlegen</page-full-heading> <page-full-heading class="col-span-full !mb-0">Suchkriterien festlegen</page-full-heading>
<form @submit.prevent="storeSearch" class="border-2 border-primary-800 border-solid p-3 rounded-lg grid gap-3 col-span-2"> <form class="border-2 border-primary-800 border-solid p-3 rounded-lg grid gap-3 col-span-2" @submit.prevent="storeSearch">
<div class="prose prose-invert max-w-none col-span-full"> <div class="prose prose-invert max-w-none col-span-full">
<p> <p>
Lege hier die Suchkriterien für den Abruf der Mitglieder-Daten fest. Mit diesen Suchkriterien wird im Anschluss eine Mitgliedersuche in NaMi durchgeführt. Alle Mitglieder, die Lege hier die Suchkriterien für den Abruf der Mitglieder-Daten fest. Mit diesen Suchkriterien wird im Anschluss eine Mitgliedersuche in NaMi durchgeführt. Alle Mitglieder, die
@ -21,71 +21,71 @@
</p> </p>
</div> </div>
<f-select <f-select
id="gruppierung1Id"
v-model="values.params.gruppierung1Id" v-model="values.params.gruppierung1Id"
label="Diözesan-Gruppierung" label="Diözesan-Gruppierung"
name="gruppierung1Id" name="gruppierung1Id"
id="gruppierung1Id"
size="sm" size="sm"
:options="searchLayerOptions[0]" :options="searchLayerOptions[0]"
@update:modelValue="loadSearchLayer(1, $event, search)"
hint="Gruppierungs-Nummer einer Diözese, auf die die Mitglieder passen sollen. I.d.R. ist das die Gruppierungsnummer deiner Diözese. Entspricht dem Feld '1. Ebene' in der NaMi Suche." hint="Gruppierungs-Nummer einer Diözese, auf die die Mitglieder passen sollen. I.d.R. ist das die Gruppierungsnummer deiner Diözese. Entspricht dem Feld '1. Ebene' in der NaMi Suche."
@update:modelValue="loadSearchLayer(1, $event, search)"
></f-select> ></f-select>
<f-select <f-select
id="gruppierung2Id"
v-model="values.params.gruppierung2Id" v-model="values.params.gruppierung2Id"
label="Bezirks-Gruppierung" label="Bezirks-Gruppierung"
name="gruppierung2Id" name="gruppierung2Id"
id="gruppierung2Id"
hint="Gruppierungs-Nummer eines Bezirks, auf die die Mitglieder passen sollen. I.d.R. ist das die Gruppierungsnummer deines Bezirks. Entspricht dem Feld '2. Ebene' in der NaMi Suche. Fülle dieses Feld aus, um Mitglieder auf einen bestimmten Bezirk zu begrenzen." hint="Gruppierungs-Nummer eines Bezirks, auf die die Mitglieder passen sollen. I.d.R. ist das die Gruppierungsnummer deines Bezirks. Entspricht dem Feld '2. Ebene' in der NaMi Suche. Fülle dieses Feld aus, um Mitglieder auf einen bestimmten Bezirk zu begrenzen."
:disabled="!values.params.gruppierung1Id" :disabled="!values.params.gruppierung1Id"
@update:modelValue="loadSearchLayer(2, $event, search)"
size="sm" size="sm"
:options="searchLayerOptions[1]" :options="searchLayerOptions[1]"
@update:modelValue="loadSearchLayer(2, $event, search)"
></f-select> ></f-select>
<f-select <f-select
id="gruppierung3Id"
v-model="values.params.gruppierung3Id" v-model="values.params.gruppierung3Id"
label="Stammes-Gruppierung" label="Stammes-Gruppierung"
name="gruppierung3Id" name="gruppierung3Id"
id="gruppierung3Id"
size="sm" size="sm"
@update:modelValue="search"
hint="Gruppierungs-Nummer deines Stammes, auf die die Mitglieder passen sollen. I.d.R. ist das die Gruppierungsnummer deines Stammes. Entspricht dem Feld '3. Ebene' in der NaMi Suche. Fülle dieses Feld aus, um Mitglieder auf einen bestimmten Stamm zu beschränken." hint="Gruppierungs-Nummer deines Stammes, auf die die Mitglieder passen sollen. I.d.R. ist das die Gruppierungsnummer deines Stammes. Entspricht dem Feld '3. Ebene' in der NaMi Suche. Fülle dieses Feld aus, um Mitglieder auf einen bestimmten Stamm zu beschränken."
:disabled="!values.params.gruppierung1Id || !values.params.gruppierung2Id" :disabled="!values.params.gruppierung1Id || !values.params.gruppierung2Id"
:options="searchLayerOptions[2]" :options="searchLayerOptions[2]"
@update:modelValue="search"
></f-select> ></f-select>
<f-select <f-select
id="mglStatusId"
v-model="values.params.mglStatusId" v-model="values.params.mglStatusId"
label="Mitglieds-Status" label="Mitglieds-Status"
name="mglStatusId" name="mglStatusId"
id="mglStatusId"
size="sm" size="sm"
@update:modelValue="search"
:options="states" :options="states"
hint="Wähle hier etwas aus, um nur aktive oder nur inaktive Mitglieder zu synchronisieren. Wir empfehlen dir, dies so zu belassen und Mitglieder ohne 'Datenweiterverwendung' gänzlich zu löschen, um Karteileichen zu entfernen." hint="Wähle hier etwas aus, um nur aktive oder nur inaktive Mitglieder zu synchronisieren. Wir empfehlen dir, dies so zu belassen und Mitglieder ohne 'Datenweiterverwendung' gänzlich zu löschen, um Karteileichen zu entfernen."
@update:modelValue="search"
></f-select> ></f-select>
<f-switch <f-switch
id="inGrp"
v-model="values.params.inGrp" v-model="values.params.inGrp"
label="In Gruppierung suchen" label="In Gruppierung suchen"
name="inGrp" name="inGrp"
id="inGrp"
@update:modelValue="search"
hint="Mitglieder finden, die direktes Mitglied in der kleinsten befüllten Gruppierung sind." hint="Mitglieder finden, die direktes Mitglied in der kleinsten befüllten Gruppierung sind."
size="sm" size="sm"
@update:modelValue="search"
></f-switch> ></f-switch>
<f-switch <f-switch
id="unterhalbGrp"
v-model="values.params.unterhalbGrp" v-model="values.params.unterhalbGrp"
label="Unterhalb Gruppierung suchen" label="Unterhalb Gruppierung suchen"
name="unterhalbGrp" name="unterhalbGrp"
id="unterhalbGrp"
@update:modelValue="search"
hint="Mitglieder finden, die direktes Mitglied in einer Untergruppe der kleinsten befüllten Gruppierung sind." hint="Mitglieder finden, die direktes Mitglied in einer Untergruppe der kleinsten befüllten Gruppierung sind."
size="sm" size="sm"
@update:modelValue="search"
></f-switch> ></f-switch>
<div class="col-span-full flex justify-center"> <div class="col-span-full flex justify-center">
<ui-button :is-loading="loading" class="!px-10" type="submit">Weiter</ui-button> <ui-button :is-loading="loading" class="!px-10" type="submit">Weiter</ui-button>
</div> </div>
</form> </form>
<section class="col-span-3 text-sm col-span-3" v-if="preview !== null && preview.data.length"> <section v-if="preview !== null && preview.data.length" class="col-span-3 text-sm col-span-3">
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm hidden md:table"> <table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm hidden md:table">
<thead> <thead>
<th>GruppierungsNr</th> <th>GruppierungsNr</th>
@ -108,7 +108,7 @@
<ui-pagination class="mt-4" :value="preview" @reload="reloadPage"></ui-pagination> <ui-pagination class="mt-4" :value="preview" @reload="reloadPage"></ui-pagination>
</div> </div>
</section> </section>
<section class="col-span-3 items-center justify-center flex text-xl text-gray-200 border-2 border-primary-800 border-solid p-3 rounded-lg mt-4" v-else>Keine Mitglieder gefunden</section> <section v-else class="col-span-3 items-center justify-center flex text-xl text-gray-200 border-2 border-primary-800 border-solid p-3 rounded-lg mt-4">Keine Mitglieder gefunden</section>
</div> </div>
<div v-if="step === 2"> <div v-if="step === 2">
<page-full-heading>Standard-Gruppierung</page-full-heading> <page-full-heading>Standard-Gruppierung</page-full-heading>
@ -117,8 +117,8 @@
<p>Dieser Gruppierung werden Mitglieder automatisch zugeordnet,<br />falls nichts anderes angegeben wurde.</p> <p>Dieser Gruppierung werden Mitglieder automatisch zugeordnet,<br />falls nichts anderes angegeben wurde.</p>
<p>I.d.R. ist das z.B. die Nummer deines Stammes, wenn du als StaVo mit Adrema Daten verwaltest.</p> <p>I.d.R. ist das z.B. die Nummer deines Stammes, wenn du als StaVo mit Adrema Daten verwaltest.</p>
</div> </div>
<form @submit.prevent="submit" class="grid grid-cols-2 gap-3 mt-5"> <form class="grid grid-cols-2 gap-3 mt-5" @submit.prevent="submit">
<f-text v-model="values.group_id" label="Gruppierungs-Nummer" name="groupId" id="groupId" type="tel" class="col-span-full" required></f-text> <f-text id="groupId" v-model="values.group_id" label="Gruppierungs-Nummer" type="tel" class="col-span-full" required></f-text>
<ui-button class="btn-secondary" @click.prevent="step--">Zurück</ui-button> <ui-button class="btn-secondary" @click.prevent="step--">Zurück</ui-button>
<ui-button type="submit">Weiter</ui-button> <ui-button type="submit">Weiter</ui-button>
</form> </form>
@ -141,9 +141,9 @@ import hasFlash from '../../mixins/hasFlash.js';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
export default { export default {
layout: FullLayout,
mixins: [hasFlash], mixins: [hasFlash],
layout: FullLayout,
data: function () { data: function () {
return { return {

View File

@ -5,8 +5,8 @@
</template> </template>
<form @submit.prevent="submit"> <form @submit.prevent="submit">
<div class="grid gap-5"> <div class="grid gap-5">
<f-text id="email" name="email" label="E-Mail-Adresse" v-model="values.email"></f-text> <f-text id="email" v-model="values.email" label="E-Mail-Adresse"></f-text>
<f-text id="password" name="password" type="password" label="Passwort" v-model="values.password"></f-text> <f-text id="password" v-model="values.password" type="password" label="Passwort"></f-text>
<button type="submit" class="btn btn-primary">Login</button> <button type="submit" class="btn btn-primary">Login</button>
</div> </div>
</form> </form>

View File

@ -15,7 +15,7 @@
></f-select> ></f-select>
<f-select v-model="meta.subactivity_id" :options="props.subactivities[meta.activity_id]" name="subactivity_id" label="Untertätigkeit" size="sm"></f-select> <f-select v-model="meta.subactivity_id" :options="props.subactivities[meta.activity_id]" name="subactivity_id" label="Untertätigkeit" size="sm"></f-select>
<f-select v-model="meta.group_id" :options="props.groups" label="Gruppierung" size="sm" name="group_id"></f-select> <f-select v-model="meta.group_id" :options="props.groups" label="Gruppierung" size="sm" name="group_id"></f-select>
<f-text id="search_text" v-model="searchText" label="Suchen …" size="sm" name="search_text"></f-text> <f-text id="search_text" v-model="searchText" label="Suchen …" size="sm"></f-text>
</div> </div>
<div class="grid gap-2 grid-cols-6 mt-4"> <div class="grid gap-2 grid-cols-6 mt-4">
<f-switch v-for="member in members.hits" :id="`member-${member.id}`" :key="member.id" v-model="selected" :value="member.id" :label="member.fullname" size="sm"></f-switch> <f-switch v-for="member in members.hits" :id="`member-${member.id}`" :key="member.id" v-model="selected" :value="member.id" :label="member.fullname" size="sm"></f-switch>

View File

@ -11,8 +11,8 @@
Merke oder notiere dir dieses Passwort, bevor du das Formular absendest.<br /> Merke oder notiere dir dieses Passwort, bevor du das Formular absendest.<br />
Danach wirst du zum Dashboard weitergeleitet.</span Danach wirst du zum Dashboard weitergeleitet.</span
> >
<f-text id="password" v-model="values.password" type="password" name="password" label="Neues Passwort"></f-text> <f-text id="password" v-model="values.password" type="password" label="Neues Passwort"></f-text>
<f-text id="password_confirmation" v-model="values.password_confirmation" type="password" name="password_confirmation" label="Neues Passwort widerholen"></f-text> <f-text id="password_confirmation" v-model="values.password_confirmation" type="password" label="Neues Passwort widerholen"></f-text>
<button type="submit" class="btn btn-primary">Passwort zurücksetzen</button> <button type="submit" class="btn btn-primary">Passwort zurücksetzen</button>
<div class="flex justify-center"> <div class="flex justify-center">
<button type="button" class="text-gray-500 text-sm hover:text-gray-300" @click.prevent="$inertia.visit('/login')">Zurück zum Login</button> <button type="button" class="text-gray-500 text-sm hover:text-gray-300" @click.prevent="$inertia.visit('/login')">Zurück zum Login</button>

View File

@ -5,12 +5,11 @@
</template> </template>
<form @submit.prevent="submit"> <form @submit.prevent="submit">
<div class="grid gap-5"> <div class="grid gap-5">
<f-text id="email" v-model="values.email" name="email" label="E-Mail-Adresse"></f-text> <f-text id="email" v-model="values.email" label="E-Mail-Adresse"></f-text>
<f-text id="password" v-model="values.password" name="password" type="password" label="Passwort"></f-text> <f-text id="password" v-model="values.password" type="password" label="Passwort"></f-text>
<button type="submit" class="btn btn-primary">Login</button> <button type="submit" class="btn btn-primary">Login</button>
<div class="flex justify-center"> <div class="flex justify-center">
<button type="button" class="text-gray-500 text-sm hover:text-gray-300" <button type="button" class="text-gray-500 text-sm hover:text-gray-300" @click.prevent="$inertia.visit('/password/reset')">Passwort vergessen?</button>
@click.prevent="$inertia.visit('/password/reset')">Passwort vergessen?</button>
</div> </div>
</div> </div>
</form> </form>

View File

@ -1,38 +1,42 @@
<template> <template>
<page-layout> <page-layout>
<form target="_BLANK" class="max-w-4xl w-full mx-auto gap-6 grid-cols-2 grid p-6"> <form target="_BLANK" class="max-w-4xl w-full mx-auto gap-6 grid-cols-2 grid p-6">
<f-text id="eventName" v-model="values.eventName" name="eventName" class="col-span-2" <f-text id="eventName" v-model="values.eventName" class="col-span-2" label="Veranstaltungs-Name" required></f-text>
label="Veranstaltungs-Name" required></f-text> <f-text id="dateFrom" v-model="values.dateFrom" type="date" label="Datum von" required></f-text>
<f-text id="dateFrom" v-model="values.dateFrom" name="dateFrom" type="date" label="Datum von" required></f-text> <f-text id="dateUntil" v-model="values.dateUntil" type="date" label="Datum bis" required></f-text>
<f-text id="dateUntil" v-model="values.dateUntil" name="dateUntil" type="date" label="Datum bis"
required></f-text>
<f-text id="zipLocation" v-model="values.zipLocation" name="zipLocation" label="PLZ / Ort" required></f-text> <f-text id="zipLocation" v-model="values.zipLocation" label="PLZ / Ort" required></f-text>
<f-select id="country" v-model="values.country" :options="countries" name="country" label="Land" <f-select id="country" v-model="values.country" :options="countries" name="country" label="Land" required></f-select>
required></f-select>
<div class="border-gray-200 shadow shadow-primary-700 p-3 shadow-[0_0_4px_gray] col-span-2"> <div class="border-gray-200 shadow shadow-primary-700 p-3 shadow-[0_0_4px_gray] col-span-2">
<f-text id="search_text" ref="searchTextField" v-model="searchText" class="col-span-2" name="search_text" <f-text id="search_text" ref="searchTextField" v-model="searchText" class="col-span-2" label="Suchen …" size="sm" @keypress.enter.prevent="onSubmitFirstMemberResult"></f-text>
label="Suchen …" size="sm" @keypress.enter.prevent="onSubmitFirstMemberResult"></f-text>
<div class="mt-2 grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2 col-span-2"> <div class="mt-2 grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2 col-span-2">
<f-switch v-for="member in results" :id="`members-${member.id}`" :key="member.id" <f-switch
v-model="values.members" :label="member.fullname" name="members[]" :value="member.id" size="sm" v-for="member in results"
inline @keypress.enter.prevent="onSubmitMemberResult(member)"></f-switch> :id="`members-${member.id}`"
:key="member.id"
v-model="values.members"
:label="member.fullname"
name="members[]"
:value="member.id"
size="sm"
inline
@keypress.enter.prevent="onSubmitMemberResult(member)"
></f-switch>
</div> </div>
</div> </div>
<button v-for="(compiler, index) in compilers" class="btn btn-primary mt-3 inline-block" <button v-for="(compiler, index) in compilers" class="btn btn-primary mt-3 inline-block" @click.prevent="submit(compiler.class)" v-text="compiler.title"></button>
@click.prevent="submit(compiler.class)" v-text="compiler.title"></button>
</form> </form>
</page-layout> </page-layout>
</template> </template>
<script setup> <script setup>
import { ref, computed, inject } from 'vue'; import {ref, computed, inject} from 'vue';
import useSearch from '../../composables/useSearch.js'; import useSearch from '../../composables/useSearch.js';
const axios = inject('axios'); const axios = inject('axios');
const { search } = useSearch(); const {search} = useSearch();
const props = defineProps({ const props = defineProps({
data: {}, data: {},

View File

@ -40,7 +40,7 @@
<ui-tabs v-model="active" :entries="tabs"></ui-tabs> <ui-tabs v-model="active" :entries="tabs"></ui-tabs>
<div v-show="active === 0" class="grid grid-cols-2 gap-3"> <div v-show="active === 0" class="grid grid-cols-2 gap-3">
<div class="flex space-x-3"> <div class="flex space-x-3">
<f-text id="name" v-model="single.name" class="grow" name="name" label="Name" required></f-text> <f-text id="name" v-model="single.name" class="grow" label="Name" required></f-text>
<f-switch id="is_active" v-model="single.is_active" name="is_active" label="Aktiv"></f-switch> <f-switch id="is_active" v-model="single.is_active" name="is_active" label="Aktiv"></f-switch>
<f-switch id="is_private" v-model="single.is_private" name="is_private" label="Privat"></f-switch> <f-switch id="is_private" v-model="single.is_private" name="is_private" label="Privat"></f-switch>
</div> </div>
@ -54,13 +54,12 @@
collection="headerImage" collection="headerImage"
required required
></f-singlefile> ></f-singlefile>
<f-text id="from" v-model="single.from" type="date" name="from" label="Von" required></f-text> <f-text id="from" v-model="single.from" type="date" label="Von" required></f-text>
<f-text id="to" v-model="single.to" type="date" name="to" label="Bis" required></f-text> <f-text id="to" v-model="single.to" type="date" label="Bis" required></f-text>
<f-textarea <f-textarea
id="excerpt" id="excerpt"
v-model="single.excerpt" v-model="single.excerpt"
hint="Gebe hier eine kurze Beschreibung für die Veranstaltungs-Übersicht ein (Maximal 130 Zeichen)." hint="Gebe hier eine kurze Beschreibung für die Veranstaltungs-Übersicht ein (Maximal 130 Zeichen)."
name="excerpt"
label="Auszug" label="Auszug"
rows="5" rows="5"
required required
@ -122,7 +121,7 @@
</ui-popup> </ui-popup>
<page-filter breakpoint="xl"> <page-filter breakpoint="xl">
<f-text id="search" :model-value="getFilter('search')" name="search" label="Suchen …" size="sm" @update:model-value="setFilter('search', $event)"></f-text> <f-text id="search" :model-value="getFilter('search')" label="Suchen …" size="sm" @update:model-value="setFilter('search', $event)"></f-text>
<f-switch id="past" :model-value="getFilter('past')" label="vergangene zeigen" size="sm" @update:model-value="setFilter('past', $event)"></f-switch> <f-switch id="past" :model-value="getFilter('past')" label="vergangene zeigen" size="sm" @update:model-value="setFilter('past', $event)"></f-switch>
<f-switch id="inactive" :model-value="getFilter('inactive')" label="inaktive zeigen" size="sm" @update:model-value="setFilter('inactive', $event)"></f-switch> <f-switch id="inactive" :model-value="getFilter('inactive')" label="inaktive zeigen" size="sm" @update:model-value="setFilter('inactive', $event)"></f-switch>
</page-filter> </page-filter>

View File

@ -12,7 +12,6 @@
id="description" id="description"
label="Beschreibung" label="Beschreibung"
size="sm" size="sm"
name="description"
:model-value="modelValue.description" :model-value="modelValue.description"
@update:modelValue="$emit('update:modelValue', {...modelValue, description: $event})" @update:modelValue="$emit('update:modelValue', {...modelValue, description: $event})"
></f-textarea> ></f-textarea>

View File

@ -6,7 +6,6 @@
:id="`options-${index}`" :id="`options-${index}`"
size="sm" size="sm"
class="grow" class="grow"
:name="`options-${index}`"
:model-value="option" :model-value="option"
@update:modelValue="$emit('update:modelValue', {...props.modelValue, options: setOption(props.modelValue.options, index, $event)})" @update:modelValue="$emit('update:modelValue', {...props.modelValue, options: setOption(props.modelValue.options, index, $event)})"
></f-text> ></f-text>
@ -18,15 +17,7 @@
></ui-action-button> ></ui-action-button>
</div> </div>
<ui-icon-button icon="plus" @click="$emit('update:modelValue', {...modelValue, options: addOption(modelValue.options)})">Option einfügen</ui-icon-button> <ui-icon-button icon="plus" @click="$emit('update:modelValue', {...modelValue, options: addOption(modelValue.options)})">Option einfügen</ui-icon-button>
<f-text <f-text id="min" type="number" size="sm" label="Minimale Anzahl Elemente" :model-value="modelValue.min" @update:model-value="$emit('update:modelValue', {...modelValue, min: $event})"></f-text>
id="min"
type="number"
size="sm"
name="min"
label="Minimale Anzahl Elemente"
:model-value="modelValue.min"
@update:model-value="$emit('update:modelValue', {...modelValue, min: $event})"
></f-text>
<f-text <f-text
id="max" id="max"
type="number" type="number"

View File

@ -8,8 +8,8 @@
@close="singleSection = null" @close="singleSection = null"
@submit="storeSection" @submit="storeSection"
> >
<f-text :id="`sectionform-name`" v-model="singleSection.model.name" label="Name" :name="`sectionform-name`"></f-text> <f-text id="sectionform-name" v-model="singleSection.model.name" label="Name"></f-text>
<f-textarea :id="`sectionform-intro`" v-model="singleSection.model.intro" label="Einleitung" :name="`sectionform-intro`"></f-textarea> <f-textarea id="sectionform-intro" v-model="singleSection.model.intro" label="Einleitung"></f-textarea>
</asideform> </asideform>
<asideform v-if="singleSection !== null && singleSection.mode === 'reorder'" heading="Felder ordnen" @close="singleSection = null" @submit="storeSection"> <asideform v-if="singleSection !== null && singleSection.mode === 'reorder'" heading="Felder ordnen" @close="singleSection = null" @submit="storeSection">
<draggable v-model="singleSection.model.fields" item-key="key" :component-data="{class: 'mt-3 grid gap-3'}"> <draggable v-model="singleSection.model.fields" item-key="key" :component-data="{class: 'mt-3 grid gap-3'}">
@ -36,13 +36,13 @@
@close="singleField = null" @close="singleField = null"
@submit="storeField" @submit="storeField"
> >
<f-text id="fieldname" v-model="singleField.model.name" label="Name" size="sm" name="fieldname"></f-text> <f-text id="fieldname" v-model="singleField.model.name" label="Name" size="sm"></f-text>
<f-textarea id="intro" v-model="singleField.model.intro" label="Einleitung" size="sm" name="intro"></f-textarea> <f-textarea id="intro" v-model="singleField.model.intro" label="Einleitung" size="sm"></f-textarea>
<column-selector v-model="singleField.model.columns"></column-selector> <column-selector v-model="singleField.model.columns"></column-selector>
<component :is="fields[singleField.model.type]" v-model="singleField.model" :payload="inner.sections" :meta="props.meta"></component> <component :is="fields[singleField.model.type]" v-model="singleField.model" :payload="inner.sections" :meta="props.meta"></component>
<f-select id="nami_type" v-model="singleField.model.nami_type" :options="meta.namiTypes" label="NaMi-Feld" size="sm" name="nami_type"></f-select> <f-select id="nami_type" v-model="singleField.model.nami_type" :options="meta.namiTypes" label="NaMi-Feld" size="sm" name="nami_type"></f-select>
<f-select id="special_type" v-model="singleField.model.special_type" :options="meta.specialTypes" label="Bedeutung" size="sm" name="special_type"></f-select> <f-select id="special_type" v-model="singleField.model.special_type" :options="meta.specialTypes" label="Bedeutung" size="sm" name="special_type"></f-select>
<f-textarea id="hint" v-model="singleField.model.hint" label="Hinweis" size="sm" name="hint"></f-textarea> <f-textarea id="hint" v-model="singleField.model.hint" label="Hinweis" size="sm"></f-textarea>
<f-switch <f-switch
v-show="singleField.model.nami_type === null" v-show="singleField.model.nami_type === null"
id="for_members" id="for_members"

View File

@ -23,7 +23,6 @@
v-model="modelValue.empty_option_value" v-model="modelValue.empty_option_value"
label="Wert der leeren Option" label="Wert der leeren Option"
size="sm" size="sm"
name="empty_option_value"
@update:modelValue="$emit('update:modelValue', {...modelValue, empty_option_value: $event})" @update:modelValue="$emit('update:modelValue', {...modelValue, empty_option_value: $event})"
></f-text> ></f-text>
<f-select <f-select

View File

@ -26,7 +26,7 @@
<ui-popup v-if="single !== null" :heading="`Vorlage ${single.id ? 'bearbeiten' : 'erstellen'}`" full @close="cancel"> <ui-popup v-if="single !== null" :heading="`Vorlage ${single.id ? 'bearbeiten' : 'erstellen'}`" full @close="cancel">
<form-builder v-model="single.config" :meta="meta"> <form-builder v-model="single.config" :meta="meta">
<template #meta> <template #meta>
<f-text id="name" v-model="single.name" name="name" label="Name" required></f-text> <f-text id="name" v-model="single.name" label="Name" required></f-text>
</template> </template>
</form-builder> </form-builder>
<template #actions> <template #actions>

View File

@ -1,10 +1,15 @@
<template> <template>
<f-switch id="fieldrequired" :model-value="modelValue.required" label="Erforderlich" size="sm" name="fieldrequired" <f-switch
inline @update:modelValue="$emit('update:modelValue', { ...modelValue, required: $event })"></f-switch> id="fieldrequired"
<f-text id="min" :model-value="modelValue.min" label="minimaler Wert" size="sm" name="min" type="number" :model-value="modelValue.required"
@update:modelValue="$emit('update:modelValue', { ...modelValue, min: parse($event) })"></f-text> label="Erforderlich"
<f-text id="max" :model-value="modelValue.max" label="maximaler Wert" size="sm" name="max" type="number" size="sm"
@update:modelValue="$emit('update:modelValue', { ...modelValue, max: parse($event) })"></f-text> name="fieldrequired"
inline
@update:modelValue="$emit('update:modelValue', {...modelValue, required: $event})"
></f-switch>
<f-text id="min" :model-value="modelValue.min" label="minimaler Wert" size="sm" type="number" @update:modelValue="$emit('update:modelValue', {...modelValue, min: parse($event)})"></f-text>
<f-text id="max" :model-value="modelValue.max" label="maximaler Wert" size="sm" type="number" @update:modelValue="$emit('update:modelValue', {...modelValue, max: parse($event)})"></f-text>
</template> </template>
<script setup> <script setup>

View File

@ -6,7 +6,6 @@
:id="`options-${index}`" :id="`options-${index}`"
size="sm" size="sm"
class="grow" class="grow"
:name="`options-${index}`"
:model-value="option" :model-value="option"
@update:modelValue="$emit('update:modelValue', {...props.modelValue, options: setOption(props.modelValue.options, index, $event)})" @update:modelValue="$emit('update:modelValue', {...props.modelValue, options: setOption(props.modelValue.options, index, $event)})"
></f-text> ></f-text>

View File

@ -1,5 +1,5 @@
<template> <template>
<f-text id="rows" label="Zeilen" size="sm" name="rows" :model-value="modelValue.rows" type="number" min="1" @update:modelValue="$emit('update:modelValue', {...modelValue, rows: $event})"></f-text> <f-text id="rows" label="Zeilen" size="sm" :model-value="modelValue.rows" type="number" min="1" @update:modelValue="$emit('update:modelValue', {...modelValue, rows: $event})"></f-text>
<f-switch <f-switch
id="fieldrequired" id="fieldrequired"
v-model="modelValue.required" v-model="modelValue.required"

View File

@ -10,7 +10,7 @@
</a> </a>
</template> </template>
<div class="flex space-x-3"> <div class="flex space-x-3">
<f-text id="parent-inner_name" v-model="editing.parent.inner_name" label="Interner Name" name="parent-inner_name"></f-text> <f-text id="parent-inner_name" v-model="editing.parent.inner_name" label="Interner Name"></f-text>
<f-select id="parent-level" v-model="editing.parent.level" label="Ebene" name="parent-level" :options="meta.levels"></f-select> <f-select id="parent-level" v-model="editing.parent.level" label="Ebene" name="parent-level" :options="meta.levels"></f-select>
</div> </div>
<div> <div>
@ -25,7 +25,7 @@
<span v-text="child.name"></span> <span v-text="child.name"></span>
</td> </td>
<td> <td>
<f-text :id="`inner_name-${child.id}`" v-model="child.inner_name" label="" size="sm" :name="`inner_name-${child.id}`"></f-text> <f-text :id="`inner_name-${child.id}`" v-model="child.inner_name" label="" size="sm"></f-text>
</td> </td>
<td> <td>
<f-select :id="`level-${child.id}`" v-model="child.level" label="" size="sm" :name="`level-${child.id}`" :options="meta.levels"></f-select> <f-select :id="`level-${child.id}`" v-model="child.level" label="" size="sm" :name="`level-${child.id}`" :options="meta.levels"></f-select>

View File

@ -9,7 +9,7 @@
<ui-popup v-if="massstore !== null" heading="Massenrechnung anlegen" @close="massstore = null"> <ui-popup v-if="massstore !== null" heading="Massenrechnung anlegen" @close="massstore = null">
<form @submit.prevent="sendMassstore"> <form @submit.prevent="sendMassstore">
<section class="grid grid-cols-2 gap-3 mt-6"> <section class="grid grid-cols-2 gap-3 mt-6">
<f-text id="year" v-model="massstore.year" name="year" label="Jahr" required></f-text> <f-text id="year" v-model="massstore.year" label="Jahr" required></f-text>
</section> </section>
<section class="flex mt-4 space-x-2"> <section class="flex mt-4 space-x-2">
<ui-button type="submit" class="btn-danger">Speichern</ui-button> <ui-button type="submit" class="btn-danger">Speichern</ui-button>
@ -39,29 +39,29 @@
<ui-box heading="Für Mitglied anlegen" container-class="flex space-x-3" class="col-span-full"> <ui-box heading="Für Mitglied anlegen" container-class="flex space-x-3" class="col-span-full">
<f-select id="forMemberMember" v-model="forMember.member_id" name="forMemberMember" :options="meta.members" label="Mitglied"></f-select> <f-select id="forMemberMember" v-model="forMember.member_id" name="forMemberMember" :options="meta.members" label="Mitglied"></f-select>
<f-select id="forMemberSubscription" v-model="forMember.subscription_id" name="forMemberSubscription" :options="meta.subscriptions" label="Beitrag"></f-select> <f-select id="forMemberSubscription" v-model="forMember.subscription_id" name="forMemberSubscription" :options="meta.subscriptions" label="Beitrag"></f-select>
<f-text id="forMemberYear" v-model="forMember.year" name="forMemberYear" label="Jahr"></f-text> <f-text id="forMemberYear" v-model="forMember.year" label="Jahr"></f-text>
<ui-icon-button class="btn-primary self-end mb-2" icon="save" @click="saveForMember">Speichern</ui-icon-button> <ui-icon-button class="btn-primary self-end mb-2" icon="save" @click="saveForMember">Speichern</ui-icon-button>
</ui-box> </ui-box>
<ui-box heading=" Empfänger" container-class="grid grid-cols-2 gap-3 col-span-full"> <ui-box heading=" Empfänger" container-class="grid grid-cols-2 gap-3 col-span-full">
<f-text id="to_name" v-model="single.to.name" name="to_name" label="Name" class="col-span-full" required></f-text> <f-text id="to_name" v-model="single.to.name" label="Name" class="col-span-full" required></f-text>
<f-text id="to_address" v-model="single.to.address" name="to_address" label="Adresse" class="col-span-full" required></f-text> <f-text id="to_address" v-model="single.to.address" label="Adresse" class="col-span-full" required></f-text>
<f-text id="to_zip" v-model="single.to.zip" name="to_zip" label="PLZ" required></f-text> <f-text id="to_zip" v-model="single.to.zip" label="PLZ" required></f-text>
<f-text id="to_location" v-model="single.to.location" name="to_location" label="Ort" required></f-text> <f-text id="to_location" v-model="single.to.location" label="Ort" required></f-text>
<f-text id="mail_email" v-model="single.mail_email" name="mail_email" label="E-Mail-Adresse" class="col-span-full"></f-text> <f-text id="mail_email" v-model="single.mail_email" label="E-Mail-Adresse" class="col-span-full"></f-text>
</ui-box> </ui-box>
<ui-box heading="Status" container-class="grid gap-3"> <ui-box heading="Status" container-class="grid gap-3">
<f-select id="status" v-model="single.status" :options="meta.statuses" name="status" label="Status" required></f-select> <f-select id="status" v-model="single.status" :options="meta.statuses" name="status" label="Status" required></f-select>
<f-select id="via" v-model="single.via" :options="meta.vias" name="via" label="Rechnungsweg" required></f-select> <f-select id="via" v-model="single.via" :options="meta.vias" name="via" label="Rechnungsweg" required></f-select>
<f-text id="greeting" v-model="single.greeting" name="greeting" label="Anrede" required></f-text> <f-text id="greeting" v-model="single.greeting" label="Anrede" required></f-text>
<f-text id="usage" v-model="single.usage" name="usage" label="Verwendungszweck" required></f-text> <f-text id="usage" v-model="single.usage" label="Verwendungszweck" required></f-text>
</ui-box> </ui-box>
<ui-box heading="Positionen" class="col-span-full" container-class="grid gap-3"> <ui-box heading="Positionen" class="col-span-full" container-class="grid gap-3">
<template #in-title> <template #in-title>
<ui-icon-button class="ml-3 btn-primary" icon="plus" @click="single.positions.push({...meta.default_position})">Neu</ui-icon-button> <ui-icon-button class="ml-3 btn-primary" icon="plus" @click="single.positions.push({...meta.default_position})">Neu</ui-icon-button>
</template> </template>
<div v-for="(position, index) in single.positions" :key="index" class="flex items-end space-x-3"> <div v-for="(position, index) in single.positions" :key="index" class="flex items-end space-x-3">
<f-text :id="`position-description-${index}`" v-model="position.description" class="grow" :name="`position-description-${index}`" label="Beschreibung" required></f-text> <f-text :id="`position-description-${index}`" v-model="position.description" class="grow" label="Beschreibung" required></f-text>
<f-text :id="`position-price-${index}`" v-model="position.price" mode="area" :name="`position-price-${index}`" label="Preis" required></f-text> <f-text :id="`position-price-${index}`" v-model="position.price" mode="area" label="Preis" required></f-text>
<f-select :id="`position-member-${index}`" v-model="position.member_id" :options="meta.members" :name="`position-member-${index}`" label="Mitglied" required></f-select> <f-select :id="`position-member-${index}`" v-model="position.member_id" :options="meta.members" :name="`position-member-${index}`" label="Mitglied" required></f-select>
<button type="button" class="btn btn-danger btn-sm h-[35px]" icon="trash" @click="single.positions.splice(index, 1)"><ui-sprite src="trash"></ui-sprite></button> <button type="button" class="btn btn-danger btn-sm h-[35px]" icon="trash" @click="single.positions.splice(index, 1)"><ui-sprite src="trash"></ui-sprite></button>
</div> </div>

View File

@ -9,7 +9,7 @@
<form id="form" class="p-3 grid gap-3" @submit.prevent="submit"> <form id="form" class="p-3 grid gap-3" @submit.prevent="submit">
<ui-box heading="Metadatem"> <ui-box heading="Metadatem">
<div class="grid gap-4 sm:grid-cols-2"> <div class="grid gap-4 sm:grid-cols-2">
<f-text id="name" v-model="model.name" name="name" label="Name" size="sm" required></f-text> <f-text id="name" v-model="model.name" label="Name" size="sm" required></f-text>
<f-select id="gateway_id" v-model="model.gateway_id" name="gateway_id" :options="meta.gateways" label="Verbindung" size="sm" required></f-select> <f-select id="gateway_id" v-model="model.gateway_id" name="gateway_id" :options="meta.gateways" label="Verbindung" size="sm" required></f-select>
</div> </div>
</ui-box> </ui-box>

View File

@ -6,19 +6,33 @@
<ui-popup v-if="single !== null" :heading="single.id ? 'Verbindung bearbeiten' : 'Neue Verbindung'" @close="cancel"> <ui-popup v-if="single !== null" :heading="single.id ? 'Verbindung bearbeiten' : 'Neue Verbindung'" @close="cancel">
<form @submit.prevent="submit"> <form @submit.prevent="submit">
<section class="grid grid-cols-2 gap-3 mt-6"> <section class="grid grid-cols-2 gap-3 mt-6">
<f-text id="name" v-model="single.name" name="name" label="Bezeichnung" required></f-text> <f-text id="name" v-model="single.name" label="Bezeichnung" required></f-text>
<f-text id="domain" v-model="single.domain" name="domain" label="Domain" required></f-text> <f-text id="domain" v-model="single.domain" label="Domain" required></f-text>
<f-select id="type" :model-value="single.type.cls" label="Typ" name="type" :options="meta.types" <f-select
:placeholder="''" required @update:model-value=" id="type"
:model-value="single.type.cls"
label="Typ"
name="type"
:options="meta.types"
:placeholder="''"
required
@update:model-value="
single.type = { single.type = {
cls: $event, cls: $event,
params: { ...getType($event).defaults }, params: {...getType($event).defaults},
} }
"></f-select> "
></f-select>
<template v-for="(field, index) in getType(single.type.cls).fields"> <template v-for="(field, index) in getType(single.type.cls).fields">
<f-text v-if="field.type === 'text' || field.type === 'password' || field.type === 'email'" <f-text
:id="field.name" :key="index" v-model="single.type.params[field.name]" :label="field.label" v-if="field.type === 'text' || field.type === 'password' || field.type === 'email'"
:type="field.type" :name="field.name" :required="field.is_required"></f-text> :id="field.name"
:key="index"
v-model="single.type.params[field.name]"
:label="field.label"
:type="field.type"
:required="field.is_required"
></f-text>
</template> </template>
</section> </section>
<section class="flex mt-4 space-x-2"> <section class="flex mt-4 space-x-2">
@ -43,12 +57,14 @@
<td v-text="gateway.domain"></td> <td v-text="gateway.domain"></td>
<td v-text="gateway.type_human"></td> <td v-text="gateway.type_human"></td>
<td> <td>
<ui-boolean-display :value="gateway.works" long-label="Verbindungsstatus" <ui-boolean-display
:label="gateway.works ? 'Verbindung erfolgreich' : 'Verbindung fehlgeschlagen'"></ui-boolean-display> :value="gateway.works"
long-label="Verbindungsstatus"
:label="gateway.works ? 'Verbindung erfolgreich' : 'Verbindung fehlgeschlagen'"
></ui-boolean-display>
</td> </td>
<td> <td>
<a v-tooltip="`Bearbeiten`" href="#" class="inline-flex btn btn-warning btn-sm" <a v-tooltip="`Bearbeiten`" href="#" class="inline-flex btn btn-warning btn-sm" @click.prevent="edit(gateway)"><ui-sprite src="pencil"></ui-sprite></a>
@click.prevent="edit(gateway)"><ui-sprite src="pencil"></ui-sprite></a>
</td> </td>
</tr> </tr>
</table> </table>
@ -62,11 +78,11 @@
</template> </template>
<script setup> <script setup>
import { indexProps, useIndex } from '../../composables/useInertiaApiIndex.js'; import {indexProps, useIndex} from '../../composables/useInertiaApiIndex.js';
import SettingLayout from '../setting/Layout.vue'; import SettingLayout from '../setting/Layout.vue';
const props = defineProps(indexProps); const props = defineProps(indexProps);
const { meta, data, create, edit, cancel, single, submit } = useIndex(props.data, 'mailgateway'); const {meta, data, create, edit, cancel, single, submit} = useIndex(props.data, 'mailgateway');
function getType(type) { function getType(type) {
return meta.value.types.find((t) => t.id === type); return meta.value.types.find((t) => t.id === type);

View File

@ -60,7 +60,7 @@
</button> </button>
</ui-popup> </ui-popup>
<page-filter breakpoint="xl"> <page-filter breakpoint="xl">
<f-text id="search" :model-value="getFilter('search')" name="search" label="Suchen …" size="sm" @update:model-value="setFilter('search', $event)"></f-text> <f-text id="search" :model-value="getFilter('search')" label="Suchen …" size="sm" @update:model-value="setFilter('search', $event)"></f-text>
<f-switch v-show="hasModule('bill')" id="ausstand" :model-value="getFilter('ausstand')" label="Nur Ausstände" size="sm" @update:model-value="setFilter('ausstand', $event)"></f-switch> <f-switch v-show="hasModule('bill')" id="ausstand" :model-value="getFilter('ausstand')" label="Nur Ausstände" size="sm" @update:model-value="setFilter('ausstand', $event)"></f-switch>
<f-multipleselect <f-multipleselect
id="group_ids" id="group_ids"

View File

@ -5,18 +5,18 @@
</template> </template>
<setting-layout> <setting-layout>
<form id="billsettingform" class="grow p-6 grid grid-cols-2 gap-3 items-start content-start" @submit.prevent="submit"> <form id="billsettingform" class="grow p-6 grid grid-cols-2 gap-3 items-start content-start" @submit.prevent="submit">
<f-text label="Absender" hint="Absender-Name in Kurzform, i.d.R. der kurze Stammesname" name="from" id="from" v-model="inner.from"></f-text> <f-text id="from" v-model="inner.from" label="Absender" hint="Absender-Name in Kurzform, i.d.R. der kurze Stammesname"></f-text>
<f-text label="Absender (lang)" v-model="inner.from_long" name="from_long" id="from_long" hint="Absender-Name in Langform, i.d.R. der Stammesname"></f-text> <f-text id="from_long" v-model="inner.from_long" label="Absender (lang)" hint="Absender-Name in Langform, i.d.R. der Stammesname"></f-text>
<h2 class="text-lg font-semibold text-gray-300 col-span-2 mt-5">Kontaktdaten</h2> <h2 class="text-lg font-semibold text-gray-300 col-span-2 mt-5">Kontaktdaten</h2>
<div class="col-span-2 text-gray-300 text-sm">Diese Kontaktdaten stehen im Absender-Bereich auf der Rechnung.</div> <div class="col-span-2 text-gray-300 text-sm">Diese Kontaktdaten stehen im Absender-Bereich auf der Rechnung.</div>
<f-text label="Straße" v-model="inner.address" name="address" id="address"></f-text> <f-text id="address" v-model="inner.address" label="Straße"></f-text>
<f-text label="PLZ" v-model="inner.zip" name="zip" id="zip"></f-text> <f-text id="zip" v-model="inner.zip" label="PLZ"></f-text>
<f-text label="Ort" v-model="inner.place" name="place" id="place"></f-text> <f-text id="place" v-model="inner.place" label="Ort"></f-text>
<f-text label="E-Mail-Adresse" v-model="inner.email" name="email" id="email"></f-text> <f-text id="email" v-model="inner.email" label="E-Mail-Adresse"></f-text>
<f-text label="Telefonnummer" v-model="inner.mobile" name="mobile" id="mobile"></f-text> <f-text id="mobile" v-model="inner.mobile" label="Telefonnummer"></f-text>
<f-text label="Webseite" v-model="inner.website" name="website" id="website"></f-text> <f-text id="website" v-model="inner.website" label="Webseite"></f-text>
<f-text label="IBAN" v-model="inner.iban" name="iban" id="iban"></f-text> <f-text id="iban" v-model="inner.iban" label="IBAN"></f-text>
<f-text label="BIC" v-model="inner.bic" name="bic" id="bic"></f-text> <f-text id="bic" v-model="inner.bic" label="BIC"></f-text>
</form> </form>
</setting-layout> </setting-layout>
</page-layout> </page-layout>
@ -26,23 +26,23 @@
import SettingLayout from './Layout.vue'; import SettingLayout from './Layout.vue';
export default { export default {
components: {
SettingLayout,
},
props: {
data: {},
},
data: function () { data: function () {
return { return {
inner: {...this.data}, inner: {...this.data},
}; };
}, },
props: {
data: {},
},
methods: { methods: {
submit() { submit() {
this.$inertia.post('/setting/bill', this.inner, { this.$inertia.post('/setting/bill', this.inner, {
onSuccess: () => this.$success('Einstellungen gespeichert.') onSuccess: () => this.$success('Einstellungen gespeichert.'),
}); });
}, },
}, },
components: {
SettingLayout,
},
}; };
</script> </script>

View File

@ -9,8 +9,8 @@
<p class="text-sm">Hier kannst du Einstellungen für Anmeldeformulare setzen.</p> <p class="text-sm">Hier kannst du Einstellungen für Anmeldeformulare setzen.</p>
</div> </div>
<div class="grid grid-cols-2 gap-4"> <div class="grid grid-cols-2 gap-4">
<f-text id="register_url" v-model="inner.register_url" label="Formular-Link" name="register_url"></f-text> <f-text id="register_url" v-model="inner.register_url" label="Formular-Link"></f-text>
<f-text id="clear_cache_url" v-model="inner.clear_cache_url" label="Frontend-Cache-Url" name="clear_cache_url"></f-text> <f-text id="clear_cache_url" v-model="inner.clear_cache_url" label="Frontend-Cache-Url"></f-text>
</div> </div>
</form> </form>
</setting-layout> </setting-layout>

View File

@ -19,13 +19,13 @@
<ui-sprite :src="stateDisplay.icon" :class="stateDisplay.text" class="w-5 h-5"></ui-sprite> <ui-sprite :src="stateDisplay.icon" :class="stateDisplay.text" class="w-5 h-5"></ui-sprite>
<span class="ml-3" :class="stateDisplay.text" v-text="stateDisplay.label"></span> <span class="ml-3" :class="stateDisplay.text" v-text="stateDisplay.label"></span>
</div> </div>
<f-text label="URL" hint="URL der Mailman Api" name="base_url" id="base_url" v-model="inner.base_url"></f-text> <f-text id="base_url" v-model="inner.base_url" label="URL" hint="URL der Mailman Api"></f-text>
<f-text label="Benutzername" name="username" id="username" v-model="inner.username"></f-text> <f-text id="username" v-model="inner.username" label="Benutzername"></f-text>
<f-text type="password" label="Passwort" name="password" id="password" v-model="inner.password"></f-text> <f-text id="password" v-model="inner.password" type="password" label="Passwort"></f-text>
<f-select label="Liste für alle Mitglieder" name="all_list" id="all_list" v-model="inner.all_list" :options="lists"></f-select> <f-select id="all_list" v-model="inner.all_list" label="Liste für alle Mitglieder" name="all_list" :options="lists"></f-select>
<f-select label="Liste für Eltern" name="all_parents_list" id="all_parents_list" v-model="inner.all_parents_list" :options="lists"></f-select> <f-select id="all_parents_list" v-model="inner.all_parents_list" label="Liste für Eltern" name="all_parents_list" :options="lists"></f-select>
<f-select label="Liste für aktive Leiter" name="active_leaders_list" id="active_leaders_list" v-model="inner.active_leaders_list" :options="lists"></f-select> <f-select id="active_leaders_list" v-model="inner.active_leaders_list" label="Liste für aktive Leiter" name="active_leaders_list" :options="lists"></f-select>
<f-select label="Liste für passive Leiter" name="passive_leaders_list" id="passive_leaders_list" v-model="inner.passive_leaders_list" :options="lists"></f-select> <f-select id="passive_leaders_list" v-model="inner.passive_leaders_list" label="Liste für passive Leiter" name="passive_leaders_list" :options="lists"></f-select>
<div></div> <div></div>
</form> </form>
</setting-layout> </setting-layout>
@ -36,16 +36,19 @@
import SettingLayout from './Layout.vue'; import SettingLayout from './Layout.vue';
export default { export default {
data: function () { components: {
return { SettingLayout,
inner: {...this.data},
};
}, },
props: { props: {
data: {}, data: {},
state: {}, state: {},
lists: {}, lists: {},
}, },
data: function () {
return {
inner: {...this.data},
};
},
computed: { computed: {
stateDisplay() { stateDisplay() {
if (this.state === null) { if (this.state === null) {
@ -74,14 +77,11 @@ export default {
submit() { submit() {
this.$inertia.post('/setting/mailman', this.inner, { this.$inertia.post('/setting/mailman', this.inner, {
onSuccess: (page) => { onSuccess: (page) => {
this.$success('Einstellungen gespeichert.') this.$success('Einstellungen gespeichert.');
this.inner = page.props.data; this.inner = page.props.data;
}, },
}); });
}, },
}, },
components: {
SettingLayout,
},
}; };
</script> </script>

View File

@ -4,15 +4,12 @@
<f-save-button form="namisettingform"></f-save-button> <f-save-button form="namisettingform"></f-save-button>
</template> </template>
<setting-layout> <setting-layout>
<form id="namisettingform" class="grow p-6 grid grid-cols-2 gap-3 items-start content-start" <form id="namisettingform" class="grow p-6 grid grid-cols-2 gap-3 items-start content-start" @submit.prevent="submit">
@submit.prevent="submit">
<div class="col-span-full text-gray-100 mb-3"> <div class="col-span-full text-gray-100 mb-3">
<p class="text-sm">Hier kannst du deine Zugangsdaten zu NaMi anpassen, falls sich z.B. dein Passwort <p class="text-sm">Hier kannst du deine Zugangsdaten zu NaMi anpassen, falls sich z.B. dein Passwort geändert hat.</p>
geändert hat.</p>
</div> </div>
<f-text id="mglnr" v-model="inner.mglnr" label="Mitgliedsnummer" name="mglnr"></f-text> <f-text id="mglnr" v-model="inner.mglnr" label="Mitgliedsnummer"></f-text>
<f-text id="default_group_id" v-model="inner.default_group_id" label="Standard-Gruppierung" <f-text id="default_group_id" v-model="inner.default_group_id" label="Standard-Gruppierung"></f-text>
name="default_group_id"></f-text>
<f-text id="password" v-model="inner.password" label="Passwort" name="password" type="password"></f-text> <f-text id="password" v-model="inner.password" label="Passwort" name="password" type="password"></f-text>
</form> </form>
</setting-layout> </setting-layout>
@ -36,7 +33,7 @@ export default {
}, },
data: function () { data: function () {
return { return {
inner: { ...this.data }, inner: {...this.data},
}; };
}, },
methods: { methods: {