Skip to content

Commit

Permalink
UXA for success reg dialog (#1624)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimak1 authored Nov 20, 2023
1 parent 41c5051 commit 4919e4d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ppr-ui/src/components/common/RegistrationsWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,10 @@ export default defineComponent({
myRegActionRoute: null as RouteNames,
myRegAddDialog: null as DialogOptionsIF,
myRegAddDialogError: null as StatusCodes,
dialogPermanentlyHidden: false,
manufacturerRegSuccessDialogDisplay: false,
manufacturerRegSuccessDialogOptions: manufacturerRegSuccessDialogOptions,
hideSuccessDialog: false,
myRegAddDialogDisplay: false,
myRegActionDialogDisplay: false,
myRegDeleteDialogDisplay: false,
Expand Down Expand Up @@ -335,6 +337,9 @@ export default defineComponent({
// do not proceed if app is not ready
if (!props.appReady) return
localState.dialogPermanentlyHidden =
getUserMiscSettingsByKey(SettingOptions.SUCCESSFUL_REGISTRATION_DIALOG_HIDE) || false
resetNewRegistration(null) // Clear store data from any previous registration.
// FUTURE: add loading for search history too
localState.myRegDataLoading = true
Expand Down Expand Up @@ -540,6 +545,7 @@ export default defineComponent({
}
localState.myRegAddDialogError = null
localState.myRegAddDialogDisplay = false
localState.hideSuccessDialog = true
}
// Add PPR summary to registration table
Expand Down Expand Up @@ -998,9 +1004,8 @@ export default defineComponent({
localState.myRegDataAdding = false
// check if success registration dialog for Manufacturers is permanently hidden (via user settings)
const dialogPermanentlyHidden =
getUserMiscSettingsByKey(SettingOptions.SUCCESSFUL_REGISTRATION_DIALOG_HIDE) || false
localState.manufacturerRegSuccessDialogDisplay = !dialogPermanentlyHidden && !isRoleStaffReg.value
localState.manufacturerRegSuccessDialogDisplay =
!localState.dialogPermanentlyHidden && !isRoleStaffReg.value && !localState.hideSuccessDialog
// trigger snackbar
context.emit('snackBarMsg', 'Registration was successfully added to your table.')
Expand Down

0 comments on commit 4919e4d

Please sign in to comment.