Merge pull request 'fix: refs #8684 adjust styles and improve item tag and request components' (!1820) from 8684-minorFixes into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #1820 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
51cb5ea3f3
|
@ -153,6 +153,7 @@ const onIntrastatCreated = (response, formData) => {
|
||||||
map-options
|
map-options
|
||||||
hide-selected
|
hide-selected
|
||||||
data-cy="itemBasicDataIntrastat"
|
data-cy="itemBasicDataIntrastat"
|
||||||
|
style="max-width: 31%"
|
||||||
>
|
>
|
||||||
<template #form>
|
<template #form>
|
||||||
<CreateIntrastatForm
|
<CreateIntrastatForm
|
||||||
|
|
|
@ -80,18 +80,12 @@ const insertTag = (rows) => {
|
||||||
itemFk: route.params.id,
|
itemFk: route.params.id,
|
||||||
tag: {
|
tag: {
|
||||||
isFree: true,
|
isFree: true,
|
||||||
value: undefined,
|
|
||||||
name: undefined,
|
|
||||||
},
|
},
|
||||||
}"
|
}"
|
||||||
:data-default="{
|
:data-default="{
|
||||||
tag: {
|
tag: {
|
||||||
isFree: true,
|
isFree: true,
|
||||||
value: undefined,
|
|
||||||
name: undefined,
|
|
||||||
},
|
},
|
||||||
tagFk: undefined,
|
|
||||||
priority: undefined,
|
|
||||||
}"
|
}"
|
||||||
:default-remove="false"
|
:default-remove="false"
|
||||||
:user-filter="{
|
:user-filter="{
|
||||||
|
@ -118,7 +112,7 @@ const insertTag = (rows) => {
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('itemTags.tag')"
|
:label="t('itemTags.tag')"
|
||||||
:options="tagOptions"
|
:options="tagOptions"
|
||||||
:model-value="row.tag"
|
:model-value="row.tagFk"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
hide-selected
|
hide-selected
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
|
|
|
@ -106,7 +106,6 @@ const columns = computed(() => [
|
||||||
name: 'price',
|
name: 'price',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
format: (row) => toCurrency(row.price),
|
format: (row) => toCurrency(row.price),
|
||||||
columnClass: 'shrink',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('item.buyRequest.attender'),
|
label: t('item.buyRequest.attender'),
|
||||||
|
@ -124,7 +123,6 @@ const columns = computed(() => [
|
||||||
columnField: {
|
columnField: {
|
||||||
component: null,
|
component: null,
|
||||||
},
|
},
|
||||||
columnClass: 'shrink',
|
|
||||||
isEditable: false,
|
isEditable: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -133,7 +131,6 @@ const columns = computed(() => [
|
||||||
name: 'itemFk',
|
name: 'itemFk',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
component: 'input',
|
component: 'input',
|
||||||
columnClass: 'expand',
|
|
||||||
isEditable: ({ isOk }) => isOk === null,
|
isEditable: ({ isOk }) => isOk === null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -149,7 +146,6 @@ const columns = computed(() => [
|
||||||
if (!row.saleQuantity) {
|
if (!row.saleQuantity) {
|
||||||
return tableRef.value.reload();
|
return tableRef.value.reload();
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
axios
|
axios
|
||||||
.post(`TicketRequests/${row.id}/confirm`, {
|
.post(`TicketRequests/${row.id}/confirm`, {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
|
@ -157,19 +153,23 @@ const columns = computed(() => [
|
||||||
quantity: parseInt(row.saleQuantity),
|
quantity: parseInt(row.saleQuantity),
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
axios
|
return axios.get(`Items/findOne`, {
|
||||||
.get(`Items/findOne`, { where: { id: row.itemFk } })
|
params: { where: { id: row.itemFk } },
|
||||||
|
});
|
||||||
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
row.itemDescription = response.data.name;
|
row.itemDescription = response.data.name;
|
||||||
row.state = 1;
|
row.state = 1;
|
||||||
});
|
|
||||||
notify(t('globals.dataSaved'), 'positive');
|
notify(t('globals.dataSaved'), 'positive');
|
||||||
return tableRef.value.reload();
|
return tableRef.value.reload();
|
||||||
});
|
})
|
||||||
} catch (error) {
|
.catch((error) => {
|
||||||
notify(error.response.data.error.message, 'negative');
|
notify(
|
||||||
|
error?.response?.data?.error?.message || error.message,
|
||||||
|
'negative',
|
||||||
|
);
|
||||||
return tableRef.value.reload();
|
return tableRef.value.reload();
|
||||||
}
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -178,7 +178,6 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
component: 'input',
|
component: 'input',
|
||||||
columnClass: 'expand',
|
|
||||||
isEditable: false,
|
isEditable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue