From ef177c01e561b8eb1443505eddedb9a9939e7781 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 2 Nov 2023 14:08:10 +0100 Subject: [PATCH] refs #6157 reguralize import migrate --- src/components/ui/CardDescriptor.vue | 91 ---------- src/composables/useArrayData.js | 2 - src/pages/Claim/Card/ClaimAction.vue | 212 +++++++++++++++++----- src/pages/Claim/Card/ClaimDescriptor.vue | 1 - src/pages/Claim/Card/ClaimDevelopment.vue | 7 +- 5 files changed, 164 insertions(+), 149 deletions(-) diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue index 5cab39082..b544f1640 100644 --- a/src/components/ui/CardDescriptor.vue +++ b/src/components/ui/CardDescriptor.vue @@ -31,82 +31,6 @@ const $props = defineProps({ }, }); -// watch( -// () => $props, -// (props) => { -// fetch(props.url); -// }, -// { deep: true } -// ); - -// const emit = defineEmits(['onFetch']); -// const arrayData = computed(() => { -// const currentArrayData = useArrayData($props.dataKey); -// const newArrayData = useArrayData($props.dataKey, { -// url: $props.url, -// filter: $props.filter, -// }); -// console.log(currentArrayData.store.url, currentArrayData?.store?.url != $props.url); -// if (currentArrayData?.store?.url != $props.url) newArrayData.fetch({ append: false }); -// return newArrayData; -// }); - -// watch( -// () => arrayData, -// (arrayData) => { -// console.log('watch CHANGE??', arrayData.value.store.data); -// entity.value = arrayData.value.store.data; -// emit('onFetch', arrayData.value.store.data); -// }, -// { deep: true } -// ); - -// const slots = useSlots(); -// const { t } = useI18n(); -// let lastUrl = ref(null); -// const entity = ref(); - -// async function fetch(url) { -// console.log('FETCH??', arrayData.value.store.url, url); -// if (arrayData.value.store.url == url) return; -// useArrayData($props.dataKey, { -// url: url ?? $props.url, -// filter: $props.filter, -// }); -// await arrayData.value.fetch({ append: false }); -// console.log('FETCH?? 2', url, $props.url); -// // if (arrayData.value.store.data) emit('onFetch', arrayData.value.store.data); -// } - -// watch($props, async () => { -// if (lastUrl.value == $props.url) return; -// entity.value = arrayData.value.store.data; -// // await fetch(); -// }); - -// onMounted(async () => { -// console.log('onMounted'); -// fetch($props.url); -// }); - -/* - -ArrayData es null. la url tb - -Watch → arrayData -url diferent a la nostra fetch - - - - - - -*/ - -// onMounted(async () => { -// console.log('onMounted'); -// fetch($props.url); -// }); const slots = useSlots(); const { t } = useI18n(); const emit = defineEmits(['onFetch']); @@ -119,26 +43,11 @@ const arrayData = computed(() => { url: $props.url, filter: $props.filter, }); - console.log( - 'URLS ', - currentArrayData.store.url, - $props.dataKey, - $props.url, - current?.url - ); if (current?.url != $props.url) newArrayData.fetch({ append: false }); if (newArrayData.store.data) emit('onFetch', newArrayData.store.data); return newArrayData; }); - -watch( - () => arrayData, - (arrayData) => { - console.log('watch CHANGE??', arrayDataStore.get($props.dataKey)); - }, - { deep: true } -); en: mana: Is paid with mana dialog title: Change destination to all selected rows + dialogGreuge title: Insert greuges on client card + ClaimGreugeDescription: Claim Id + es: mana: Cargado al maná Delivered: Descripción @@ -443,4 +553,6 @@ es: Import claim: Importar reclamación dialog title: Cambiar destino en todas las filas seleccionadas Remove: Eliminar + dialogGreuge title: Insertar greuges en la ficha del cliente + ClaimGreugeDescription: Id reclamación diff --git a/src/pages/Claim/Card/ClaimDescriptor.vue b/src/pages/Claim/Card/ClaimDescriptor.vue index 0fd7184ec..00f48f36f 100644 --- a/src/pages/Claim/Card/ClaimDescriptor.vue +++ b/src/pages/Claim/Card/ClaimDescriptor.vue @@ -69,7 +69,6 @@ function stateColor(code) { } const data = ref(useCardDescription()); const setData = (entity) => { - console.log('SET ENTITY SETDATA', entity); if (!entity) return; data.value = useCardDescription(entity.client.name, entity.id); state.set('ClaimDescriptor', entity); diff --git a/src/pages/Claim/Card/ClaimDevelopment.vue b/src/pages/Claim/Card/ClaimDevelopment.vue index 36f124142..4a31747bf 100644 --- a/src/pages/Claim/Card/ClaimDevelopment.vue +++ b/src/pages/Claim/Card/ClaimDevelopment.vue @@ -7,6 +7,7 @@ import FetchData from 'components/FetchData.vue'; import VnSelectFilter from 'components/common/VnSelectFilter.vue'; import { getUrl } from 'composables/getUrl'; import { tMobile } from 'composables/tMobile'; +import router from 'src/router'; const route = useRoute(); @@ -102,10 +103,6 @@ const columns = computed(() => [ tabIndex: 5, }, ]); - -function goToAction() { - location.href = `${salixUrl}/action`; -}