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