hotfix (dataset): enhance dataset editing and validation
- Modified the TableKeywords component to remove the external_key reset when the type is updated, only resetting the value. - Updated the DatasetController to pass authorization checks (`can.edit`, `can.delete`) to the edit view. - Updated the arrayContainsTypes validation rule to improve the error messages for titles and descriptions, clarifying the requirements for main and translated entries. - Updated the Dataset Edit view to: - Remove unused code and comments. - Add authorization checks to the save button. - Add a release button. - Add icons to the save and release buttons. - Add a computed property `hasUnsavedChanges` to determine if there are unsaved changes in the form.
This commit is contained in:
parent
2cb33a779c
commit
c3ae4327b7
4 changed files with 83 additions and 55 deletions
|
@ -154,7 +154,7 @@ const isKeywordReadOnly = (item: Subject) => {
|
|||
|
||||
<td data-label="Type" scope="row">
|
||||
<FormControl required v-model="item.type"
|
||||
@update:modelValue="() => { item.external_key = undefined; item.value = ''; }" :type="'select'"
|
||||
@update:modelValue="() => { item.value = ''; }" :type="'select'"
|
||||
placeholder="[Enter Language]" :options="props.subjectTypes">
|
||||
<div class="text-red-400 text-sm" v-if="errors[`subjects.${index}.type`]">
|
||||
{{ errors[`subjects.${index}.type`].join(', ') }}
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue