From 1c36b02d9aa284e1e8415966ab603a2888a3fbde Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Mon, 8 Jan 2024 11:38:12 +0530 Subject: [PATCH 001/109] Improved: app to upgrade ionic to v7.6.0(#162) --- package-lock.json | 175 +++++++++++++++++++++++++++++++++------------- package.json | 6 +- 2 files changed, 131 insertions(+), 50 deletions(-) diff --git a/package-lock.json b/package-lock.json index 023ccd35..c6696264 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,9 +15,9 @@ "@hotwax/apps-theme": "^1.2.4", "@hotwax/dxp-components": "^1.11.0", "@hotwax/oms-api": "^1.11.0", - "@ionic/core": "^6.7.5", - "@ionic/vue": "^6.7.5", - "@ionic/vue-router": "^6.7.5", + "@ionic/core": "^7.6.0", + "@ionic/vue": "^7.6.0", + "@ionic/vue-router": "^7.6.0", "@types/file-saver": "^2.0.4", "@types/papaparse": "^5.3.1", "boon-js": "^2.0.3", @@ -2821,6 +2821,45 @@ "vue-i18n": "^9.2.2" } }, + "node_modules/@hotwax/dxp-components/node_modules/@ionic/core": { + "version": "6.7.5", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.7.5.tgz", + "integrity": "sha512-zRkRn+h/Vs3xt/EVgBdShMKDyeGOM4RU31NPF2icfu3CUTH+VrMV569MUnNjYvd1Lu2xK90pYy4TaicSWmC1Pw==", + "dependencies": { + "@stencil/core": "^2.18.0", + "ionicons": "^6.1.3", + "tslib": "^2.1.0" + } + }, + "node_modules/@hotwax/dxp-components/node_modules/@ionic/vue": { + "version": "6.7.5", + "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.7.5.tgz", + "integrity": "sha512-6JBEaHCT2vVUzYqyfBiEUN8Wo7FezxY5Y3n+HGqI61J4qVay+8IxZRTYeX+O72QglbYOkzvfjE6SgS25oS+S9A==", + "dependencies": { + "@ionic/core": "6.7.5", + "ionicons": "^6.1.3" + } + }, + "node_modules/@hotwax/dxp-components/node_modules/@stencil/core": { + "version": "2.22.3", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.22.3.tgz", + "integrity": "sha512-kmVA0M/HojwsfkeHsifvHVIYe4l5tin7J5+DLgtl8h6WWfiMClND5K3ifCXXI2ETDNKiEk21p6jql3Fx9o2rng==", + "bin": { + "stencil": "bin/stencil" + }, + "engines": { + "node": ">=12.10.0", + "npm": ">=6.0.0" + } + }, + "node_modules/@hotwax/dxp-components/node_modules/ionicons": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.1.3.tgz", + "integrity": "sha512-ptzz38dd/Yq+PgjhXegh7yhb/SLIk1bvL9vQDtLv1aoSc7alO6mX2DIMgcKYzt9vrNWkRu1f9Jr78zIFFyOXqw==", + "dependencies": { + "@stencil/core": "^2.18.0" + } + }, "node_modules/@hotwax/dxp-components/node_modules/luxon": { "version": "3.4.4", "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.4.tgz", @@ -2829,6 +2868,11 @@ "node": ">=12" } }, + "node_modules/@hotwax/dxp-components/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/@hotwax/dxp-components/node_modules/vue-i18n": { "version": "9.8.0", "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.8.0.tgz", @@ -3056,12 +3100,12 @@ } }, "node_modules/@ionic/core": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.7.5.tgz", - "integrity": "sha512-zRkRn+h/Vs3xt/EVgBdShMKDyeGOM4RU31NPF2icfu3CUTH+VrMV569MUnNjYvd1Lu2xK90pYy4TaicSWmC1Pw==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-7.6.0.tgz", + "integrity": "sha512-pDX8G915puz8OcLhxfb9MwuvpYZsUOCngJdd+61ibJ6UF+NA2mGatsMqHKzcgelTXtwcHDpi9ZLUD/HNmupqaQ==", "dependencies": { - "@stencil/core": "^2.18.0", - "ionicons": "^6.1.3", + "@stencil/core": "^4.8.1", + "ionicons": "^7.2.1", "tslib": "^2.1.0" } }, @@ -3071,20 +3115,20 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@ionic/vue": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.7.5.tgz", - "integrity": "sha512-6JBEaHCT2vVUzYqyfBiEUN8Wo7FezxY5Y3n+HGqI61J4qVay+8IxZRTYeX+O72QglbYOkzvfjE6SgS25oS+S9A==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-7.6.0.tgz", + "integrity": "sha512-2CWLcVNS8kLQ6BK4UmRdc7a0HSsS6MqyTQh7+0qT88z+Ih05dCcZ3CiJ27F3F2a7jsOi48ggXt97zOpBbZENlg==", "dependencies": { - "@ionic/core": "6.7.5", - "ionicons": "^6.1.3" + "@ionic/core": "7.6.0", + "ionicons": "^7.0.0" } }, "node_modules/@ionic/vue-router": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@ionic/vue-router/-/vue-router-6.7.5.tgz", - "integrity": "sha512-nupLaWFARdy5vOCNg2xw6YpecaR/hPEew+tWjUJE1INlwvB88o7Uct/R480vqFj3fB436W4O4ViJd4/g0ZBZ8A==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@ionic/vue-router/-/vue-router-7.6.0.tgz", + "integrity": "sha512-grzMyURlZX3EqkQFBXeKuhxN2psbNKAI8CVwPi56xRPwCvSp32KFYtGxj20k1QBl+Kzg7/RbxTERArxZRtPWJw==", "dependencies": { - "@ionic/vue": "6.7.5" + "@ionic/vue": "7.6.0" } }, "node_modules/@isaacs/cliui": { @@ -3576,15 +3620,15 @@ "dev": true }, "node_modules/@stencil/core": { - "version": "2.22.3", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.22.3.tgz", - "integrity": "sha512-kmVA0M/HojwsfkeHsifvHVIYe4l5tin7J5+DLgtl8h6WWfiMClND5K3ifCXXI2ETDNKiEk21p6jql3Fx9o2rng==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.9.0.tgz", + "integrity": "sha512-aWSkhBmk3yPwRAkUwBbzRwmdhb8hKiQ/JMr9m5jthpBZLjtppYbzz6PN2MhSMDfRp6K93eQw5WogSEH4HHuB6w==", "bin": { "stencil": "bin/stencil" }, "engines": { - "node": ">=12.10.0", - "npm": ">=6.0.0" + "node": ">=16.0.0", + "npm": ">=7.10.0" } }, "node_modules/@surma/rollup-plugin-off-main-thread": { @@ -10667,11 +10711,11 @@ } }, "node_modules/ionicons": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.1.3.tgz", - "integrity": "sha512-ptzz38dd/Yq+PgjhXegh7yhb/SLIk1bvL9vQDtLv1aoSc7alO6mX2DIMgcKYzt9vrNWkRu1f9Jr78zIFFyOXqw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-7.2.2.tgz", + "integrity": "sha512-I3iYIfc9Q9FRifWyFSwTAvbEABWlWY32i0sAVDDPGYnaIZVugkLCZFbEcrphW6ixVPg8tt1oLwalo/JJwbEqnA==", "dependencies": { - "@stencil/core": "^2.18.0" + "@stencil/core": "^4.0.3" } }, "node_modules/ipaddr.js": { @@ -20499,11 +20543,48 @@ "vue-i18n": "^9.2.2" }, "dependencies": { + "@ionic/core": { + "version": "6.7.5", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.7.5.tgz", + "integrity": "sha512-zRkRn+h/Vs3xt/EVgBdShMKDyeGOM4RU31NPF2icfu3CUTH+VrMV569MUnNjYvd1Lu2xK90pYy4TaicSWmC1Pw==", + "requires": { + "@stencil/core": "^2.18.0", + "ionicons": "^6.1.3", + "tslib": "^2.1.0" + } + }, + "@ionic/vue": { + "version": "6.7.5", + "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.7.5.tgz", + "integrity": "sha512-6JBEaHCT2vVUzYqyfBiEUN8Wo7FezxY5Y3n+HGqI61J4qVay+8IxZRTYeX+O72QglbYOkzvfjE6SgS25oS+S9A==", + "requires": { + "@ionic/core": "6.7.5", + "ionicons": "^6.1.3" + } + }, + "@stencil/core": { + "version": "2.22.3", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.22.3.tgz", + "integrity": "sha512-kmVA0M/HojwsfkeHsifvHVIYe4l5tin7J5+DLgtl8h6WWfiMClND5K3ifCXXI2ETDNKiEk21p6jql3Fx9o2rng==" + }, + "ionicons": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.1.3.tgz", + "integrity": "sha512-ptzz38dd/Yq+PgjhXegh7yhb/SLIk1bvL9vQDtLv1aoSc7alO6mX2DIMgcKYzt9vrNWkRu1f9Jr78zIFFyOXqw==", + "requires": { + "@stencil/core": "^2.18.0" + } + }, "luxon": { "version": "3.4.4", "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.4.tgz", "integrity": "sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA==" }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "vue-i18n": { "version": "9.8.0", "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.8.0.tgz", @@ -20670,12 +20751,12 @@ } }, "@ionic/core": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.7.5.tgz", - "integrity": "sha512-zRkRn+h/Vs3xt/EVgBdShMKDyeGOM4RU31NPF2icfu3CUTH+VrMV569MUnNjYvd1Lu2xK90pYy4TaicSWmC1Pw==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-7.6.0.tgz", + "integrity": "sha512-pDX8G915puz8OcLhxfb9MwuvpYZsUOCngJdd+61ibJ6UF+NA2mGatsMqHKzcgelTXtwcHDpi9ZLUD/HNmupqaQ==", "requires": { - "@stencil/core": "^2.18.0", - "ionicons": "^6.1.3", + "@stencil/core": "^4.8.1", + "ionicons": "^7.2.1", "tslib": "^2.1.0" }, "dependencies": { @@ -20687,20 +20768,20 @@ } }, "@ionic/vue": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.7.5.tgz", - "integrity": "sha512-6JBEaHCT2vVUzYqyfBiEUN8Wo7FezxY5Y3n+HGqI61J4qVay+8IxZRTYeX+O72QglbYOkzvfjE6SgS25oS+S9A==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-7.6.0.tgz", + "integrity": "sha512-2CWLcVNS8kLQ6BK4UmRdc7a0HSsS6MqyTQh7+0qT88z+Ih05dCcZ3CiJ27F3F2a7jsOi48ggXt97zOpBbZENlg==", "requires": { - "@ionic/core": "6.7.5", - "ionicons": "^6.1.3" + "@ionic/core": "7.6.0", + "ionicons": "^7.0.0" } }, "@ionic/vue-router": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/@ionic/vue-router/-/vue-router-6.7.5.tgz", - "integrity": "sha512-nupLaWFARdy5vOCNg2xw6YpecaR/hPEew+tWjUJE1INlwvB88o7Uct/R480vqFj3fB436W4O4ViJd4/g0ZBZ8A==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@ionic/vue-router/-/vue-router-7.6.0.tgz", + "integrity": "sha512-grzMyURlZX3EqkQFBXeKuhxN2psbNKAI8CVwPi56xRPwCvSp32KFYtGxj20k1QBl+Kzg7/RbxTERArxZRtPWJw==", "requires": { - "@ionic/vue": "6.7.5" + "@ionic/vue": "7.6.0" } }, "@isaacs/cliui": { @@ -21091,9 +21172,9 @@ "dev": true }, "@stencil/core": { - "version": "2.22.3", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.22.3.tgz", - "integrity": "sha512-kmVA0M/HojwsfkeHsifvHVIYe4l5tin7J5+DLgtl8h6WWfiMClND5K3ifCXXI2ETDNKiEk21p6jql3Fx9o2rng==" + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.9.0.tgz", + "integrity": "sha512-aWSkhBmk3yPwRAkUwBbzRwmdhb8hKiQ/JMr9m5jthpBZLjtppYbzz6PN2MhSMDfRp6K93eQw5WogSEH4HHuB6w==" }, "@surma/rollup-plugin-off-main-thread": { "version": "2.2.3", @@ -26464,11 +26545,11 @@ } }, "ionicons": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.1.3.tgz", - "integrity": "sha512-ptzz38dd/Yq+PgjhXegh7yhb/SLIk1bvL9vQDtLv1aoSc7alO6mX2DIMgcKYzt9vrNWkRu1f9Jr78zIFFyOXqw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-7.2.2.tgz", + "integrity": "sha512-I3iYIfc9Q9FRifWyFSwTAvbEABWlWY32i0sAVDDPGYnaIZVugkLCZFbEcrphW6ixVPg8tt1oLwalo/JJwbEqnA==", "requires": { - "@stencil/core": "^2.18.0" + "@stencil/core": "^4.0.3" } }, "ipaddr.js": { diff --git a/package.json b/package.json index 7a5a5e79..db1ba05f 100644 --- a/package.json +++ b/package.json @@ -19,9 +19,9 @@ "@hotwax/apps-theme": "^1.2.4", "@hotwax/dxp-components": "^1.11.0", "@hotwax/oms-api": "^1.11.0", - "@ionic/core": "^6.7.5", - "@ionic/vue": "^6.7.5", - "@ionic/vue-router": "^6.7.5", + "@ionic/core": "^7.6.0", + "@ionic/vue": "^7.6.0", + "@ionic/vue-router": "^7.6.0", "@types/file-saver": "^2.0.4", "@types/papaparse": "^5.3.1", "boon-js": "^2.0.3", From 0c227ec2d14127c8776527976711554f6d94ab68 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Mon, 8 Jan 2024 11:39:07 +0530 Subject: [PATCH 002/109] Improved: app theme version to latest(#162) --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index c6696264..6734852b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@capacitor/core": "^2.4.7", "@casl/ability": "^6.0.0", "@hotwax/app-version-info": "^1.0.0", - "@hotwax/apps-theme": "^1.2.4", + "@hotwax/apps-theme": "^1.2.6", "@hotwax/dxp-components": "^1.11.0", "@hotwax/oms-api": "^1.11.0", "@ionic/core": "^7.6.0", @@ -2798,9 +2798,9 @@ "integrity": "sha512-PnJTqTbFvvl9N23yi1DjL4aNmTkpYFrayyoJyfH1qDJXADFbQ9kB7gJmKcfiPpyYMGR86Yf3Is5ct0+wReUJGQ==" }, "node_modules/@hotwax/apps-theme": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@hotwax/apps-theme/-/apps-theme-1.2.5.tgz", - "integrity": "sha512-3Vec4pGWJVs6vDbL/pO5hYqoF1zn2w8liXuleqDJ7waI2R5JuF2eaJmYcUQETnk/DZIg47bDdyOSxihQltB2Ow==" + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@hotwax/apps-theme/-/apps-theme-1.2.6.tgz", + "integrity": "sha512-zpUjGoY7LBlKeiP0V7tonrmoey8HQ5THQmyixQ+IDtrjmEJNBjynW/Ef3gC0FUNNPuVqxWPZdT5CVgaETLGTwg==" }, "node_modules/@hotwax/dxp-components": { "version": "1.11.0", @@ -20520,9 +20520,9 @@ "integrity": "sha512-PnJTqTbFvvl9N23yi1DjL4aNmTkpYFrayyoJyfH1qDJXADFbQ9kB7gJmKcfiPpyYMGR86Yf3Is5ct0+wReUJGQ==" }, "@hotwax/apps-theme": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@hotwax/apps-theme/-/apps-theme-1.2.5.tgz", - "integrity": "sha512-3Vec4pGWJVs6vDbL/pO5hYqoF1zn2w8liXuleqDJ7waI2R5JuF2eaJmYcUQETnk/DZIg47bDdyOSxihQltB2Ow==" + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@hotwax/apps-theme/-/apps-theme-1.2.6.tgz", + "integrity": "sha512-zpUjGoY7LBlKeiP0V7tonrmoey8HQ5THQmyixQ+IDtrjmEJNBjynW/Ef3gC0FUNNPuVqxWPZdT5CVgaETLGTwg==" }, "@hotwax/dxp-components": { "version": "1.11.0", diff --git a/package.json b/package.json index db1ba05f..2df891f6 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@capacitor/core": "^2.4.7", "@casl/ability": "^6.0.0", "@hotwax/app-version-info": "^1.0.0", - "@hotwax/apps-theme": "^1.2.4", + "@hotwax/apps-theme": "^1.2.6", "@hotwax/dxp-components": "^1.11.0", "@hotwax/oms-api": "^1.11.0", "@ionic/core": "^7.6.0", From 17c843f3373c850db357cfdce07c7c07c4ba842c Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Mon, 8 Jan 2024 13:02:56 +0530 Subject: [PATCH 003/109] Improved: usage of ion-radio as per the changes in ionic7(#162) --- src/components/AddOperatingHoursModal.vue | 9 +++++---- src/components/TimezoneModal.vue | 5 +---- src/views/FacilityDetails.vue | 5 +++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/components/AddOperatingHoursModal.vue b/src/components/AddOperatingHoursModal.vue index 223a96c2..dd61201a 100644 --- a/src/components/AddOperatingHoursModal.vue +++ b/src/components/AddOperatingHoursModal.vue @@ -14,10 +14,11 @@ - - - {{ calendar.description ? calendar.description : calendar.calendarId }} - + + + {{ calendar.description ? calendar.description : calendar.calendarId }} + +
diff --git a/src/components/TimezoneModal.vue b/src/components/TimezoneModal.vue index 89156320..2ae99645 100644 --- a/src/components/TimezoneModal.vue +++ b/src/components/TimezoneModal.vue @@ -30,8 +30,7 @@ - {{ timeZone.label }} ({{ timeZone.id }}) - + {{ timeZone.label }} ({{ timeZone.id }}) @@ -57,7 +56,6 @@ import { IonHeader, IonItem, IonIcon, - IonLabel, IonList, IonRadioGroup, IonRadio, @@ -87,7 +85,6 @@ export default defineComponent({ IonHeader, IonIcon, IonItem, - IonLabel, IonList, IonRadioGroup, IonRadio, diff --git a/src/views/FacilityDetails.vue b/src/views/FacilityDetails.vue index 122bac91..14139021 100644 --- a/src/views/FacilityDetails.vue +++ b/src/views/FacilityDetails.vue @@ -117,8 +117,9 @@ - {{ calendar.description ? calendar.description : calendar.calendarId }} - + +
{{ calendar.description ? calendar.description : calendar.calendarId }} {{ 'TEST CALENDAR THIS' }}
+
From 34c51ece963b8888d154391b8a05e00478a93626 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Mon, 8 Jan 2024 19:34:09 +0530 Subject: [PATCH 004/109] Improved: usage of different components on facility details page and related components(#162) --- src/components/AddFacilityGroupModal.vue | 5 +-- src/components/AddLocationModal.vue | 26 ++++++++------- src/components/AddStaffMemberModal.vue | 8 ++--- src/components/CreateFacilityLoginModal.vue | 33 +++++++++---------- src/components/CustomScheduleModal.vue | 13 ++++---- src/components/FacilityAddressModal.vue | 22 ++++++------- src/components/FacilityExternalIdModal.vue | 3 +- src/components/FacilityFilters.vue | 8 ++--- src/components/FacilityGeoPointModal.vue | 12 +++---- src/components/FacilityMappingModal.vue | 3 +- .../FacilityShopifyMappingModal.vue | 7 ++-- src/components/SelectProductStoreModal.vue | 11 ++++--- src/theme/variables.css | 4 +++ src/views/FacilityDetails.vue | 27 ++++----------- src/views/FindFacilities.vue | 9 ++--- 15 files changed, 82 insertions(+), 109 deletions(-) diff --git a/src/components/AddFacilityGroupModal.vue b/src/components/AddFacilityGroupModal.vue index 25fecc16..c6a36e85 100644 --- a/src/components/AddFacilityGroupModal.vue +++ b/src/components/AddFacilityGroupModal.vue @@ -18,8 +18,7 @@ {{ getFacilityGroupTypeDesc(typeId) }} - {{ group.facilityGroupName }} - + {{ group.facilityGroupName }}
@@ -45,7 +44,6 @@ import { IonItem, IonItemDivider, IonItemGroup, - IonLabel, IonList, IonSearchbar, IonTitle, @@ -77,7 +75,6 @@ export default defineComponent({ IonItem, IonItemDivider, IonItemGroup, - IonLabel, IonList, IonSearchbar, IonTitle, diff --git a/src/components/AddLocationModal.vue b/src/components/AddLocationModal.vue index 49ef5264..bf63a57a 100644 --- a/src/components/AddLocationModal.vue +++ b/src/components/AddLocationModal.vue @@ -15,30 +15,32 @@ - {{ translate("Type") }} - + {{ description }} - {{ translate("Area") }} * - + + {{ translate("Area") }} * + - {{ translate("Aisle") }} * - + + {{ translate("Aisle") }} * + - {{ translate("Section") }} * - + + {{ translate("Section") }} * + - {{ translate("Level") }} * - + + {{ translate("Level") }} * + - {{ translate("Sequence") }} - + diff --git a/src/components/AddStaffMemberModal.vue b/src/components/AddStaffMemberModal.vue index fe694dd9..f2a28a4e 100644 --- a/src/components/AddStaffMemberModal.vue +++ b/src/components/AddStaffMemberModal.vue @@ -19,11 +19,11 @@ {{ translate("Staff") }} - - {{ party.fullName }} -

{{ party.partyId }}

-
+ + {{ party.fullName }} +

{{ party.partyId }}

+
{{ description }}
diff --git a/src/components/CreateFacilityLoginModal.vue b/src/components/CreateFacilityLoginModal.vue index f9cd024f..41c86caf 100644 --- a/src/components/CreateFacilityLoginModal.vue +++ b/src/components/CreateFacilityLoginModal.vue @@ -13,24 +13,25 @@ - - {{ translate('Username') }} * - - + + + {{ translate('Username') }} * + + - - - {{ translate('Password') }} * - - - - {{ translate('Password should be at least 5 characters long, it contains at least one number, one alphabet and one special character.') }} - + + + + {{ translate('Password') }} * + + - {{ translate('Reset password email') }} * - + + {{ translate('Reset password email') }} + * + + @@ -55,7 +56,6 @@ import { IonItem, IonLabel, IonList, - IonNote, IonTitle, IonToolbar, modalController @@ -89,7 +89,6 @@ export default defineComponent({ IonItem, IonLabel, IonList, - IonNote, IonTitle, IonToolbar, }, diff --git a/src/components/CustomScheduleModal.vue b/src/components/CustomScheduleModal.vue index 655351fe..18a3360f 100644 --- a/src/components/CustomScheduleModal.vue +++ b/src/components/CustomScheduleModal.vue @@ -12,14 +12,12 @@ - - {{ translate("Name") }} * - - + + {{ translate("Name") }} * + - {{ translate("Daily timings") }} - + {{ translate("Daily timings") }} @@ -62,7 +60,7 @@ show-default-buttons hour-cycle="h12" presentation="time" - :value="selectedTimesForWeek[selectedDayTime] ? selectedTimesForWeek[selectedDayTime] : ''" + :value="selectedTimesForWeek[selectedDayTime] ? selectedTimesForWeek[selectedDayTime] : DateTime.now().toUTC().toISO()" @ionChange="updateTime($event)" /> @@ -268,6 +266,7 @@ export default defineComponent({ return { closeCircle, closeOutline, + DateTime, saveOutline, store, translate diff --git a/src/components/FacilityAddressModal.vue b/src/components/FacilityAddressModal.vue index c1b202b2..c86671bb 100644 --- a/src/components/FacilityAddressModal.vue +++ b/src/components/FacilityAddressModal.vue @@ -13,32 +13,30 @@
- {{ translate("Address line 1") }} * - + + {{ translate("Address line 1") }} * + - {{ translate("Address line 2") }} - + - {{ translate("City") }} * - + + {{ translate("City") }} * + - {{ translate("Country") }} - + {{ country.geoName }} - {{ translate("State") }} - + {{ state.geoName }} - {{ translate("Zipcode") }} - +
diff --git a/src/components/FacilityExternalIdModal.vue b/src/components/FacilityExternalIdModal.vue index e7924fc8..90e483a8 100644 --- a/src/components/FacilityExternalIdModal.vue +++ b/src/components/FacilityExternalIdModal.vue @@ -27,8 +27,7 @@ {{ translate('Facility External ID') }} - {{ translate("Identification") }} - + diff --git a/src/components/FacilityFilters.vue b/src/components/FacilityFilters.vue index 716885dd..ea1a2057 100644 --- a/src/components/FacilityFilters.vue +++ b/src/components/FacilityFilters.vue @@ -10,16 +10,14 @@ - {{ translate("Product Store") }} - + {{ translate("All") }} {{ productStore.storeName }} - {{ translate("Type") }} - + {{ translate("All") }} {{ type.description }} @@ -37,7 +35,6 @@ import { IonHeader, IonIcon, IonItem, - IonLabel, IonList, IonMenu, IonTitle, @@ -58,7 +55,6 @@ export default defineComponent({ IonHeader, IonIcon, IonItem, - IonLabel, IonList, IonMenu, IonTitle, diff --git a/src/components/FacilityGeoPointModal.vue b/src/components/FacilityGeoPointModal.vue index 9c5306d2..da348f09 100644 --- a/src/components/FacilityGeoPointModal.vue +++ b/src/components/FacilityGeoPointModal.vue @@ -13,20 +13,18 @@
- - + + {{ translate("Generate") }} - {{ translate("Latitude") }} - + - {{ translate("Longitude") }} - +
@@ -49,7 +47,6 @@ import { IonIcon, IonInput, IonItem, - IonLabel, IonSpinner, IonTitle, IonToolbar, @@ -78,7 +75,6 @@ export default defineComponent({ IonIcon, IonInput, IonItem, - IonLabel, IonSpinner, IonTitle, IonToolbar, diff --git a/src/components/FacilityMappingModal.vue b/src/components/FacilityMappingModal.vue index 4def00cc..f2e96cb0 100644 --- a/src/components/FacilityMappingModal.vue +++ b/src/components/FacilityMappingModal.vue @@ -27,8 +27,7 @@ {{ externalMappingTypes[mappingId] }} - {{ translate("Identification") }} - + diff --git a/src/components/FacilityShopifyMappingModal.vue b/src/components/FacilityShopifyMappingModal.vue index 0e38b3f9..43b87142 100644 --- a/src/components/FacilityShopifyMappingModal.vue +++ b/src/components/FacilityShopifyMappingModal.vue @@ -27,17 +27,16 @@ {{ translate('Shopify location') }} - {{ translate("Shopify store") }} + {{ translate("Shopify store") }} {{ shopifyFacilityMapping.shopId }} - + {{ shop.name ? shop.name : shop.shopId }} - {{ translate("Location ID") }} - + diff --git a/src/components/SelectProductStoreModal.vue b/src/components/SelectProductStoreModal.vue index a2db2a5f..f0061d56 100644 --- a/src/components/SelectProductStoreModal.vue +++ b/src/components/SelectProductStoreModal.vue @@ -13,11 +13,12 @@ - - {{ productStore.storeName }} -

{{ productStore.productStoreId }}

-
- + + + {{ productStore.storeName }} +

{{ productStore.productStoreId }}

+
+
diff --git a/src/theme/variables.css b/src/theme/variables.css index 0a246529..cc739260 100644 --- a/src/theme/variables.css +++ b/src/theme/variables.css @@ -356,6 +356,10 @@ hr { justify-self: start } +ion-item > ion-label:not([slot="end"]) { + width: unset; +} + @media (min-width: 700px) { .list-item { --col-calc: var(--columns-tablet); diff --git a/src/views/FacilityDetails.vue b/src/views/FacilityDetails.vue index 14139021..dae6c808 100644 --- a/src/views/FacilityDetails.vue +++ b/src/views/FacilityDetails.vue @@ -21,8 +21,7 @@
- {{ translate('Facility Type') }} - + {{ translate('Physical Store') }} {{ translate('Distribution Center') }} @@ -30,8 +29,7 @@ - {{ translate('Facility SubType') }} - + {{ type.description ? type.description : facilityTypeId }} @@ -192,20 +190,16 @@ - {{ translate("Allow pickup") }} - + {{ translate("Allow pickup") }} - {{ translate("Uses native fulfillment app") }} - + {{ translate("Uses native fulfillment app") }} - {{ translate("Generate shipping labels") }} - + {{ translate("Generate shipping labels") }} - {{ translate("Days to ship") }} - + {{ translate("Update days to ship") }} @@ -221,8 +215,7 @@ {{ translate("Select which channels this facility publishes inventory too.") }} - {{ inventoryGroup?.facilityGroupName }} - + {{ inventoryGroup?.facilityGroupName }} @@ -1260,12 +1253,6 @@ export default defineComponent({ this.facilityTypeId = this.facilityTypeIdOptions['RETAIL_STORE'] ? 'RETAIL_STORE' : this.facilityTypeIdOptions['WAREHOUSE'] ? 'WAREHOUSE' : Object.keys(this.facilityTypeIdOptions)[0] }, async updateFacilityType() { - // Not updating facility when current selected type and facilityType are same, as the value of facilityTypeId - // gets changed programatically on initial load and thus calls this method hence this check is required - if(this.current.facilityTypeId === this.facilityTypeId) { - return; - } - try { const resp = await FacilityService.updateFacility({ facilityId: this.facilityId, diff --git a/src/views/FindFacilities.vue b/src/views/FindFacilities.vue index ff470161..6525cc6f 100644 --- a/src/views/FindFacilities.vue +++ b/src/views/FindFacilities.vue @@ -24,16 +24,14 @@ - {{ translate("Product Store") }} - + {{ translate("All") }} {{ productStore.storeName }} - {{ translate("Type") }} - + {{ translate("All") }} {{ type.description }} @@ -42,8 +40,7 @@ - {{ translate("Group") }} - + {{ translate("All") }} {{ group.facilityGroupName }} From c29a4c883dd00a7c39539e6147091177d977a1d9 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Mon, 8 Jan 2024 19:36:36 +0530 Subject: [PATCH 005/109] Updated: styling for card-header to change the direction to row(#162) --- src/views/FacilityDetails.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/FacilityDetails.vue b/src/views/FacilityDetails.vue index dae6c808..79241804 100644 --- a/src/views/FacilityDetails.vue +++ b/src/views/FacilityDetails.vue @@ -1339,6 +1339,7 @@ ion-modal.date-time-modal { ion-card-header { display: flex; + flex-direction: row; justify-content: space-between; align-items: center; } From 73b6866b7c591082ed8d9e5783a3cc4724861f3f Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Tue, 9 Jan 2024 10:19:15 +0530 Subject: [PATCH 006/109] Fixed: usage of components on find groups page(#162) --- src/views/FindGroups.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/views/FindGroups.vue b/src/views/FindGroups.vue index b0f7a48b..af3a2c73 100644 --- a/src/views/FindGroups.vue +++ b/src/views/FindGroups.vue @@ -16,10 +16,7 @@ {{ translate('System groups') }} - - {{ groupType.description ? groupType.description : groupType.facilityGroupTypeId }} - - + {{ group.facilityGroupName ? group.facilityGroupName : group.facilityGroupId }} @@ -41,7 +38,7 @@ - + {{ translate('Facilities') }} {{ group.facilityCount }} From 4e5a76cfe38c52b6ca2509beeea17327e6281e61 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Tue, 9 Jan 2024 11:11:34 +0530 Subject: [PATCH 007/109] Fixed: usage of components in create group modal(#162) --- src/components/CreateFacilityGroupModal.vue | 29 +++++++-------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/src/components/CreateFacilityGroupModal.vue b/src/components/CreateFacilityGroupModal.vue index c66b103a..a0cac670 100644 --- a/src/components/CreateFacilityGroupModal.vue +++ b/src/components/CreateFacilityGroupModal.vue @@ -14,33 +14,24 @@
- - {{ translate("Name") }} * - - + + + {{ translate("Name") }} * + + - - - {{ translate("Internal ID") }} - - - - {{ translate('Internal ID cannot be more than 20 characters.') }} - + + - {{ translate("System group type") }} - + {{ facilityGroupType.description ? facilityGroupType.description : facilityGroupType.facilityGroupTypeId }} - - {{ translate("Description") }} - - + @@ -66,7 +57,6 @@ import { IonItem, IonLabel, IonList, - IonNote, IonSelect, IonSelectOption, IonText, @@ -97,7 +87,6 @@ export default defineComponent({ IonItem, IonLabel, IonList, - IonNote, IonSelect, IonSelectOption, IonText, From 7829cfb32ea7f0bb60d78e4ab1eb00f5716bb898 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Wed, 10 Jan 2024 10:30:19 +0530 Subject: [PATCH 008/109] Improved: usage of components on parking page(#162) --- src/components/CreateFacilityGroupModal.vue | 2 +- src/components/CreateVirtualFacilityModal.vue | 26 ++++++------------- src/views/FacilityDetails.vue | 2 +- src/views/Parking.vue | 5 ++-- 4 files changed, 12 insertions(+), 23 deletions(-) diff --git a/src/components/CreateFacilityGroupModal.vue b/src/components/CreateFacilityGroupModal.vue index a0cac670..d29e5f3e 100644 --- a/src/components/CreateFacilityGroupModal.vue +++ b/src/components/CreateFacilityGroupModal.vue @@ -21,7 +21,7 @@ - + diff --git a/src/components/CreateVirtualFacilityModal.vue b/src/components/CreateVirtualFacilityModal.vue index a278713c..4aa003f6 100644 --- a/src/components/CreateVirtualFacilityModal.vue +++ b/src/components/CreateVirtualFacilityModal.vue @@ -14,25 +14,17 @@ - - {{ translate("Name") }} * - - + + + {{ translate("Name") }} * + + - - - {{ translate("Internal ID") }} - - - - {{ translate('Internal ID cannot be more than 20 characters.') }} - + + - - {{ translate("Description") }} - - + @@ -58,7 +50,6 @@ import { IonItem, IonLabel, IonList, - IonNote, IonText, IonTitle, IonToolbar, @@ -87,7 +78,6 @@ export default defineComponent({ IonItem, IonLabel, IonList, - IonNote, IonText, IonTitle, IonToolbar diff --git a/src/views/FacilityDetails.vue b/src/views/FacilityDetails.vue index 79241804..08cae3f5 100644 --- a/src/views/FacilityDetails.vue +++ b/src/views/FacilityDetails.vue @@ -116,7 +116,7 @@ -
{{ calendar.description ? calendar.description : calendar.calendarId }} {{ 'TEST CALENDAR THIS' }}
+
{{ calendar.description ? calendar.description : calendar.calendarId }}
diff --git a/src/views/Parking.vue b/src/views/Parking.vue index a39c0b6e..7fade418 100644 --- a/src/views/Parking.vue +++ b/src/views/Parking.vue @@ -20,7 +20,7 @@

{{ facility.facilityName }}

{{ facility.facilityId }}

- +
@@ -39,8 +39,7 @@ {{ facility.orderCount }} - {{ translate('Auto release') }} - + {{ translate('Auto release') }} {{ facility.description }} From 389134f63fb02726f3298915767ccf47c047b6f3 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Wed, 10 Jan 2024 14:51:33 +0530 Subject: [PATCH 009/109] Fixed: component usage in facility create flow(#162) --- src/views/AddFacilityAddress.vue | 50 +++++++++++--------------------- src/views/AddFacilityConfig.vue | 47 ++++++++++++++---------------- src/views/CreateFacility.vue | 37 +++++++++++------------ 3 files changed, 56 insertions(+), 78 deletions(-) diff --git a/src/views/AddFacilityAddress.vue b/src/views/AddFacilityAddress.vue index 8508e095..48db52a4 100644 --- a/src/views/AddFacilityAddress.vue +++ b/src/views/AddFacilityAddress.vue @@ -14,44 +14,34 @@ - - {{ translate('Address line 1') }} * - - + + + {{ translate('Address line 1') }} * + + - - {{ translate('Address line 2') }} - - + - - {{ translate('City') }} * - - + + + {{ translate('City') }} * + + - - {{ translate('Zipcode') }} - - + - - {{ translate('Country') }} - - + {{ country.geoName }} - - {{ translate('State') }} - - + {{ state.geoName }} @@ -66,23 +56,17 @@ - + {{ translate('Generate') }} - - {{ translate('Latitude') }} - - + - - {{ translate('Longitude') }} - - + diff --git a/src/views/AddFacilityConfig.vue b/src/views/AddFacilityConfig.vue index 82e8d1d1..cfd05d42 100644 --- a/src/views/AddFacilityConfig.vue +++ b/src/views/AddFacilityConfig.vue @@ -64,42 +64,40 @@ - {{ translate("Sell Inventory Online") }} - + {{ translate("Sell Inventory Online") }} - {{ translate("Allow pickup") }} - + {{ translate("Allow pickup") }} - {{ translate("Uses native fulfillment app") }} - + {{ translate("Uses native fulfillment app") }} @@ -136,7 +134,6 @@ import { IonLabel, IonList, IonListHeader, - IonNote, IonPage, IonPopover, IonText, @@ -182,7 +179,6 @@ export default defineComponent({ IonLabel, IonList, IonListHeader, - IonNote, IonPage, IonPopover, IonText, @@ -435,6 +431,7 @@ export default defineComponent({ diff --git a/src/router/index.ts b/src/router/index.ts index f04c782b..a8b9a970 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -7,14 +7,10 @@ import { showToast } from '@/utils' import 'vue-router' import { useAuthStore, DxpLogin, translate } from '@hotwax/dxp-components' import { loader } from '@/utils/user'; -import FacilityManagement from '@/views/FacilityManagement.vue' -import Settings from '@/views/Settings.vue'; -import Parking from '@/views/Parking.vue'; -import FindFacilities from '@/views/FindFacilities.vue'; -import FindGroups from '@/views/FindGroups.vue'; import CreateFacility from '@/views/CreateFacility.vue'; import AddFacilityAddress from '@/views/AddFacilityAddress.vue'; import AddFacilityConfig from '@/views/AddFacilityConfig.vue'; +import Tabs from '@/components/Tabs.vue' // Defining types for the meta values declare module 'vue-router' { @@ -46,7 +42,7 @@ const loginGuard = (to: any, from: any, next: any) => { const routes: Array = [ { path: '/', - redirect: '/facility-management' + redirect: '/tabs/find-facilities' }, { path: '/login', @@ -55,16 +51,24 @@ const routes: Array = [ beforeEnter: loginGuard }, { - path: '/facility-management', - name: 'FacilityManagement', - component: FacilityManagement, - beforeEnter: authGuard - }, - { - path: '/find-facilities', - name: 'FindFacilities', - component: FindFacilities, - beforeEnter: authGuard + path: '/tabs', + component: Tabs, + children: [ + { + path: 'find-facilities', + component: () => import('@/views/FindFacilities.vue'), + }, { + path: 'parking', + component: () => import('@/views/Parking.vue') + }, { + path: 'find-groups', + component: () => import('@/views/FindGroups.vue') + }, { + path: 'settings', + component: () => import('@/views/Settings.vue') + }, + ], + beforeEnter: authGuard, }, { path: "/facility-details/:facilityId", @@ -92,24 +96,6 @@ const routes: Array = [ component: AddFacilityConfig, props: true, beforeEnter: authGuard - }, - { - path: '/parking', - name: 'Parking', - component: Parking, - beforeEnter: authGuard - }, - { - path: '/find-groups', - name: 'FindGroups', - component: FindGroups, - beforeEnter: authGuard - }, - { - path: '/settings', - name: 'Settings', - component: Settings, - beforeEnter: authGuard } ] diff --git a/src/views/FacilityManagement.vue b/src/views/FacilityManagement.vue deleted file mode 100644 index 25371d20..00000000 --- a/src/views/FacilityManagement.vue +++ /dev/null @@ -1,244 +0,0 @@ - - - - - \ No newline at end of file From 9badfcba8054c0ae3f260ecdb5bb8447e87e1e76 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Mon, 4 Mar 2024 18:59:13 +0530 Subject: [PATCH 024/109] Implemented: logic to link group to product stores (#210) --- src/components/AddFacilityToGroupModal.vue | 4 +- .../AddProductStoreToGroupModal.vue | 172 ++++++++++++++++++ src/locales/en.json | 1 + src/services/FacilityService.ts | 79 ++++++++ src/store/modules/facility/actions.ts | 7 +- src/views/FindGroups.vue | 21 ++- 6 files changed, 280 insertions(+), 4 deletions(-) create mode 100644 src/components/AddProductStoreToGroupModal.vue diff --git a/src/components/AddFacilityToGroupModal.vue b/src/components/AddFacilityToGroupModal.vue index 07bbc036..2b6edd0f 100644 --- a/src/components/AddFacilityToGroupModal.vue +++ b/src/components/AddFacilityToGroupModal.vue @@ -186,7 +186,7 @@ export default defineComponent({ const facilitiesToRemove = this.selectedFacilities.filter((facility: any) => !this.selectedFacilityValues.some((selectedFacility: any) => facility.facilityId === selectedFacility.facilityId)) const removeResponses = await Promise.allSettled(facilitiesToRemove - .map(async (facility: any) => await FacilityService.updateFacilityToGroup({ + .map(async (facility: any) => await FacilityService.updateProductStoreToFacilityGroup({ "facilityId": facility.facilityId, "facilityGroupId": this.facilityGroupId, "fromDate": facility.fromDate, @@ -195,7 +195,7 @@ export default defineComponent({ ) const addResponses = await Promise.allSettled(facilitiesToAdd - .map(async (facility: any) => await FacilityService.addFacilityToGroup({ + .map(async (facility: any) => await FacilityService.addProductStoreToFacilityGroup({ "facilityId": facility.facilityId, "facilityGroupId": this.facilityGroupId })) diff --git a/src/components/AddProductStoreToGroupModal.vue b/src/components/AddProductStoreToGroupModal.vue new file mode 100644 index 00000000..17a48ff5 --- /dev/null +++ b/src/components/AddProductStoreToGroupModal.vue @@ -0,0 +1,172 @@ + + + + \ No newline at end of file diff --git a/src/locales/en.json b/src/locales/en.json index a40004a3..22bba22c 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -274,6 +274,7 @@ "primary store": "primary store", "Product Store": "Product Store", "Product Stores": "Product Stores", + "Product stores": "Product stores", "Product stores updated successfully.": "Product stores updated successfully.", "Quick edit": "Quick edit", "Reason:": "Reason:", diff --git a/src/services/FacilityService.ts b/src/services/FacilityService.ts index af6a8327..d7d17d98 100644 --- a/src/services/FacilityService.ts +++ b/src/services/FacilityService.ts @@ -601,6 +601,57 @@ const fetchFacilityCountByGroup = async (facilityGroupIds: any): Promise => }, {}) } +const fetchProductStoreCountByGroup = async (facilityGroupIds: any): Promise => { + if (!facilityGroupIds.length) return [] + const requests = [] + + const facilityGroupIdList = facilityGroupIds + while (facilityGroupIdList.length) { + const batch = facilityGroupIdList.splice(0, 10) + const params = { + inputFields: { + facilityGroupId: batch + }, + viewSize: 250, // maximum view size + entityName: 'ProductStoreFacilityGroup', + noConditionFind: "Y", + filterByDate: 'Y', + fieldList: ['facilityGroupId', 'productStoreId'] + } + requests.push(params) + } + + const productStoreCountResponse = await Promise.allSettled(requests.map((params) => api({ + url: 'performFind', + method: 'POST', + data: params + }))) + + const hasFailedResponse = productStoreCountResponse.some((response: any) => hasError(response.value) && !response?.data?.count) + + if (hasFailedResponse) { + logger.error('Failed to fetch product store count for some groups') + } + + // taking out the response from Promise.allSettled's 'value' field first + const allResponseData = productStoreCountResponse.map((response: any) => response.value) + .reduce((responseData: any, response: any) => { + if (!hasError(response)) { + responseData.push(...response.data.docs) + } + return responseData + }, []) + + return allResponseData.reduce((productStoreCountByGroup: any, responseData: any) => { + if (productStoreCountByGroup[responseData.facilityGroupId]) { + productStoreCountByGroup[responseData.facilityGroupId] += 1 + } else { + productStoreCountByGroup[responseData.facilityGroupId] = 1 + } + return productStoreCountByGroup + }, {}) +} + const updateFacilityGroup = async (payload: any): Promise => { return api({ url: "service/updateFacilityGroup", @@ -701,6 +752,14 @@ const fetchAssociatedFacilitiesToGroup = async (payload: any): Promise => { }) } +const fetchAssociatedProductStoresToGroup = async (payload: any): Promise => { + return api({ + url: "performFind", + method: "post", + data: payload + }) +} + const createFacilityTelecomNumber = async (payload: any): Promise => { return api({ url: "service/createFacilityTelecomNumber", @@ -717,9 +776,26 @@ const updateFacilityTelecomNumber = async (payload: any): Promise => { }) } +const addProductStoreToFacilityGroup = async (payload: any): Promise => { + return api({ + url: "service/addProductStoreToFacilityGroup", + method: "post", + data: payload + }) +} + +const updateProductStoreToFacilityGroup = async (payload: any): Promise => { + return api({ + url: "service/updateProductStoreToFacilityGroup", + method: "post", + data: payload + }) +} + export const FacilityService = { addFacilityToGroup, addPartyToFacility, + addProductStoreToFacilityGroup, associateCalendarToFacility, createFacilityGroup, createFacility, @@ -738,6 +814,7 @@ export const FacilityService = { deleteShopifyShopLocation, fetchArchivedFacilities, fetchAssociatedFacilitiesToGroup, + fetchAssociatedProductStoresToGroup, fetchFacilityGroup, fetchFacilityGroups, fetchFacilityLocations, @@ -752,6 +829,7 @@ export const FacilityService = { fetchInactiveFacilityGroupAssociations, fetchJobData, fetchOrderCountsByFacility, + fetchProductStoreCountByGroup, getFacilityProductStores, fetchShopifyFacilityMappings, getFacilityParties, @@ -767,5 +845,6 @@ export const FacilityService = { updateFacilityTelecomNumber, updateFacilityToGroup, updateProductStoreFacility, + updateProductStoreToFacilityGroup, updateShopifyShopLocation } \ No newline at end of file diff --git a/src/store/modules/facility/actions.ts b/src/store/modules/facility/actions.ts index 50f52e8f..087dea4a 100644 --- a/src/store/modules/facility/actions.ts +++ b/src/store/modules/facility/actions.ts @@ -744,10 +744,15 @@ const actions: ActionTree = { stateGroups = stateGroups.filter((group: any) => !facilityGroupIds.includes(group.facilityGroupId)) try { - const facilityCountByGroup = await FacilityService.fetchFacilityCountByGroup(facilityGroupIds) + const facilityCountByGroup = await FacilityService.fetchFacilityCountByGroup(JSON.parse(JSON.stringify(facilityGroupIds))) groups.map((group: any) => { group.facilityCount = facilityCountByGroup[group.facilityGroupId] || 0 }) + + const productStoreCountByGroup = await FacilityService.fetchProductStoreCountByGroup(facilityGroupIds) + groups.map((group: any) => { + group.productStoreCount = productStoreCountByGroup[group.facilityGroupId] || 0 + }) } catch (error) { logger.error(error) } diff --git a/src/views/FindGroups.vue b/src/views/FindGroups.vue index 1e01ed6d..9b17fac9 100644 --- a/src/views/FindGroups.vue +++ b/src/views/FindGroups.vue @@ -42,6 +42,14 @@ + + {{ translate('Product stores') }} + + {{ group.productStoreCount }} + + + + {{ translate('Facilities') }} {{ group.facilityCount }} @@ -103,7 +111,7 @@ import { popoverController, } from '@ionic/vue'; import { defineComponent } from 'vue'; -import { ellipsisVerticalOutline, addOutline } from 'ionicons/icons'; +import { ellipsisVerticalOutline, addOutline, bagHandleOutline, businessOutline } from 'ionicons/icons'; import { useRouter } from 'vue-router'; import { mapGetters, useStore } from 'vuex'; import { translate } from '@hotwax/dxp-components' @@ -115,6 +123,7 @@ import { hasError } from '@/adapter'; import logger from '@/logger'; import emitter from '@/event-bus'; import GroupActionsPopover from '@/components/GroupActionsPopover.vue'; +import AddProductStoreToGroupModal from '@/components/AddProductStoreToGroupModal.vue'; export default defineComponent({ name: 'FindGroups', @@ -269,6 +278,14 @@ export default defineComponent({ await this.fetchGroups() emitter.emit('dismissLoader') + }, + async openAddProductStoreToGroupModal(group: any) { + const addProductStoreToGroupModal = await modalController.create({ + component: AddProductStoreToGroupModal, + componentProps: { group } + }) + + addProductStoreToGroupModal.present() } }, setup() { @@ -277,6 +294,8 @@ export default defineComponent({ return { addOutline, + bagHandleOutline, + businessOutline, customSort, ellipsisVerticalOutline, router, From 7c8cbade31664957b81ecddd3e01b63bd5b6a3b1 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 5 Mar 2024 11:19:01 +0530 Subject: [PATCH 025/109] Implemented: support for updating group type of a facility group (#208) --- .../FacilityGroupActionsPopover.vue | 15 +- src/components/GroupTypeModal.vue | 140 ++++++++++++++++++ src/locales/en.json | 5 + 3 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 src/components/GroupTypeModal.vue diff --git a/src/components/FacilityGroupActionsPopover.vue b/src/components/FacilityGroupActionsPopover.vue index 8ff09904..3bdc9e07 100644 --- a/src/components/FacilityGroupActionsPopover.vue +++ b/src/components/FacilityGroupActionsPopover.vue @@ -10,6 +10,9 @@ {{ group?.description ? translate("Edit description") : translate("Add description") }} + + {{ translate("Select type") }} + {{ translate("Delete") }} @@ -34,7 +37,8 @@ import { FacilityService } from "@/services/FacilityService"; import { hasError } from "@/adapter"; import { mapGetters, useStore } from "vuex"; import logger from "@/logger"; -import FacilityGroupDescriptionModal from "./FacilityGroupDescriptionModal.vue"; +import FacilityGroupDescriptionModal from "@/components/FacilityGroupDescriptionModal.vue"; +import GroupTypeModal from "@/components/GroupTypeModal.vue" export default defineComponent({ name: "FacilityGroupActionsPopover", @@ -131,6 +135,15 @@ export default defineComponent({ } }); }) + }, + async openUpdateGroupTypeModal() { + const updateGroupTypeModal = await modalController.create({ + component: GroupTypeModal, + componentProps: { facilityGroup: this.group } + }) + + await popoverController.dismiss() + updateGroupTypeModal.present() } }, setup() { diff --git a/src/components/GroupTypeModal.vue b/src/components/GroupTypeModal.vue new file mode 100644 index 00000000..f57f7c55 --- /dev/null +++ b/src/components/GroupTypeModal.vue @@ -0,0 +1,140 @@ + + + \ No newline at end of file diff --git a/src/locales/en.json b/src/locales/en.json index a40004a3..dc56aad5 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -100,6 +100,7 @@ "Facility External ID": "Facility External ID", "Facility external ID updated.": "Facility external ID updated.", "Facility group deleted.": "Facility group deleted.", + "Facility group type updated successfully.": "Facility group type updated successfully.", "Facility ID": "Facility ID", "Facility latitude and longitude removed successfully.": "Facility latitude and longitude removed successfully.", "Facility latitude and longitude updated successfully.": "Facility latitude and longitude updated successfully.", @@ -146,6 +147,7 @@ "Failed to remove shopify mapping": "Failed to remove shopify mapping", "Failed to rename facility group.": "Failed to rename facility group.", "Failed to rename parking.": "Failed to rename parking.", + "Failed to update facility group type.": "Failed to update facility group type.", "Failed to update some groups for facility": "Failed to update some groups for facility", "Facility type updated": "Facility type updated", "Failed to unarchive parking.": "Failed to unarchive parking.", @@ -178,6 +180,7 @@ "Go to OMS": "Go to OMS", "Group": "Group", "Group associated to system group types.": "Group associated to system group types.", + "Group type": "Group type", "Group unlinked from facility": "Group unlinked from facility", "groups": "{count} groups", "Groups": "Groups", @@ -226,6 +229,7 @@ "No facility found": "No facility found", "No fulfillment capacity": "No fulfillment capacity", "No groups found": "No groups found", + "No group types found": "No group types found", "no longer sells on": "{facilityName} no longer sells on {facilityGroupId}.", "No party found": "No party found", "No records found": "No records found", @@ -310,6 +314,7 @@ "Search groups": "Search groups", "Search time zones": "Search time zones", "Select time zone": "Select time zone", + "Select type": "Select type", "Select product stores": "Select product stores", "Select which channels this facility publishes inventory too.": "Select which channels this facility publishes inventory too.", "Select your preferred language.": "Select your preferred language.", From 3879e671526b2b99464eb7efdad00df6e870ac8e Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 5 Mar 2024 11:31:19 +0530 Subject: [PATCH 026/109] Improved: updated method / variables names, updated UI for type list and syntax (#208) --- .../FacilityGroupActionsPopover.vue | 6 +-- src/components/GroupTypeModal.vue | 44 +++++++++++-------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/components/FacilityGroupActionsPopover.vue b/src/components/FacilityGroupActionsPopover.vue index 3bdc9e07..2f5c4f92 100644 --- a/src/components/FacilityGroupActionsPopover.vue +++ b/src/components/FacilityGroupActionsPopover.vue @@ -10,7 +10,7 @@ {{ group?.description ? translate("Edit description") : translate("Add description") }} - + {{ translate("Select type") }} @@ -38,7 +38,7 @@ import { hasError } from "@/adapter"; import { mapGetters, useStore } from "vuex"; import logger from "@/logger"; import FacilityGroupDescriptionModal from "@/components/FacilityGroupDescriptionModal.vue"; -import GroupTypeModal from "@/components/GroupTypeModal.vue" +import GroupTypeModal from "@/components/GroupTypeModal.vue"; export default defineComponent({ name: "FacilityGroupActionsPopover", @@ -136,7 +136,7 @@ export default defineComponent({ }); }) }, - async openUpdateGroupTypeModal() { + async updateGroupTypeModal() { const updateGroupTypeModal = await modalController.create({ component: GroupTypeModal, componentProps: { facilityGroup: this.group } diff --git a/src/components/GroupTypeModal.vue b/src/components/GroupTypeModal.vue index f57f7c55..edc6ccc7 100644 --- a/src/components/GroupTypeModal.vue +++ b/src/components/GroupTypeModal.vue @@ -10,23 +10,24 @@ - - + + -
+

{{ translate("No group types found")}}

+ + + + {{ groupType.description ? groupType.description : groupType.facilityGroupTypeId }} +

{{ groupType.facilityGroupTypeId }}

+
+ +
+
- - - - {{ groupType.description ? groupType.description : groupType.facilityGroupTypeId }} - - - -
@@ -63,10 +64,9 @@ import { useStore } from "@/store"; import { translate } from "@hotwax/dxp-components"; import { mapGetters } from "vuex"; import { FacilityService } from "@/services/FacilityService"; -import { hasError } from "@hotwax/oms-api"; +import { hasError } from "@/adapter"; import logger from "@/logger"; import { showToast } from "@/utils"; -import { popoverController } from "@ionic/core"; export default defineComponent({ name: "GroupTypeModal", @@ -88,7 +88,7 @@ export default defineComponent({ }, data() { return { - facilityGroupValues: JSON.parse(JSON.stringify(this.facilityGroup)) + facilityGroupValue: JSON.parse(JSON.stringify(this.facilityGroup)) } }, props: ["facilityGroup"], @@ -105,15 +105,15 @@ export default defineComponent({ async saveGroupType() { try { const resp = await FacilityService.updateFacilityGroup({ - facilityGroupId: this.facilityGroupValues.facilityGroupId, - facilityGroupTypeId: this.facilityGroupValues.facilityGroupTypeId + facilityGroupId: this.facilityGroupValue.facilityGroupId, + facilityGroupTypeId: this.facilityGroupValue.facilityGroupTypeId }) if(!hasError(resp)) { showToast(translate("Facility group type updated successfully.")) this.groups.map((group: any) => { - if(group.facilityGroupId === this.facilityGroupValues.facilityGroupId) { - group.facilityGroupTypeId = this.facilityGroupValues.facilityGroupTypeId + if(group.facilityGroupId === this.facilityGroupValue.facilityGroupId) { + group.facilityGroupTypeId = this.facilityGroupValue.facilityGroupTypeId } }) await this.store.dispatch('facility/updateFacilityGroups', this.groups) @@ -137,4 +137,10 @@ export default defineComponent({ }; } }); - \ No newline at end of file + + + \ No newline at end of file From 479ef7d005a4edcd6754c86a5eadde3519673939 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 5 Mar 2024 15:14:03 +0530 Subject: [PATCH 027/109] Improved: api endpoints to create and update ProductStore to facility Group (#210) --- src/components/AddFacilityToGroupModal.vue | 4 +-- .../AddProductStoreToGroupModal.vue | 26 ++++++++++++++----- src/services/FacilityService.ts | 12 ++++----- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/components/AddFacilityToGroupModal.vue b/src/components/AddFacilityToGroupModal.vue index 2b6edd0f..07bbc036 100644 --- a/src/components/AddFacilityToGroupModal.vue +++ b/src/components/AddFacilityToGroupModal.vue @@ -186,7 +186,7 @@ export default defineComponent({ const facilitiesToRemove = this.selectedFacilities.filter((facility: any) => !this.selectedFacilityValues.some((selectedFacility: any) => facility.facilityId === selectedFacility.facilityId)) const removeResponses = await Promise.allSettled(facilitiesToRemove - .map(async (facility: any) => await FacilityService.updateProductStoreToFacilityGroup({ + .map(async (facility: any) => await FacilityService.updateFacilityToGroup({ "facilityId": facility.facilityId, "facilityGroupId": this.facilityGroupId, "fromDate": facility.fromDate, @@ -195,7 +195,7 @@ export default defineComponent({ ) const addResponses = await Promise.allSettled(facilitiesToAdd - .map(async (facility: any) => await FacilityService.addProductStoreToFacilityGroup({ + .map(async (facility: any) => await FacilityService.addFacilityToGroup({ "facilityId": facility.facilityId, "facilityGroupId": this.facilityGroupId })) diff --git a/src/components/AddProductStoreToGroupModal.vue b/src/components/AddProductStoreToGroupModal.vue index 17a48ff5..a83a67ce 100644 --- a/src/components/AddProductStoreToGroupModal.vue +++ b/src/components/AddProductStoreToGroupModal.vue @@ -21,7 +21,7 @@ - + @@ -133,18 +133,19 @@ export default defineComponent({ const productStoresToRemove = this.selectedProductStores.filter((store: any) => !this.selectedProductStoreValues.some((selectedStore: any) => store.productStoreId === selectedStore.productStoreId)) const removeResponses = await Promise.allSettled(productStoresToRemove - .map(async (store: any) => await FacilityService.updateFacilityToGroup({ - "facilityId": store.facilityId, - "facilityGroupId": store.facilityGroupId, + .map(async (store: any) => await FacilityService.updateProductStoreFacilityGroup({ + "productStoreId": store.productStoreId, + "facilityGroupId": this.group.facilityGroupId, "fromDate": store.fromDate, "thruDate": DateTime.now().toMillis() })) ) const addResponses = await Promise.allSettled(productStoresToAdd - .map(async (store: any) => await FacilityService.addFacilityToGroup({ + .map(async (store: any) => await FacilityService.createProductStoreFacilityGroup({ "productStoreId": store.productStoreId, - "facilityGroupId": store.facilityGroupId + "facilityGroupId": this.group.facilityGroupId, + "fromDate": DateTime.now().toMillis() })) ) @@ -154,8 +155,21 @@ export default defineComponent({ } else { showToast(translate("Product stores associated to group successfully.")) } + this.fetchGroups() modalController.dismiss() }, + async fetchGroups(vSize?: any, vIndex?: any) { + const viewSize = vSize ? vSize : process.env.VUE_APP_VIEW_SIZE; + const viewIndex = vIndex ? vIndex : 0; + const payload = { + viewSize, + viewIndex + }; + await this.store.dispatch('facility/fetchFacilityGroups', payload) + }, + areProductStoresUpdated() { + return JSON.stringify(this.selectedProductStoreValues) !== JSON.stringify(this.selectedProductStores) + } }, setup() { const store = useStore() diff --git a/src/services/FacilityService.ts b/src/services/FacilityService.ts index d7d17d98..17d4a2e1 100644 --- a/src/services/FacilityService.ts +++ b/src/services/FacilityService.ts @@ -776,17 +776,17 @@ const updateFacilityTelecomNumber = async (payload: any): Promise => { }) } -const addProductStoreToFacilityGroup = async (payload: any): Promise => { +const createProductStoreFacilityGroup = async (payload: any): Promise => { return api({ - url: "service/addProductStoreToFacilityGroup", + url: "service/createProductStoreFacilityGroup", method: "post", data: payload }) } -const updateProductStoreToFacilityGroup = async (payload: any): Promise => { +const updateProductStoreFacilityGroup = async (payload: any): Promise => { return api({ - url: "service/updateProductStoreToFacilityGroup", + url: "service/updateProductStoreFacilityGroup", method: "post", data: payload }) @@ -795,7 +795,6 @@ const updateProductStoreToFacilityGroup = async (payload: any): Promise => export const FacilityService = { addFacilityToGroup, addPartyToFacility, - addProductStoreToFacilityGroup, associateCalendarToFacility, createFacilityGroup, createFacility, @@ -807,6 +806,7 @@ export const FacilityService = { createFacilityPostalAddress, createFacilityTelecomNumber, createProductStoreFacility, + createProductStoreFacilityGroup, createShopifyShopLocation, deleteFacilityGroup, deleteFacilityLocation, @@ -845,6 +845,6 @@ export const FacilityService = { updateFacilityTelecomNumber, updateFacilityToGroup, updateProductStoreFacility, - updateProductStoreToFacilityGroup, + updateProductStoreFacilityGroup, updateShopifyShopLocation } \ No newline at end of file From 9c665941a90e4383a72636fa9b0456c84b5ad9e7 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 5 Mar 2024 15:18:59 +0530 Subject: [PATCH 028/109] Improved: title of modal to add product store to facility group (#210) --- src/components/AddProductStoreToGroupModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AddProductStoreToGroupModal.vue b/src/components/AddProductStoreToGroupModal.vue index a83a67ce..957eeae4 100644 --- a/src/components/AddProductStoreToGroupModal.vue +++ b/src/components/AddProductStoreToGroupModal.vue @@ -6,7 +6,7 @@ - {{ translate("Select product stores") }} + {{ translate("Product stores") }} From 21a59c5b303056b3ad718c30b850233f7ba3627a Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 5 Mar 2024 15:30:46 +0530 Subject: [PATCH 029/109] Improved: removed unused console in code (#210) --- src/components/AddProductStoreToGroupModal.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/AddProductStoreToGroupModal.vue b/src/components/AddProductStoreToGroupModal.vue index 957eeae4..a5aa30a9 100644 --- a/src/components/AddProductStoreToGroupModal.vue +++ b/src/components/AddProductStoreToGroupModal.vue @@ -105,7 +105,6 @@ export default defineComponent({ "filterByDate": 'Y' }) - console.log(resp); if(!hasError(resp)) { this.selectedProductStores = resp.data.docs this.selectedProductStoreValues = JSON.parse(JSON.stringify(resp.data.docs)) From f0b40273d64b27696a12e4a02d1930f2c6d3982a Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 5 Mar 2024 17:53:28 +0530 Subject: [PATCH 030/109] Improved: added comment, and added operator in api calls (#210) --- src/services/FacilityService.ts | 6 ++++-- src/store/modules/facility/actions.ts | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/services/FacilityService.ts b/src/services/FacilityService.ts index 17d4a2e1..4f68a9a9 100644 --- a/src/services/FacilityService.ts +++ b/src/services/FacilityService.ts @@ -560,7 +560,8 @@ const fetchFacilityCountByGroup = async (facilityGroupIds: any): Promise => const batch = facilityGroupIdList.splice(0, 10) const params = { inputFields: { - facilityGroupId: batch + facilityGroupId: batch, + facilityGroupId_op: "in" }, viewSize: 250, // maximum view size entityName: 'FacilityGroupAndMember', @@ -610,7 +611,8 @@ const fetchProductStoreCountByGroup = async (facilityGroupIds: any): Promise = { stateGroups = stateGroups.filter((group: any) => !facilityGroupIds.includes(group.facilityGroupId)) try { + // facilityGroupIds is list of ids which gets empty at the end of below api call + // We again want's to use this facilityGroupIds in another api hence deep cloning it. const facilityCountByGroup = await FacilityService.fetchFacilityCountByGroup(JSON.parse(JSON.stringify(facilityGroupIds))) groups.map((group: any) => { group.facilityCount = facilityCountByGroup[group.facilityGroupId] || 0 From b0eb81eef18d2b71c411f08553fcd74a370d9048 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 5 Mar 2024 18:43:01 +0530 Subject: [PATCH 031/109] Improved: code to update state instead of calling api post product store association (#210) --- .../AddProductStoreToGroupModal.vue | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/components/AddProductStoreToGroupModal.vue b/src/components/AddProductStoreToGroupModal.vue index a5aa30a9..92922e2a 100644 --- a/src/components/AddProductStoreToGroupModal.vue +++ b/src/components/AddProductStoreToGroupModal.vue @@ -77,6 +77,7 @@ export default defineComponent({ ...mapGetters({ productStores: 'util/getProductStores', facilityProductStores: 'facility/getFacilityProductStores', + groups: "facility/getFacilityGroups" }) }, data() { @@ -154,17 +155,17 @@ export default defineComponent({ } else { showToast(translate("Product stores associated to group successfully.")) } - this.fetchGroups() + this.fetchGroupsCount() modalController.dismiss() }, - async fetchGroups(vSize?: any, vIndex?: any) { - const viewSize = vSize ? vSize : process.env.VUE_APP_VIEW_SIZE; - const viewIndex = vIndex ? vIndex : 0; - const payload = { - viewSize, - viewIndex - }; - await this.store.dispatch('facility/fetchFacilityGroups', payload) + async fetchGroupsCount() { + const productStoreCountByGroup = await FacilityService.fetchProductStoreCountByGroup([this.group.facilityGroupId]) + this.groups.map((group: any) => { + if(group.facilityGroupId === this.group.facilityGroupId) { + group.productStoreCount = productStoreCountByGroup[this.group.facilityGroupId] + } + }) + await this.store.dispatch('facility/updateFacilityGroups', this.groups) }, areProductStoresUpdated() { return JSON.stringify(this.selectedProductStoreValues) !== JSON.stringify(this.selectedProductStores) From d291cb44fe67a03ae6cb6e90457889e142622723 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 5 Mar 2024 18:47:21 +0530 Subject: [PATCH 032/109] Improved: parameter name for better understandability (#210) --- src/components/AddProductStoreToGroupModal.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/AddProductStoreToGroupModal.vue b/src/components/AddProductStoreToGroupModal.vue index 92922e2a..fbefd5a3 100644 --- a/src/components/AddProductStoreToGroupModal.vue +++ b/src/components/AddProductStoreToGroupModal.vue @@ -119,13 +119,13 @@ export default defineComponent({ isSelected(productStoreId: any) { return this.selectedProductStoreValues.some((productStore: any) => productStore.productStoreId === productStoreId); }, - toggleProductStoreSelection(updatedStore: any) { - let selectedStore = this.selectedProductStoreValues.some((store: any) => store.productStoreId === updatedStore.productStoreId); + toggleProductStoreSelection(store: any) { + let selectedStore = this.selectedProductStoreValues.some((productStore: any) => productStore.productStoreId === store.productStoreId); if(selectedStore) { - this.selectedProductStoreValues = this.selectedProductStoreValues.filter((store: any) => store.productStoreId !== updatedStore.productStoreId); + this.selectedProductStoreValues = this.selectedProductStoreValues.filter((productStore: any) => productStore.productStoreId !== store.productStoreId); } else { - this.selectedProductStoreValues.push(updatedStore); + this.selectedProductStoreValues.push(store); } }, async saveProductStores() { From 9de6bb87471411a536bbbd23dabbb38832377463 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 5 Mar 2024 19:01:06 +0530 Subject: [PATCH 033/109] Improved: added entry for empty path for tabs route (#207) --- src/router/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/router/index.ts b/src/router/index.ts index a8b9a970..a7fa5189 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -55,6 +55,9 @@ const routes: Array = [ component: Tabs, children: [ { + path: '', + redirect: '/find-facilities' + }, { path: 'find-facilities', component: () => import('@/views/FindFacilities.vue'), }, { From 2461618727aae051338e0ee545d1dab92d892a50 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 5 Mar 2024 19:08:00 +0530 Subject: [PATCH 034/109] Improved: redirect url for /tabs path (#207) --- src/router/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/index.ts b/src/router/index.ts index a7fa5189..8a84c404 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -56,7 +56,7 @@ const routes: Array = [ children: [ { path: '', - redirect: '/find-facilities' + redirect: '/tabs/find-facilities' }, { path: 'find-facilities', component: () => import('@/views/FindFacilities.vue'), From fac71092665605d399b7d0e595cc44688dd69ede Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Thu, 7 Mar 2024 10:58:10 +0530 Subject: [PATCH 035/109] Improved: code for optimizing it, removed unused code, fixed return type from a service (#210) --- src/components/AddProductStoreToGroupModal.vue | 12 ++++-------- src/services/FacilityService.ts | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/AddProductStoreToGroupModal.vue b/src/components/AddProductStoreToGroupModal.vue index fbefd5a3..e3642846 100644 --- a/src/components/AddProductStoreToGroupModal.vue +++ b/src/components/AddProductStoreToGroupModal.vue @@ -120,9 +120,7 @@ export default defineComponent({ return this.selectedProductStoreValues.some((productStore: any) => productStore.productStoreId === productStoreId); }, toggleProductStoreSelection(store: any) { - let selectedStore = this.selectedProductStoreValues.some((productStore: any) => productStore.productStoreId === store.productStoreId); - - if(selectedStore) { + if(this.isSelected(store.productStoreId)) { this.selectedProductStoreValues = this.selectedProductStoreValues.filter((productStore: any) => productStore.productStoreId !== store.productStoreId); } else { this.selectedProductStoreValues.push(store); @@ -160,11 +158,9 @@ export default defineComponent({ }, async fetchGroupsCount() { const productStoreCountByGroup = await FacilityService.fetchProductStoreCountByGroup([this.group.facilityGroupId]) - this.groups.map((group: any) => { - if(group.facilityGroupId === this.group.facilityGroupId) { - group.productStoreCount = productStoreCountByGroup[this.group.facilityGroupId] - } - }) + const currentGroup = this.groups.find((group: any) => group.facilityGroupId === this.group.facilityGroupId) + currentGroup.productStoreCount = productStoreCountByGroup[this.group.facilityGroupId] + await this.store.dispatch('facility/updateFacilityGroups', this.groups) }, areProductStoresUpdated() { diff --git a/src/services/FacilityService.ts b/src/services/FacilityService.ts index 4f68a9a9..b1478f24 100644 --- a/src/services/FacilityService.ts +++ b/src/services/FacilityService.ts @@ -602,8 +602,8 @@ const fetchFacilityCountByGroup = async (facilityGroupIds: any): Promise => }, {}) } -const fetchProductStoreCountByGroup = async (facilityGroupIds: any): Promise => { - if (!facilityGroupIds.length) return [] +const fetchProductStoreCountByGroup = async (facilityGroupIds: Array): Promise => { + if (!facilityGroupIds.length) return {} const requests = [] const facilityGroupIdList = facilityGroupIds From d4cf66edf4b35c7395b5a2bca4dfd4c78a9f4ce2 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Thu, 7 Mar 2024 14:39:44 +0530 Subject: [PATCH 036/109] Improved: added slot in icon, grouptype updating in state logic and removed unused ion-list (#208) --- src/components/GroupTypeModal.vue | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/components/GroupTypeModal.vue b/src/components/GroupTypeModal.vue index edc6ccc7..ddd42bd6 100644 --- a/src/components/GroupTypeModal.vue +++ b/src/components/GroupTypeModal.vue @@ -3,7 +3,7 @@ - + {{ translate("Group type") }} @@ -27,8 +27,6 @@ - -
@@ -60,9 +58,8 @@ import { } from "@ionic/vue"; import { defineComponent } from "vue"; import { closeOutline, saveOutline } from "ionicons/icons"; -import { useStore } from "@/store"; import { translate } from "@hotwax/dxp-components"; -import { mapGetters } from "vuex"; +import { mapGetters, useStore } from "vuex"; import { FacilityService } from "@/services/FacilityService"; import { hasError } from "@/adapter"; import logger from "@/logger"; @@ -111,11 +108,9 @@ export default defineComponent({ if(!hasError(resp)) { showToast(translate("Facility group type updated successfully.")) - this.groups.map((group: any) => { - if(group.facilityGroupId === this.facilityGroupValue.facilityGroupId) { - group.facilityGroupTypeId = this.facilityGroupValue.facilityGroupTypeId - } - }) + const currentGroup = this.groups.find((group: any) => group.facilityGroupId === this.facilityGroupValue.facilityGroupId) + currentGroup.facilityGroupTypeId = this.facilityGroupValue.facilityGroupTypeId + await this.store.dispatch('facility/updateFacilityGroups', this.groups) modalController.dismiss() } else { From bf2c1e356e5255a89f2ec13c6fc65b11621a02c8 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Thu, 7 Mar 2024 14:48:14 +0530 Subject: [PATCH 037/109] Fixed: removed unused import for IonList in groupTypeModal (#208) --- src/components/GroupTypeModal.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/GroupTypeModal.vue b/src/components/GroupTypeModal.vue index ddd42bd6..20eaecb8 100644 --- a/src/components/GroupTypeModal.vue +++ b/src/components/GroupTypeModal.vue @@ -49,7 +49,6 @@ import { IonItem, IonIcon, IonLabel, - IonList, IonRadioGroup, IonRadio, IonTitle, @@ -77,7 +76,6 @@ export default defineComponent({ IonIcon, IonItem, IonLabel, - IonList, IonRadioGroup, IonRadio, IonTitle, From 070bfde5e9bcb8f53c1eeda5c6e5b58272a2a068 Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Thu, 7 Mar 2024 17:01:03 +0530 Subject: [PATCH 038/109] Improved: code by including the fab components in parking.vue and removed unused class button-card from variable.css --- src/theme/variables.css | 6 ------ src/views/Parking.vue | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/theme/variables.css b/src/theme/variables.css index bf37e049..f5192653 100644 --- a/src/theme/variables.css +++ b/src/theme/variables.css @@ -394,10 +394,4 @@ hr { display: none; } - .button-card { - display: grid; - place-items: center; - align-self: stretch; - } - } \ No newline at end of file diff --git a/src/views/Parking.vue b/src/views/Parking.vue index a161e15e..7e76ce63 100644 --- a/src/views/Parking.vue +++ b/src/views/Parking.vue @@ -110,6 +110,8 @@ export default defineComponent({ IonButtons, IonCard, IonContent, + IonFab, + IonFabButton, IonHeader, IonIcon, IonInfiniteScroll, From 4df3b46b2b39cab217e2479499ff206a2700b38b Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Thu, 7 Mar 2024 18:00:19 +0530 Subject: [PATCH 039/109] Improved: code by including fab components in FindGroups.vue --- src/views/FindGroups.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/views/FindGroups.vue b/src/views/FindGroups.vue index 1d420e18..7ff240b8 100644 --- a/src/views/FindGroups.vue +++ b/src/views/FindGroups.vue @@ -84,6 +84,8 @@ import { IonCard, IonChip, IonContent, + IonFab, + IonFabButton, IonHeader, IonIcon, IonInfiniteScroll, @@ -124,6 +126,8 @@ export default defineComponent({ IonCard, IonChip, IonContent, + IonFab, + IonFabButton, IonHeader, IonIcon, IonInfiniteScroll, From 65951cc9465513a7863699493d4506dc53c8401c Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Thu, 7 Mar 2024 18:31:53 +0530 Subject: [PATCH 040/109] Improved: code by removing the unused translation fron en.json --- src/locales/en.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index a40004a3..d04780a5 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -5,7 +5,6 @@ "Add Group": "Add Group", "Add locations to facility": "Add locations to facility", "Add group description": "Add group description", - "Add new parking": "Add new parking", "Staff member": "Staff member", "Add Store": "Add Store", "Add Store Address": "Add Store Address", @@ -52,7 +51,6 @@ "Country": "Country", "Create ": "Create ", "Create Distribution Center login": "Create Distribution Center login", - "Create group": "Create group", "Create login credentials": "Create login credentials", "Create Outlet Store": "Create Outlet Store", "Create Outlet Store login": "Create Outlet Store login", From aa527a853744e1b71f906c751c072be67a4b5192 Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Fri, 8 Mar 2024 09:49:03 +0530 Subject: [PATCH 041/109] Updated: app version for minor release (1.4.0). --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e7585a93..2b85c62e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "facilities", - "version": "1.3.1", + "version": "1.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "facilities", - "version": "1.3.1", + "version": "1.4.0", "dependencies": { "@capacitor/android": "^2.4.7", "@capacitor/core": "^2.4.7", diff --git a/package.json b/package.json index 8aa6383f..5a429765 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "facilities", - "version": "1.3.1", + "version": "1.4.0", "private": true, "description": "App to manage facilities", "scripts": { From acb50da43cd221e03066391cde33fd151c83bc7a Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Fri, 8 Mar 2024 12:38:46 +0530 Subject: [PATCH 042/109] Improved: removed the back button from the tab pages (#215) --- src/views/FindFacilities.vue | 3 --- src/views/FindGroups.vue | 3 --- src/views/Parking.vue | 3 --- src/views/Settings.vue | 3 --- 4 files changed, 12 deletions(-) diff --git a/src/views/FindFacilities.vue b/src/views/FindFacilities.vue index 1fd5fe4f..2d37cf4f 100644 --- a/src/views/FindFacilities.vue +++ b/src/views/FindFacilities.vue @@ -4,7 +4,6 @@ - {{ translate("Find Facilities") }} @@ -126,7 +125,6 @@ \ No newline at end of file + + + \ No newline at end of file diff --git a/src/locales/en.json b/src/locales/en.json index 2bd0c550..47a7352a 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -324,6 +324,7 @@ "Settings": "Settings", "Setting fulfillment capacity to 0 disables new order from being allocated to this facility. Leave this empty if this facility's fulfillment capacity is unrestricted.": "Setting fulfillment capacity to 0 disables new order from being allocated to this facility. Leave this empty if this facility's fulfillment capacity is unrestricted.", "Setup Store": "Setup Store", + "Shipping name": "Shipping name", "Shopify": "Shopify", "Shopify facility": "Shopify facility", "Shopify location": "Shopify location", diff --git a/src/store/modules/facility/actions.ts b/src/store/modules/facility/actions.ts index 81ecd3f7..6e31a051 100644 --- a/src/store/modules/facility/actions.ts +++ b/src/store/modules/facility/actions.ts @@ -237,7 +237,7 @@ const actions: ActionTree = { entityName: "FacilityContactDetailByPurpose", orderBy: 'fromDate DESC', filterByDate: 'Y', - fieldList: ['address1', 'address2', 'city', 'contactMechId', 'countryGeoId', 'countryGeoName', 'latitude', 'longitude', 'postalCode', 'stateGeoId', 'stateGeoName'], + fieldList: ['address1', 'address2', 'city', 'contactMechId', 'countryGeoId', 'countryGeoName', 'latitude', 'longitude', 'postalCode', 'stateGeoId', 'stateGeoName', 'toName'], viewSize: 1 } diff --git a/src/views/AddFacilityAddress.vue b/src/views/AddFacilityAddress.vue index 848194c1..ddaeacd3 100644 --- a/src/views/AddFacilityAddress.vue +++ b/src/views/AddFacilityAddress.vue @@ -13,6 +13,12 @@ {{ translate('Address') }} + + + {{ translate('Shipping name') }} + + + {{ translate('Address line 1') }} * @@ -163,12 +169,14 @@ export default defineComponent({ computed: { ...mapGetters({ countries: 'util/getCountries', - states: 'util/getStates' + states: 'util/getStates', + current: 'facility/getCurrent', }) }, data() { return { formData: { + toName: '', address1: '', address2: '', city: '', @@ -184,6 +192,7 @@ export default defineComponent({ }, props: ['facilityId'], async ionViewWillEnter() { + this.formData.toName = this.current.facilityName await this.store.dispatch('util/fetchCountries', { countryGeoId: "USA" }) }, methods: { diff --git a/src/views/CreateFacility.vue b/src/views/CreateFacility.vue index 06d0a3d3..c1f84b9f 100644 --- a/src/views/CreateFacility.vue +++ b/src/views/CreateFacility.vue @@ -184,6 +184,7 @@ export default defineComponent({ if (!hasError(resp)) { const { facilityId } = resp.data showToast(translate("Facility created successfully.")) + this.store.dispatch('facility/updateCurrentFacility', payload), this.router.replace(`/add-facility-address/${facilityId}`) } else { throw resp.data; diff --git a/src/views/FacilityDetails.vue b/src/views/FacilityDetails.vue index e052dcea..1671d5ff 100644 --- a/src/views/FacilityDetails.vue +++ b/src/views/FacilityDetails.vue @@ -50,6 +50,7 @@