hapus validasi name floor
This commit is contained in:
parent
d753a3a634
commit
57bcbcccde
|
@ -137,52 +137,17 @@ export class MasterFloorComponent {
|
||||||
modalRef.result.then(
|
modalRef.result.then(
|
||||||
(result) => {
|
(result) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
if (
|
this.monitoringApiService
|
||||||
this.filteredRows.some(
|
.putHeaderDetailParam(result, row.id)
|
||||||
(value) =>
|
.subscribe((res) => {
|
||||||
value.name.trim().toLowerCase() ===
|
this.fetchData();
|
||||||
result.name.trim().toLowerCase()
|
if (res.status === 400) {
|
||||||
)
|
|
||||||
) {
|
|
||||||
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.", {
|
this.toastr.error("Warning", "Data yang anda masukan double.", {
|
||||||
timeOut: 5000,
|
timeOut: 5000,
|
||||||
closeButton: true,
|
closeButton: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
} else {
|
|
||||||
this.monitoringApiService
|
|
||||||
.putHeaderDetailParam(result, row.id)
|
|
||||||
.subscribe((res) => {
|
|
||||||
this.fetchData();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
(reason) => {
|
(reason) => {
|
||||||
|
|
Loading…
Reference in New Issue