diff options
Diffstat (limited to 'client/src/app/+admin/users/user-edit/user-edit.ts')
-rw-r--r-- | client/src/app/+admin/users/user-edit/user-edit.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/client/src/app/+admin/users/user-edit/user-edit.ts b/client/src/app/+admin/users/user-edit/user-edit.ts index a23cd9033..18ca5805f 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.ts +++ b/client/src/app/+admin/users/user-edit/user-edit.ts | |||
@@ -8,8 +8,8 @@ import { User } from '@app/shared/users/user.model' | |||
8 | import { ScreenService } from '@app/shared/misc/screen.service' | 8 | import { ScreenService } from '@app/shared/misc/screen.service' |
9 | 9 | ||
10 | export abstract class UserEdit extends FormReactive implements OnInit { | 10 | export abstract class UserEdit extends FormReactive implements OnInit { |
11 | videoQuotaOptions: { value: string, label: string }[] = [] | 11 | videoQuotaOptions: { value: string, label: string, disabled?: boolean }[] = [] |
12 | videoQuotaDailyOptions: { value: string, label: string }[] = [] | 12 | videoQuotaDailyOptions: { value: string, label: string, disabled?: boolean }[] = [] |
13 | username: string | 13 | username: string |
14 | user: User | 14 | user: User |
15 | 15 | ||
@@ -94,9 +94,14 @@ export abstract class UserEdit extends FormReactive implements OnInit { | |||
94 | protected buildQuotaOptions () { | 94 | protected buildQuotaOptions () { |
95 | // These are used by a HTML select, so convert key into strings | 95 | // These are used by a HTML select, so convert key into strings |
96 | this.videoQuotaOptions = this.configService | 96 | this.videoQuotaOptions = this.configService |
97 | .videoQuotaOptions.map(q => ({ value: q.value.toString(), label: q.label })) | 97 | .videoQuotaOptions.map(q => ({ value: q.value?.toString(), label: q.label, disabled: q.disabled })) |
98 | 98 | ||
99 | this.videoQuotaDailyOptions = this.configService | 99 | this.videoQuotaDailyOptions = this.configService |
100 | .videoQuotaDailyOptions.map(q => ({ value: q.value.toString(), label: q.label })) | 100 | .videoQuotaDailyOptions.map(q => ({ value: q.value?.toString(), label: q.label, disabled: q.disabled })) |
101 | |||
102 | console.log( | ||
103 | this.videoQuotaOptions, | ||
104 | this.videoQuotaDailyOptions | ||
105 | ) | ||
101 | } | 106 | } |
102 | } | 107 | } |