Browse Source
Task/reduce expiration date in create or update access dialog (#7890)
Reduce expiration date
pull/7867/head
Thomas Kaul
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
4 deletions
-
apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts
|
|
|
@ -58,7 +58,7 @@ import { MatInputModule } from '@angular/material/input'; |
|
|
|
import { MatSelectModule } from '@angular/material/select'; |
|
|
|
import { IonIcon } from '@ionic/angular/standalone'; |
|
|
|
import { AccessType } from '@prisma/client'; |
|
|
|
import { addDays, addYears, endOfDay, isValid, startOfDay } from 'date-fns'; |
|
|
|
import { addDays, endOfDay, isValid, startOfDay } from 'date-fns'; |
|
|
|
import { StatusCodes } from 'http-status-codes'; |
|
|
|
import { addIcons } from 'ionicons'; |
|
|
|
import { calendarClearOutline } from 'ionicons/icons'; |
|
|
|
@ -158,9 +158,7 @@ export class GfCreateOrUpdateAccessDialogComponent implements OnInit { |
|
|
|
accessLevel: getAccessLevel(access?.scopes), |
|
|
|
alias: [access?.alias ?? ''], |
|
|
|
expiresAt: [ |
|
|
|
access?.expiresAt |
|
|
|
? new Date(access.expiresAt) |
|
|
|
: addYears(this.today, 1), |
|
|
|
access?.expiresAt ? new Date(access.expiresAt) : addDays(this.today, 1), |
|
|
|
Validators.required |
|
|
|
], |
|
|
|
filters: [null], |
|
|
|
|