description listing > fix bug on invite user on description w/o blueprint
This commit is contained in:
parent
60308a7029
commit
e1dec1f5c8
|
@ -9,7 +9,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div mat-dialog-content class="row">
|
<div mat-dialog-content class="row">
|
||||||
<div>
|
<div>
|
||||||
<app-plan-user-field-component [form]="formGroup" [validationErrorModel]="editorModel.validationErrorModel" [sections]="selectedBlueprint.definition.sections" [viewOnly]="false" [initializeUsers]="true" [enableSorting]="false"></app-plan-user-field-component>
|
<app-plan-user-field-component [form]="formGroup" [validationErrorModel]="editorModel.validationErrorModel" [sections]="selectedBlueprint?.definition?.sections" [viewOnly]="false" [initializeUsers]="true" [enableSorting]="false"></app-plan-user-field-component>
|
||||||
</div>
|
</div>
|
||||||
<div class="col mt-2">
|
<div class="col mt-2">
|
||||||
<button mat-raised-button *ngIf="hasValue()" [disabled]="inProgressSendButton" (click)="send()" type="button" class="invite-btn">{{'PLAN-USER-INVITATION-DIALOG.ACTIONS.INVITE' | translate}}</button>
|
<button mat-raised-button *ngIf="hasValue()" [disabled]="inProgressSendButton" (click)="send()" type="button" class="invite-btn">{{'PLAN-USER-INVITATION-DIALOG.ACTIONS.INVITE' | translate}}</button>
|
||||||
|
|
|
@ -45,7 +45,7 @@ export class PlanEditorModel extends BaseEditorModel implements PlanPersist {
|
||||||
this.accessType = item.accessType;
|
this.accessType = item.accessType;
|
||||||
if (item?.planUsers) { item.planUsers.filter(x => x.isActive === IsActive.Active).map(x => this.users.push(new PlanUserEditorModel(this.validationErrorModel).fromModel(x))); }
|
if (item?.planUsers) { item.planUsers.filter(x => x.isActive === IsActive.Active).map(x => this.users.push(new PlanUserEditorModel(this.validationErrorModel).fromModel(x))); }
|
||||||
|
|
||||||
item.blueprint.definition.sections.forEach(section => {
|
item?.blueprint?.definition?.sections?.forEach(section => {
|
||||||
if (section.hasTemplates) {
|
if (section.hasTemplates) {
|
||||||
const isNew = (item.id == null);
|
const isNew = (item.id == null);
|
||||||
const sectionTemplatesFromPlan = item.planDescriptionTemplates?.filter(x => x.sectionId == section.id && x.isActive == IsActive.Active) || [];
|
const sectionTemplatesFromPlan = item.planDescriptionTemplates?.filter(x => x.sectionId == section.id && x.isActive == IsActive.Active) || [];
|
||||||
|
@ -208,7 +208,7 @@ export class PlanPropertiesEditorModel implements PlanPropertiesPersist {
|
||||||
fromModel(item: PlanProperties, planReferences: PlanReference[], planBlueprint: PlanBlueprint): PlanPropertiesEditorModel {
|
fromModel(item: PlanProperties, planReferences: PlanReference[], planBlueprint: PlanBlueprint): PlanPropertiesEditorModel {
|
||||||
|
|
||||||
|
|
||||||
planBlueprint.definition.sections.forEach(section => {
|
planBlueprint?.definition?.sections?.forEach(section => {
|
||||||
section.fields?.forEach(field => {
|
section.fields?.forEach(field => {
|
||||||
if (field.category !== PlanBlueprintFieldCategory.System) {
|
if (field.category !== PlanBlueprintFieldCategory.System) {
|
||||||
this.planBlueprintValues.set(field.id, new PlanBlueprintValueEditorModel(this.validationErrorModel).fromModel(
|
this.planBlueprintValues.set(field.id, new PlanBlueprintValueEditorModel(this.validationErrorModel).fromModel(
|
||||||
|
|
Loading…
Reference in New Issue