forked from verdnatura/salix-front
refs #7283 itemRequest fix deny
This commit is contained in:
parent
cd1b5f56f7
commit
e4aec1773b
|
@ -7,6 +7,7 @@ import { useArrayData } from 'composables/useArrayData';
|
|||
import { toCurrency } from 'filters/index';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import axios from 'axios';
|
||||
import ItemRequestDenyForm from './ItemRequestDenyForm.vue';
|
||||
import { toDate } from 'src/filters';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
|
@ -26,6 +27,10 @@ const arrayData = useArrayData('ItemRequests', {
|
|||
});
|
||||
const store = arrayData.store;
|
||||
|
||||
const userParams = {
|
||||
state: 'pending',
|
||||
};
|
||||
|
||||
watch(
|
||||
() => store.data,
|
||||
(value) => (itemRequestsOptions.value = value)
|
||||
|
@ -174,7 +179,9 @@ const onDenyAccept = (_, responseData) => {
|
|||
itemRequestsOptions.value[denyRequestIndex.value].isOk = responseData.isOk;
|
||||
itemRequestsOptions.value[denyRequestIndex.value].attenderFk =
|
||||
responseData.attenderFk;
|
||||
console.log('itemRequestsOptions: ', itemRequestsOptions.value);
|
||||
itemRequestsOptions.value[denyRequestIndex.value].response = responseData.response;
|
||||
console.log('itemRequestsOptions.value', itemRequestsOptions.value);
|
||||
denyRequestId.value = null;
|
||||
denyRequestIndex.value = null;
|
||||
};
|
||||
|
@ -341,8 +348,10 @@ onBeforeMount(() => {
|
|||
url="ticketRequests/filter"
|
||||
order="shippedDate ASC, isOk ASC"
|
||||
:columns="columns"
|
||||
:user-params="userParams"
|
||||
:is-editable="true"
|
||||
auto-load
|
||||
:disable-option="{ card: true }"
|
||||
>
|
||||
<template #column-attenderName="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
|
@ -378,7 +387,7 @@ onBeforeMount(() => {
|
|||
{{ row.itemDescription }}
|
||||
</span>
|
||||
</template>
|
||||
<template #column-action="{ row, rowIndex }">
|
||||
<template #column-tableActions="{ row, rowIndex }">
|
||||
<QTd>
|
||||
<QIcon
|
||||
v-if="row.response?.length"
|
||||
|
@ -405,6 +414,9 @@ onBeforeMount(() => {
|
|||
</QTd>
|
||||
</template>
|
||||
</VnTable>
|
||||
<QDialog ref="denyFormRef" transition-show="scale" transition-hide="scale">
|
||||
<ItemRequestDenyForm :request-id="denyRequestId" @on-data-saved="onDenyAccept" />
|
||||
</QDialog>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
|
|
Loading…
Reference in New Issue