From a9bab6ab2c4d69257b77c9d1371d5fef42953109 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 11 Jul 2024 06:16:51 +0200 Subject: [PATCH] feat: show bad dates --- src/pages/Item/ItemFixedPrice.vue | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue index da574be3a..11817d3e9 100644 --- a/src/pages/Item/ItemFixedPrice.vue +++ b/src/pages/Item/ItemFixedPrice.vue @@ -69,7 +69,7 @@ const onFixedPricesFetched = (data) => { console.log(item.hasMinPrice); item.hasMinPrice = `${item.hasMinPrice !== 0}`; }); - fixedPrices.value = data; + fixedPrices.value = Array(200).fill(...data); // el objetivo de guardar una copia de las rows es evitar guardar cambios si la data no cambiĆ³ al disparar los eventos fixedPricesOriginalData.value = JSON.parse(JSON.stringify(data)); }; @@ -323,7 +323,17 @@ const addRow = () => { const openEditTableCellDialog = () => { editTableCellDialogRef.value.show(); }; - +async function showBadDates() { + try { + const { data } = await axios.get('FixedPrices/filter', { + params: { + showBadDates: true, + }, + }); + } catch (error) { + console.error(error); + } +} const onEditCellDataSaved = async () => { rowsSelected.value = []; await fetchFixedPrices(); @@ -583,6 +593,12 @@ onUnmounted(() => (stateStore.rightDrawer = false)); + + + + {{ t('Edit fixed price(s)') }} + +