Merge pull request 'feat: refs #8387 crudModel' (!1206) from 8387-itemTagCrudModelFront into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #1206 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
73f421f19e
|
@ -149,7 +149,7 @@ function filter(value, update, filterOptions) {
|
|||
(ref) => {
|
||||
ref.setOptionIndex(-1);
|
||||
ref.moveOptionSelection(1, true);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ async function remove(data) {
|
|||
|
||||
if (preRemove.length) {
|
||||
newData = newData.filter(
|
||||
(form) => !preRemove.some((index) => index == form.$index)
|
||||
(form) => !preRemove.some((index) => index == form.$index),
|
||||
);
|
||||
const changes = getChanges();
|
||||
if (!changes.creates?.length && !changes.updates?.length)
|
||||
|
|
|
@ -13,10 +13,9 @@ import axios from 'axios';
|
|||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
const itemTagsRef = ref(null);
|
||||
const itemTagsRef = ref();
|
||||
const tagOptions = ref([]);
|
||||
const valueOptionsMap = ref(new Map());
|
||||
|
||||
const getSelectedTagValues = async (tag) => {
|
||||
if (!tag.tagFk && tag.tag.isFree) return;
|
||||
const filter = {
|
||||
|
@ -59,10 +58,6 @@ const insertTag = (rows) => {
|
|||
itemTagsRef.value.formData[itemTagsRef.value.formData.length - 1].priority =
|
||||
getHighestPriority(rows);
|
||||
};
|
||||
|
||||
const submitTags = async (data) => {
|
||||
itemTagsRef.value.onSubmit(data);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -149,7 +144,7 @@ const submitTags = async (data) => {
|
|||
v-model="row.value"
|
||||
:label="t('itemTags.value')"
|
||||
:is-clearable="false"
|
||||
@keyup.enter.stop="submitTags(row)"
|
||||
@keyup.enter.stop="(data) => itemTagsRef.onSubmit(data)"
|
||||
/>
|
||||
<VnInput
|
||||
:label="t('itemBasicData.relevancy')"
|
||||
|
@ -157,7 +152,7 @@ const submitTags = async (data) => {
|
|||
v-model="row.priority"
|
||||
:required="true"
|
||||
:rules="validate('itemTag.priority')"
|
||||
@keyup.enter.stop="submitTags(row)"
|
||||
@keyup.enter.stop="(data) => itemTagsRef.onSubmit(data)"
|
||||
/>
|
||||
<div class="row justify-center" style="flex: 0">
|
||||
<QIcon
|
||||
|
@ -197,4 +192,5 @@ const submitTags = async (data) => {
|
|||
<i18n>
|
||||
es:
|
||||
Tags can not be repeated: Las etiquetas no pueden repetirse
|
||||
The value must be a number or a range of numbers: El valor debe ser un número o un rango de números
|
||||
</i18n>
|
||||
|
|
Loading…
Reference in New Issue