AW-6046 Angular improvement
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
2024-04-15 10:29:47 +02:00
parent ede75f63f5
commit 84a1a04b19
104 changed files with 592 additions and 796 deletions

View File

@@ -1,8 +1,8 @@
import { Component, Output, ViewChild, EventEmitter, Input, ElementRef, HostListener } from '@angular/core';
import { UntypedFormGroup,UntypedFormBuilder, Validators } from '@angular/forms';
import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { IListItem } from '@farmmaps/common';
import { NgbModal, NgbModalRef } from "@ng-bootstrap/ng-bootstrap";
import { IDroppedFile } from '../aol/file-drop-target/file-drop-target.component';
import {NgbModal, NgbModalRef} from "@ng-bootstrap/ng-bootstrap";
export interface IMetaData {
droppedFile: IDroppedFile,
@@ -37,7 +37,7 @@ export class MetaDataModalComponent {
public metaDataForm: UntypedFormGroup;
handleMetaDataEntered(event) {
handleMetaDataEntered() {
if (this.metaDataForm.valid) {
this.onAddFilesWithMetaData.emit({ droppedFile: this.droppedFile, attributes: { name: this.metaDataForm.value.name } });
}
@@ -48,7 +48,7 @@ export class MetaDataModalComponent {
setTimeout(() => this.modalRef = this.modalService.open(this._templateModal, { backdrop: 'static', keyboard: false }));
}
closeModal() {
closeModal() {
this.modalRef.close();
this.metaDataForm.patchValue({ name: "" });
}