hapus validasi name floor

This commit is contained in:
Fuzi_fauzia 2024-08-20 10:30:31 +07:00
parent d753a3a634
commit 57bcbcccde
1 changed files with 6 additions and 41 deletions

View File

@ -137,53 +137,18 @@ 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.toastr.error("Warning", "Data yang anda masukan double.", {
timeOut: 5000,
closeButton: true,
});
}
}
} else {
this.monitoringApiService
.putHeaderDetailParam(result, row.id)
.subscribe((res) => {
this.fetchData();
});
}
}
},
(reason) => {
console.log(`Dismissed: ${reason}`);