small fixes
This commit is contained in:
parent
31b4e8fd39
commit
33c7676464
|
@ -87,7 +87,8 @@ export class DescriptionFormFieldComponent extends BaseComponent implements OnIn
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private fileUtils: FileUtils,
|
private fileUtils: FileUtils,
|
||||||
private referenceService: ReferenceService,
|
private referenceService: ReferenceService,
|
||||||
private storageFileService: StorageFileService
|
private storageFileService: StorageFileService,
|
||||||
|
private changeDetectorRef: ChangeDetectorRef
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -117,15 +118,6 @@ export class DescriptionFormFieldComponent extends BaseComponent implements OnIn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkBoxChanged(event: MatCheckboxChange){
|
|
||||||
if (event.checked){
|
|
||||||
this.propertiesFormGroup?.get(this.field.id).get('textValue').setValue("true");
|
|
||||||
} else{
|
|
||||||
this.propertiesFormGroup?.get(this.field.id).get('textValue').setValue("false");
|
|
||||||
}
|
|
||||||
this.visibilityRulesService.reloadVisibility();
|
|
||||||
}
|
|
||||||
|
|
||||||
private applyFieldType(){
|
private applyFieldType(){
|
||||||
this.isRequired = this.field.validations?.includes(DescriptionTemplateFieldValidationType.Required);
|
this.isRequired = this.field.validations?.includes(DescriptionTemplateFieldValidationType.Required);
|
||||||
|
|
||||||
|
@ -287,6 +279,7 @@ export class DescriptionFormFieldComponent extends BaseComponent implements OnIn
|
||||||
private createFileNameDisplay(name: string, extension: string){
|
private createFileNameDisplay(name: string, extension: string){
|
||||||
if (extension.startsWith('.')) this.fileNameDisplay = name + extension;
|
if (extension.startsWith('.')) this.fileNameDisplay = name + extension;
|
||||||
else this.fileNameDisplay = name + '.' + extension;
|
else this.fileNameDisplay = name + '.' + extension;
|
||||||
|
this.changeDetectorRef.markForCheck();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<div *ngIf="section?.sections?.length > 0" class="col-12">
|
<div *ngIf="section?.sections?.length > 0" class="col-12">
|
||||||
<ng-container *ngFor="let innerSection of section.sections; let j = index;">
|
<ng-container *ngFor="let innerSection of section.sections; let j = index;">
|
||||||
<div class="row" *ngIf="visibilityRulesService.isVisibleMap[innerSection.id]">
|
<div class="row" *ngIf="visibilityRulesService.isVisibleMap[innerSection.id]">
|
||||||
<app-description-form-section class="col-12" [section]="innerSection" [canReview]="canReview" [path]="path+'.'+(j+1)" [pathName]="pathName+'.sections.'+j" (askedToScroll)="onAskedToScroll($event)" [propertiesFormGroup]="propertiesFormGroup" [descriptionId]="descriptionId" [visibilityRulesService]="visibilityRulesService" [linkToScroll]="subsectionLinkToScroll"></app-description-form-section>
|
<app-description-form-section class="col-12" [section]="innerSection" [canReview]="canReview" [path]="path+'.'+(j+1)" [pathName]="pathName+'.sections.'+j" (askedToScroll)="onAskedToScroll(null, $event)" [propertiesFormGroup]="propertiesFormGroup" [descriptionId]="descriptionId" [visibilityRulesService]="visibilityRulesService" [linkToScroll]="subsectionLinkToScroll"></app-description-form-section>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -70,7 +70,7 @@ export class DescriptionFormSectionComponent extends BaseComponent implements On
|
||||||
}
|
}
|
||||||
|
|
||||||
onAskedToScroll(event:MouseEvent, id: string) {
|
onAskedToScroll(event:MouseEvent, id: string) {
|
||||||
event.stopPropagation();
|
event?.stopPropagation();
|
||||||
this.panelExpanded = true;
|
this.panelExpanded = true;
|
||||||
this.askedToScroll.emit(id);
|
this.askedToScroll.emit(id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue