diff --git a/src/app/content/hemat-app/master/master-floor/master-floor.component.ts b/src/app/content/hemat-app/master/master-floor/master-floor.component.ts index 2b53cc5..11ab36c 100644 --- a/src/app/content/hemat-app/master/master-floor/master-floor.component.ts +++ b/src/app/content/hemat-app/master/master-floor/master-floor.component.ts @@ -137,52 +137,17 @@ export class MasterFloorComponent { modalRef.result.then( (result) => { if (result) { - if ( - this.filteredRows.some( - (value) => - value.name.trim().toLowerCase() === - result.name.trim().toLowerCase() - ) - ) { - if ( - row.name.trim().toLowerCase() === result.name.trim().toLowerCase() - ) { - this.monitoringApiService - .putHeaderDetailParam(result, row.id) - .subscribe((res) => { - this.fetchData(); - if (res.status === 400) { - this.toastr.error( - "Warning", - "Data yang anda masukan double.", - { - timeOut: 5000, - closeButton: true, - } - ); - } - }); - } else { - if ( - this.filteredRows.some( - (value) => - value.name.trim().toLowerCase() === - result.name.trim().toLowerCase() - ) - ) { + this.monitoringApiService + .putHeaderDetailParam(result, row.id) + .subscribe((res) => { + this.fetchData(); + if (res.status === 400) { this.toastr.error("Warning", "Data yang anda masukan double.", { timeOut: 5000, closeButton: true, }); } - } - } else { - this.monitoringApiService - .putHeaderDetailParam(result, row.id) - .subscribe((res) => { - this.fetchData(); - }); - } + }); } }, (reason) => {