- added LicenseController.ts and MimetypeController for enabling mime_types and licences
Some checks failed
CI Pipeline / japa-tests (push) Failing after 58s

- add new authors and contributors only by unique email addresses
- allow multiple file upload
- added validation rule for validating length of uploaded files
- modified Dockerfile for starting "bin/server.js" instead of *server.js"
- npm updates
This commit is contained in:
Kaimbacher 2024-06-14 12:38:04 +02:00
parent 770e791613
commit ac473b1e72
27 changed files with 1720 additions and 914 deletions

View file

@ -22,6 +22,10 @@ const props = defineProps({
type: Array<Person>,
default: () => [],
},
relation: {
type: String,
required: true,
},
contributortypes: {
type: Object,
default: () => ({}),
@ -82,7 +86,7 @@ const pagesList = computed(() => {
return pagesList;
});
const removeAuthor = (key) => {
const removeAuthor = (key: number) => {
items.value.splice(key, 1);
};
@ -131,8 +135,10 @@ const removeAuthor = (key) => {
<!-- <th v-if="checkable" /> -->
<th />
<th scope="col">Sort</th>
<th class="hidden lg:table-cell"></th>
<th>Name</th>
<th scope="col">Id</th>
<!-- <th class="hidden lg:table-cell"></th> -->
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th scope="col" v-if="Object.keys(contributortypes).length">
<span>Type</span>
@ -153,15 +159,56 @@ const removeAuthor = (key) => {
<BaseIcon :path="mdiDragVariant" />
</td>
<td scope="row">{{ index + 1 }}</td>
<td data-label="Id">{{ element.id }}</td>
<!-- <TableCheckboxCell v-if="checkable" @checked="checked($event, client)" /> -->
<td class="border-b-0 lg:w-6 before:hidden hidden lg:table-cell">
<!-- <td v-if="element.name" class="border-b-0 lg:w-6 before:hidden hidden lg:table-cell">
<UserAvatar :username="element.name" class="w-24 h-24 mx-auto lg:w-6 lg:h-6" />
</td> -->
<td data-label="First Name">
<!-- {{ element.first_name }} -->
<FormControl
required
v-model="element.first_name"
type="text" :is-read-only="element.status==true"
placeholder="[FIRST NAME]"
>
<div
class="text-red-400 text-sm"
v-if="errors && Array.isArray(errors[`${relation}.${index}.first_name`])"
>
{{ errors[`${relation}.${index}.first_name`].join(', ') }}
</div>
</FormControl>
</td>
<td data-label="Name">
{{ element.name }}
<td data-label="Last Name">
<FormControl
required
v-model="element.last_name"
type="text" :is-read-only="element.status==true"
placeholder="[LAST NAME]"
>
<div
class="text-red-400 text-sm"
v-if="errors && Array.isArray(errors[`${relation}.${index}.last_name`])"
>
{{ errors[`${relation}.${index}.last_name`].join(', ') }}
</div>
</FormControl>
</td>
<td data-label="Email">
{{ element.email }}
<td data-label="Email">
<FormControl
required
v-model="element.email"
type="text" :is-read-only="element.status==true"
placeholder="[EMAIL]"
>
<div
class="text-red-400 text-sm"
v-if="errors && Array.isArray(errors[`${relation}.${index}.email`])"
>
{{ errors[`${relation}.${index}.email`].join(', ') }}
</div>
</FormControl>
</td>
<td v-if="Object.keys(contributortypes).length">
<!-- <select type="text" v-model="element.pivot.contributor_type">
@ -173,14 +220,14 @@ const removeAuthor = (key) => {
required
v-model="element.pivot_contributor_type"
type="select"
:options="contributortypes"
:options="contributortypes"
placeholder="[relation type]"
>
<div
class="text-red-400 text-sm"
v-if="errors && Array.isArray(errors[`contributors.${index}.pivot_contributor_type`])"
v-if="errors && Array.isArray(errors[`${relation}.${index}.pivot_contributor_type`])"
>
{{ errors[`contributors.${index}.pivot_contributor_type`].join(', ') }}
{{ errors[`${relation}.${index}.pivot_contributor_type`].join(', ') }}
</div>
</FormControl>
</td>