diff --git a/src/components/AddLocationModal.vue b/src/components/AddLocationModal.vue index e08e8b54..14a3f952 100644 --- a/src/components/AddLocationModal.vue +++ b/src/components/AddLocationModal.vue @@ -11,39 +11,43 @@ - - {{ translate("Type") }} - - {{ description }} - - - - {{ translate("Area") }} * - - - - {{ translate("Aisle") }} * - - - - {{ translate("Section") }} * - - - - {{ translate("Level") }} * - - - - {{ translate("Sequence") }} - - - +
+ + + {{ translate("Type") }} + + {{ description }} + + + + {{ translate("Area") }} * + + + + {{ translate("Aisle") }} * + + + + {{ translate("Section") }} * + + + + {{ translate("Level") }} * + + + + {{ translate("Sequence") }} + + - - - - - + + + + + +
+ \ No newline at end of file diff --git a/src/components/LocationDetailsPopover.vue b/src/components/LocationDetailsPopover.vue index 2a05110c..2e4fed31 100644 --- a/src/components/LocationDetailsPopover.vue +++ b/src/components/LocationDetailsPopover.vue @@ -53,10 +53,8 @@ export default defineComponent({ addLocationModal.present() - addLocationModal.onDidDismiss().then((result: any) => { - if(result.data?.result) { - popoverController.dismiss(); - } + addLocationModal.onDidDismiss().then(() => { + popoverController.dismiss(); }) }, async removeLocation() { @@ -69,8 +67,8 @@ export default defineComponent({ const resp = await FacilityService.deleteFacilityLocation(params) if(!hasError(resp)) { - this.store.dispatch('facility/fetchFacilityLocation') - popoverController.dismiss(); + showToast(translate('Facility location removed successfully')) + await this.store.dispatch('facility/fetchFacilityLocations', { facilityId: this.current.facilityId }) } else { throw resp.data } @@ -78,6 +76,7 @@ export default defineComponent({ showToast(translate('Failed to remove facility location')) logger.error('Failed to remove facility location', err) } + popoverController.dismiss(); } }, setup() { diff --git a/src/locales/en.json b/src/locales/en.json index 412ee6ee..1640364c 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -25,13 +25,16 @@ "Click the backdrop to dismiss.": "Click the backdrop to dismiss.", "Closing Time": "Closing Time", "Configure the order fulfillment capacity of your facility.": "Configure the order fulfillment capacity of your facility.", + "Consumed Order Limit": "Consumed Order Limit", "Custom": "Custom", "Custom fulfillment capacity": "Custom fulfillment capacity", "Custom mapping": "Custom mapping", "Country": "Country", "Days to ship": "Days to ship", "days to ship": "days to ship", + "Default days to ship updated successfully": "Default days to ship updated successfully", "Dismiss": "Dismiss", + "Filters": "Filters", "Edit": "Edit", "Edit location": "Edit location", "External mappings": "External mappings", @@ -39,6 +42,7 @@ "Facility details": "Facility details", "Facility ID": "Facility ID", "Facility location created successfully": "Facility location created successfully", + "Facility location removed successfully": "Facility location removed successfully", "Facility location updated successfully": "Facility location updated successfully", "Facility name": "Facility name", "Facility Management": "Facility Management", @@ -46,13 +50,17 @@ "Failed to fetch facility information": "Failed to fetch facility information", "Failed to find the facility locations": "Failed to find the facility locations", "Failed to remove facility location": "Failed to remove facility location", + "Failed to update default days to ship": "Failed to update default days to ship", "Failed to update facility location": "Failed to update facility location", + "Failed to update fulfillment capacity for ": "Failed to update fulfillment capacity for {facilityName}", + "Failed to update fulfillment setting": "Failed to update fulfillment setting", "Fetching TimeZones": "Fetching TimeZones", "Find Facilities": "Find Facilities", "Friday": "Friday", "Fulfillment Capacity": "Fulfillment Capacity", "Fulfillment capacity updated successfully for ": "Fulfillment capacity updated successfully for {facilityName}", "Fulfillment Settings": "Fulfillment Settings", + "Fulfillment setting updated successfully": "Fulfillment setting updated successfully", "Generate": "Generate", "Generate shipping labels": "Generate shipping labels", "Go to Launchpad": "Go to Launchpad", @@ -83,9 +91,10 @@ "Netsuite": "Netsuite", "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 found": "No facilities found", "No fulfillment capacity": "No fulfillment 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 records found": "No records found", "No time zone found": "No time zone found", "OMS": "OMS", "OMS instance": "OMS instance", diff --git a/src/store/modules/facility/actions.ts b/src/store/modules/facility/actions.ts index 60de955b..87ab9935 100644 --- a/src/store/modules/facility/actions.ts +++ b/src/store/modules/facility/actions.ts @@ -56,9 +56,7 @@ const actions: ActionTree = { facilities = resp.data.docs total = resp.data.count - // make api calls in parallel - const facilitiesGroupInformation = await FacilityService.fetchFacilityGroupInformation(facilities.map((facility: any) => facility.facilityId)) - const facilitiesOrderCount = await FacilityService.fetchFacilitiesOrderCount(facilities.map((facility: any) => facility.facilityId)) + const [facilitiesGroupInformation, facilitiesOrderCount] = await Promise.all([FacilityService.fetchFacilityGroupInformation(facilities.map((facility: any) => facility.facilityId)), FacilityService.fetchFacilitiesOrderCount(facilities.map((facility: any) => facility.facilityId))]) facilities.map((facility: any) => { const fulfillmentOrderLimit = facility.maximumOrderLimit @@ -186,7 +184,7 @@ const actions: ActionTree = { const resp = await FacilityService.fetchFacilityLocations(params) if(!hasError(resp) && resp.data.count > 0) { - commit(types.FACILITY_CURRENT_LOCATION_UPDATED, resp.data.docs) + commit(types.FACILITY_LOCATIONS_UPDATED, resp.data.docs) } else { throw resp.data } diff --git a/src/store/modules/facility/mutation-types.ts b/src/store/modules/facility/mutation-types.ts index 45007698..b99d3d44 100644 --- a/src/store/modules/facility/mutation-types.ts +++ b/src/store/modules/facility/mutation-types.ts @@ -2,4 +2,4 @@ export const SN_FACILITY = 'facility' export const FACILITY_LIST_UPDATED = SN_FACILITY + '/LIST_UPDATED' export const FACILITY_QUERY_UPDATED = SN_FACILITY + '/QUERY_UPDATED' export const FACILITY_CURRENT_UPDATED = SN_FACILITY + '/CURRENT_UPDATED' -export const FACILITY_CURRENT_LOCATION_UPDATED = SN_FACILITY + '/CURRENT_LOCATION_UPDATED' \ No newline at end of file +export const FACILITY_LOCATIONS_UPDATED = SN_FACILITY + '/LOCATIONS_UPDATED' \ No newline at end of file diff --git a/src/store/modules/facility/mutations.ts b/src/store/modules/facility/mutations.ts index c6e11f6b..c067f705 100644 --- a/src/store/modules/facility/mutations.ts +++ b/src/store/modules/facility/mutations.ts @@ -13,7 +13,7 @@ const mutations: MutationTree = { [types.FACILITY_CURRENT_UPDATED](state, payload) { state.current = payload }, - [types.FACILITY_CURRENT_LOCATION_UPDATED](state, payload) { + [types.FACILITY_LOCATIONS_UPDATED](state, payload) { state.current.locations = payload } } diff --git a/src/theme/variables.css b/src/theme/variables.css index 5fbb21f2..820eae8b 100644 --- a/src/theme/variables.css +++ b/src/theme/variables.css @@ -326,7 +326,7 @@ hr { .list-item { --columns-mobile: 2; - --columns-tablet: 5; + --columns-tablet: 4; --columns-desktop: 7; --col-calc: var(--columns-mobile); --implicit-columns: calc(var(--col-calc) - 1); diff --git a/src/views/FindFacilities.vue b/src/views/FindFacilities.vue index db2fa67e..1fa1c2b5 100644 --- a/src/views/FindFacilities.vue +++ b/src/views/FindFacilities.vue @@ -1,13 +1,20 @@