From 3405b103aa1007a5594b5278fa86a78dc89dbdf9 Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Fri, 22 Dec 2023 16:27:06 +0530 Subject: [PATCH] Fixed: Displayed facility type instead of facility parent type on login card (#131). --- src/components/CreateFacilityLoginModal.vue | 4 ++-- src/components/FacilityLoginActionPopover.vue | 4 ++-- src/locales/en.json | 14 ++++++++++++-- src/views/FacilityDetails.vue | 6 +++--- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/components/CreateFacilityLoginModal.vue b/src/components/CreateFacilityLoginModal.vue index 951c7932..f9cd024f 100644 --- a/src/components/CreateFacilityLoginModal.vue +++ b/src/components/CreateFacilityLoginModal.vue @@ -6,7 +6,7 @@ - {{ `Create ${parentFacilityTypeDesc} login` }} + {{ translate(`Create ${facilityTypeDesc} login`) }} @@ -100,7 +100,7 @@ export default defineComponent({ emailAddress: '', } }, - props: ["currentFacility", "parentFacilityTypeDesc"], + props: ["currentFacility", "facilityTypeDesc"], methods: { closeModal() { modalController.dismiss({ dismissed: true }); diff --git a/src/components/FacilityLoginActionPopover.vue b/src/components/FacilityLoginActionPopover.vue index d0c0ce14..208fbca6 100644 --- a/src/components/FacilityLoginActionPopover.vue +++ b/src/components/FacilityLoginActionPopover.vue @@ -49,7 +49,7 @@ export default defineComponent({ IonList, IonListHeader }, - props: ['currentFacility', 'currentFacilityUser', "parentFacilityTypeDesc"], + props: ['currentFacility', 'currentFacilityUser', "facilityTypeDesc"], methods: { async viewDetails() { const userDetailUrl = `${process.env.VUE_APP_USERS_APPLICATION_URL}/user-details/${this.currentFacilityUser.partyId}` @@ -161,7 +161,7 @@ export default defineComponent({ async unlinkFacilityLoginAlert() { const message = 'Unlinking this login as an official facility login will not prevent this user from being used to login at this facility. Do you also want to block this user from logging into this facility?' const alert = await alertController.create({ - header: translate(`Unlink ${this.parentFacilityTypeDesc} login`), + header: translate(`Unlink ${this.facilityTypeDesc} login`), message: translate(message, { space: "

" }), inputs: [ { diff --git a/src/locales/en.json b/src/locales/en.json index 47d2639a..d8ffc70f 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -64,7 +64,6 @@ "Description": "Description", "Dismiss": "Dismiss", "Distribution Center": "Distribution Center", - "Distribution Center login": "Distribution Center login", "Failed to associate calendar to the facility.": "Failed to associate calendar to the facility.", "Filters": "Filters", "Edit": "Edit", @@ -215,6 +214,10 @@ "orders allocated today": "{orderCount} orders allocated today", "orders in fulfillment queue": "{orderCount} orders in fulfillment queue", "Others": "Others", + "Outlet Store login": "Outlet Store login", + "Outlet Store logins": "Outlet Store logins", + "Outlet Warehouse login": "Outlet Warehouse login", + "Outlet Warehouse logins": "Outlet Warehouse logins", "Parking": "Parking", "Parking archived successfully.": "Parking archived successfully.", "Parking renamed successfully.": "Parking renamed successfully.", @@ -227,7 +230,6 @@ "party id": "party id", "Pending allocation": "Pending allocation", "Physical Store": "Physical Store", - "Physical Store login": "Physical Store login", "Please check start time and end time entries. End time cannot be less than start time.": "Please check start time and end time entries. End time cannot be less than start time.", "Please update atleast one party role.": "Please update atleast one party role.", "Password": "Password", @@ -257,6 +259,8 @@ "Rename parking": "Rename parking", "Reset": "Reset", "Reset password email": "Reset password email", + "Retail Store login": "Retail Store login", + "Retail Store logins": "Retail Store logins", "Role": "Role", "role": "role", "Saturday": "Saturday", @@ -323,6 +327,10 @@ "Unlimited orders": "Unlimited orders", "Unlink": "Unlink", "Unlink and block": "Unlink and block", + "Unlink Outlet Store login": "Unlink Outlet Store login", + "Unlink Outlet Warehouse login": "Unlink Outlet Warehouse login", + "Unlink Retail Store login": "Unlink Retail Store login", + "Unlink Warehouse login": "Unlink Warehouse login", "Unlinking this login as an official facility login will not prevent this user from being used to login at this facility. Do you also want to block this user from logging into this facility?": "Unlinking this login as an official facility login will not prevent this user from being used to login at this facility. {space} Do you also want to block this user from logging into this facility?", "Update days to ship": "Update days to ship", "Updated default days to ship": "Updated default days to ship", @@ -334,6 +342,8 @@ "View order count history": "View order count history", "View other schedules": "View other schedules", "Warehouses": "Warehouses", + "Warehouse login": "Warehouse login", + "Warehouse logins": "Warehouse logins", "Wednesday": "Wednesday", "Would you like to update your time zone to . Your profile is currently set to . This setting can always be changed from the settings menu.": "Would you like to update your time zone to {localTimeZone}. Your profile is currently set to {profileTimeZone}. This setting can always be changed from the settings menu.", "Zipcode": "Zipcode" diff --git a/src/views/FacilityDetails.vue b/src/views/FacilityDetails.vue index 9788a2e7..19740b84 100644 --- a/src/views/FacilityDetails.vue +++ b/src/views/FacilityDetails.vue @@ -246,7 +246,7 @@ - {{ `${facilityTypes[current.parentFacilityTypeId]?.description} logins` }} + {{ translate(`${facilityTypes[current.facilityTypeId]?.description} logins`) }} @@ -1189,7 +1189,7 @@ export default defineComponent({ async openFacilityLoginActionPopover(ev: Event, facilityUser: any) { const popover = await popoverController.create({ component: FacilityLoginActionPopover, - componentProps: { currentFacility: this.current, currentFacilityUser: facilityUser, parentFacilityTypeDesc: this.facilityTypes[this.current.parentFacilityTypeId]?.description }, + componentProps: { currentFacility: this.current, currentFacilityUser: facilityUser, facilityTypeDesc: this.facilityTypes[this.current.facilityTypeId]?.description }, event: ev, showBackdrop: false }); @@ -1198,7 +1198,7 @@ export default defineComponent({ async createFacilityLoginModal() { const facilityLoginModal = await modalController.create({ component: CreateFacilityLoginModal, - componentProps: { currentFacility: this.current, parentFacilityTypeDesc: this.facilityTypes[this.current.parentFacilityTypeId]?.description } + componentProps: { currentFacility: this.current, facilityTypeDesc: this.facilityTypes[this.current.facilityTypeId]?.description } }) facilityLoginModal.present() },