hapus validasi name floor
This commit is contained in:
parent
d753a3a634
commit
57bcbcccde
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue