This commit is contained in:
philipp lang 2024-07-03 16:37:58 +02:00
parent 99a28f44dd
commit 7f9be4262c
28 changed files with 129 additions and 139 deletions

View File

@ -36,7 +36,7 @@
</page-layout>
</template>
<script setup>
<script lang="js" setup>
import { ref, defineProps } from 'vue';
import { indexProps, useIndex } from '../../composables/useIndex.js';

View File

@ -31,7 +31,7 @@
</page-layout>
</template>
<script setup>
<script lang="js" setup>
import { ref, computed, inject } from 'vue';
import useSearch from '../../composables/useSearch.js';
const axios = inject('axios');

View File

@ -75,7 +75,7 @@
</page-layout>
</template>
<script setup>
<script lang="js" setup>
import { useApiIndex } from '../../composables/useApiIndex.js';
import SettingLayout from '../setting/Layout.vue';

View File

@ -55,7 +55,7 @@
</div>
</template>
<script setup>
<script lang="js" setup>
import { ref, inject, computed } from 'vue';
const axios = inject('axios');
const emit = defineEmits(['save']);

View File

@ -172,7 +172,7 @@
</page-layout>
</template>
<script setup>
<script lang="js" setup>
import { ref, inject, computed } from 'vue';
import { indexProps, useIndex } from '../../composables/useInertiaApiIndex.js';
import FormBuilder from '../formtemplate/FormBuilder.vue';

View File

@ -21,7 +21,7 @@
</div>
</template>
<script setup>
<script lang="js" setup>
import { computed, ref } from 'vue';
import useSearch from '../../composables/useSearch.js';
const emit = defineEmits(['assign']);

View File

@ -108,7 +108,7 @@
</div>
</template>
<script setup>
<script lang="js" setup>
import { watch, ref, computed } from 'vue';
import { useApiIndex } from '../../composables/useApiIndex.js';
import useTableToggle from '../../composables/useTableToggle.js';

View File

@ -14,7 +14,7 @@
</ui-box>
</template>
<script setup>
<script lang="js" setup>
const emit = defineEmits(['close', 'submit']);
const props = defineProps({

View File

@ -17,7 +17,7 @@
></f-textarea>
</template>
<script setup>
<script lang="js" setup>
const props = defineProps({
modelValue: {},
meta: {},

View File

@ -30,7 +30,7 @@
</div>
</template>
<script setup>
<script lang="js" setup>
import useElements from './useElements.js';
const { addOption, setOption, removeOption } = useElements();

View File

@ -42,7 +42,7 @@
</div>
</template>
<script setup>
<script lang="js" setup>
defineEmits(['update:modelValue']);
const props = defineProps({

View File

@ -19,7 +19,7 @@
></f-switch>
</template>
<script setup>
<script lang="js" setup>
const props = defineProps({
modelValue: {},
meta: {},

View File

@ -71,7 +71,7 @@
</form>
</template>
<script setup>
<script lang="js" setup>
import { watch, computed, ref } from 'vue';
import { snakeCase } from 'change-case';
import '!/adrema-form/dist/main.js';

View File

@ -45,7 +45,7 @@
></f-select>
</template>
<script setup>
<script lang="js" setup>
import { computed } from 'vue';
const props = defineProps({

View File

@ -58,7 +58,7 @@
</page-layout>
</template>
<script setup>
<script lang="js" setup>
import { ref } from 'vue';
import { indexProps, useIndex } from '../../composables/useInertiaApiIndex.js';
import FormBuilder from './FormBuilder.vue';

View File

@ -12,7 +12,7 @@
<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>
<script setup>
<script lang="js" setup>
const props = defineProps({
modelValue: {},
meta: {},

View File

@ -38,7 +38,7 @@
></f-switch>
</template>
<script setup>
<script lang="js" setup>
import useElements from './useElements.js';
const { addOption, setOption, removeOption } = useElements();

View File

@ -10,7 +10,7 @@
></f-switch>
</template>
<script setup>
<script lang="js" setup>
const props = defineProps({
modelValue: {},
meta: {},

View File

@ -11,7 +11,7 @@
></f-switch>
</template>
<script setup>
<script lang="js" setup>
const props = defineProps({
modelValue: {},
meta: {},

View File

@ -92,7 +92,7 @@
</page-layout>
</template>
<script setup>
<script lang="js" setup>
import { ref } from 'vue';
import { indexProps, useIndex } from '../../composables/useInertiaApiIndex.js';
import useTableToggle from '../../composables/useTableToggle.js';

View File

@ -124,7 +124,7 @@
</page-layout>
</template>
<script setup>
<script lang="js" setup>
import { ref } from 'vue';
import { indexProps, useIndex } from '../../composables/useInertiaApiIndex.js';
const props = defineProps(indexProps);

View File

@ -74,7 +74,7 @@
</page-layout>
</template>
<script setup>
<script lang="js" setup>
import { ref, inject, defineProps } from 'vue';
import { useIndex } from '../../composables/useIndex.js';

View File

@ -77,7 +77,7 @@
</page-layout>
</template>
<script setup>
<script lang="js" setup>
import { indexProps, useIndex } from '../../composables/useInertiaApiIndex.js';
import SettingLayout from '../setting/Layout.vue';

View File

@ -2,17 +2,14 @@
<div class="sidebar flex flex-col group is-bright">
<page-header title="Ausbildungen" @close="$emit('close')">
<template #toolbar>
<page-toolbar-button v-if="single === null" color="primary" icon="plus" @click.prevent="create">Neue
Ausbildung</page-toolbar-button>
<page-toolbar-button v-if="single !== null" color="primary" icon="undo"
@click.prevent="cancel">Zurück</page-toolbar-button>
<page-toolbar-button v-if="single === null" color="primary" icon="plus" @click.prevent="create">Neue Ausbildung</page-toolbar-button>
<page-toolbar-button v-if="single !== null" color="primary" icon="undo" @click.prevent="cancel">Zurück</page-toolbar-button>
</template>
</page-header>
<form v-if="single" class="p-6 grid gap-4 justify-start" @submit.prevent="submit">
<f-text id="completed_at" v-model="single.completed_at" type="date" label="Datum" required></f-text>
<f-select id="course_id" v-model="single.course_id" name="course_id" :options="meta.courses" label="Baustein"
required></f-select>
<f-select id="course_id" v-model="single.course_id" name="course_id" :options="meta.courses" label="Baustein" required></f-select>
<f-text id="event_name" v-model="single.event_name" label="Veranstaltung" required></f-text>
<f-text id="organizer" v-model="single.organizer" label="Veranstalter" required></f-text>
<button type="submit" class="btn btn-primary">Absenden</button>
@ -34,10 +31,8 @@
<td v-text="course.organizer"></td>
<td v-text="course.completed_at_human"></td>
<td class="flex">
<a href="#" class="inline-flex btn btn-warning btn-sm" @click.prevent="edit(course)"><ui-sprite
src="pencil"></ui-sprite></a>
<a href="#" class="inline-flex btn btn-danger btn-sm" @click.prevent="remove(course)"><ui-sprite
src="trash"></ui-sprite></a>
<a href="#" class="inline-flex btn btn-warning btn-sm" @click.prevent="edit(course)"><ui-sprite src="pencil"></ui-sprite></a>
<a href="#" class="inline-flex btn btn-danger btn-sm" @click.prevent="remove(course)"><ui-sprite src="trash"></ui-sprite></a>
</td>
</tr>
</table>
@ -45,7 +40,7 @@
</div>
</template>
<script setup>
<script lang="js" setup>
defineEmits(['close']);
import { useApiIndex } from '../../composables/useApiIndex.js';

View File

@ -18,7 +18,7 @@
</div>
</template>
<script setup>
<script lang="js" setup>
defineEmits(['close']);
import { useApiIndex } from '../../composables/useApiIndex.js';

View File

@ -1,25 +1,25 @@
<template>
<page-header title="Mitgliedschaften" @close="$emit('close')">
<template #toolbar>
<page-toolbar-button v-if="single === null" color="primary" icon="plus" @click.prevent="create">Neue
Mitgliedschaft</page-toolbar-button>
<page-toolbar-button v-if="single !== null" color="primary" icon="undo"
@click.prevent="single = null">Zurück</page-toolbar-button>
<page-toolbar-button v-if="single === null" color="primary" icon="plus" @click.prevent="create">Neue Mitgliedschaft</page-toolbar-button>
<page-toolbar-button v-if="single !== null" color="primary" icon="undo" @click.prevent="single = null">Zurück</page-toolbar-button>
</template>
</page-header>
<form v-if="single" class="p-6 grid gap-4 justify-start" @submit.prevent="submit">
<f-select id="group_id" v-model="single.group_id" name="group_id" :options="meta.groups" label="Gruppierung"
required></f-select>
<f-select id="activity_id" v-model="single.activity_id" name="activity_id" :options="meta.activities"
label="Tätigkeit" required></f-select>
<f-select v-if="single.activity_id" id="subactivity_id" :model-value="single.subactivity_id" name="subactivity_id"
:options="meta.subactivities[single.activity_id]" label="Untertätigkeit"
@update:modelValue="setSubactivityId(single, $event)"></f-select>
<f-switch v-if="displayPromisedAt" id="has_promise" :model-value="single.promised_at !== null"
label="Hat Versprechen" @update:modelValue="setPromisedAtSwitch(single, $event)"></f-switch>
<f-text v-show="displayPromisedAt && single.promised_at !== null" id="promised_at" v-model="single.promised_at"
type="date" label="Versprechensdatum" size="sm"></f-text>
<f-select id="group_id" v-model="single.group_id" name="group_id" :options="meta.groups" label="Gruppierung" required></f-select>
<f-select id="activity_id" v-model="single.activity_id" name="activity_id" :options="meta.activities" label="Tätigkeit" required></f-select>
<f-select
v-if="single.activity_id"
id="subactivity_id"
:model-value="single.subactivity_id"
name="subactivity_id"
:options="meta.subactivities[single.activity_id]"
label="Untertätigkeit"
@update:modelValue="setSubactivityId(single, $event)"
></f-select>
<f-switch v-if="displayPromisedAt" id="has_promise" :model-value="single.promised_at !== null" label="Hat Versprechen" @update:modelValue="setPromisedAtSwitch(single, $event)"></f-switch>
<f-text v-show="displayPromisedAt && single.promised_at !== null" id="promised_at" v-model="single.promised_at" type="date" label="Versprechensdatum" size="sm"></f-text>
<button type="submit" class="btn btn-primary">Absenden</button>
</form>
@ -39,17 +39,15 @@
<td v-text="membership.human_date"></td>
<td><ui-boolean-display :value="membership.is_active" dark></ui-boolean-display></td>
<td class="flex space-x-1">
<a href="#" class="inline-flex btn btn-warning btn-sm" @click.prevent="edit(membership)"><ui-sprite
src="pencil"></ui-sprite></a>
<a href="#" class="inline-flex btn btn-danger btn-sm" @click.prevent="remove(membership)"><ui-sprite
src="trash"></ui-sprite></a>
<a href="#" class="inline-flex btn btn-warning btn-sm" @click.prevent="edit(membership)"><ui-sprite src="pencil"></ui-sprite></a>
<a href="#" class="inline-flex btn btn-danger btn-sm" @click.prevent="remove(membership)"><ui-sprite src="trash"></ui-sprite></a>
</td>
</tr>
</table>
</div>
</template>
<script setup>
<script lang="js" setup>
import { computed } from 'vue';
import dayjs from 'dayjs';

View File

@ -132,7 +132,7 @@
</page-layout>
</template>
<script setup>
<script lang="js" setup>
import MemberInvoicePositions from './MemberInvoicePositions.vue';
import MemberMemberships from './MemberMemberships.vue';
import MemberCourses from './MemberCourses.vue';

View File

@ -1,23 +1,20 @@
<template>
<div class="flex space-x-1">
<i-link v-tooltip="`Details`" :href="member.links.show" class="inline-flex btn btn-primary btn-sm"><ui-sprite
src="eye"></ui-sprite></i-link>
<i-link v-tooltip="`Bearbeiten`" :href="member.links.edit" class="inline-flex btn btn-warning btn-sm"><ui-sprite
src="pencil"></ui-sprite></i-link>
<a v-show="hasModule('bill')" v-tooltip="`Zahlungen`" href="#" class="inline-flex btn btn-info btn-sm"
@click.prevent="$emit('sidebar', 'invoicePosition')"><ui-sprite src="money"></ui-sprite></a>
<a v-show="hasModule('courses')" v-tooltip="`Ausbildungen`" href="#" class="inline-flex btn btn-info btn-sm"
@click.prevent="$emit('sidebar', 'courses')"><ui-sprite src="course"></ui-sprite></a>
<a v-tooltip="`Mitgliedschaften`" href="#" class="inline-flex btn btn-info btn-sm"
@click.prevent="$emit('sidebar', 'membership')"><ui-sprite src="user"></ui-sprite></a>
<a v-show="member.efz_link" v-tooltip="`EFZ Formular`" :href="member.efz_link"
class="inline-flex btn btn-info btn-sm"><ui-sprite src="report"></ui-sprite></a>
<a v-tooltip="`Entfernen`" href="#" class="inline-flex btn btn-danger btn-sm"
@click.prevent="$emit('remove')"><ui-sprite src="trash"></ui-sprite></a>
<i-link v-tooltip="`Details`" :href="member.links.show" class="inline-flex btn btn-primary btn-sm"><ui-sprite src="eye"></ui-sprite></i-link>
<i-link v-tooltip="`Bearbeiten`" :href="member.links.edit" class="inline-flex btn btn-warning btn-sm"><ui-sprite src="pencil"></ui-sprite></i-link>
<a v-show="hasModule('bill')" v-tooltip="`Zahlungen`" href="#" class="inline-flex btn btn-info btn-sm" @click.prevent="$emit('sidebar', 'invoicePosition')"
><ui-sprite src="money"></ui-sprite
></a>
<a v-show="hasModule('courses')" v-tooltip="`Ausbildungen`" href="#" class="inline-flex btn btn-info btn-sm" @click.prevent="$emit('sidebar', 'courses')"
><ui-sprite src="course"></ui-sprite
></a>
<a v-tooltip="`Mitgliedschaften`" href="#" class="inline-flex btn btn-info btn-sm" @click.prevent="$emit('sidebar', 'membership')"><ui-sprite src="user"></ui-sprite></a>
<a v-show="member.efz_link" v-tooltip="`EFZ Formular`" :href="member.efz_link" class="inline-flex btn btn-info btn-sm"><ui-sprite src="report"></ui-sprite></a>
<a v-tooltip="`Entfernen`" href="#" class="inline-flex btn btn-danger btn-sm" @click.prevent="$emit('remove')"><ui-sprite src="trash"></ui-sprite></a>
</div>
</template>
<script setup>
<script lang="js" setup>
defineProps({
member: {
type: Object,