diff --git a/src/components/FacilityGroupDescriptionModal.vue b/src/components/FacilityGroupDescriptionModal.vue index 807d6385..f240b3f0 100644 --- a/src/components/FacilityGroupDescriptionModal.vue +++ b/src/components/FacilityGroupDescriptionModal.vue @@ -16,10 +16,12 @@
{{ translate("Name") }} *
- + diff --git a/src/locales/en.json b/src/locales/en.json index da3075af..ff9b6695 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -244,6 +244,7 @@ "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 facilities selected." : "No facilities selected.", "No facility found": "No facility found", "No fulfillment capacity": "No fulfillment capacity", "No groups found": "No groups found", diff --git a/src/views/CreateFacilityGroup.vue b/src/views/CreateFacilityGroup.vue index 99f9f334..f95bbbd9 100644 --- a/src/views/CreateFacilityGroup.vue +++ b/src/views/CreateFacilityGroup.vue @@ -38,7 +38,14 @@ - + + @@ -72,6 +79,7 @@ import { IonSelect, IonSelectOption, IonText, + IonTextarea, IonTitle, IonToolbar, alertController @@ -105,6 +113,7 @@ export default defineComponent({ IonSelect, IonSelectOption, IonText, + IonTextarea, IonTitle, IonToolbar }, diff --git a/src/views/FindGroups.vue b/src/views/FindGroups.vue index ed1b8d17..b7601e64 100644 --- a/src/views/FindGroups.vue +++ b/src/views/FindGroups.vue @@ -3,7 +3,7 @@ {{ translate("Groups") }} - + {{ translate("Facility groups") }} @@ -14,7 +14,7 @@ - + - - - @@ -129,8 +118,6 @@ import { IonFabButton, IonHeader, IonIcon, - IonInfiniteScroll, - IonInfiniteScrollContent, IonItem, IonLabel, IonList, @@ -172,8 +159,6 @@ export default defineComponent({ IonFabButton, IonHeader, IonIcon, - IonInfiniteScroll, - IonInfiniteScrollContent, IonItem, IonLabel, IonList, @@ -189,7 +174,6 @@ export default defineComponent({ data() { return { segment: "facility-groups", - isScrollingEnabled: false, currentFacilityGroupTypeId: "", isParentGroupDetailAnimationCompleted: false, facilityGroupProductStore: {} as any @@ -207,8 +191,8 @@ export default defineComponent({ await this.store.dispatch('util/fetchFacilityGroupTypes') }, async ionViewWillEnter() { + this.segment = "facility-groups" await this.fetchGroups(); - this.isScrollingEnabled = false; }, methods: { resetParentGroupPage() { @@ -260,39 +244,18 @@ export default defineComponent({ await this.store.dispatch('facility/updateGroupQuery', this.query) this.fetchGroups(); }, - 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) - }, - enableScrolling() { - const parentElement = (this as any).$refs.contentRef.$el - const scrollEl = parentElement.shadowRoot.querySelector("main[part='scroll']") - let scrollHeight = scrollEl.scrollHeight, infiniteHeight = (this as any).$refs.infiniteScrollRef.$el.offsetHeight, scrollTop = scrollEl.scrollTop, threshold = 100, height = scrollEl.offsetHeight - const distanceFromInfinite = scrollHeight - infiniteHeight - scrollTop - threshold - height - if(distanceFromInfinite < 0) { - this.isScrollingEnabled = false; - } else { - this.isScrollingEnabled = true; - } - }, - async loadMoreGroups(event: any) { - // Added this check here as if added on infinite-scroll component the Loading content does not gets displayed - if(!(this.isScrollingEnabled && this.isScrollable)) { - await event.target.complete(); + async fetchGroups() { + const viewSize = process.env.VUE_APP_VIEW_SIZE; + let viewIndex = 0; + do { + const payload = { + viewSize, + viewIndex + }; + await this.store.dispatch('facility/fetchFacilityGroups', payload) + viewIndex++; } - this.fetchGroups( - undefined, - Math.ceil( - this.groups?.length / (process.env.VUE_APP_VIEW_SIZE as any) - ).toString() - ).then(async () => { - await event.target.complete(); - }); + while (this.isScrollable); }, getAssociatedFacilityGroupIds(facilityGroupTypeId: any) { const associatedfacilityGroupIds = [] as any diff --git a/src/views/ManageFacilities.vue b/src/views/ManageFacilities.vue index b47e5270..0cb6fcf3 100644 --- a/src/views/ManageFacilities.vue +++ b/src/views/ManageFacilities.vue @@ -54,6 +54,9 @@ +
+

{{ translate('No facilities selected.') }}

+
@@ -133,8 +136,9 @@ } }, props: ['facilityGroupId'], - async mounted() { + async ionViewWillEnter() { emitter.emit('presentLoader') + this.isSavingDetail = false await Promise.all([this.fetchFacilities(), this.fetchFacilityGroup()]) await this.fetchMemberFacilities(); await this.getFilteredFacilities(); diff --git a/src/views/Parking.vue b/src/views/Parking.vue index 1c11873b..fcd29da2 100644 --- a/src/views/Parking.vue +++ b/src/views/Parking.vue @@ -126,7 +126,7 @@ export default defineComponent({ isScrollable: "facility/isVirtualFacilitiesScrollable", }) }, - async mounted() { + async ionViewWillEnter() { await this.fetchArchivedFacilities(); await this.fetchFacilities(); },