Commit ab2ed268 by DESKTOP-HF0LVOG\myhr

Update ปุ่ม Delete

parent 9bc28b4f
......@@ -41,7 +41,7 @@
<button class="btn btn-sm btn-outline-primary"
(click)="Ropen(editroom,((pageListRoom-1) * pageSizeListRoom)+i)">แก้ไข</button>
<button class="btn btn-sm btn-danger" type="button.dispose"
(click)="openDelete(deleteRoom)">ลบ</button>
(click)="openDelete(deleteRoomPopup,item)">ลบ</button>
</div>
</div>
</div>
......@@ -335,7 +335,7 @@
</div>
</ng-template>
<ng-template #deleteRoom let-modal>
<ng-template #deleteRoomPopup let-modal>
<div class=" col-md-12" style="padding: 0; ">
<div class="card" style="margin: 0; ">
<div class=" card-header">
......@@ -345,8 +345,8 @@
<h4 class="text">คุณต้องการลบข้อมูลจริงหรือไม่</h4>
</div>
<div class=" card-footer">
<button class=" btn btn-fill btn-danger" (click)="deleteRoomProfile(item)">ยืนยัน</button>
<button class=" btn btn-fill btn-danger" (click)="modal.dismiss()">ยกเลิก</button>
<button class=" btn btn-fill btn-danger" type="submit" (click)="deleteRoomProfile()">ยืนยัน</button>
<button class=" btn btn-fill btn-danger" type="cancel" (click)="modal.dismiss()">ยกเลิก</button>
</div>
</div>
</div>
......
......@@ -277,14 +277,15 @@ export class AdminEquirmentComponent implements OnInit {
this.ngOnInit();
}
deleteRoomProfile(item : Room) {
this.roomService.deleteRoomProfile(item)
deleteRoomProfile() {
this.roomService.deleteRoomProfile(this.modelRoom)
this.modalService.dismissAll();
this.ngOnInit();
}
openDelete(deleteRoomProfile) {
this.modalService.open(deleteRoomProfile, { ariaLabelledBy: 'modal-basic-title' }).result.then((result) => {
openDelete(deleteRoom , item) {
this.modelRoom = item ;
this.modalService.open(deleteRoom, { ariaLabelledBy: 'modal-basic-title' }).result.then((result) => {
this.closeResult = `Closed with: ${result}`;
}, (reason) => {
this.closeResult = `Dismissed ${this.getDismissReason(reason)}`;
......
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