From 5c5f154c3e91e0a52786233e534fb7c0d76ed094 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 8 Nov 2023 02:58:45 +0100 Subject: [PATCH 01/15] approach to use i18n for each module --- src/pages/InvoiceIn/Card/InvoiceInCard.vue | 12 +++--------- src/pages/InvoiceIn/Card/InvoiceInSummary.vue | 8 ++------ src/pages/InvoiceIn/InvoiceInList.vue | 11 +++-------- src/pages/InvoiceIn/i18n.json | 8 ++++++++ src/pages/InvoiceIn/i18n/en.json | 3 +++ src/pages/InvoiceIn/i18n/es.json | 3 +++ src/pages/InvoiceIn/in18n.js | 19 +++++++++++++++++++ 7 files changed, 41 insertions(+), 23 deletions(-) create mode 100644 src/pages/InvoiceIn/i18n.json create mode 100644 src/pages/InvoiceIn/i18n/en.json create mode 100644 src/pages/InvoiceIn/i18n/es.json create mode 100644 src/pages/InvoiceIn/in18n.js diff --git a/src/pages/InvoiceIn/Card/InvoiceInCard.vue b/src/pages/InvoiceIn/Card/InvoiceInCard.vue index 4d06cb41e..ef3bafe59 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInCard.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInCard.vue @@ -7,9 +7,9 @@ import VnSearchbar from 'components/ui/VnSearchbar.vue'; import { useArrayData } from 'src/composables/useArrayData'; import { onMounted, watch } from 'vue'; import { useRoute } from 'vue-router'; - const stateStore = useStateStore(); -const { t } = useI18n(); +import in18n from '../in18n'; +const { t } = useI18n(in18n); const route = useRoute(); const filter = { @@ -61,7 +61,7 @@ onMounted(async () => { @@ -83,9 +83,3 @@ onMounted(async () => { - - - es: - Search invoice: Buscar factura emitida - You can search by invoice reference: Puedes buscar por referencia de la factura - diff --git a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue index 6c3f0838c..370dc786d 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue @@ -8,6 +8,7 @@ import { downloadFile } from 'src/composables/downloadFile'; import CardSummary from 'components/ui/CardSummary.vue'; import VnLv from 'src/components/ui/VnLv.vue'; +import in18n from '../in18n'; onMounted(async () => { salixUrl.value = await getUrl(''); @@ -15,7 +16,7 @@ onMounted(async () => { }); const route = useRoute(); -const { t } = useI18n(); +const { t } = useI18n(in18n); const $props = defineProps({ id: { @@ -453,8 +454,3 @@ function setData(entity) { width: 16em; } - - es: - Search invoice: Buscar factura emitida - You can search by invoice reference: Puedes buscar por referencia de la factura - diff --git a/src/pages/InvoiceIn/InvoiceInList.vue b/src/pages/InvoiceIn/InvoiceInList.vue index 692251bff..78b94ba81 100644 --- a/src/pages/InvoiceIn/InvoiceInList.vue +++ b/src/pages/InvoiceIn/InvoiceInList.vue @@ -13,12 +13,13 @@ import CardList from 'src/components/ui/CardList.vue'; import InvoiceInFilter from './InvoiceInFilter.vue'; import InvoiceInSummaryDialog from './Card/InvoiceInSummaryDialog.vue'; import { getUrl } from 'src/composables/getUrl'; +import in18n from './in18n'; const stateStore = useStateStore(); const router = useRouter(); const quasar = useQuasar(); let url = ref(); -const { t } = useI18n(); +const { t } = useI18n(in18n); onMounted(async () => { stateStore.rightDrawer = true; @@ -45,7 +46,7 @@ function viewSummary(id) { @@ -171,9 +172,3 @@ function viewSummary(id) { max-width: 60em; } - - -es: - Search invoice: Buscar factura emitida - You can search by invoice reference: Puedes buscar por referencia de la factura - diff --git a/src/pages/InvoiceIn/i18n.json b/src/pages/InvoiceIn/i18n.json new file mode 100644 index 000000000..eceaca723 --- /dev/null +++ b/src/pages/InvoiceIn/i18n.json @@ -0,0 +1,8 @@ +{ + "es": { + "searchInvoice": "Buscar factura emitida" + }, + "en": { + "searchInvoice": "Seaasdrch invoice" + } +} diff --git a/src/pages/InvoiceIn/i18n/en.json b/src/pages/InvoiceIn/i18n/en.json new file mode 100644 index 000000000..c45940398 --- /dev/null +++ b/src/pages/InvoiceIn/i18n/en.json @@ -0,0 +1,3 @@ +{ + "searchInvoice": "Seaasdrch invoice" +} diff --git a/src/pages/InvoiceIn/i18n/es.json b/src/pages/InvoiceIn/i18n/es.json new file mode 100644 index 000000000..82e3a8890 --- /dev/null +++ b/src/pages/InvoiceIn/i18n/es.json @@ -0,0 +1,3 @@ +{ + "searchInvoice": "Buasdscar factura emitida" +} diff --git a/src/pages/InvoiceIn/in18n.js b/src/pages/InvoiceIn/in18n.js new file mode 100644 index 000000000..ea48a6a3e --- /dev/null +++ b/src/pages/InvoiceIn/in18n.js @@ -0,0 +1,19 @@ +// OPTION 1 +import en from './i18n/en.json'; +import es from './i18n/es.json'; + +// OPTION 2 +import _messages from './i18n.json'; + +// OPTION 3 +const messages = { + en: { + searchInvoice: 'Search invoice', + }, + es: { + searchInvoice: 'Buscar factura emitida', + }, +}; +export default { + messages: _messages, +}; -- 2.40.1 From a1414cbefd33f05d8e2d88b2e026070f31318742 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 8 Nov 2023 03:00:11 +0100 Subject: [PATCH 02/15] refs #6416 feat: VnTable --- src/components/ui/VnTable.vue | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/components/ui/VnTable.vue diff --git a/src/components/ui/VnTable.vue b/src/components/ui/VnTable.vue new file mode 100644 index 000000000..4f1a9ae0b --- /dev/null +++ b/src/components/ui/VnTable.vue @@ -0,0 +1,24 @@ + + + -- 2.40.1 From 147bbb5c44182991f622fec5702f6f95255bc8c6 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 8 Nov 2023 03:00:23 +0100 Subject: [PATCH 03/15] refs #6416 feat: VnCardSection --- src/components/ui/VnCardSection.vue | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/components/ui/VnCardSection.vue diff --git a/src/components/ui/VnCardSection.vue b/src/components/ui/VnCardSection.vue new file mode 100644 index 000000000..0ea9af1c4 --- /dev/null +++ b/src/components/ui/VnCardSection.vue @@ -0,0 +1,17 @@ + + + -- 2.40.1 From ce0a327f9b4b1f208317b0910059e6b8155abc4a Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 8 Nov 2023 03:00:30 +0100 Subject: [PATCH 04/15] refs #6416 feat: VnCard --- src/components/ui/VnCard.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/components/ui/VnCard.vue diff --git a/src/components/ui/VnCard.vue b/src/components/ui/VnCard.vue new file mode 100644 index 000000000..ca4a02009 --- /dev/null +++ b/src/components/ui/VnCard.vue @@ -0,0 +1,18 @@ + + + -- 2.40.1 From 5f3c39f74781088ce96ab8c5a389e3147a428daa Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 8 Nov 2023 03:01:18 +0100 Subject: [PATCH 05/15] refs #6416 feat: use custom Vn cmp 1/2 --- src/pages/InvoiceIn/Card/InvoiceInSummary.vue | 148 ++++++++---------- 1 file changed, 63 insertions(+), 85 deletions(-) diff --git a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue index 370dc786d..66db3608e 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue @@ -8,6 +8,9 @@ import { downloadFile } from 'src/composables/downloadFile'; import CardSummary from 'components/ui/CardSummary.vue'; import VnLv from 'src/components/ui/VnLv.vue'; +import VnTable from 'src/components/ui/VnTable.vue'; +import VnCardSection from 'src/components/ui/VnCardSection.vue'; +import VnCard from 'src/components/ui/VnCard.vue'; import in18n from '../in18n'; onMounted(async () => { @@ -355,93 +358,67 @@ function setData(entity) { /> - - - {{ t('invoiceIn.card.vat') }} - - - - - - + + + + - -
- {{ t('invoiceIn.card.dueDay') }} -
- - - - -
+ + + + - -
- {{ t('invoiceIn.card.intrastat') }} -
- - - - -
+ + + + @@ -449,6 +426,7 @@ function setData(entity) { .bg { background-color: var(--vn-light-gray); } + .bordered { border: 1px solid var(--vn-text); width: 16em; -- 2.40.1 From dfc727e8137d73966898c61e0b3f0aa3c6c99ee1 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 8 Nov 2023 04:09:05 +0100 Subject: [PATCH 06/15] refs #6416 feat: remove almost all quasar refs --- src/pages/InvoiceIn/Card/InvoiceInSummary.vue | 302 +++++++++--------- 1 file changed, 144 insertions(+), 158 deletions(-) diff --git a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue index 66db3608e..5de19f6cb 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue @@ -11,7 +11,10 @@ import VnLv from 'src/components/ui/VnLv.vue'; import VnTable from 'src/components/ui/VnTable.vue'; import VnCardSection from 'src/components/ui/VnCardSection.vue'; import VnCard from 'src/components/ui/VnCard.vue'; +import VnIcon from 'src/components/ui/VnIcon.vue'; +import VnBtn from 'src/components/ui/VnBtn.vue'; import in18n from '../in18n'; +import VnChip from 'src/components/ui/VnChip.vue'; onMounted(async () => { salixUrl.value = await getUrl(''); @@ -197,166 +200,129 @@ function setData(entity) { @@ -351,15 +346,12 @@ function setData(entity) { @@ -372,16 +364,13 @@ function setData(entity) { > - -- 2.40.1 From 5e3ce33b5b1bcdd2db9a6653566414945a8bf08f Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 10 Nov 2023 09:59:49 +0100 Subject: [PATCH 13/15] refs #6416 perf: VnTable local styles --- src/components/ui/VnTable.vue | 6 +++++- src/pages/InvoiceIn/Card/InvoiceInSummary.vue | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/ui/VnTable.vue b/src/components/ui/VnTable.vue index 90e7e615e..2ce8bc09c 100644 --- a/src/components/ui/VnTable.vue +++ b/src/components/ui/VnTable.vue @@ -27,4 +27,8 @@ const { t } = useI18n(); - + diff --git a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue index 497d18735..4c5507dcc 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue @@ -398,9 +398,6 @@ function setData(entity) { } } } -.bg { - background-color: var(--vn-light-gray); -} .bordered { border: 1px solid var(--vn-text); -- 2.40.1 From 7f25059206213e4795d39b663cff4d8318dacd9e Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 10 Nov 2023 10:03:01 +0100 Subject: [PATCH 14/15] refs #6416 test: create spec file for each Vn --- .../__tests__/components/common/VnBtn.js | 75 +++++++++++++++++++ .../__tests__/components/common/VnCard.js | 75 +++++++++++++++++++ .../components/common/VnCardSection.js | 75 +++++++++++++++++++ .../__tests__/components/common/VnChip.js | 75 +++++++++++++++++++ .../__tests__/components/common/VnTable.js | 75 +++++++++++++++++++ 5 files changed, 375 insertions(+) create mode 100644 test/vitest/__tests__/components/common/VnBtn.js create mode 100644 test/vitest/__tests__/components/common/VnCard.js create mode 100644 test/vitest/__tests__/components/common/VnCardSection.js create mode 100644 test/vitest/__tests__/components/common/VnChip.js create mode 100644 test/vitest/__tests__/components/common/VnTable.js diff --git a/test/vitest/__tests__/components/common/VnBtn.js b/test/vitest/__tests__/components/common/VnBtn.js new file mode 100644 index 000000000..c6dc1cd9e --- /dev/null +++ b/test/vitest/__tests__/components/common/VnBtn.js @@ -0,0 +1,75 @@ +import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest'; +import { createWrapper } from 'app/test/vitest/helper'; +import VnBtn from 'src/components/common/VnBtn.vue'; + +describe('VnBtn', () => { + let vm; + beforeAll(() => { + vm = createWrapper(VnBtn, { + global: { + stubs: ['FetchData', 'VnPaginate'], + mocks: { + fetch: vi.fn(), + }, + }, + propsData: { + model: 'Claim', + }, + }).vm; + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + describe('formatValue()', () => { + it('should return Yes if has a true boolean', async () => { + const result = vm.formatValue(true); + + expect(result).toEqual('Yes'); + }); + it('should return No if has a true boolean', async () => { + const result = vm.formatValue(false); + + expect(result).toEqual('No'); + }); + it('should return Nothing if has no params', async () => { + const result = vm.formatValue(); + + expect(result).toEqual('Nothing'); + }); + it('should return a string from a string value', async () => { + const result = vm.formatValue('Something'); + + expect(result).toEqual(`"Something"`); + }); + it('should call to format a date', async () => { + vi.mock('src/filters', () => ({ + toDate: () => { + return 'Date formatted'; + }, + })); + + const result = vm.formatValue('01-01-1970'); + expect(result).toEqual('Date formatted'); + }); + }); + + describe('actionColor()', () => { + it('should return positive if insert', async () => { + const result = vm.actionColor('insert'); + + expect(result).toEqual('positive'); + }); + it('should return positive if update', async () => { + const result = vm.actionColor('update'); + + expect(result).toEqual('positive'); + }); + it('should return negative if delete', async () => { + const result = vm.actionColor('delete'); + + expect(result).toEqual('negative'); + }); + }); +}); diff --git a/test/vitest/__tests__/components/common/VnCard.js b/test/vitest/__tests__/components/common/VnCard.js new file mode 100644 index 000000000..ba9221d20 --- /dev/null +++ b/test/vitest/__tests__/components/common/VnCard.js @@ -0,0 +1,75 @@ +import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest'; +import { createWrapper } from 'app/test/vitest/helper'; +import VnCard from 'src/components/common/VnCard.vue'; + +describe('VnCard', () => { + let vm; + beforeAll(() => { + vm = createWrapper(VnCard, { + global: { + stubs: ['FetchData', 'VnPaginate'], + mocks: { + fetch: vi.fn(), + }, + }, + propsData: { + model: 'Claim', + }, + }).vm; + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + describe('formatValue()', () => { + it('should return Yes if has a true boolean', async () => { + const result = vm.formatValue(true); + + expect(result).toEqual('Yes'); + }); + it('should return No if has a true boolean', async () => { + const result = vm.formatValue(false); + + expect(result).toEqual('No'); + }); + it('should return Nothing if has no params', async () => { + const result = vm.formatValue(); + + expect(result).toEqual('Nothing'); + }); + it('should return a string from a string value', async () => { + const result = vm.formatValue('Something'); + + expect(result).toEqual(`"Something"`); + }); + it('should call to format a date', async () => { + vi.mock('src/filters', () => ({ + toDate: () => { + return 'Date formatted'; + }, + })); + + const result = vm.formatValue('01-01-1970'); + expect(result).toEqual('Date formatted'); + }); + }); + + describe('actionColor()', () => { + it('should return positive if insert', async () => { + const result = vm.actionColor('insert'); + + expect(result).toEqual('positive'); + }); + it('should return positive if update', async () => { + const result = vm.actionColor('update'); + + expect(result).toEqual('positive'); + }); + it('should return negative if delete', async () => { + const result = vm.actionColor('delete'); + + expect(result).toEqual('negative'); + }); + }); +}); diff --git a/test/vitest/__tests__/components/common/VnCardSection.js b/test/vitest/__tests__/components/common/VnCardSection.js new file mode 100644 index 000000000..5c906a3d8 --- /dev/null +++ b/test/vitest/__tests__/components/common/VnCardSection.js @@ -0,0 +1,75 @@ +import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest'; +import { createWrapper } from 'app/test/vitest/helper'; +import VnCardSection from 'src/components/common/VnCardSection.vue'; + +describe('VnCardSection', () => { + let vm; + beforeAll(() => { + vm = createWrapper(VnCardSection, { + global: { + stubs: ['FetchData', 'VnPaginate'], + mocks: { + fetch: vi.fn(), + }, + }, + propsData: { + model: 'Claim', + }, + }).vm; + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + describe('formatValue()', () => { + it('should return Yes if has a true boolean', async () => { + const result = vm.formatValue(true); + + expect(result).toEqual('Yes'); + }); + it('should return No if has a true boolean', async () => { + const result = vm.formatValue(false); + + expect(result).toEqual('No'); + }); + it('should return Nothing if has no params', async () => { + const result = vm.formatValue(); + + expect(result).toEqual('Nothing'); + }); + it('should return a string from a string value', async () => { + const result = vm.formatValue('Something'); + + expect(result).toEqual(`"Something"`); + }); + it('should call to format a date', async () => { + vi.mock('src/filters', () => ({ + toDate: () => { + return 'Date formatted'; + }, + })); + + const result = vm.formatValue('01-01-1970'); + expect(result).toEqual('Date formatted'); + }); + }); + + describe('actionColor()', () => { + it('should return positive if insert', async () => { + const result = vm.actionColor('insert'); + + expect(result).toEqual('positive'); + }); + it('should return positive if update', async () => { + const result = vm.actionColor('update'); + + expect(result).toEqual('positive'); + }); + it('should return negative if delete', async () => { + const result = vm.actionColor('delete'); + + expect(result).toEqual('negative'); + }); + }); +}); diff --git a/test/vitest/__tests__/components/common/VnChip.js b/test/vitest/__tests__/components/common/VnChip.js new file mode 100644 index 000000000..f8901dd10 --- /dev/null +++ b/test/vitest/__tests__/components/common/VnChip.js @@ -0,0 +1,75 @@ +import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest'; +import { createWrapper } from 'app/test/vitest/helper'; +import VnChip from 'src/components/common/VnChip.vue'; + +describe('VnChip', () => { + let vm; + beforeAll(() => { + vm = createWrapper(VnChip, { + global: { + stubs: ['FetchData', 'VnPaginate'], + mocks: { + fetch: vi.fn(), + }, + }, + propsData: { + model: 'Claim', + }, + }).vm; + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + describe('formatValue()', () => { + it('should return Yes if has a true boolean', async () => { + const result = vm.formatValue(true); + + expect(result).toEqual('Yes'); + }); + it('should return No if has a true boolean', async () => { + const result = vm.formatValue(false); + + expect(result).toEqual('No'); + }); + it('should return Nothing if has no params', async () => { + const result = vm.formatValue(); + + expect(result).toEqual('Nothing'); + }); + it('should return a string from a string value', async () => { + const result = vm.formatValue('Something'); + + expect(result).toEqual(`"Something"`); + }); + it('should call to format a date', async () => { + vi.mock('src/filters', () => ({ + toDate: () => { + return 'Date formatted'; + }, + })); + + const result = vm.formatValue('01-01-1970'); + expect(result).toEqual('Date formatted'); + }); + }); + + describe('actionColor()', () => { + it('should return positive if insert', async () => { + const result = vm.actionColor('insert'); + + expect(result).toEqual('positive'); + }); + it('should return positive if update', async () => { + const result = vm.actionColor('update'); + + expect(result).toEqual('positive'); + }); + it('should return negative if delete', async () => { + const result = vm.actionColor('delete'); + + expect(result).toEqual('negative'); + }); + }); +}); diff --git a/test/vitest/__tests__/components/common/VnTable.js b/test/vitest/__tests__/components/common/VnTable.js new file mode 100644 index 000000000..9ebc78a04 --- /dev/null +++ b/test/vitest/__tests__/components/common/VnTable.js @@ -0,0 +1,75 @@ +import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest'; +import { createWrapper } from 'app/test/vitest/helper'; +import VnTable from 'src/components/common/VnTable.vue'; + +describe('VnTable', () => { + let vm; + beforeAll(() => { + vm = createWrapper(VnTable, { + global: { + stubs: ['FetchData', 'VnPaginate'], + mocks: { + fetch: vi.fn(), + }, + }, + propsData: { + model: 'Claim', + }, + }).vm; + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + describe('formatValue()', () => { + it('should return Yes if has a true boolean', async () => { + const result = vm.formatValue(true); + + expect(result).toEqual('Yes'); + }); + it('should return No if has a true boolean', async () => { + const result = vm.formatValue(false); + + expect(result).toEqual('No'); + }); + it('should return Nothing if has no params', async () => { + const result = vm.formatValue(); + + expect(result).toEqual('Nothing'); + }); + it('should return a string from a string value', async () => { + const result = vm.formatValue('Something'); + + expect(result).toEqual(`"Something"`); + }); + it('should call to format a date', async () => { + vi.mock('src/filters', () => ({ + toDate: () => { + return 'Date formatted'; + }, + })); + + const result = vm.formatValue('01-01-1970'); + expect(result).toEqual('Date formatted'); + }); + }); + + describe('actionColor()', () => { + it('should return positive if insert', async () => { + const result = vm.actionColor('insert'); + + expect(result).toEqual('positive'); + }); + it('should return positive if update', async () => { + const result = vm.actionColor('update'); + + expect(result).toEqual('positive'); + }); + it('should return negative if delete', async () => { + const result = vm.actionColor('delete'); + + expect(result).toEqual('negative'); + }); + }); +}); -- 2.40.1 From a87ac6bbe69589d7bc00ed0acde42d6b14457c89 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 19 Feb 2024 14:12:54 +0100 Subject: [PATCH 15/15] refs #6416 feat: VnTeleport --- src/components/CrudModel.vue | 79 ++++++++++--------- src/components/ui/VnTeleport.vue | 14 ++++ src/pages/Claim/Card/ClaimAction.vue | 4 +- src/pages/Claim/Card/ClaimLines.vue | 39 ++++----- src/pages/Entry/Card/EntryBuys.vue | 34 ++++---- src/pages/Entry/Card/EntryBuysImport.vue | 49 ++++++------ .../InvoiceOut/InvoiceOutNegativeBases.vue | 14 +++- .../Supplier/Card/SupplierConsumption.vue | 57 ++++++------- .../Travel/Card/TravelThermographsForm.vue | 48 +++++------ 9 files changed, 189 insertions(+), 149 deletions(-) create mode 100644 src/components/ui/VnTeleport.vue diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 9bb05d439..5b6f43912 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -4,14 +4,15 @@ import { computed, ref, watch } from 'vue'; import { useI18n } from 'vue-i18n'; import { useQuasar } from 'quasar'; import { useValidator } from 'src/composables/useValidator'; -import { useStateStore } from 'stores/useStateStore'; +// import { useStateStore } from 'stores/useStateStore'; import VnPaginate from 'components/ui/VnPaginate.vue'; import VnConfirm from 'components/ui/VnConfirm.vue'; import SkeletonTable from 'components/ui/SkeletonTable.vue'; import { tMobile } from 'src/composables/tMobile'; +import VnTeleport from 'components/ui/VnTeleport.vue'; const quasar = useQuasar(); -const stateStore = useStateStore(); +// const stateStore = useStateStore(); const { t } = useI18n(); const { validate } = useValidator(); @@ -275,42 +276,44 @@ watch(formUrl, async () => { - - - - - - - - - + + + +import { useStateStore } from 'stores/useStateStore'; + +const stateStore = useStateStore(); + + + diff --git a/src/pages/Claim/Card/ClaimAction.vue b/src/pages/Claim/Card/ClaimAction.vue index ef45bf3dc..18a620419 100644 --- a/src/pages/Claim/Card/ClaimAction.vue +++ b/src/pages/Claim/Card/ClaimAction.vue @@ -13,6 +13,7 @@ import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; import VnConfirm from 'src/components/ui/VnConfirm.vue'; import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue'; import { useArrayData } from 'composables/useArrayData'; +import VnTeleport from 'components/ui/VnTeleport.vue'; const { t } = useI18n(); const quasar = useQuasar(); @@ -267,7 +268,8 @@ async function importToNewRefundTicket() { /> - + +