From ca7aae631531783e0f39c71a1169418c50a3e1b1 Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Thu, 23 Nov 2023 20:26:50 -0300 Subject: [PATCH 1/2] Update filter implementation --- src/components/FetchData.vue | 2 +- src/components/FormModel.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/FetchData.vue b/src/components/FetchData.vue index 251d7502a..f0d908972 100644 --- a/src/components/FetchData.vue +++ b/src/components/FetchData.vue @@ -46,7 +46,7 @@ async function fetch() { if ($props.limit) filter.limit = $props.limit; const { data } = await axios.get($props.url, { - params: { filter }, + params: { filter: JSON.stringify(filter) }, }); emit('onFetch', data); diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index e8a9e4c17..90f19bb59 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -61,7 +61,7 @@ function tMobile(...args) { async function fetch() { const { data } = await axios.get($props.url, { - params: { filter: $props.filter }, + params: { filter: JSON.stringify($props.filter) }, }); state.set($props.model, data); From bffe6b0664019e85370be4f40fecce6830acadc9 Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Thu, 23 Nov 2023 20:27:06 -0300 Subject: [PATCH 2/2] Add create shelving page --- src/i18n/en/index.js | 2 +- src/i18n/es/index.js | 2 +- src/pages/Shelving/ShelvingBasicData.vue | 37 ++++++ src/pages/Shelving/ShelvingCreate.vue | 69 ++++++++++++ src/pages/Shelving/ShelvingList.vue | 10 +- .../Shelving/Summary/ShelvingBasicData.vue | 105 ------------------ .../{ => components}/ShelvingFilter.vue | 0 .../Shelving/components/ShelvingForm.vue | 100 +++++++++++++++++ src/router/modules/shelving.js | 12 +- 9 files changed, 227 insertions(+), 110 deletions(-) create mode 100644 src/pages/Shelving/ShelvingBasicData.vue create mode 100644 src/pages/Shelving/ShelvingCreate.vue delete mode 100644 src/pages/Shelving/Summary/ShelvingBasicData.vue rename src/pages/Shelving/{ => components}/ShelvingFilter.vue (100%) create mode 100644 src/pages/Shelving/components/ShelvingForm.vue diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 01a54cfbb..4ba680497 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -428,7 +428,7 @@ export default { pageTitles: { shelving: 'Shelving', shelvingList: 'Shelving List', - createShelving: 'Create shelving', + create: 'Create', summary: 'Summary', basicData: 'Basic Data', }, diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 829fe6221..a8d8dbccb 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -430,7 +430,7 @@ export default { pageTitles: { shelving: 'Carros', shelvingList: 'Listado de carros', - createShelving: 'Crear carro', + create: 'Crear', summary: 'Resumen', basicData: 'Datos básicos', }, diff --git a/src/pages/Shelving/ShelvingBasicData.vue b/src/pages/Shelving/ShelvingBasicData.vue new file mode 100644 index 000000000..1894a2143 --- /dev/null +++ b/src/pages/Shelving/ShelvingBasicData.vue @@ -0,0 +1,37 @@ + + diff --git a/src/pages/Shelving/ShelvingCreate.vue b/src/pages/Shelving/ShelvingCreate.vue new file mode 100644 index 000000000..130361f69 --- /dev/null +++ b/src/pages/Shelving/ShelvingCreate.vue @@ -0,0 +1,69 @@ + + + diff --git a/src/pages/Shelving/ShelvingList.vue b/src/pages/Shelving/ShelvingList.vue index e18bb8b92..ca4050cfc 100644 --- a/src/pages/Shelving/ShelvingList.vue +++ b/src/pages/Shelving/ShelvingList.vue @@ -7,7 +7,7 @@ import CardList2 from 'components/ui/CardList2.vue'; import VnLv from 'components/ui/VnLv.vue'; import { useQuasar } from 'quasar'; import { useRouter } from 'vue-router'; -import ShelvingFilter from 'pages/Shelving/ShelvingFilter.vue'; +import ShelvingFilter from 'pages/Shelving/components/ShelvingFilter.vue'; import ShelvingSummaryDialog from 'pages/Shelving/Summary/ShelvingSummaryDialog.vue'; import ShelvingSearchbar from 'pages/Shelving/components/ShelvingSearchbar.vue'; @@ -109,6 +109,14 @@ function viewSummary(id) { + + + + + {{ t('supplier.list.newSupplier') }} + + + diff --git a/src/pages/Shelving/Summary/ShelvingBasicData.vue b/src/pages/Shelving/Summary/ShelvingBasicData.vue deleted file mode 100644 index de2867e73..000000000 --- a/src/pages/Shelving/Summary/ShelvingBasicData.vue +++ /dev/null @@ -1,105 +0,0 @@ - - diff --git a/src/pages/Shelving/ShelvingFilter.vue b/src/pages/Shelving/components/ShelvingFilter.vue similarity index 100% rename from src/pages/Shelving/ShelvingFilter.vue rename to src/pages/Shelving/components/ShelvingFilter.vue diff --git a/src/pages/Shelving/components/ShelvingForm.vue b/src/pages/Shelving/components/ShelvingForm.vue new file mode 100644 index 000000000..d919a05ba --- /dev/null +++ b/src/pages/Shelving/components/ShelvingForm.vue @@ -0,0 +1,100 @@ + + diff --git a/src/router/modules/shelving.js b/src/router/modules/shelving.js index ee60d7461..d8d8d131a 100644 --- a/src/router/modules/shelving.js +++ b/src/router/modules/shelving.js @@ -25,10 +25,18 @@ export default { name: 'ShelvingList', meta: { title: 'shelvingList', - icon: 'vn:trolley', + icon: 'view_list', }, component: () => import('src/pages/Shelving/ShelvingList.vue'), }, + { + path: 'create', + name: 'ShelvingCreate', + meta: { + title: 'create', + }, + component: () => import('src/pages/Shelving/ShelvingCreate.vue'), + }, ], }, { @@ -54,7 +62,7 @@ export default { icon: 'vn:settings', roles: ['salesPerson'], }, - component: () => import('src/pages/Shelving/Summary/ShelvingBasicData.vue'), + component: () => import('pages/Shelving/ShelvingBasicData.vue'), }, ], },