plan, description status ui fixes
This commit is contained in:
parent
94a23c0ee0
commit
99023ed159
|
@ -63,8 +63,6 @@ public class DescriptionStatusDefinitionAuthorizationItemPersist {
|
|||
protected List<Specification> specifications(DescriptionStatusDefinitionAuthorizationItemPersist item) {
|
||||
return Arrays.asList(
|
||||
this.spec()
|
||||
.must(() -> !this.isListNullOrEmpty(item.getRoles()))
|
||||
.failOn(PlanStatusDefinitionAuthorizationItemPersist._roles).failWith(messageSource.getMessage("Validation_Required", new Object[]{PlanStatusDefinitionAuthorizationItemPersist._roles}, LocaleContextHolder.getLocale())), this.spec()
|
||||
.must(() -> !this.isListNullOrEmpty(item.getPlanRoles()))
|
||||
.failOn(PlanStatusDefinitionAuthorizationItemPersist._planRoles).failWith(messageSource.getMessage("Validation_Required", new Object[]{PlanStatusDefinitionAuthorizationItemPersist._planRoles}, LocaleContextHolder.getLocale()))
|
||||
);
|
||||
|
|
|
@ -67,8 +67,6 @@ public class PlanStatusDefinitionAuthorizationItemPersist {
|
|||
protected List<Specification> specifications(PlanStatusDefinitionAuthorizationItemPersist item) {
|
||||
return Arrays.asList(
|
||||
this.spec()
|
||||
.must(() -> !this.isListNullOrEmpty(item.getRoles()))
|
||||
.failOn(PlanStatusDefinitionAuthorizationItemPersist._roles).failWith(messageSource.getMessage("Validation_Required", new Object[]{PlanStatusDefinitionAuthorizationItemPersist._roles}, LocaleContextHolder.getLocale())), this.spec()
|
||||
.must(() -> !this.isListNullOrEmpty(item.getPlanRoles()))
|
||||
.failOn(PlanStatusDefinitionAuthorizationItemPersist._planRoles).failWith(messageSource.getMessage("Validation_Required", new Object[]{PlanStatusDefinitionAuthorizationItemPersist._planRoles}, LocaleContextHolder.getLocale()))
|
||||
);
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<mat-card-content>
|
||||
<div class="col-12">
|
||||
<mat-form-field class="w-100">
|
||||
<mat-label>{{'DESCRIPTION-STATUS-EDITOR.FIELDS.ROLES' | translate}}*</mat-label>
|
||||
<mat-label>{{'DESCRIPTION-STATUS-EDITOR.FIELDS.ROLES' | translate}}</mat-label>
|
||||
<mat-select [formControl]="editAuthenticationForm.controls.roles" [multiple]="true">
|
||||
<mat-option *ngFor="let userRole of userRolesEnum" [value]="userRole">{{enumUtils.toAppRoleString(userRole)}}</mat-option>
|
||||
</mat-select>
|
||||
|
|
|
@ -84,7 +84,7 @@ export class DescriptionStatusEditorModel extends BaseEditorModel implements Des
|
|||
baseValidationArray.push({ key: 'allowAnonymous', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, `${rootPath}allowAnonymous`)] });
|
||||
baseValidationArray.push({ key: 'allowAuthenticated', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, `${rootPath}allowAuthenticated`)] });
|
||||
baseValidationArray.push({ key: 'planRoles', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, `${rootPath}planRoles`)] });
|
||||
baseValidationArray.push({ key: 'roles', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, `${rootPath}roles`)] });
|
||||
baseValidationArray.push({ key: 'roles', validators: [BackendErrorValidator(this.validationErrorModel, `${rootPath}roles`)] });
|
||||
|
||||
baseContext.validation = baseValidationArray;
|
||||
return baseContext;
|
||||
|
|
|
@ -38,14 +38,7 @@
|
|||
</div>
|
||||
|
||||
<ng-template #status let-row="row" let-item>
|
||||
<div
|
||||
class="status-chip"
|
||||
[class.status-chip-finalized]="row.internalStatus === DescriptionStatusEnum.Finalized"
|
||||
[class.status-chip-draft]="row.internalStatus === DescriptionStatusEnum.Draft"
|
||||
[class.status-chip-error]="row.internalStatus === DescriptionStatusEnum.Canceled"
|
||||
>
|
||||
{{enumUtils.toDescriptionStatusString(row.internalStatus)}}
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #actions let-row="row" let-item>
|
||||
<div class="row" (click)="$event.stopPropagation()">
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<mat-card-content>
|
||||
<div class="col-12">
|
||||
<mat-form-field class="w-100">
|
||||
<mat-label>{{'PLAN-STATUS-EDITOR.FIELDS.ROLES' | translate}}*</mat-label>
|
||||
<mat-label>{{'PLAN-STATUS-EDITOR.FIELDS.ROLES' | translate}}</mat-label>
|
||||
<mat-select [formControl]="editAuthenticationForm.controls.roles" [multiple]="true">
|
||||
<mat-option *ngFor="let userRole of userRolesEnum" [value]="userRole">{{enumUtils.toAppRoleString(userRole)}}</mat-option>
|
||||
</mat-select>
|
||||
|
|
|
@ -85,7 +85,7 @@ export class PlanStatusEditorModel extends BaseEditorModel implements PlanStatus
|
|||
baseValidationArray.push({ key: 'allowAnonymous', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, `${rootPath}allowAnonymous`)] });
|
||||
baseValidationArray.push({ key: 'allowAuthenticated', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, `${rootPath}allowAuthenticated`)] });
|
||||
baseValidationArray.push({ key: 'planRoles', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, `${rootPath}planRoles`)] });
|
||||
baseValidationArray.push({ key: 'roles', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, `${rootPath}roles`)] });
|
||||
baseValidationArray.push({ key: 'roles', validators: [BackendErrorValidator(this.validationErrorModel, `${rootPath}roles`)] });
|
||||
|
||||
baseContext.validation = baseValidationArray;
|
||||
return baseContext;
|
||||
|
|
|
@ -38,13 +38,7 @@
|
|||
</div>
|
||||
|
||||
<ng-template #status let-row="row" let-item>
|
||||
<div
|
||||
class="status-chip"
|
||||
[class.status-chip-finalized]="row.internalStatus === PlanStatusEnum.Finalized"
|
||||
[class.status-chip-draft]="row.internalStatus === PlanStatusEnum.Draft"
|
||||
>
|
||||
{{enumUtils.toPlanStatusString(row.internalStatus)}}
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #actions let-row="row" let-item>
|
||||
<div class="row" (click)="$event.stopPropagation()">
|
||||
|
|
Loading…
Reference in New Issue