mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
MFA (#14049)
* adds development workflow to mirage config * adds mirage handler and factory for mfa workflow * adds mfa handling to auth service and cluster adapter * moves auth success logic from form to controller * adds mfa form component * shows delayed auth message for all methods * adds new code delay to mfa form * adds error views * fixes merge conflict * adds integration tests for mfa-form component * fixes auth tests * updates mfa response handling to align with backend * updates mfa-form to handle multiple methods and constraints * adds noDefault arg to Select component * updates mirage mfa handler to align with backend and adds generator for various mfa scenarios * adds tests * flaky test fix attempt * reverts test fix attempt * adds changelog entry * updates comments for todo items * removes faker from mfa mirage factory and handler * adds number to word helper * fixes tests * Revert "Merge branch 'main' into ui/mfa" This reverts commit 8ee6a6aaa1b6c9ec16b985c10d91c3806819ec40, reversing changes made to 2428dd6cca07bb41cda3f453619646ca3a88bfd0. * format-ttl helper fix from main
This commit is contained in:
@@ -12,15 +12,9 @@ import { tracked } from '@glimmer/tracking';
|
||||
* ```
|
||||
* @param {function} handleDateSelection - is the action from the parent that the date picker triggers
|
||||
* @param {string} [name] - optional argument passed from date dropdown to parent function
|
||||
* @param {string} [submitText] - optional argument to change submit button text
|
||||
*/
|
||||
export default class DateDropdown extends Component {
|
||||
currentDate = new Date();
|
||||
currentYear = this.currentDate.getFullYear(); // integer of year
|
||||
currentMonth = this.currentDate.getMonth(); // index of month
|
||||
|
||||
@tracked allowedMonthMax = 12;
|
||||
@tracked disabledYear = null;
|
||||
export default class DateDropdown extends Component {
|
||||
@tracked startMonth = null;
|
||||
@tracked startYear = null;
|
||||
|
||||
@@ -32,18 +26,13 @@ export default class DateDropdown extends Component {
|
||||
});
|
||||
|
||||
@action
|
||||
selectStartMonth(month, event) {
|
||||
selectStartMonth(month) {
|
||||
this.startMonth = month;
|
||||
// disables months if in the future
|
||||
this.disabledYear = this.months.indexOf(month) >= this.currentMonth ? this.currentYear : null;
|
||||
event.close();
|
||||
}
|
||||
|
||||
@action
|
||||
selectStartYear(year, event) {
|
||||
selectStartYear(year) {
|
||||
this.startYear = year;
|
||||
this.allowedMonthMax = year === this.currentYear ? this.currentMonth : 12;
|
||||
event.close();
|
||||
}
|
||||
|
||||
@action
|
||||
|
||||
Reference in New Issue
Block a user