Commit 719716f3 by DESKTOP-HF0LVOG\myhr

add การแสดงข้อมูลหน้าตาราง

parent 2b192e68
...@@ -127,14 +127,12 @@ export class EquipmentComponent implements OnInit { ...@@ -127,14 +127,12 @@ export class EquipmentComponent implements OnInit {
this.itemDetailService.additemDetail(this.modelitemDetail); this.itemDetailService.additemDetail(this.modelitemDetail);
this.modalService.dismissAll(); this.modalService.dismissAll();
this.ngOnInit(); this.ngOnInit();
console.log(this.itemDetailService);
} }
saveBook() { saveBook() {
this.roomDetailService.addroomDetail(this.modelroomDetail); this.roomDetailService.addroomDetail(this.modelroomDetail);
this.modalService.dismissAll(); this.modalService.dismissAll();
this.ngOnInit(); this.ngOnInit();
console.log(this.roomDetailService);
} }
} }
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
<td>{{ item.eStatus }}</td> <td>{{ item.eStatus }}</td>
<div class="col-auto align-self-sm-center"> <div class="col-auto align-self-sm-center">
<button type="button" class="btn btn-info btn-sm btn-circle " <button type="button" class="btn btn-info btn-sm btn-circle "
style="line-height: 0px" (click)="open(lend)"><i class="fa fa-search"></i> </button> style="line-height: 0px" (click)="openItemDetail(lend,item)"><i class="fa fa-search"></i> </button>
</div> </div>
</tr> </tr>
</tbody> </tbody>
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
<div class=" col-md-12"> <div class=" col-md-12">
<div class=" form-group"> <div class=" form-group">
<label> ชื่อผู้จอง </label> <label> ชื่อผู้จอง </label>
<input readonly class=" form-control" placeholder="" type="text" value="" /> <input readonly class=" form-control" placeholder="" type="text" [value]="listroomDetail.userName" />
</div> </div>
</div> </div>
</div> </div>
...@@ -209,13 +209,13 @@ ...@@ -209,13 +209,13 @@
<div class="row"> <div class="row">
<div class="col-sm-12 mb-1"> <div class="col-sm-12 mb-1">
<label for="exampleFormControlSelect1">ชื่อห้อง</label> <label for="exampleFormControlSelect1">ชื่อห้อง</label>
<input readonly class="form-control" type="text" value=""> <input readonly class="form-control" type="text" [value]="listroomDetail.room.rName">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-12 mb-1"> <div class="col-sm-12 mb-1">
<label for="exampleFormControlSelect1">รายละเอียด</label> <label for="exampleFormControlSelect1">รายละเอียด</label>
<input readonly class="form-control" type="text" value=""> <input readonly class="form-control" type="text" [value]="listroomDetail.room.rDesc">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
<div class=" col-sm-12 mb-1"> <div class=" col-sm-12 mb-1">
<div class=" form-group"> <div class=" form-group">
<label> ชื่อผู้จอง </label> <label> ชื่อผู้จอง </label>
<input readonly class=" form-control" placeholder="" type="text" value="" /> <input readonly class=" form-control" placeholder="" type="text" value="{{modelitemDetail.userName}}" />
</div> </div>
</div> </div>
</div> </div>
......
...@@ -5,6 +5,8 @@ import { itemDetail } from 'src/app/models/itemDetail.model'; ...@@ -5,6 +5,8 @@ import { itemDetail } from 'src/app/models/itemDetail.model';
import { itemDetailService } from 'src/app/service/item-detail.service'; import { itemDetailService } from 'src/app/service/item-detail.service';
import { roomDetail } from 'src/app/models/roomDetail.model'; import { roomDetail } from 'src/app/models/roomDetail.model';
import { roomDetailService } from 'src/app/service/room-detail.service'; import { roomDetailService } from 'src/app/service/room-detail.service';
import { Equirment } from 'src/app/models/equirment.model';
import { Room } from 'src/app/models/rooms.model';
@Component({ @Component({
selector: 'app-pending', selector: 'app-pending',
...@@ -45,6 +47,11 @@ export class PendingComponent implements OnInit { ...@@ -45,6 +47,11 @@ export class PendingComponent implements OnInit {
listitemDetail : itemDetail[] = []; listitemDetail : itemDetail[] = [];
listroomDetail : roomDetail[] = []; listroomDetail : roomDetail[] = [];
modelEquirment = new Equirment();
modelRoom = new Room();
modelitemDetail = new itemDetail();
modelroomDetail = new roomDetail();
collectionSize = this.listitemDetail.length; collectionSize = this.listitemDetail.length;
hoveredDate: NgbDate | null = null; hoveredDate: NgbDate | null = null;
...@@ -83,6 +90,16 @@ export class PendingComponent implements OnInit { ...@@ -83,6 +90,16 @@ export class PendingComponent implements OnInit {
}); });
} }
openItemDetail(content : string ,item : itemDetail) {
this.modelitemDetail = item ;
console.log(item);
this.modalService.open(content, { ariaLabelledBy: 'modal-basic-title' }).result.then((result) => {
this.closeResult = `Closed with: ${result}`;
}, (reason) => {
this.closeResult = `Dismissed ${this.getDismissReason(reason)}`;
});
}
private getDismissReason(reason: any): string { private getDismissReason(reason: any): string {
if (reason === ModalDismissReasons.ESC) { if (reason === ModalDismissReasons.ESC) {
return 'by pressing ESC'; return 'by pressing ESC';
......
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