diff --git a/src/components/AddLocationModal.vue b/src/components/AddLocationModal.vue
index e08e8b54..1a706102 100644
--- a/src/components/AddLocationModal.vue
+++ b/src/components/AddLocationModal.vue
@@ -69,7 +69,7 @@ import { defineComponent } from "vue";
import { closeOutline, saveOutline } from "ionicons/icons";
import { translate } from '@hotwax/dxp-components'
import { FacilityService } from "@/services/FacilityService";
-import { mapGetters } from 'vuex'
+import { mapGetters, useStore } from 'vuex'
import { hasError } from "@/adapter";
import { showToast } from "@/utils";
import logger from "@/logger";
@@ -109,17 +109,17 @@ export default defineComponent({
})
},
methods: {
- closeModal(result?: string) {
- modalController.dismiss({ result });
+ closeModal() {
+ modalController.dismiss();
},
saveFacilityLocation() {
- if(!this.locationInfo.aisleId?.trim() || !this.locationInfo.areaId?.trim() || !this.locationInfo.positionId?.trim() || !this.locationInfo.sectionId?.trim() || !this.locationInfo.levelId?.trim()) {
+ if(!this.locationInfo.aisleId?.trim() || !this.locationInfo.areaId?.trim() || !this.locationInfo.sectionId?.trim() || !this.locationInfo.levelId?.trim()) {
showToast(translate('Please fill all the required fields'))
return;
}
// checking for locationSeqId as when adding new facility we won't be having locationSeqId
- if(this.location.locationSeqId) {
+ if(this.location?.locationSeqId) {
this.updateFacilityLocation()
} else {
this.addFacilityLocation()
@@ -136,7 +136,8 @@ export default defineComponent({
if(!hasError(resp)) {
showToast(translate('Facility location created successfully'))
- this.closeModal('success');
+ this.closeModal();
+ await this.store.dispatch('facility/fetchFacilityLocations')
} else {
throw resp.data
}
@@ -157,7 +158,8 @@ export default defineComponent({
if(!hasError(resp)) {
showToast(translate('Facility location updated successfully'))
- this.closeModal('success');
+ this.closeModal();
+ await this.store.dispatch('facility/fetchFacilityLocations')
} else {
throw resp.data
}
@@ -168,9 +170,12 @@ export default defineComponent({
},
},
setup() {
+ const store = useStore();
+
return {
closeOutline,
saveOutline,
+ store,
translate
};
},
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
new file mode 100644
index 00000000..d5a64495
--- /dev/null
+++ b/src/components/Filters.vue
@@ -0,0 +1,94 @@
+
+
+
+
+ {{ translate("Filters") }}
+
+
+
+
+
+
+
+ {{ translate("Product Store") }}
+
+ {{ translate("All") }}
+ {{ productStore.storeName }}
+
+
+
+
+ {{ translate("Type") }}
+
+ {{ translate("All") }}
+ {{ facilityType.description }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/LocationDetailsPopover.vue b/src/components/LocationDetailsPopover.vue
index 2a05110c..2bd249a5 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')
} 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/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 1056add6..1fa1c2b5 100644
--- a/src/views/FindFacilities.vue
+++ b/src/views/FindFacilities.vue
@@ -1,13 +1,20 @@
+
+
{{ translate("Find Facilities") }}
+
+
+
+
+
-
+