feat: enhance user management, mimetype creation, and validation
Some checks failed
CI Pipeline / japa-tests (push) Failing after 1m8s

- **AdminuserController.ts**: enable editing `first_name` and `last_name` for user creation and updates
- **MimetypeController.ts**: add creation support for mimetypes with selectable extensions
- **Models**: add `Mimetype` model (mime_type.ts); add `SnakeCaseNamingStrategy` for User model
- **Validators**:
  - **updateDatasetValidator**: increase title length to 255 and description length to 2500
  - **User Validators**: refine `createUserValidator` and `updateUserValidator` to include `first_name` and `last_name`
- **vanilla_error_reporter**: improve error reporting for wildcard fields
- **SKOS Query**: refine keyword request in `SearchCategoryAutocomplete.vue`
- **UI Enhancements**:
  - improve icon design in wizard (Wizard.vue)
  - add components for mimetype creation (Create.vue and button in Index.vue)
- **Routes**: update `routes.ts` to include new AdonisJS routes
This commit is contained in:
Kaimbacher 2024-10-31 11:02:36 +01:00
parent 2235f3905a
commit 49bd96ee77
24 changed files with 1548 additions and 945 deletions

View file

@ -38,6 +38,8 @@ const props = defineProps({
const form = useForm({
login: '',
first_name: '',
last_name: '',
email: '',
password: '',
password_confirmation: '',
@ -74,6 +76,22 @@ const submit = async () => {
</FormControl>
</FormField>
<FormField label="First Name" :class="{ 'text-red-400': errors.first_name }">
<FormControl v-model="form.first_name" type="text" placeholder="Enter First Name" :errors="errors.first_name">
<div class="text-red-400 text-sm" v-if="errors.first_name && Array.isArray(errors.first_name)">
{{ errors.first_name.join(', ') }}
</div>
</FormControl>
</FormField>
<FormField label="Last Name" :class="{ 'text-red-400': errors.last_name }">
<FormControl v-model="form.last_name" type="text" placeholder="Enter Last Name" :errors="errors.last_name">
<div class="text-red-400 text-sm" v-if="errors.last_name && Array.isArray(errors.last_name)">
{{ errors.last_name.join(', ') }}
</div>
</FormControl>
</FormField>
<FormField label="Email" :class="{ 'text-red-400': errors.email }">
<FormControl v-model="form.email" type="text" placeholder="Enter Email" :errors="errors.email">
<div class="text-red-400 text-sm" v-if="errors.email && Array.isArray(errors.email)">

View file

@ -39,6 +39,8 @@ const props = defineProps({
const form = useForm({
_method: 'put',
login: props.user.login,
first_name: props.user.first_name,
last_name: props.user.last_name,
email: props.user.email,
password: '',
password_confirmation: '',
@ -82,6 +84,22 @@ const handleScore = (score: number) => {
</FormControl>
</FormField>
<FormField label="First Name" :class="{ 'text-red-400': errors.first_name }">
<FormControl v-model="form.first_name" type="text" placeholder="Enter First Name" :errors="errors.first_name">
<div class="text-red-400 text-sm" v-if="errors.first_name && Array.isArray(errors.first_name)">
{{ errors.first_name.join(', ') }}
</div>
</FormControl>
</FormField>
<FormField label="Last Name" :class="{ 'text-red-400': errors.last_name }">
<FormControl v-model="form.last_name" type="text" placeholder="Enter Last Name" :errors="errors.last_name">
<div class="text-red-400 text-sm" v-if="errors.last_name && Array.isArray(errors.last_name)">
{{ errors.last_name.join(', ') }}
</div>
</FormControl>
</FormField>
<FormField label="Enter Email" :class="{ 'text-red-400': errors.email }">
<FormControl v-model="form.email" type="text" placeholder="Email" :errors="errors.email">
<div class="text-red-400 text-sm" v-if="errors.email && Array.isArray(errors.email)">

View file

@ -11,7 +11,7 @@ import BaseButton from '@/Components/BaseButton.vue';
import CardBox from '@/Components/CardBox.vue';
import BaseButtons from '@/Components/BaseButtons.vue';
import NotificationBar from '@/Components/NotificationBar.vue';
import Pagination from '@/Components/Admin/Pagination.vue';
import Pagination from '@/Components/Pagination.vue';
import Sort from '@/Components/Admin/Sort.vue';
import { stardust } from '@eidellev/adonis-stardust/client';
// import { Vue } from 'vue-facing-decorator';