diff --git a/.env.example b/.env.example index 2d1de397..a0a75169 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,7 @@ VUE_APP_I18N_LOCALE=en-US VUE_APP_I18N_FALLBACK_LOCALE=en-US VUE_APP_CACHE_MAX_AGE=3600 -VUE_APP_VIEW_SIZE=10 +VUE_APP_VIEW_SIZE=20 VUE_APP_BASE_URL= VUE_APP_PERMISSION_ID= VUE_APP_LOCALES={"en-US": "English"} diff --git a/src/components/AddStaffMemberModal.vue b/src/components/AddStaffMemberModal.vue index 09ab95b9..5414ec77 100644 --- a/src/components/AddStaffMemberModal.vue +++ b/src/components/AddStaffMemberModal.vue @@ -19,20 +19,20 @@ - +
+ {{ translate("No party found") }} +
+ {{ translate("Staff") }} -
{{ translate("No party found") }}
-
- - - {{ party.fullName }} -

{{ party.partyId }}

-
- - {{ description }} - -
-
+ + + {{ party.fullName }} +

{{ party.partyId }}

+
+ + {{ description }} + +
@@ -100,7 +100,7 @@ export default defineComponent({ props: ['facilityId', 'selectedParties'], data() { return { - parties: [], + parties: [] as any, queryString: '', selectedPartyValues: JSON.parse(JSON.stringify(this.selectedParties)) } diff --git a/src/store/modules/facility/actions.ts b/src/store/modules/facility/actions.ts index 5eb1dd97..cba17a13 100644 --- a/src/store/modules/facility/actions.ts +++ b/src/store/modules/facility/actions.ts @@ -264,6 +264,7 @@ const actions: ActionTree = { }, async fetchFacilityLocations({ commit }, payload) { + let facilityLocations = [] try { const params = { inputFields: { @@ -277,13 +278,14 @@ const actions: ActionTree = { const resp = await FacilityService.fetchFacilityLocations(params) if(!hasError(resp) && resp.data.count > 0) { - commit(types.FACILITY_LOCATIONS_UPDATED, resp.data.docs) + facilityLocations = resp.data.docs } else { throw resp.data } } catch(err) { logger.error('Failed to find the facility locations', err) } + commit(types.FACILITY_LOCATIONS_UPDATED, facilityLocations) }, async fetchFacilityCalendar({commit}, payload) { diff --git a/src/store/modules/facility/mutation-types.ts b/src/store/modules/facility/mutation-types.ts index 864d31bf..aa9d96cc 100644 --- a/src/store/modules/facility/mutation-types.ts +++ b/src/store/modules/facility/mutation-types.ts @@ -2,7 +2,6 @@ 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' export const FACILITY_LOCATIONS_UPDATED = SN_FACILITY + '/LOCATIONS_UPDATED' export const FACILITY_POSTAL_ADDRESS_UPDATED = SN_FACILITY + '/POSTAL_ADDRESS_UPDATED' export const FACILITY_MAPPINGS_UPDATED = SN_FACILITY + '/MAPPINGS_UPDATED' diff --git a/src/store/modules/facility/mutations.ts b/src/store/modules/facility/mutations.ts index 12a86eef..54549eb6 100644 --- a/src/store/modules/facility/mutations.ts +++ b/src/store/modules/facility/mutations.ts @@ -16,9 +16,6 @@ const mutations: MutationTree = { [types.FACILITY_CURRENT_UPDATED](state, payload) { state.current = payload }, - [types.FACILITY_CURRENT_LOCATION_UPDATED](state, payload) { - state.current.locations = payload - }, [types.FACILITY_POSTAL_ADDRESS_UPDATED](state, payload) { state.current.postalAddress = payload }, diff --git a/src/views/AddFacilityConfig.vue b/src/views/AddFacilityConfig.vue index 2bc79c0a..c47604f1 100644 --- a/src/views/AddFacilityConfig.vue +++ b/src/views/AddFacilityConfig.vue @@ -18,7 +18,7 @@ {{ translate("Add") }} -
+

{{ translate("No product stores added.") }}

diff --git a/src/views/FacilityDetails.vue b/src/views/FacilityDetails.vue index 71d4a024..ccb086af 100644 --- a/src/views/FacilityDetails.vue +++ b/src/views/FacilityDetails.vue @@ -23,7 +23,7 @@ {{ translate("Address") }} -
+ {{ translate("Add") }} @@ -46,7 +46,7 @@ {{ translate("Latitude & Longitude") }} -
+ {{ translate("Add") }} diff --git a/src/views/FindFacilities.vue b/src/views/FindFacilities.vue index 76f0db59..5801b9a9 100644 --- a/src/views/FindFacilities.vue +++ b/src/views/FindFacilities.vue @@ -46,7 +46,7 @@
- +

{{ facility.facilityTypeId ? facilityTypes[facility.facilityTypeId] ? facilityTypes[facility.facilityTypeId].description : facilityTypes.facilityTypeId : '' }}

{{ facility.facilityName }} @@ -252,12 +252,12 @@ export default defineComponent({ if (!hasError(resp)) { // updating the facilities state instead of refetching - const updatedFacilities = JSON.parse(JSON.stringify(this.facilities)).map((fac: any) => { - if (facility.facilityId === fac.facilityId) { - fac.maximumOrderLimit = maximumOrderLimit === "" ? null : maximumOrderLimit - fac.orderLimitType = fac.maximumOrderLimit === null ? 'unlimited' : (fac.maximumOrderLimit === 0 ? 'no-capacity' : 'custom') + const updatedFacilities = JSON.parse(JSON.stringify(this.facilities)).map((facilityData: any) => { + if (facility.facilityId === facilityData.facilityId) { + facilityData.maximumOrderLimit = maximumOrderLimit === "" ? null : maximumOrderLimit + facilityData.orderLimitType = facilityData.maximumOrderLimit === null ? 'unlimited' : (facilityData.maximumOrderLimit === 0 ? 'no-capacity' : 'custom') } - return fac + return facilityData }) this.store.dispatch('facility/updateFacilities', updatedFacilities) showToast(translate('Fulfillment capacity updated successfully for ', { facilityName: facility.facilityName })) @@ -289,11 +289,11 @@ export default defineComponent({ if (!hasError(resp)) { // updating the facilities state instead of refetching - const updatedFacilities = JSON.parse(JSON.stringify(this.facilities)).map((fac: any) => { - if (facility.facilityId === fac.facilityId) { - fac.sellOnline = !facility.sellOnline + const updatedFacilities = JSON.parse(JSON.stringify(this.facilities)).map((facilityData: any) => { + if (facility.facilityId === facilityData.facilityId) { + facilityData.sellOnline = !facility.sellOnline } - return fac + return facilityData }) this.store.dispatch('facility/updateFacilities', updatedFacilities) showToast(translate('Fulfillment setting updated successfully'))