Commit 52be4e8d by Nattana Chaiyamat

แก้ปุ่มเพิ่ม ปุ่มลบหน้าdatasource table

parent e0853513
......@@ -112,7 +112,7 @@
</thead>
<tbody *ngIf="!datasourceTableFilter().length">
<tr style="background-color:#ebf2f6">
<td colspan="7" class="text-center">ไม่พบข้อมูล</td>
<td colspan="9" class="text-center">ไม่พบข้อมูล</td>
</tr>
</tbody>
<tbody *ngIf="datasourceTableFilter().length">
......
......@@ -47,10 +47,10 @@ export class DatasourceTableComponent implements OnInit {
modalConfirmRef.result.then(result => {
this.datasourceTable.loading = true
this.datasourseTableService.post(this.datasourceTable.select).subscribe(response => {
this.openAlertModal(response.message)
if (response.success) {
this.getList()
} else {
this.openAlertModal(response.message)
this.datasourceTable.loading = false
}
}, error => {
......@@ -64,14 +64,14 @@ export class DatasourceTableComponent implements OnInit {
centered: true,
backdrop: 'static',
})
modalConfirmRef.componentInstance.message = 'คุณต้องการบันทึกข้อมูลหรือไม่'
modalConfirmRef.componentInstance.message = 'คุณต้องการลบข้อมูลหรือไม่'
modalConfirmRef.result.then(result => {
this.datasourceTable.loading = true
this.datasourseTableService.post(this.datasourceTable.select).subscribe(response => {
this.datasourseTableService.delete(this.datasourceTable.select).subscribe(response => {
this.openAlertModal(response.message)
if (response.success) {
this.getList()
} else {
this.openAlertModal(response.message)
this.datasourceTable.loading = false
}
}, error => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment