Commit 719716f3 by DESKTOP-HF0LVOG\myhr

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

parent 2b192e68
......@@ -127,14 +127,12 @@ export class EquipmentComponent implements OnInit {
this.itemDetailService.additemDetail(this.modelitemDetail);
this.modalService.dismissAll();
this.ngOnInit();
console.log(this.itemDetailService);
}
saveBook() {
this.roomDetailService.addroomDetail(this.modelroomDetail);
this.modalService.dismissAll();
this.ngOnInit();
console.log(this.roomDetailService);
}
}
......@@ -154,7 +154,7 @@
<td>{{ item.eStatus }}</td>
<div class="col-auto align-self-sm-center">
<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>
</tr>
</tbody>
......@@ -194,7 +194,7 @@
<div class=" col-md-12">
<div class=" form-group">
<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>
......@@ -209,13 +209,13 @@
<div class="row">
<div class="col-sm-12 mb-1">
<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 class="row">
<div class="col-sm-12 mb-1">
<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 class="row">
......@@ -265,7 +265,7 @@
<div class=" col-sm-12 mb-1">
<div class=" form-group">
<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>
......
......@@ -5,6 +5,8 @@ import { itemDetail } from 'src/app/models/itemDetail.model';
import { itemDetailService } from 'src/app/service/item-detail.service';
import { roomDetail } from 'src/app/models/roomDetail.model';
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({
selector: 'app-pending',
......@@ -45,6 +47,11 @@ export class PendingComponent implements OnInit {
listitemDetail : itemDetail[] = [];
listroomDetail : roomDetail[] = [];
modelEquirment = new Equirment();
modelRoom = new Room();
modelitemDetail = new itemDetail();
modelroomDetail = new roomDetail();
collectionSize = this.listitemDetail.length;
hoveredDate: NgbDate | null = null;
......@@ -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 {
if (reason === ModalDismissReasons.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