-
Notifications
You must be signed in to change notification settings - Fork 24
Password change prompt after expiration (#63) #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Nirvan-Bobde30
wants to merge
11
commits into
hotwax:main
Choose a base branch
from
Nirvan-Bobde30:launchpad/issue#63
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e1cc156
Implemented : Password Change Prompt After Expiration (#63)
Nirvan-Bobde30 1a1c7bb
Fixed : removed unused code and consoles (#63)
Nirvan-Bobde30 7cde409
Fixed : added static text to locales file (#63)
Nirvan-Bobde30 028d380
Fixed : styles for the login page forgot password message box (#63)
Nirvan-Bobde30 a6fc819
Fixed : improved indentations issues (#63)
Nirvan-Bobde30 61886fc
Fixed : imporved indentations and used label prop within ion-input (#63)
Nirvan-Bobde30 eaaadc2
Fixed : naming conventions ,tempelate code and error messages in rese…
Nirvan-Bobde30 9f73e3b
Merge remote-tracking branch 'upstream/main' into launchpad/issue#63
Nirvan-Bobde30 50a190f
Fixed : Forgot password flow ,changed api endpoint for reset password…
Nirvan-Bobde30 b6bfe36
Fixed : indentation issue and updated UI according figma (#63)
Nirvan-Bobde30 abd347a
Fixed : removed css static classes and fixed ui issues (#63)
Nirvan-Bobde30 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,131 @@ | ||
| <template> | ||
| <ion-header> | ||
| <ion-toolbar> | ||
| <ion-buttons slot="start"> | ||
| <ion-button @click="closeModal"> | ||
| <ion-icon slot="icon-only" :icon="closeOutline" /> | ||
| </ion-button> | ||
| </ion-buttons> | ||
| <ion-title>{{$t("Reset password")}}</ion-title> | ||
| </ion-toolbar> | ||
| </ion-header> | ||
| <ion-content> | ||
| <ion-item lines="full"> | ||
| <ion-input @ionFocus="clearMessages" :label="$t('Username')" name="username" v-model="username" id="username" type="text" /> | ||
| </ion-item> | ||
| <ion-text color="danger" v-if="errorMessage"> | ||
| <p class="ion-padding-start">{{ errorMessage }}</p> | ||
| </ion-text> | ||
| <ion-text color="success" v-if="successMessage"> | ||
| <p class="ion-padding-start">{{ successMessage }}</p> | ||
| </ion-text> | ||
|
|
||
| <ion-item lines="none" class="ion-margin-vertical ion-padding-vertical"> | ||
| <ion-icon :icon="informationOutline" size="medium" slot="start"></ion-icon> | ||
| <ion-label >{{ $t("Your username must have an email already associated with it in HotWax to receive a reset password email. If you do not have an email linked to your account already, please contact your administrator to manually reset your password.") }}</ion-label> | ||
| </ion-item> | ||
|
|
||
| <ion-fab vertical="bottom" horizontal="end" slot="fixed"> | ||
| <ion-fab-button @click="forgotPassword"> | ||
| <ion-icon :icon="sendOutline" /> | ||
| </ion-fab-button> | ||
| </ion-fab> | ||
| </ion-content> | ||
| </template> | ||
|
|
||
| <script lang="ts"> | ||
| import { defineComponent } from 'vue'; | ||
| import { | ||
| IonButton, | ||
| IonButtons, | ||
| IonContent, | ||
| IonHeader, | ||
| IonIcon, | ||
| IonTitle, | ||
| IonToolbar, | ||
| IonItem, | ||
| IonLabel, | ||
| IonFab, | ||
| IonFabButton, | ||
| modalController, | ||
| IonInput | ||
| } from '@ionic/vue'; | ||
| import { closeOutline, informationOutline, sendOutline } from 'ionicons/icons'; | ||
| import { UserService } from '@/services/UserService'; | ||
| import { hasError } from '@hotwax/oms-api'; | ||
| import { useRouter } from 'vue-router'; | ||
| import { showToast } from '@/util'; | ||
|
|
||
| export default defineComponent({ | ||
| name:'ForgotPasswordModal', | ||
| components:{ | ||
| IonButton, | ||
| IonButtons, | ||
| IonContent, | ||
| IonHeader, | ||
| IonIcon, | ||
| IonTitle, | ||
| IonToolbar, | ||
| IonItem, | ||
| IonLabel, | ||
| IonFab, | ||
| IonFabButton, | ||
| IonInput | ||
| }, | ||
| data(){ | ||
| return { | ||
| username:'', | ||
| errorMessage:'', | ||
| successMessage:'' | ||
| } | ||
| }, | ||
| methods:{ | ||
| closeModal() { | ||
| modalController.dismiss({ dismissed: true }); | ||
| }, | ||
| clearMessages(){ | ||
| this.errorMessage = "" | ||
| this.successMessage = "" | ||
| }, | ||
| async forgotPassword() { | ||
| if (!this.username.trim()) { | ||
| this.errorMessage = this.$t('Username cannot be empty.'); | ||
| this.successMessage = ''; | ||
| return; | ||
| } | ||
|
|
||
| const params = { | ||
| userName: this.username, | ||
| }; | ||
|
|
||
| try { | ||
| const resp = await UserService.forgotPassword(params); | ||
|
|
||
| if (!hasError(resp)) { | ||
| this.successMessage = this.$t(resp.data._EVENT_MESSAGE_); | ||
| this.errorMessage = ''; | ||
| showToast(this.successMessage) | ||
| this.closeModal() | ||
| } else { | ||
| throw resp.data._ERROR_MESSAGE_; | ||
| } | ||
| } catch (err) { | ||
| this.errorMessage = this.$t( | ||
| 'Failed to send password reset link, please try again or contact administrator.' | ||
| ); | ||
| this.successMessage = ''; | ||
| console.error(err); | ||
|
Check warning on line 117 in src/components/ForgotPasswordModal.vue
|
||
| } | ||
| }, | ||
| }, | ||
| setup(){ | ||
| const router = useRouter() | ||
| return { | ||
| closeOutline, | ||
| informationOutline, | ||
| sendOutline, | ||
| router | ||
| } | ||
| } | ||
| }) | ||
| </script> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,29 @@ | ||
| { | ||
| "Confirm Password": "Confirm Password", | ||
| "Failed to fetch user-profile, please try again": "Failed to fetch user-profile, please try again", | ||
| "Failed to reset password, please try again and follow the instructions for creating a new password.": "Failed to reset password, please try again and follow the instructions for creating a new password.", | ||
| "Failed to send password reset link, please try again or contact administrator.": "Failed to send password reset link, please try again or contact administrator.", | ||
| "Finish resetting your password": "Finish resetting your password", | ||
| "Launch Pad": "Launch Pad", | ||
| "Login": "Login", | ||
| "Logout": "Logout", | ||
| "Logging out...": "Logging out...", | ||
| "New Password": "New Password", | ||
| "Next": "Next", | ||
| "Not configured": "Not configured", | ||
| "OMS": "OMS", | ||
| "Password": "Password", | ||
| "Reset Password":"Reset Password", | ||
| "Please fill in the OMS": "Please fill in the OMS", | ||
| "Please fill in the user details": "Please fill in the user details", | ||
| "Processing": "Processing", | ||
| "Something went wrong while login. Please contact administrator.": "Something went wrong while login. Please contact administrator.", | ||
| "Sorry, your username or password is incorrect. Please try again.": "Sorry, your username or password is incorrect. Please try again.", | ||
| "This application is not enabled for your account": "This application is not enabled for your account", | ||
| "Username": "Username", | ||
| "View profile": "View profile" | ||
| "Username cannot be empty.": "Username cannot be empty.", | ||
| "View profile": "View profile", | ||
| "Your password has been successfully reset.": "Your password has been successfully reset.", | ||
| "Your request for reset password has been processed. Please check your email, for further instructions.":"Your request for reset password has been processed. Please check your email, for further instructions.", | ||
| "Your username must have an email already associated with it in HotWax to receive a reset password email. If you do not have an email linked to your account already, please contact your administrator to manually reset your password.":"Your username must have an email already associated with it in HotWax to receive a reset password email. If you do not have an email linked to your account already, please contact your administrator to manually reset your password." | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.