From 1833cf4773184c11044e763e20f817dc8ac3de12 Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Wed, 7 Aug 2024 15:08:25 +0530 Subject: [PATCH 1/4] Improved: Added a separate page for managing facility group's facilities (#293). --- src/locales/en.json | 12 + src/router/index.ts | 8 + src/views/FindGroups.vue | 18 +- src/views/ManageFacilities.vue | 403 +++++++++++++++++++++++++++++++++ 4 files changed, 437 insertions(+), 4 deletions(-) create mode 100644 src/views/ManageFacilities.vue diff --git a/src/locales/en.json b/src/locales/en.json index 40efd962..837ffb50 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -90,12 +90,14 @@ "Facilities": "Facilities", "Facilities:": "Facilities: {count}", "Facilities associated to group successfully.": "Facilities associated to group successfully.", + "Facilities order has been changed. Click save button to update them.": "Facilities order has been changed. Click save button to update them.", "Facility": "Facility", "Facility address created successfully.": "Facility address created successfully.", "Facility address updated successfully.": "Facility address updated successfully.", "Facility created successfully.": "Facility created successfully.", "Facility configurations created successfully.": "Facility configurations created successfully.", "Facility contact updated successfully.": "Facility contact updated successfully.", + "Facility deselected. Click the save button to remove it from the group.": "Facility deselected. Click the save button to remove it from the group.", "Facility details": "Facility details", "Facility External ID": "Facility External ID", "Facility external ID updated.": "Facility external ID updated.", @@ -114,6 +116,7 @@ "Facility name is required.": "Facility name is required.", "Facility Management": "Facility Management", "Facility renamed successfully.": "Facility renamed successfully.", + "Facility selected. Click the save button to add it to the group.": "Facility selected. Click the save button to add it to the group.", "Facility SubType": "Facility SubType", "Facility Type": "Facility Type", "Facility zipcode": "Facility zipcode", @@ -165,6 +168,7 @@ "Failed to update sell inventory online setting": "Failed to update sell inventory online setting", "Failed to update shopify mapping": "Failed to update shopify mapping", "Failed to update some fulfillment settings.": "Failed to update some fulfillment settings.", + "Failed to update some member facilities.": "Failed to update some member facilities.", "Failed to update some product stores": "Failed to update some product stores", "Failed to update some role(s).": "Failed to update some role(s).", "Failed to send password reset email.": "Failed to send password reset email.", @@ -188,6 +192,7 @@ "group description": "group description", "Group description updated.": "Group description updated.", "Identification": "Identification", + "Include all": "Include all", "Internal ID": "Internal ID", "Internal ID cannot be more than 20 characters.": "Internal ID cannot be more than 20 characters.", "Internal locations": "Internal locations", @@ -212,9 +217,12 @@ "Login failed": "Login failed", "Logout": "Logout", "Longitude": "Longitude", + "Manage Facilities": "Manage Facilities", + "Manage sequence": "Manage sequence", "Mapping ID": "Mapping ID", "Mapping Name": "Mapping Name", "Map facility to an external system": "Map facility to an external system", + "Member facilities updated successfully.": "Member facilities updated successfully.", "Monday": "Monday", "Name": "Name", "Netsuite": "Netsuite", @@ -223,9 +231,11 @@ "New parking created successfully.": "New parking created successfully.", "Next brokering": "Next brokering", "No archived parkings to show.": "No archived parkings to show.", + "No associated facilties found.": "No associated facilties found.", "No Capacity": "No Capacity", "No capacity": "No capacity", "No capacity sets the fulfillment capacity to 0, preventing any new orders from being allocated to this facility. Use the \"Reject all orders\" option in the fulfillment pages to clear your facilities fulfillment queue. To add a fulfillment capacity to this facility, use the custom option.": "No capacity sets the fulfillment capacity to 0, preventing any new orders from being allocated to this facility. Use the \"Reject all orders\" option in the fulfillment pages to clear your facilities fulfillment queue. To add a fulfillment capacity to this facility, use the custom option.", + "No facilities available to select": "No facilities available to select", "No facilities found": "No facilities found", "No facility found": "No facility found", "No fulfillment capacity": "No fulfillment capacity", @@ -296,6 +306,7 @@ "Rename parking": "Rename parking", "Reset": "Reset", "Reset password email": "Reset password email", + "Results": "Results", "Retail Store login": "Retail Store login", "Retail Store logins": "Retail Store logins", "Role": "Role", @@ -361,6 +372,7 @@ "Thursday": "Thursday", "Time zone updated successfully": "Time zone updated successfully", "Timezone": "Timezone", + "Total facilities selected for group": "Total {total} facilities selected for group {facilityGroupName}", "Tuesday": "Tuesday", "Type": "Type", "Unable to find the latitude and longitude for the entered zip code.": "Unable to find the latitude and longitude for the entered zip code.", diff --git a/src/router/index.ts b/src/router/index.ts index 42c29428..89508be1 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -11,6 +11,7 @@ import CreateFacility from '@/views/CreateFacility.vue'; import AddFacilityAddress from '@/views/AddFacilityAddress.vue'; import AddFacilityConfig from '@/views/AddFacilityConfig.vue'; import Tabs from '@/components/Tabs.vue' +import ManageFacilities from '@/views/ManageFacilities.vue'; // Defining types for the meta values declare module 'vue-router' { @@ -99,6 +100,13 @@ const routes: Array = [ component: AddFacilityConfig, props: true, beforeEnter: authGuard + }, + { + path: '/manage-facilities/:facilityGroupId', + name: 'Manage Facilities', + component: ManageFacilities, + props: true, + beforeEnter: authGuard, } ] diff --git a/src/views/FindGroups.vue b/src/views/FindGroups.vue index 774dc1e0..8a2f6195 100644 --- a/src/views/FindGroups.vue +++ b/src/views/FindGroups.vue @@ -47,9 +47,15 @@ {{ translate('Facilities') }} - + + {{ group.facilityCount }} + + + + + {{ group.description }} @@ -108,7 +114,7 @@ import { popoverController, } from '@ionic/vue'; import { defineComponent } from 'vue'; -import { ellipsisVerticalOutline, addOutline, bagHandleOutline, businessOutline } from 'ionicons/icons'; +import { ellipsisVerticalOutline, addOutline, bagHandleOutline, businessOutline, pencilOutline } from 'ionicons/icons'; import { useRouter } from 'vue-router'; import { mapGetters, useStore } from 'vuex'; import { translate } from '@hotwax/dxp-components' @@ -161,10 +167,10 @@ export default defineComponent({ }) }, async mounted() { - await this.fetchGroups(); await this.store.dispatch('util/fetchFacilityGroupTypes') }, async ionViewWillEnter() { + await this.fetchGroups(); this.isScrollingEnabled = false; }, methods: { @@ -251,6 +257,9 @@ export default defineComponent({ } } }, + manageFacilities(facilityGroup: any) { + this.$router.push({ path: `/manage-facilities/${facilityGroup.facilityGroupId}`}) + }, async openGroupActionsPopover(event: Event, group: any) { const groupActionsPopover = await popoverController.create({ component: GroupActionsPopover, @@ -319,6 +328,7 @@ export default defineComponent({ businessOutline, customSort, ellipsisVerticalOutline, + pencilOutline, router, store, translate diff --git a/src/views/ManageFacilities.vue b/src/views/ManageFacilities.vue new file mode 100644 index 00000000..6f0a4c9c --- /dev/null +++ b/src/views/ManageFacilities.vue @@ -0,0 +1,403 @@ + + + + \ No newline at end of file From 6b2454d52fd4f16c40db313935cb301fdc75b978 Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Wed, 7 Aug 2024 15:24:42 +0530 Subject: [PATCH 2/4] Improved: Removed the 'add facility to group' modal and the 'group actions' popover. These became unused after the new page to manage group facilities is introduced. --- src/components/AddFacilityToGroupModal.vue | 243 --------------------- src/components/GroupActionsPopover.vue | 78 ------- src/views/FindGroups.vue | 11 - 3 files changed, 332 deletions(-) delete mode 100644 src/components/AddFacilityToGroupModal.vue delete mode 100644 src/components/GroupActionsPopover.vue diff --git a/src/components/AddFacilityToGroupModal.vue b/src/components/AddFacilityToGroupModal.vue deleted file mode 100644 index 9cd42109..00000000 --- a/src/components/AddFacilityToGroupModal.vue +++ /dev/null @@ -1,243 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/GroupActionsPopover.vue b/src/components/GroupActionsPopover.vue deleted file mode 100644 index c3fa54e3..00000000 --- a/src/components/GroupActionsPopover.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/FindGroups.vue b/src/views/FindGroups.vue index 8a2f6195..6dc7dd9e 100644 --- a/src/views/FindGroups.vue +++ b/src/views/FindGroups.vue @@ -125,7 +125,6 @@ import { FacilityService } from '@/services/FacilityService'; 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({ @@ -260,16 +259,6 @@ export default defineComponent({ manageFacilities(facilityGroup: any) { this.$router.push({ path: `/manage-facilities/${facilityGroup.facilityGroupId}`}) }, - async openGroupActionsPopover(event: Event, group: any) { - const groupActionsPopover = await popoverController.create({ - component: GroupActionsPopover, - event, - showBackdrop: false, - componentProps: { group } - }); - - groupActionsPopover.present(); - }, getAssociatedFacilityGroupIds(facilityGroupTypeId: any) { const associatedfacilityGroupIds = [] as any From 906beda573bca63b303fe4bde1b28e05a3e4f80f Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Wed, 7 Aug 2024 15:27:01 +0530 Subject: [PATCH 3/4] Improved: Removed code used to open modal (#293). --- src/views/FindGroups.vue | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/views/FindGroups.vue b/src/views/FindGroups.vue index 6dc7dd9e..d674c84b 100644 --- a/src/views/FindGroups.vue +++ b/src/views/FindGroups.vue @@ -52,10 +52,6 @@ - - {{ group.description }} From 8ea309795642ff5c3976ffe38c4197eee95c6b15 Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Thu, 8 Aug 2024 10:45:50 +0530 Subject: [PATCH 4/4] Improved: Added border syles for vertical divider (#293). --- src/views/ManageFacilities.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/ManageFacilities.vue b/src/views/ManageFacilities.vue index 6f0a4c9c..6a0e05b0 100644 --- a/src/views/ManageFacilities.vue +++ b/src/views/ManageFacilities.vue @@ -9,7 +9,7 @@
-