From 628fc888ba0916d69b763bc57ed654fa58f3aaa1 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 15 May 2024 14:31:51 +0200 Subject: [PATCH] fix: refs #7281 fix warnings --- src/components/CreateBankEntityForm.vue | 7 +------ src/components/FormModelPopup.vue | 2 +- src/components/FormPopup.vue | 2 +- src/components/common/SendEmailDialog.vue | 6 ++++-- src/components/ui/VnLinkPhone.vue | 11 +++-------- src/components/ui/VnTree.vue | 2 +- src/pages/Agency/Card/AgencySummary.vue | 7 ------- src/pages/Claim/ClaimList.vue | 1 - src/pages/Customer/Card/CustomerAddress.vue | 4 ++-- src/pages/Customer/Card/CustomerWebAccess.vue | 1 - .../Customer/Card/CustomerWebPayment.vue | 1 - .../components/CustomerAddressCreate.vue | 1 - .../components/CustomerAddressEdit.vue | 1 - .../components/CustomerNewCustomsAgent.vue | 1 - src/pages/Entry/Card/EntrySummary.vue | 1 - src/pages/Item/ItemFixedPrice.vue | 6 +++--- src/pages/Monitor/SalesOrdersTable.vue | 2 -- src/pages/Monitor/SalesTicketsTable.vue | 19 +++---------------- src/pages/Order/Card/OrderForm.vue | 2 +- src/pages/Route/Roadmap/RoadmapCreate.vue | 9 ++------- src/pages/Shelving/Card/ShelvingSummary.vue | 17 +++-------------- .../Supplier/Card/SupplierAddressesCreate.vue | 11 +---------- .../Supplier/Card/SupplierConsumption.vue | 2 +- src/pages/Travel/TravelFilter.vue | 1 - src/pages/Wagon/Type/WagonTypeList.vue | 1 - src/pages/Worker/WorkerCreate.vue | 1 - src/pages/Zone/ZoneList.vue | 13 +++---------- 27 files changed, 30 insertions(+), 102 deletions(-) diff --git a/src/components/CreateBankEntityForm.vue b/src/components/CreateBankEntityForm.vue index 068646c9a..fb50865a1 100644 --- a/src/components/CreateBankEntityForm.vue +++ b/src/components/CreateBankEntityForm.vue @@ -8,12 +8,7 @@ import FetchData from 'components/FetchData.vue'; import VnRow from 'components/ui/VnRow.vue'; import FormModelPopup from './FormModelPopup.vue'; -const props = defineProps({ - showEntityField: { - type: Boolean, - default: true, - }, -}); +defineProps({ showEntityField: { type: Boolean, default: true } }); const emit = defineEmits(['onDataSaved']); const { t } = useI18n(); diff --git a/src/components/FormModelPopup.vue b/src/components/FormModelPopup.vue index c5caf9778..25213a8b7 100644 --- a/src/components/FormModelPopup.vue +++ b/src/components/FormModelPopup.vue @@ -6,7 +6,7 @@ import FormModel from 'components/FormModel.vue'; const emit = defineEmits(['onDataSaved']); -const $props = defineProps({ +defineProps({ title: { type: String, default: '', diff --git a/src/components/FormPopup.vue b/src/components/FormPopup.vue index e203a7c75..2da986006 100644 --- a/src/components/FormPopup.vue +++ b/src/components/FormPopup.vue @@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n'; const emit = defineEmits(['onSubmit']); -const $props = defineProps({ +defineProps({ title: { type: String, default: '', diff --git a/src/components/common/SendEmailDialog.vue b/src/components/common/SendEmailDialog.vue index 501c48a4d..d73133921 100644 --- a/src/components/common/SendEmailDialog.vue +++ b/src/components/common/SendEmailDialog.vue @@ -29,10 +29,12 @@ async function confirm() { const response = { address: address.value }; if (props.promise) { isLoading.value = true; - const { address: _address, ...restData } = props.data; try { - Object.assign(response, restData); + const dataCopy = JSON.parse(JSON.stringify({ ...props.data })); + delete dataCopy.address; + + Object.assign(response, dataCopy); await props.promise(response); } finally { isLoading.value = false; diff --git a/src/components/ui/VnLinkPhone.vue b/src/components/ui/VnLinkPhone.vue index b04ab3e5b..3ce0b7aa6 100644 --- a/src/components/ui/VnLinkPhone.vue +++ b/src/components/ui/VnLinkPhone.vue @@ -1,21 +1,16 @@ - diff --git a/src/components/ui/VnTree.vue b/src/components/ui/VnTree.vue index 13aa05635..928d045e9 100644 --- a/src/components/ui/VnTree.vue +++ b/src/components/ui/VnTree.vue @@ -90,7 +90,7 @@ const onNodeCreated = async () => { await fetchNodeLeaves(creationNodeSelectedId.value); }; -onMounted(async (n) => { +onMounted(async () => { const tree = [...state.get('Tree'), 1]; const lastStateTree = state.get('TreeState'); if (tree) { diff --git a/src/pages/Agency/Card/AgencySummary.vue b/src/pages/Agency/Card/AgencySummary.vue index a4a6a2a18..d2cf41763 100644 --- a/src/pages/Agency/Card/AgencySummary.vue +++ b/src/pages/Agency/Card/AgencySummary.vue @@ -3,11 +3,9 @@ import { computed } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; -import FetchData from 'src/components/FetchData.vue'; import CardSummary from 'components/ui/CardSummary.vue'; import VnLv from 'components/ui/VnLv.vue'; import VnTitle from 'src/components/common/VnTitle.vue'; -import VnSelect from 'src/components/common/VnSelect.vue'; const $props = defineProps({ id: { @@ -18,11 +16,6 @@ const $props = defineProps({ const { params } = useRoute(); const { t } = useI18n(); const entityId = computed(() => $props.id || params.id); - -const filter = { - fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'], - include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }], -};