perbaikan master

This commit is contained in:
Fuzi_fauzia 2024-07-18 14:56:37 +07:00
parent f86dfb7829
commit 0c1dd29554
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ export class MasterFloorComponent {
(result) => { (result) => {
console.log(result); console.log(result);
if (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.", { this.toastr.error("Warning", "Data yang anda masukan double.", {
timeOut: 5000, timeOut: 5000,
closeButton: true, closeButton: true,

View File

@ -92,7 +92,7 @@ export class MasterTypeComponent {
modalRef.result.then( modalRef.result.then(
(result) => { (result) => {
if (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.", { this.toastr.error("Warning", "Data yang anda masukan double.", {
timeOut: 5000, timeOut: 5000,
closeButton: true, closeButton: true,