Skip to content

Commit

Permalink
Merge pull request #143 from hotwax/131_facility_type_login_card
Browse files Browse the repository at this point in the history
Fixed: Displayed facility type instead of facility parent type on login card (#131).
  • Loading branch information
ravilodhi authored Dec 22, 2023
2 parents 5666076 + 3405b10 commit f0db820
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/components/CreateFacilityLoginModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ion-icon slot="icon-only" :icon="closeOutline" />
</ion-button>
</ion-buttons>
<ion-title>{{ `Create ${parentFacilityTypeDesc} login` }}</ion-title>
<ion-title>{{ translate(`Create ${facilityTypeDesc} login`) }}</ion-title>
</ion-toolbar>
</ion-header>

Expand Down Expand Up @@ -100,7 +100,7 @@ export default defineComponent({
emailAddress: '',
}
},
props: ["currentFacility", "parentFacilityTypeDesc"],
props: ["currentFacility", "facilityTypeDesc"],
methods: {
closeModal() {
modalController.dismiss({ dismissed: true });
Expand Down
4 changes: 2 additions & 2 deletions src/components/FacilityLoginActionPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down Expand Up @@ -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: "<br><br>" }),
inputs: [
{
Expand Down
14 changes: 12 additions & 2 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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.",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/views/FacilityDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
<ion-card>
<ion-card-header>
<ion-card-title>
{{ `${facilityTypes[current.parentFacilityTypeId]?.description} logins` }}
{{ translate(`${facilityTypes[current.facilityTypeId]?.description} logins`) }}
</ion-card-title>
<ion-button v-if="current.facilityLogins?.length" @click="createFacilityLoginModal()" fill="clear">
<ion-icon :icon="addCircleOutline" slot="end" />
Expand Down Expand Up @@ -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
});
Expand All @@ -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()
},
Expand Down

0 comments on commit f0db820

Please sign in to comment.