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) {
|
protected List<Specification> specifications(DescriptionStatusDefinitionAuthorizationItemPersist item) {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
this.spec()
|
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()))
|
.must(() -> !this.isListNullOrEmpty(item.getPlanRoles()))
|
||||||
.failOn(PlanStatusDefinitionAuthorizationItemPersist._planRoles).failWith(messageSource.getMessage("Validation_Required", new Object[]{PlanStatusDefinitionAuthorizationItemPersist._planRoles}, LocaleContextHolder.getLocale()))
|
.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) {
|
protected List<Specification> specifications(PlanStatusDefinitionAuthorizationItemPersist item) {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
this.spec()
|
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()))
|
.must(() -> !this.isListNullOrEmpty(item.getPlanRoles()))
|
||||||
.failOn(PlanStatusDefinitionAuthorizationItemPersist._planRoles).failWith(messageSource.getMessage("Validation_Required", new Object[]{PlanStatusDefinitionAuthorizationItemPersist._planRoles}, LocaleContextHolder.getLocale()))
|
.failOn(PlanStatusDefinitionAuthorizationItemPersist._planRoles).failWith(messageSource.getMessage("Validation_Required", new Object[]{PlanStatusDefinitionAuthorizationItemPersist._planRoles}, LocaleContextHolder.getLocale()))
|
||||||
);
|
);
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<mat-form-field class="w-100">
|
<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-select [formControl]="editAuthenticationForm.controls.roles" [multiple]="true">
|
||||||
<mat-option *ngFor="let userRole of userRolesEnum" [value]="userRole">{{enumUtils.toAppRoleString(userRole)}}</mat-option>
|
<mat-option *ngFor="let userRole of userRolesEnum" [value]="userRole">{{enumUtils.toAppRoleString(userRole)}}</mat-option>
|
||||||
</mat-select>
|
</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: 'allowAnonymous', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, `${rootPath}allowAnonymous`)] });
|
||||||
baseValidationArray.push({ key: 'allowAuthenticated', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, `${rootPath}allowAuthenticated`)] });
|
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: '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;
|
baseContext.validation = baseValidationArray;
|
||||||
return baseContext;
|
return baseContext;
|
||||||
|
|
|
@ -38,14 +38,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ng-template #status let-row="row" let-item>
|
<ng-template #status let-row="row" let-item>
|
||||||
<div
|
{{enumUtils.toDescriptionStatusString(row.internalStatus)}}
|
||||||
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>
|
||||||
<ng-template #actions let-row="row" let-item>
|
<ng-template #actions let-row="row" let-item>
|
||||||
<div class="row" (click)="$event.stopPropagation()">
|
<div class="row" (click)="$event.stopPropagation()">
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<mat-form-field class="w-100">
|
<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-select [formControl]="editAuthenticationForm.controls.roles" [multiple]="true">
|
||||||
<mat-option *ngFor="let userRole of userRolesEnum" [value]="userRole">{{enumUtils.toAppRoleString(userRole)}}</mat-option>
|
<mat-option *ngFor="let userRole of userRolesEnum" [value]="userRole">{{enumUtils.toAppRoleString(userRole)}}</mat-option>
|
||||||
</mat-select>
|
</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: 'allowAnonymous', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, `${rootPath}allowAnonymous`)] });
|
||||||
baseValidationArray.push({ key: 'allowAuthenticated', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, `${rootPath}allowAuthenticated`)] });
|
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: '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;
|
baseContext.validation = baseValidationArray;
|
||||||
return baseContext;
|
return baseContext;
|
||||||
|
|
|
@ -38,13 +38,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ng-template #status let-row="row" let-item>
|
<ng-template #status let-row="row" let-item>
|
||||||
<div
|
{{enumUtils.toPlanStatusString(row.internalStatus)}}
|
||||||
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>
|
||||||
<ng-template #actions let-row="row" let-item>
|
<ng-template #actions let-row="row" let-item>
|
||||||
<div class="row" (click)="$event.stopPropagation()">
|
<div class="row" (click)="$event.stopPropagation()">
|
||||||
|
|
Loading…
Reference in New Issue