diff --git a/src/components/ui/VnSubToolbar.vue b/src/components/ui/VnSubToolbar.vue index c0d129613..67b75c27c 100644 --- a/src/components/ui/VnSubToolbar.vue +++ b/src/components/ui/VnSubToolbar.vue @@ -18,7 +18,7 @@ onMounted(() => { const observer = new MutationObserver( () => (hasContent.value = - actions.value.childNodes.length + data.value.childNodes.length) + actions.value?.childNodes.length + data.value?.childNodes.length) ); if (actions.value) observer.observe(actions.value, opts); if (data.value) observer.observe(data.value, opts); diff --git a/src/pages/Ticket/Negative/TicketLackDetail.vue b/src/pages/Ticket/Negative/TicketLackDetail.vue index 05f16c6c3..70e4cf352 100644 --- a/src/pages/Ticket/Negative/TicketLackDetail.vue +++ b/src/pages/Ticket/Negative/TicketLackDetail.vue @@ -1,8 +1,13 @@ @@ -279,6 +318,65 @@ const handleRows = (rows) => { @on-fetch="(data) => (editableStates = data)" auto-load /> + + + {{ t('globals.cancel') }} + + + + + + + {{ t('Change state') }} + + + + + {{ t('Change quantity') }} + + + + + {{ t('globals.split') }} + + + + + {{ t('Item proposal') }} + + + + + + { + + + + + + diff --git a/src/pages/Ticket/Negative/TicketLackList.vue b/src/pages/Ticket/Negative/TicketLackList.vue index 765899050..a387a8a51 100644 --- a/src/pages/Ticket/Negative/TicketLackList.vue +++ b/src/pages/Ticket/Negative/TicketLackList.vue @@ -5,47 +5,31 @@ import { useStateStore } from 'stores/useStateStore'; import VnPaginate from 'components/ui/VnPaginate.vue'; import TicketLackFilter from 'pages/Ticket/Negative/TicketLackFilter.vue'; import TicketLackDetail from 'pages/Ticket/Negative/TicketLackDetail.vue'; -import HandleSplited from 'pages/Ticket/Negative/HandleSplited.vue'; -import ChangeQuantityDialog from 'pages/Ticket/Negative/ChangeQuantityDialog.vue'; -import ChangeStateDialog from 'pages/Ticket/Negative/ChangeStateDialog.vue'; -import ItemProposal from 'src/pages/Item/components/ItemProposal.vue'; import FetchData from 'components/FetchData.vue'; -import { useVnConfirm } from 'composables/useVnConfirm'; import NegativeOriginDialog from 'pages/Ticket/Negative/NegativeOriginDialog.vue'; import TotalNegativeOriginDialog from 'pages/Ticket/Negative/TotalNegativeOriginDialog.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; -import axios from 'axios'; import { onBeforeMount } from 'vue'; const DEFAULT_WAREHOUSE = 'Algemesi'; const stateStore = useStateStore(); const { t } = useI18n(); const selectedRows = ref([]); -const selectedRowsDetail = ref([]); -const resultSplit = ref([]); const showNegativeOriginDialog = ref(false); const showTotalNegativeOriginDialog = ref(false); -const showProposalDialog = ref(false); -const showSplitDialog = ref(false); -const showChangeQuantityDialog = ref(false); -const showChangeStateDialog = ref(false); -const showFree = ref(true); const showFilterPanel = ref(false); const currentRow = ref(null); const negativeParams = reactive({ days: 2, }); const viewSummary = (row) => { + stateStore.rightDrawer = false; currentRow.value = row; }; const originDialogRef = ref(); const totalNegativeDialogRef = ref(); -const proposalDialogRef = ref(); -const splitDialogRef = ref(); -const changeStateDialogRef = ref(); -const changeQuantityDialogRef = ref(); const columns = computed(() => [ { name: 'minTimed', @@ -118,26 +102,6 @@ const handleWarehouses = async (data) => { await vnPaginateRef.value.fetch(); showFilterPanel.value = true; }; -const onDetailDialogHide = (evt) => { - if (evt?.type === 'refresh') ticketDetailRef.value.reload(); -}; -const { openConfirmationModal } = useVnConfirm(); - -const split = async ({ simple }, data = []) => { - openConfirmationModal( - t('negative.detail.split.confirmSplitSelected'), - t('negative.detail.split.splitQuestion'), - null, - () => { - showSplitDialog.value = true; - resultSplit.value = [{}]; - // const body = simple ? data : selectedRows.value; - // axios.post(`Tickets/split`, body).then((data) => { - // resultSplit.value = data; - // }); - } - ); -};