#7283 #7831 itemMigration #553

Merged
carlossa merged 77 commits from 7283-itemMigration into dev 2024-10-25 07:09:13 +00:00
1 changed files with 3 additions and 21 deletions
Showing only changes of commit 488dc74c1f - Show all commits

View File

@ -1,5 +1,5 @@
<script setup>
import { ref, computed, onMounted, onBeforeMount, watch } from 'vue';
import { ref, computed, onMounted, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import { useStateStore } from 'stores/useStateStore';
@ -11,7 +11,6 @@ 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';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
const { t } = useI18n();
const { notify } = useNotify();
const stateStore = useStateStore();
@ -31,6 +30,7 @@ const userParams = {
state: 'pending',
};
const tableRef = ref();
watch(
() => store.data,
(value) => (itemRequestsOptions.value = value)
@ -162,9 +162,7 @@ const getState = (isOk) => {
const showDenyRequestForm = (requestId, rowIndex) => {
denyRequestId.value = requestId;
console.log('denyRequestId.value: ', denyRequestId.value);
denyRequestIndex.value = rowIndex;
console.log('denyRequestIndex.value: ', denyRequestIndex.value);
denyFormRef.value.show();
};
@ -172,32 +170,16 @@ 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;
tableRef.value.reload();
};
onMounted(async () => {
await arrayData.fetch({ append: false });
stateStore.rightDrawer = true;
});
onBeforeMount(() => {
const today = Date.vnNew();
today.setHours(0, 0, 0, 0);
const nextWeek = Date.vnNew();
nextWeek.setHours(23, 59, 59, 59);
nextWeek.setDate(nextWeek.getDate() + 7);
filterParams.value = {
from: today,
to: nextWeek,
state: 'pending',
};
});
</script>
<template>