small fixes

This commit is contained in:
Diamantis Tziotzios 2024-05-09 10:47:34 +03:00
parent 31b4e8fd39
commit 33c7676464
3 changed files with 5 additions and 12 deletions

View File

@ -87,7 +87,8 @@ export class DescriptionFormFieldComponent extends BaseComponent implements OnIn
public dialog: MatDialog,
private fileUtils: FileUtils,
private referenceService: ReferenceService,
private storageFileService: StorageFileService
private storageFileService: StorageFileService,
private changeDetectorRef: ChangeDetectorRef
) {
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(){
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){
if (extension.startsWith('.')) this.fileNameDisplay = name + extension;
else this.fileNameDisplay = name + '.' + extension;
this.changeDetectorRef.markForCheck();
}

View File

@ -33,7 +33,7 @@
<div *ngIf="section?.sections?.length > 0" class="col-12">
<ng-container *ngFor="let innerSection of section.sections; let j = index;">
<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>
</ng-container>
</div>

View File

@ -70,7 +70,7 @@ export class DescriptionFormSectionComponent extends BaseComponent implements On
}
onAskedToScroll(event:MouseEvent, id: string) {
event.stopPropagation();
event?.stopPropagation();
this.panelExpanded = true;
this.askedToScroll.emit(id);
}