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
|
||||
hide-selected
|
||||
data-cy="itemBasicDataIntrastat"
|
||||
style="max-width: 31%"
|
||||
>
|
||||
<template #form>
|
||||
<CreateIntrastatForm
|
||||
|
|
|
@ -80,18 +80,12 @@ const insertTag = (rows) => {
|
|||
itemFk: route.params.id,
|
||||
tag: {
|
||||
isFree: true,
|
||||
value: undefined,
|
||||
name: undefined,
|
||||
},
|
||||
}"
|
||||
:data-default="{
|
||||
tag: {
|
||||
isFree: true,
|
||||
value: undefined,
|
||||
name: undefined,
|
||||
},
|
||||
tagFk: undefined,
|
||||
priority: undefined,
|
||||
}"
|
||||
:default-remove="false"
|
||||
:user-filter="{
|
||||
|
@ -118,7 +112,7 @@ const insertTag = (rows) => {
|
|||
<VnSelect
|
||||
:label="t('itemTags.tag')"
|
||||
:options="tagOptions"
|
||||
:model-value="row.tag"
|
||||
:model-value="row.tagFk"
|
||||
option-label="name"
|
||||
hide-selected
|
||||
@update:model-value="
|
||||
|
|
|
@ -106,7 +106,6 @@ const columns = computed(() => [
|
|||
name: 'price',
|
||||
align: 'left',
|
||||
format: (row) => toCurrency(row.price),
|
||||
columnClass: 'shrink',
|
||||
},
|
||||
{
|
||||
label: t('item.buyRequest.attender'),
|
||||
|
@ -124,7 +123,6 @@ const columns = computed(() => [
|
|||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
columnClass: 'shrink',
|
||||
isEditable: false,
|
||||
},
|
||||
|
||||
|
@ -133,7 +131,6 @@ const columns = computed(() => [
|
|||
name: 'itemFk',
|
||||
align: 'left',
|
||||
component: 'input',
|
||||
columnClass: 'expand',
|
||||
isEditable: ({ isOk }) => isOk === null,
|
||||
},
|
||||
{
|
||||
|
@ -149,27 +146,30 @@ const columns = computed(() => [
|
|||
if (!row.saleQuantity) {
|
||||
return tableRef.value.reload();
|
||||
}
|
||||
try {
|
||||
axios
|
||||
.post(`TicketRequests/${row.id}/confirm`, {
|
||||
id: row.id,
|
||||
itemFk: parseInt(row.itemFk),
|
||||
quantity: parseInt(row.saleQuantity),
|
||||
})
|
||||
.then(() => {
|
||||
axios
|
||||
.get(`Items/findOne`, { where: { id: row.itemFk } })
|
||||
.then((response) => {
|
||||
row.itemDescription = response.data.name;
|
||||
row.state = 1;
|
||||
});
|
||||
notify(t('globals.dataSaved'), 'positive');
|
||||
return tableRef.value.reload();
|
||||
axios
|
||||
.post(`TicketRequests/${row.id}/confirm`, {
|
||||
id: row.id,
|
||||
itemFk: parseInt(row.itemFk),
|
||||
quantity: parseInt(row.saleQuantity),
|
||||
})
|
||||
.then(() => {
|
||||
return axios.get(`Items/findOne`, {
|
||||
params: { where: { id: row.itemFk } },
|
||||
});
|
||||
} catch (error) {
|
||||
notify(error.response.data.error.message, 'negative');
|
||||
return tableRef.value.reload();
|
||||
}
|
||||
})
|
||||
.then((response) => {
|
||||
row.itemDescription = response.data.name;
|
||||
row.state = 1;
|
||||
notify(t('globals.dataSaved'), 'positive');
|
||||
return tableRef.value.reload();
|
||||
})
|
||||
.catch((error) => {
|
||||
notify(
|
||||
error?.response?.data?.error?.message || error.message,
|
||||
'negative',
|
||||
);
|
||||
return tableRef.value.reload();
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -178,7 +178,6 @@ const columns = computed(() => [
|
|||
align: 'left',
|
||||
sortable: true,
|
||||
component: 'input',
|
||||
columnClass: 'expand',
|
||||
isEditable: false,
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue