- prettier formatting
All checks were successful
CI Pipeline / japa-tests (push) Successful in 51s

- npm updates
- new SearchMap.vue component
This commit is contained in:
Kaimbacher 2023-10-31 15:38:43 +01:00
parent 7bc9f90cca
commit a7142f694f
74 changed files with 3360 additions and 3577 deletions

View file

@ -1,34 +1,30 @@
<script setup>
import { Head, Link, useForm, router } from "@inertiajs/vue3"
import {
mdiAccountKey,
mdiArrowLeftBoldOutline,
mdiAccount, mdiNoteText, mdiFormTextarea
} from "@mdi/js"
import LayoutAuthenticated from "@/Layouts/LayoutAuthenticated.vue"
import SectionMain from "@/Components/SectionMain.vue"
import SectionTitleLineWithButton from "@/Components/SectionTitleLineWithButton.vue"
import CardBox from "@/Components/CardBox.vue"
import FormField from '@/Components/FormField.vue'
import FormControl from '@/Components/FormControl.vue'
import FormCheckRadioGroup from '@/Components/FormCheckRadioGroup.vue'
import BaseDivider from '@/Components/BaseDivider.vue'
import BaseButton from '@/Components/BaseButton.vue'
import BaseButtons from '@/Components/BaseButtons.vue'
import { Head, Link, useForm, router } from '@inertiajs/vue3';
import { mdiAccountKey, mdiArrowLeftBoldOutline, mdiAccount, mdiNoteText, mdiFormTextarea } from '@mdi/js';
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
import SectionMain from '@/Components/SectionMain.vue';
import SectionTitleLineWithButton from '@/Components/SectionTitleLineWithButton.vue';
import CardBox from '@/Components/CardBox.vue';
import FormField from '@/Components/FormField.vue';
import FormControl from '@/Components/FormControl.vue';
import FormCheckRadioGroup from '@/Components/FormCheckRadioGroup.vue';
import BaseDivider from '@/Components/BaseDivider.vue';
import BaseButton from '@/Components/BaseButton.vue';
import BaseButtons from '@/Components/BaseButtons.vue';
import { stardust } from '@eidellev/adonis-stardust/client';
const props = defineProps({
permissions: {
type: Object,
default: () => ({}),
},
permissions: {
type: Object,
default: () => ({}),
},
});
const form = useForm({
name: '',
display_name: '',
description: '',
permissions: []
name: '',
display_name: '',
description: '',
permissions: [],
});
const submit = async () => {
@ -37,58 +33,77 @@ const submit = async () => {
</script>
<template>
<LayoutAuthenticated>
<LayoutAuthenticated>
<Head title="Add role" />
<SectionMain>
<SectionTitleLineWithButton :icon="mdiAccountKey" title="Add role" main>
<BaseButton
:route-name="stardust.route('role.index')"
:icon="mdiArrowLeftBoldOutline"
label="Back"
color="white"
rounded-full
small
/>
</SectionTitleLineWithButton>
<!-- <CardBox form @submit.prevent="form.post(stardust.route('role.store'))"> -->
<CardBox form @submit.prevent="submit()">
<FormField label="Name" help="Required. Role name" :class="{ 'text-red-400': form.errors.name }">
<FormControl v-model="form.name" type="text" placeholder="Enter Name" required :error="form.errors.name">
<div class="text-red-400 text-sm" v-if="form.errors.name">
{{ form.errors.name }}
</div>
</FormControl>
</FormField>
<Head title="Add role" />
<SectionMain>
<SectionTitleLineWithButton :icon="mdiAccountKey" title="Add role" main>
<BaseButton :route-name="stardust.route('role.index')" :icon="mdiArrowLeftBoldOutline" label="Back" color="white"
rounded-full small />
</SectionTitleLineWithButton>
<!-- <CardBox form @submit.prevent="form.post(stardust.route('role.store'))"> -->
<CardBox form @submit.prevent="submit()">
<FormField label="Display Name" help="Optional. Display name" :class="{ 'text-red-400': form.errors.display_name }">
<FormControl v-model="form.display_name" name="display_name" :error="form.errors.display_name">
<div class="text-red-400 text-sm" v-if="form.errors.display_name">
{{ form.errors.display_name }}
</div>
</FormControl>
</FormField>
<FormField label="Name" help="Required. Role name" :class="{ 'text-red-400': form.errors.name }">
<FormControl v-model="form.name" type="text" placeholder="Enter Name" required :error="form.errors.name">
<div class="text-red-400 text-sm" v-if="form.errors.name">
{{ form.errors.name }}
</div>
</FormControl>
</FormField>
<FormField
label="Description"
help="Optional. Description of new role"
:class="{ 'text-red-400': form.errors.description }"
>
<FormControl
v-model="form.description"
v-bind:icon="mdiFormTextarea"
name="display_name"
:type="'textarea'"
:error="form.errors.description"
>
<div class="text-red-400 text-sm" v-if="form.errors.description">
{{ form.errors.description }}
</div>
</FormControl>
</FormField>
<FormField label="Display Name" help="Optional. Display name" :class="{ 'text-red-400': form.errors.display_name }">
<FormControl v-model="form.display_name" name="display_name" :error="form.errors.display_name">
<div class="text-red-400 text-sm" v-if="form.errors.display_name">
{{ form.errors.display_name }}
</div>
</FormControl>
</FormField>
<BaseDivider />
<FormField label="Description" help="Optional. Description of new role" :class="{ 'text-red-400': form.errors.description }">
<FormControl v-model="form.description" v-bind:icon="mdiFormTextarea" name="display_name" :type="'textarea'" :error="form.errors.description">
<div class="text-red-400 text-sm" v-if="form.errors.description">
{{ form.errors.description }}
</div>
</FormControl>
</FormField>
<FormField label="Permissions" wrap-body>
<FormCheckRadioGroup v-model="form.permissions" name="permissions" is-column :options="props.permissions" />
</FormField>
<div class="text-red-400 text-sm" v-if="form.errors.permissions && Array.isArray(form.errors.permissions)">
<!-- {{ errors.password_confirmation }} -->
{{ form.errors.permissions.join(', ') }}
</div>
<BaseDivider />
<FormField label="Permissions" wrap-body>
<FormCheckRadioGroup v-model="form.permissions" name="permissions" is-column :options="props.permissions" />
</FormField>
<div class="text-red-400 text-sm" v-if="form.errors.permissions && Array.isArray(form.errors.permissions)">
<!-- {{ errors.password_confirmation }} -->
{{ form.errors.permissions.join(', ') }}
</div>
<template #footer>
<BaseButtons>
<BaseButton type="submit" color="info" label="Submit" :class="{ 'opacity-25': form.processing }"
:disabled="form.processing" />
</BaseButtons>
</template>
</CardBox>
</SectionMain>
</LayoutAuthenticated>
<template #footer>
<BaseButtons>
<BaseButton
type="submit"
color="info"
label="Submit"
:class="{ 'opacity-25': form.processing }"
:disabled="form.processing"
/>
</BaseButtons>
</template>
</CardBox>
</SectionMain>
</LayoutAuthenticated>
</template>

View file

@ -1,43 +1,39 @@
<script setup>
import { Head, Link, useForm } from "@inertiajs/vue3"
import {
mdiAccountKey,
mdiArrowLeftBoldOutline,
mdiFormTextarea
} from "@mdi/js"
import LayoutAuthenticated from "@/Layouts/LayoutAuthenticated.vue"
import SectionMain from "@/Components/SectionMain.vue"
import SectionTitleLineWithButton from "@/Components/SectionTitleLineWithButton.vue"
import CardBox from "@/Components/CardBox.vue"
import FormField from '@/Components/FormField.vue'
import FormControl from '@/Components/FormControl.vue'
import FormCheckRadioGroup from '@/Components/FormCheckRadioGroup.vue'
import BaseDivider from '@/Components/BaseDivider.vue'
import BaseButton from '@/Components/BaseButton.vue'
import BaseButtons from '@/Components/BaseButtons.vue'
import { Head, Link, useForm } from '@inertiajs/vue3';
import { mdiAccountKey, mdiArrowLeftBoldOutline, mdiFormTextarea } from '@mdi/js';
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
import SectionMain from '@/Components/SectionMain.vue';
import SectionTitleLineWithButton from '@/Components/SectionTitleLineWithButton.vue';
import CardBox from '@/Components/CardBox.vue';
import FormField from '@/Components/FormField.vue';
import FormControl from '@/Components/FormControl.vue';
import FormCheckRadioGroup from '@/Components/FormCheckRadioGroup.vue';
import BaseDivider from '@/Components/BaseDivider.vue';
import BaseButton from '@/Components/BaseButton.vue';
import BaseButtons from '@/Components/BaseButtons.vue';
import { stardust } from '@eidellev/adonis-stardust/client';
const props = defineProps({
role: {
type: Object,
default: () => ({}),
},
permissions: {
type: Object,
default: () => ({}),
},
roleHasPermissions: {
type: Object,
default: () => ({}),
}
})
role: {
type: Object,
default: () => ({}),
},
permissions: {
type: Object,
default: () => ({}),
},
roleHasPermissions: {
type: Object,
default: () => ({}),
},
});
const form = useForm({
_method: 'put',
name: props.role.name,
description: props.role.description,
permissions: props.roleHasPermissions
})
_method: 'put',
name: props.role.name,
description: props.role.description,
permissions: props.roleHasPermissions,
});
const submit = async () => {
// await Inertia.post(stardust.route('user.store'), form);
@ -46,46 +42,65 @@ const submit = async () => {
</script>
<template>
<LayoutAuthenticated>
<LayoutAuthenticated>
<Head title="Update role" />
<SectionMain>
<SectionTitleLineWithButton :icon="mdiAccountKey" title="Update role" main>
<BaseButton
:route-name="stardust.route('role.index')"
:icon="mdiArrowLeftBoldOutline"
label="Back"
color="white"
rounded-full
small
/>
</SectionTitleLineWithButton>
<!-- <CardBox form @submit.prevent="form.put(stardust.route('role.update', [props.role.id]))"> -->
<CardBox form @submit.prevent="submit()">
<FormField label="Name" :class="{ 'text-red-400': form.errors.name }">
<FormControl v-model="form.name" type="text" placeholder="Enter Name" required :error="form.errors.name">
<div class="text-red-400 text-sm" v-if="form.errors.name">
{{ form.errors.name }}
</div>
</FormControl>
</FormField>
<Head title="Update role" />
<SectionMain>
<SectionTitleLineWithButton :icon="mdiAccountKey" title="Update role" main>
<BaseButton :route-name="stardust.route('role.index')" :icon="mdiArrowLeftBoldOutline" label="Back" color="white"
rounded-full small />
</SectionTitleLineWithButton>
<!-- <CardBox form @submit.prevent="form.put(stardust.route('role.update', [props.role.id]))"> -->
<CardBox form @submit.prevent="submit()">
<FormField label="Name" :class="{ 'text-red-400': form.errors.name }">
<FormControl v-model="form.name" type="text" placeholder="Enter Name" required :error="form.errors.name">
<div class="text-red-400 text-sm" v-if="form.errors.name">
{{ form.errors.name }}
</div>
</FormControl>
</FormField>
<FormField
label="Description"
help="Optional. Description of new role"
:class="{ 'text-red-400': form.errors.description }"
>
<FormControl
v-model="form.description"
v-bind:icon="mdiFormTextarea"
name="display_name"
:type="'textarea'"
:error="form.errors.description"
>
<div class="text-red-400 text-sm" v-if="form.errors.description">
{{ form.errors.description }}
</div>
</FormControl>
</FormField>
<FormField label="Description" help="Optional. Description of new role" :class="{ 'text-red-400': form.errors.description }">
<FormControl v-model="form.description" v-bind:icon="mdiFormTextarea" name="display_name" :type="'textarea'" :error="form.errors.description">
<div class="text-red-400 text-sm" v-if="form.errors.description">
{{ form.errors.description }}
</div>
</FormControl>
</FormField>
<BaseDivider />
<BaseDivider />
<FormField label="Permissions" wrap-body>
<FormCheckRadioGroup v-model="form.permissions" name="permissions" is-column :options="props.permissions" />
</FormField>
<FormField label="Permissions" wrap-body>
<FormCheckRadioGroup v-model="form.permissions" name="permissions" is-column :options="props.permissions" />
</FormField>
<template #footer>
<BaseButtons>
<BaseButton type="submit" color="info" label="Submit" :class="{ 'opacity-25': form.processing }"
:disabled="form.processing" />
</BaseButtons>
</template>
</CardBox>
</SectionMain>
</LayoutAuthenticated>
<template #footer>
<BaseButtons>
<BaseButton
type="submit"
color="info"
label="Submit"
:class="{ 'opacity-25': form.processing }"
:disabled="form.processing"
/>
</BaseButtons>
</template>
</CardBox>
</SectionMain>
</LayoutAuthenticated>
</template>

View file

@ -1,79 +1,68 @@
<script setup>
import { Head, Link, useForm } from "@inertiajs/vue3"
import {
mdiAccountKey,
mdiArrowLeftBoldOutline,
} from "@mdi/js"
import LayoutAuthenticated from "@/Layouts/LayoutAuthenticated.vue"
import SectionMain from "@/Components/SectionMain.vue"
import SectionTitleLineWithButton from "@/Components/SectionTitleLineWithButton.vue"
import CardBox from "@/Components/CardBox.vue"
import BaseButton from "@/Components/BaseButton.vue"
import { Head, Link, useForm } from '@inertiajs/vue3';
import { mdiAccountKey, mdiArrowLeftBoldOutline } from '@mdi/js';
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
import SectionMain from '@/Components/SectionMain.vue';
import SectionTitleLineWithButton from '@/Components/SectionTitleLineWithButton.vue';
import CardBox from '@/Components/CardBox.vue';
import BaseButton from '@/Components/BaseButton.vue';
import { stardust } from '@eidellev/adonis-stardust/client';
const props = defineProps({
role: {
type: Object,
default: () => ({}),
},
permissions: {
type: Object,
default: () => ({}),
},
roleHasPermissions: {
type: Object,
default: () => ({}),
}
})
role: {
type: Object,
default: () => ({}),
},
permissions: {
type: Object,
default: () => ({}),
},
roleHasPermissions: {
type: Object,
default: () => ({}),
},
});
</script>
<template>
<LayoutAuthenticated>
<Head title="View role" />
<SectionMain>
<SectionTitleLineWithButton :icon="mdiAccountKey" title="View role" main>
<BaseButton :route-name="stardust.route('role.index')" :icon="mdiArrowLeftBoldOutline" label="Back" color="white"
rounded-full small />
</SectionTitleLineWithButton>
<CardBox class="mb-6">
<table>
<tbody>
<tr>
<td class="p-4 pl-8 text-slate-500 dark:text-slate-400 hidden lg:block">
Name
</td>
<td data-label="Name">
{{ role.name }}
</td>
</tr>
<tr>
<td class="p-4 pl-8 text-slate-500 dark:text-slate-400 hidden lg:block">
Name
</td>
<td data-label="Description">
{{ role.description }}
</td>
</tr>
<tr>
<td class="
p-4
pl-8
text-slate-500
dark:text-slate-400
hidden
lg:block
">
Created
</td>
<td data-label="Created">
<!-- {{ new Date(role.created_at).toLocaleString() }} -->
{{ role.created_at }}
</td>
</tr>
</tbody>
</table>
</CardBox>
</SectionMain>
</LayoutAuthenticated>
<LayoutAuthenticated>
<Head title="View role" />
<SectionMain>
<SectionTitleLineWithButton :icon="mdiAccountKey" title="View role" main>
<BaseButton
:route-name="stardust.route('role.index')"
:icon="mdiArrowLeftBoldOutline"
label="Back"
color="white"
rounded-full
small
/>
</SectionTitleLineWithButton>
<CardBox class="mb-6">
<table>
<tbody>
<tr>
<td class="p-4 pl-8 text-slate-500 dark:text-slate-400 hidden lg:block">Name</td>
<td data-label="Name">
{{ role.name }}
</td>
</tr>
<tr>
<td class="p-4 pl-8 text-slate-500 dark:text-slate-400 hidden lg:block">Name</td>
<td data-label="Description">
{{ role.description }}
</td>
</tr>
<tr>
<td class="p-4 pl-8 text-slate-500 dark:text-slate-400 hidden lg:block">Created</td>
<td data-label="Created">
<!-- {{ new Date(role.created_at).toLocaleString() }} -->
{{ role.created_at }}
</td>
</tr>
</tbody>
</table>
</CardBox>
</SectionMain>
</LayoutAuthenticated>
</template>