Commit 37815da0 by DESKTOP-HF0LVOG\myhr

update ปุ่มจองทั้งวัน

parent 1bc6ca85
......@@ -87,7 +87,7 @@
</thead>
<tbody>
<tr *ngFor="let item of listRoomDetail">
<th scope="row">{{ item.Id }}</th>
<th scope="row">{{ item.id }}</th>
<td>{{ item.room.rType }}</td>
<td>{{ item.room.rName }}</td>
<td>{{ item.room.rDesc }}</td>
......
......@@ -19,7 +19,8 @@
<div class="">
<div class="card-body">
<div class="row">
<div class="col-sm-3" *ngFor="let item of listRoomModel|slice: (pageListRoom-1) * pageSizeListRoom :(pageListRoom-1) * pageSizeListRoom + pageSizeListRoom ;let i = index">
<div class="col-sm-3"
*ngFor="let item of listRoomModel|slice: (pageListRoom-1) * pageSizeListRoom :(pageListRoom-1) * pageSizeListRoom + pageSizeListRoom ;let i = index">
<div class="card" style="
padding: 10px;">
<div class="card-body">
......@@ -70,7 +71,8 @@
<div class="">
<div class="card-body">
<div class="row">
<div class="col-sm-3" *ngFor="let item of listEquirmentModel |slice: (page-1) * pageSize :(page-1) * pageSize + pageSize ;let i = index">
<div class="col-sm-3"
*ngFor="let item of listEquirmentModel |slice: (page-1) * pageSize :(page-1) * pageSize + pageSize ;let i = index">
<div class="card" style="
padding: 10px;">
<div class="card-body">
......@@ -250,7 +252,7 @@
<div class=" form-group">
<label> ชื่อผู้จอง </label>
<input class=" form-control" placeholder="" type="text"
[(ngModel)]="modelRoomDetail.userName" formControlName="userNameForm" />
[(ngModel)]="modelRoomDetail.userName" formControlName="userNameForm" />
<div style="color: red;" *ngIf="myFormRoom.controls.userNameForm.status=='INVALID'">
กรุณากรอกชื่อผู้จอง.</div>
</div>
......@@ -312,10 +314,23 @@
</div>
</div>
<div class="row">
<div class="col-12 mb-1">
<div class=" form-check">
<label class=" form-check-label">
<input class=" form-check{{readonly ? 'danger' : 'success'}}" type="checkbox" value="" (click)="readonly = !readonly" />
<span class=" form-check-sign">
<span class="check">ทั้งวัน</span>
</span>
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-6 mb-1">
<label for="exampleFormControlSelect1">เวลาที่เริ่มต้น</label>
<input class="form-control" type="time" [(ngModel)]="modelRoomDetail.sTime" formControlName="sTime" />
<input class="form-control" type="time" [(ngModel)]="modelRoomDetail.sTime"
formControlName="sTime" [readonly]="readonly"/>
<div style="color: red;" *ngIf="myFormRoom.controls.sTime.status=='INVALID'">
กรุณากรอกเวลาที่เริ่มต้นการจอง.
</div>
......@@ -323,8 +338,9 @@
</div>
<div class="col-6 mb-1">
<label for="exampleFormControlSelect1">เวลาที่สิ้นสุด</label>
<input class="form-control" type="time" [(ngModel)]="modelRoomDetail.eTime" formControlName="eTime" />
<input class="form-control" type="time" [(ngModel)]="modelRoomDetail.eTime"
formControlName="eTime" [readonly]="readonly"/>
<div style="color: red;" *ngIf="myFormRoom.controls.eTime.status=='INVALID'">
กรุณากรอกเวลาที่สิ้นสุดการจอง.
</div>
......@@ -429,16 +445,18 @@
<div class="row">
<div class="col-6 mb-1">
<label for="exampleFormControlSelect1">เวลาที่เริ่มต้น</label>
<input class="form-control" type="time" [(ngModel)]="modelItemDetail.sTime" formControlName="sTime" />
<input class="form-control" type="time" [(ngModel)]="modelItemDetail.sTime"
formControlName="sTime" />
<div style="color: red;" *ngIf="myFormEquir.controls.sTime.status=='INVALID'">
กรุณากรอกเวลาที่เริ่มต้นการเบิก.
</div>
</div>
<div class="col-6 mb-1">
<label for="exampleFormControlSelect1">เวลาที่สิ้นสุด</label>
<input class="form-control" type="time" [(ngModel)]="modelItemDetail.eTime" formControlName="eTime" />
<input class="form-control" type="time" [(ngModel)]="modelItemDetail.eTime"
formControlName="eTime" />
<div style="color: red;" *ngIf="myFormEquir.controls.eTime.status=='INVALID'">
กรุณากรอกเวลาที่สิ้นสุดการเบิก.
</div>
......
......@@ -18,6 +18,8 @@ import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'
})
export class EquipmentComponent implements OnInit {
time = { hour: 13, minute: 30 };
readonly = false;
closeResult = '';
......@@ -42,6 +44,8 @@ export class EquipmentComponent implements OnInit {
myFormRoom: FormGroup;
myFormEquir: FormGroup;
ctrl = new FormControl(null, Validators.required);
constructor(private modalService: NgbModal, private equirmentService: EquirmentService, private roomService: RoomService, private ItemDetailService : ItemDetailService, private RoomDetailService : RoomDetailService
,private fb: FormBuilder) {
......@@ -189,8 +193,6 @@ export class EquipmentComponent implements OnInit {
}
saveBook() {
this.modelRoomDetail.sDate = this.modelRoomDetail.sDate.split("-")[0]+"/"+this.modelRoomDetail.sDate.split("-")[1]+"/"+this.modelRoomDetail.sDate.split("-")[2];
this.modelRoomDetail.eDate = this.modelRoomDetail.eDate.split("-")[0]+"/"+this.modelRoomDetail.eDate.split("-")[1]+"/"+this.modelRoomDetail.eDate.split("-")[2];
this.modelRoomDetail.rStatus = 0 ;
......@@ -200,5 +202,6 @@ export class EquipmentComponent implements OnInit {
this.ngOnInit();
}
}
......@@ -87,7 +87,7 @@
</thead>
<tbody>
<tr *ngFor="let item of listRoomDetail">
<th scope="row">{{ item.Id }}</th>
<th scope="row">{{ item.id }}</th>
<td>{{ item.room.rType }}</td>
<td>{{ item.room.rName }}</td>
<td>{{ item.room.rDesc }}</td>
......
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