Commit 0342af61 by DESKTOP-HF0LVOG\myhr

add หน้าการจอง/การเบิก

parent b83251ac
......@@ -14,64 +14,10 @@
<li ngbNavItem>
<a ngbNavLink>การจอง</a>
<ng-template ngbNavContent>
<div class="row">
<div class="col-sm-12">
<div class="">
<div class="card-body">
<ng-template #content let-modal style="padding: 0; ">
<div class=" col-md-12">
<div class="card">
<div class=" card-header">
<h5 class=" title">Add Equirment</h5>
</div>
<div class=" card-body">
<form>
<div class=" row">
<div class=" col-md-12">
<div class=" form-group">
<label> Name </label>
<input class=" form-control" placeholder="" type="text"
value="" />
</div>
</div>
</div>
<div class=" row">
<div class=" col-md-6 mb-2">
<div class=" form-group">
<label> Type </label>
<br>
<select class="form-select"
aria-label="Default select example">
<option selected>Open this select type</option>
<option value="1">Rooms</option>
<option value="2">Cars</option>
</select>
</div>
</div>
</div>
<div class=" row">
<div class=" col-md-12">
<div class=" form-group">
<label> Details </label>
<textarea class="form-control"
id="exampleFormControlTextarea1"
rows="3" placeholder="......"></textarea>
</div>
</div>
</div>
<label for="exampleFormControlFile">แนบไฟล์รูปภาพ</label>
<input type="file" class="form-control-file"
id="exampleFormControlFile">
</form>
</div>
<div class=" card-footer">
<button class=" btn btn-fill btn-danger" type="submit">Save</button>
<button class=" btn btn-fill btn-danger" type="cancel">Cancel</button>
</div>
</div>
</div>
</ng-template>
<button class="btn btn-lg btn-outline-primary"
(click)="open(content)">เพิ่มรายการ</button>
......@@ -91,7 +37,8 @@
<div class="text-center">
<div class="d-grid gap-2 a-md-flex justify-content-md-end ">
<button class="btn btn-sm btn-primary" type="button">ยืม</button>
<button class="btn btn-sm btn-outline-primary"
(click)="open(Room)">ยืม</button>
<button class="btn btn-sm btn-primary" type="button">ยกเลิก</button>
</div>
</div>
......@@ -120,7 +67,6 @@
<li ngbNavItem>
<a ngbNavLink>การเบิก</a>
<ng-template ngbNavContent>
<div class="row">
<div class="col-sm-12">
<div class="">
......@@ -161,8 +107,8 @@
<div class=" form-group">
<label> Details </label>
<textarea class="form-control"
id="exampleFormControlTextarea1"
rows="3" placeholder="......"></textarea>
id="exampleFormControlTextarea1" rows="3"
placeholder="......"></textarea>
</div>
</div>
</div>
......@@ -198,7 +144,8 @@
<div class="text-center">
<div class="d-grid gap-2 a-md-flex justify-content-md-end">
<button class="btn btn-sm btn-primary" type="button">ยืม</button>
<button class="btn btn-sm btn-outline-primary"
(click)="open(lend)">ยืม</button>
<button class="btn btn-sm btn-primary" type="button">ยกเลิก</button>
</div>
</div>
......@@ -228,3 +175,136 @@
</ul>
<div [ngbNavOutlet]="nav"></div>
</div>
<ng-template #content let-modal style="padding: 0; ">
<div class=" col-md-12">
<div class="card">
<div class=" card-header">
<h5 class=" title">Add Equirment</h5>
</div>
<div class=" card-body">
<form>
<div class=" row">
<div class=" col-md-12">
<div class=" form-group">
<label> Name </label>
<input class=" form-control" placeholder="" type="text" value="" />
</div>
</div>
</div>
<div class=" row">
<div class=" col-md-6 mb-2">
<div class=" form-group">
<label> Type </label>
<br>
<select class="form-select" aria-label="Default select example">
<option selected>Open this select type</option>
<option value="1">Rooms</option>
<option value="2">Cars</option>
</select>
</div>
</div>
</div>
<div class=" row">
<div class=" col-md-12">
<div class=" form-group">
<label> Details </label>
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3"
placeholder="......"></textarea>
</div>
</div>
</div>
<label for="exampleFormControlFile">แนบไฟล์รูปภาพ</label>
<input type="file" class="form-control-file" id="exampleFormControlFile">
</form>
</div>
<div class=" card-footer">
<button class=" btn btn-fill btn-danger" type="submit">Save</button>
<button class=" btn btn-fill btn-danger" type="cancel">Cancel</button>
</div>
</div>
</div>
</ng-template>
<ng-template #Room let-modal style="padding: 0; ">
<div class=" col-md-12">
<div class="card">
<div class=" card-header">
<h5 class=" title">Booking</h5>
</div>
<div class=" card-body">
<form>
<div class=" row">
<div class=" col-md-12">
<div class=" form-group">
<label> ชื่อผู้จอง </label>
<input class=" form-control" placeholder="" type="text" value="" />
</div>
</div>
</div>
<div class="row">
<div class="col-sm-5 mb-3">
<label for="exampleFormControlSelect1">ชื่อห้อง</label>
<input readonly class="form-control" type="text" value="{{item.rname}}">
</div>
</div>
<div class="row">
<div class="col-sm-5 mb-3">
<label for="exampleFormControlSelect1">รายละเอียด</label>
<input readonly class="form-control" type="text" value="{{item.rdecs}}">
</div>
</div>
</form>
</div>
<div class=" card-footer">
<button class=" btn btn-fill btn-danger" type="submit">Save</button>
<button class=" btn btn-fill btn-danger" type="close">Cancel</button>
</div>
</div>
</div>
</ng-template>
<ng-template #lend let-modal style="padding: 0; ">
<div class=" col-md-12">
<div class="card">
<div class=" card-header">
<h5 class=" title">Lend Equirment</h5>
</div>
<div class=" card-body">
<form>
<div class=" row">
<div class=" col-md-12">
<div class=" form-group">
<label> ชื่อผู้จอง </label>
<input class=" form-control" placeholder="" type="text" value="" />
</div>
</div>
</div>
<div class="row">
<div class="col-sm-5 mb-3">
<label for="exampleFormControlSelect1">ชื่ออุปกรณ์</label>
<input readonly class="form-control" type="text" value="{{item.rname}}">
</div>
</div>
<div class="row">
<div class="col-sm-5 mb-3">
<label for="exampleFormControlSelect1">รายละเอียดอุปกรณ์</label>
<input readonly class="form-control" type="text" value="{{item.rdecs}}">
</div>
</div>
<div class=" row">
<div class=" col-sm-6 mb-2">
<label for="changequantity">จำนวน</label>
<input id="changequantity" type="number" class="form-control form-control-sm"
[(ngModel)]="quantity" />
</div>
</div>
</form>
</div>
<div class=" card-footer">
<button class=" btn btn-fill btn-danger" type="submit">Save</button>
<button class=" btn btn-fill btn-danger" type="close">Cancel</button>
</div>
</div>
</div>
</ng-template>
\ No newline at end of file
......@@ -83,6 +83,30 @@ export class EquipmentComponent implements OnInit {
rpic: "assets/img/car.jpg"
},
]
countries: Country[] = [
{
catagory: 'string',
type: 'string',
detail: 'Moniter',
name: 'a',
sdate: '2021-11-25',
edate: '2021-11-25',
status: 'waiting',
quantity : '1',
},
{
catagory: 'string',
type: 'string',
detail: 'Mouse',
name: 'b',
sdate: '2021-11-25',
edate: '2021-11-25',
status: 'waiting',
quantity : '1',
}
];
collectionSize = this.listEquirment.length;
constructor(private modalService: NgbModal) { }
......
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