From 0c1dd29554b41e257fc038139ed6d8f0c7830cc1 Mon Sep 17 00:00:00 2001 From: Fuzi_fauzia Date: Thu, 18 Jul 2024 14:56:37 +0700 Subject: [PATCH] perbaikan master --- .../hemat-app/master/master-floor/master-floor.component.ts | 2 +- .../hemat-app/master/master-type/master-type.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 83f4752..95a5d7b 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 @@ -93,7 +93,7 @@ export class MasterFloorComponent { (result) => { console.log(result); if (result) { - if (this.filteredRows.some(value => value.name.toLowerCase() === result.name.toLowerCase())) { + if (this.filteredRows.some(value => value.name.trim().toLowerCase() === result.name.trim().toLowerCase())) { this.toastr.error("Warning", "Data yang anda masukan double.", { timeOut: 5000, closeButton: true, diff --git a/src/app/content/hemat-app/master/master-type/master-type.component.ts b/src/app/content/hemat-app/master/master-type/master-type.component.ts index c697171..2dfceab 100644 --- a/src/app/content/hemat-app/master/master-type/master-type.component.ts +++ b/src/app/content/hemat-app/master/master-type/master-type.component.ts @@ -92,7 +92,7 @@ export class MasterTypeComponent { modalRef.result.then( (result) => { if (result) { - if (this.filteredRows.some(value => value.name.trim().toLowerCase() === result.name.trim().toLowerCase() && value.status === result.status)) { + if (this.filteredRows.some(value => value.name.trim().toLowerCase() === result.name.trim().toLowerCase())) { this.toastr.error("Warning", "Data yang anda masukan double.", { timeOut: 5000, closeButton: true,