Commit d6f5d177 by DESKTOP-HF0LVOG\myhr

Update หน้าต่างการจองเปลี่ยนภาษา

parent 16d16296
...@@ -30,8 +30,8 @@ export class ItemDetail { ...@@ -30,8 +30,8 @@ export class ItemDetail {
this.eDate = ''; this.eDate = '';
this.eStatus = ''; this.eStatus = '';
this.Quantity = ''; this.Quantity = '';
this.eTelephone = undefined; this.eTelephone = '';
this.email = undefined; this.email = '';
this.Remark = ''; this.Remark = '';
} }
} }
......
...@@ -28,8 +28,8 @@ export class RoomDetail { ...@@ -28,8 +28,8 @@ export class RoomDetail {
this.sDate = ''; this.sDate = '';
this.eDate = ''; this.eDate = '';
this.rStatus = ''; this.rStatus = '';
this.rTelephone = undefined; this.rTelephone = '';
this.email = undefined; this.email = '';
this.Remark = ''; this.Remark = '';
} }
} }
......
...@@ -139,8 +139,7 @@ ...@@ -139,8 +139,7 @@
<input class=" form-control" placeholder="" type="text" <input class=" form-control" placeholder="" type="text"
[(ngModel)]="modelEquirment.eqName" value="" formControlName="eqName" /> [(ngModel)]="modelEquirment.eqName" value="" formControlName="eqName" />
<div style="color: red;" *ngIf="myFormEquir.controls.eqName.status=='INVALID'"> <div style="color: red;" *ngIf="myFormEquir.controls.eqName.status=='INVALID'">
Invalid กรุณากรอกชื่ออุปกรณ์.</div>
Equirment Name.</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -156,8 +155,7 @@ ...@@ -156,8 +155,7 @@
<option value="5">Company</option> <option value="5">Company</option>
</select> </select>
<div style="color: red;" *ngIf="myFormEquir.controls.eqType.status=='INVALID'"> <div style="color: red;" *ngIf="myFormEquir.controls.eqType.status=='INVALID'">
Invalid กรุณากรอกประเภทอุปกรณ์.</div>
Equirment Type.</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -169,8 +167,7 @@ ...@@ -169,8 +167,7 @@
placeholder="......" [(ngModel)]="modelEquirment.eqDesc" placeholder="......" [(ngModel)]="modelEquirment.eqDesc"
formControlName="eqDesc"></textarea> formControlName="eqDesc"></textarea>
<div style="color: red;" *ngIf="myFormEquir.controls.eqDesc.status=='INVALID'"> <div style="color: red;" *ngIf="myFormEquir.controls.eqDesc.status=='INVALID'">
Invalid กรุณากรอกรายละเอียดอุปกรณ์.</div>
Equirment Desc.</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -203,8 +200,7 @@ ...@@ -203,8 +200,7 @@
<input class=" form-control" placeholder="" type="text" [(ngModel)]="modelRoom.rName" <input class=" form-control" placeholder="" type="text" [(ngModel)]="modelRoom.rName"
formControlName="rName"> formControlName="rName">
<div style="color: red;" *ngIf="myFormRoom.controls.rName.status=='INVALID'"> <div style="color: red;" *ngIf="myFormRoom.controls.rName.status=='INVALID'">
Invalid กรุณากรอกชื่อ.</div>
Name.</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -219,8 +215,7 @@ ...@@ -219,8 +215,7 @@
<option value="2">รถ</option> <option value="2">รถ</option>
</select> </select>
<div style="color: red;" *ngIf="myFormRoom.controls.rType.status=='INVALID'"> <div style="color: red;" *ngIf="myFormRoom.controls.rType.status=='INVALID'">
Invalid กรุณากรอกประเภท.</div>
Type.</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -232,8 +227,7 @@ ...@@ -232,8 +227,7 @@
placeholder="......" [(ngModel)]="modelRoom.rDesc" placeholder="......" [(ngModel)]="modelRoom.rDesc"
formControlName="rDesc"></textarea> formControlName="rDesc"></textarea>
<div style="color: red;" *ngIf="myFormRoom.controls.rDesc.status=='INVALID'"> <div style="color: red;" *ngIf="myFormRoom.controls.rDesc.status=='INVALID'">
Invalid กรุณากรอกรายละเอียด.</div>
Desc.</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -265,8 +259,7 @@ ...@@ -265,8 +259,7 @@
<input class=" form-control" placeholder="" type="text" <input class=" form-control" placeholder="" type="text"
formControlName="userNameForm" /> formControlName="userNameForm" />
<div style="color: red;" *ngIf="myFormRoom.controls.userNameForm.status=='INVALID'"> <div style="color: red;" *ngIf="myFormRoom.controls.userNameForm.status=='INVALID'">
Invalid กรุณากรอกชื่อผู้จอง.</div>
Username.</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -276,8 +269,8 @@ ...@@ -276,8 +269,8 @@
<label> อีเมลผู้จอง </label> <label> อีเมลผู้จอง </label>
<input class=" form-control" placeholder="" type="text" value="" <input class=" form-control" placeholder="" type="text" value=""
[(ngModel)]="modelRoomDetail.email" formControlName="email" /> [(ngModel)]="modelRoomDetail.email" formControlName="email" />
<div style="color: red;" *ngIf="myFormRoom.controls.email.status=='INVALID'">Valid <div style="color: red;" *ngIf="myFormRoom.controls.email.status=='INVALID'">
Email. กรุณากรอกอีเมล.
</div> </div>
</div> </div>
</div> </div>
...@@ -288,22 +281,22 @@ ...@@ -288,22 +281,22 @@
<label> เบอร์โทร </label> <label> เบอร์โทร </label>
<input class=" form-control" placeholder="" type="text" value="" <input class=" form-control" placeholder="" type="text" value=""
[(ngModel)]="modelRoomDetail.rTelephone" formControlName="rTelephone" /> [(ngModel)]="modelRoomDetail.rTelephone" formControlName="rTelephone" />
<div style="color: red;" *ngIf="myFormRoom.controls.rTelephone.status=='INVALID'">Valid <div style="color: red;" *ngIf="myFormRoom.controls.rTelephone.status=='INVALID'">
Telephone.</div> กรุณากรอกหมายเลขโทรศัพท์.</div>
</div> </div>
</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" [(ngModel)]="modelRoomDetail.room.rName" <input class="form-control" type="text" [(ngModel)]="modelRoomDetail.room.rName"
formControlName="rName"> formControlName="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" [(ngModel)]="modelRoomDetail.room.rDesc" <input class="form-control" type="text" [(ngModel)]="modelRoomDetail.room.rDesc"
formControlName="rDesc"> formControlName="rDesc">
</div> </div>
</div> </div>
...@@ -312,16 +305,16 @@ ...@@ -312,16 +305,16 @@
<label for="exampleFormControlSelect1">วันที่เริ่มต้น</label> <label for="exampleFormControlSelect1">วันที่เริ่มต้น</label>
<input type="date" class="form-control" value="" [(ngModel)]="modelRoomDetail.sDate" <input type="date" class="form-control" value="" [(ngModel)]="modelRoomDetail.sDate"
formControlName="sDate"> formControlName="sDate">
<div style="color: red;" *ngIf="myFormRoom.controls.sDate.status=='INVALID'">Valid Start <div style="color: red;" *ngIf="myFormRoom.controls.sDate.status=='INVALID'">
Date. กรุณากรอกวันที่เริ่มต้นการจอง.
</div> </div>
</div> </div>
<div class="col-6 mb-1"> <div class="col-6 mb-1">
<label for="exampleFormControlSelect1">วันที่สิ้นสุด</label> <label for="exampleFormControlSelect1">วันที่สิ้นสุด</label>
<input type="date" class="form-control" value="" [(ngModel)]="modelRoomDetail.eDate" <input type="date" class="form-control" value="" [(ngModel)]="modelRoomDetail.eDate"
formControlName="eDate"> formControlName="eDate">
<div style="color: red;" *ngIf="myFormRoom.controls.eDate.status=='INVALID'">Valid End Date. <div style="color: red;" *ngIf="myFormRoom.controls.eDate.status=='INVALID'">
กรุณากรอกวันที่สิ้นสุดการจอง.
</div> </div>
</div> </div>
</div> </div>
...@@ -330,8 +323,8 @@ ...@@ -330,8 +323,8 @@
<label for="exampleFormControlSelect1">เวลาที่เริ่มต้น</label> <label for="exampleFormControlSelect1">เวลาที่เริ่มต้น</label>
<ngb-timepicker [(ngModel)]="modelRoomDetail.sTime" formControlName="sTime"> <ngb-timepicker [(ngModel)]="modelRoomDetail.sTime" formControlName="sTime">
</ngb-timepicker> </ngb-timepicker>
<div style="color: red;" *ngIf="myFormRoom.controls.sTime.status=='INVALID'">Valid Start <div style="color: red;" *ngIf="myFormRoom.controls.sTime.status=='INVALID'">
Time. กรุณากรอกเวลาที่เริ่มต้นการจอง.
</div> </div>
</div> </div>
...@@ -339,7 +332,8 @@ ...@@ -339,7 +332,8 @@
<label for="exampleFormControlSelect1">เวลาที่สิ้นสุด</label> <label for="exampleFormControlSelect1">เวลาที่สิ้นสุด</label>
<ngb-timepicker [(ngModel)]="modelRoomDetail.etime" formControlName="eTime"> <ngb-timepicker [(ngModel)]="modelRoomDetail.etime" formControlName="eTime">
</ngb-timepicker> </ngb-timepicker>
<div style="color: red;" *ngIf="myFormRoom.controls.eTime.status=='INVALID'">Valid End Time. <div style="color: red;" *ngIf="myFormRoom.controls.eTime.status=='INVALID'">
กรุณากรอกเวลาที่สิ้นสุดการจอง.
</div> </div>
</div> </div>
</div> </div>
...@@ -356,7 +350,7 @@ ...@@ -356,7 +350,7 @@
</form> </form>
</div> </div>
<div class=" card-footer"> <div class=" card-footer">
<button class=" btn btn-fill btn-danger" [disabled]="" type="button" (click)="validate()">Save</button> <button class=" btn btn-fill btn-danger" [disabled]="" type="button" (click)="saveBook()">Save</button>
<button class=" btn btn-fill btn-danger" type="close">Cancel</button> <button class=" btn btn-fill btn-danger" type="close">Cancel</button>
</div> </div>
</div> </div>
...@@ -378,7 +372,7 @@ ...@@ -378,7 +372,7 @@
<input class=" form-control" placeholder="" type="text" value="" <input class=" form-control" placeholder="" type="text" value=""
[(ngModel)]="modelItemDetail.userName" formControlName="userNameForm" /> [(ngModel)]="modelItemDetail.userName" formControlName="userNameForm" />
<div style="color: red;" *ngIf="myFormEquir.controls.userNameForm.status=='INVALID'"> <div style="color: red;" *ngIf="myFormEquir.controls.userNameForm.status=='INVALID'">
Valid End Time. กรุณากรอกชื่อผู้เบิก.
</div> </div>
</div> </div>
</div> </div>
...@@ -389,8 +383,8 @@ ...@@ -389,8 +383,8 @@
<label> เบอร์โทร </label> <label> เบอร์โทร </label>
<input class=" form-control" placeholder="" type="text" value="" <input class=" form-control" placeholder="" type="text" value=""
[(ngModel)]="modelItemDetail.eTelephone" formControlName="eTelephone" /> [(ngModel)]="modelItemDetail.eTelephone" formControlName="eTelephone" />
<div style="color: red;" *ngIf="myFormEquir.controls.eTelephone.status=='INVALID'">Valid <div style="color: red;" *ngIf="myFormEquir.controls.eTelephone.status=='INVALID'">
End Time. กรุณากรอกหมายเลขโทรศัพท์.
</div> </div>
</div> </div>
</div> </div>
...@@ -398,16 +392,15 @@ ...@@ -398,16 +392,15 @@
<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]="modelItemDetail.equirment.eqName" <input readonly class="form-control" type="text"
formControlName="eqName"> [(ngModel)]="modelItemDetail.equirment.eqName" formControlName="eqName">
</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]="modelItemDetail.equirment.eqDesc" <input readonly class="form-control" type="text"
formControlName="eqDesc"> [(ngModel)]="modelItemDetail.equirment.eqDesc" formControlName="eqDesc">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
...@@ -415,16 +408,16 @@ ...@@ -415,16 +408,16 @@
<label for="exampleFormControlSelect1">วันที่เริ่มต้น</label> <label for="exampleFormControlSelect1">วันที่เริ่มต้น</label>
<input type="date" class="form-control" value="" [(ngModel)]="modelItemDetail.sDate" <input type="date" class="form-control" value="" [(ngModel)]="modelItemDetail.sDate"
formControlName="sDate"> formControlName="sDate">
<div style="color: red;" *ngIf="myFormEquir.controls.sDate.status=='INVALID'">Valid End <div style="color: red;" *ngIf="myFormEquir.controls.sDate.status=='INVALID'">
Time. กรุณากรอกวันที่เริ่มต้นการเบิก.
</div> </div>
</div> </div>
<div class="col-6 mb-1"> <div class="col-6 mb-1">
<label for="exampleFormControlSelect1">วันที่สิ้นสุด</label> <label for="exampleFormControlSelect1">วันที่สิ้นสุด</label>
<input type="date" class="form-control" value="" [(ngModel)]="modelItemDetail.eDate" <input type="date" class="form-control" value="" [(ngModel)]="modelItemDetail.eDate"
formControlName="eDate"> formControlName="eDate">
<div style="color: red;" *ngIf="myFormEquir.controls.eDate.status=='INVALID'">Valid End <div style="color: red;" *ngIf="myFormEquir.controls.eDate.status=='INVALID'">
Time. กรุณากรอกวันที่สิ้นสุดการเบิก.
</div> </div>
</div> </div>
</div> </div>
...@@ -433,16 +426,16 @@ ...@@ -433,16 +426,16 @@
<label for="exampleFormControlSelect1">เวลาที่เริ่มต้น</label> <label for="exampleFormControlSelect1">เวลาที่เริ่มต้น</label>
<ngb-timepicker [(ngModel)]="modelItemDetail.sTime" formControlName="sTime"> <ngb-timepicker [(ngModel)]="modelItemDetail.sTime" formControlName="sTime">
</ngb-timepicker> </ngb-timepicker>
<div style="color: red;" *ngIf="myFormEquir.controls.sTime.status=='INVALID'">Valid End <div style="color: red;" *ngIf="myFormEquir.controls.sTime.status=='INVALID'">
Time. กรุณากรอกเวลาที่เริ่มต้นการเบิก.
</div> </div>
</div> </div>
<div class="col-6 mb-1"> <div class="col-6 mb-1">
<label for="exampleFormControlSelect1">เวลาที่สิ้นสุด</label> <label for="exampleFormControlSelect1">เวลาที่สิ้นสุด</label>
<ngb-timepicker [(ngModel)]="modelItemDetail.eTime" formControlName="eTime"> <ngb-timepicker [(ngModel)]="modelItemDetail.eTime" formControlName="eTime">
</ngb-timepicker> </ngb-timepicker>
<div style="color: red;" *ngIf="myFormEquir.controls.eTime.status=='INVALID'">Valid End <div style="color: red;" *ngIf="myFormEquir.controls.eTime.status=='INVALID'">
Time. กรุณากรอกเวลาที่สิ้นสุดการเบิก.
</div> </div>
</div> </div>
</div> </div>
...@@ -451,8 +444,8 @@ ...@@ -451,8 +444,8 @@
<label for="changequantity">จำนวน</label> <label for="changequantity">จำนวน</label>
<input id="changequantity" type="number" class="form-control form-control-sm" <input id="changequantity" type="number" class="form-control form-control-sm"
[(ngModel)]="modelItemDetail.Quantity" formControlName="Quantity" /> [(ngModel)]="modelItemDetail.Quantity" formControlName="Quantity" />
<div style="color: red;" *ngIf="myFormEquir.controls.Quantity.status=='INVALID'">Valid End <div style="color: red;" *ngIf="myFormEquir.controls.Quantity.status=='INVALID'">
Time. กรุณากรอกจำนวนการเบิก.
</div> </div>
</div> </div>
</div> </div>
...@@ -469,7 +462,7 @@ ...@@ -469,7 +462,7 @@
</form> </form>
</div> </div>
<div class=" card-footer"> <div class=" card-footer">
<button class=" btn btn-fill btn-danger" type="submit" (click)="validate()">Save</button> <button class=" btn btn-fill btn-danger" type="submit" (click)="saveLend()">Save</button>
<button class=" btn btn-fill btn-danger" type="close">Cancel</button> <button class=" btn btn-fill btn-danger" type="close">Cancel</button>
</div> </div>
</div> </div>
......
...@@ -120,6 +120,7 @@ export class EquipmentComponent implements OnInit { ...@@ -120,6 +120,7 @@ export class EquipmentComponent implements OnInit {
}, (reason) => { }, (reason) => {
this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; this.closeResult = `Dismissed ${this.getDismissReason(reason)}`;
}); });
} }
Ropen(contentroom) { Ropen(contentroom) {
......
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
<div class=" form-group"> <div class=" form-group">
<label> เบอร์โทร </label> <label> เบอร์โทร </label>
<input readonly class=" form-control" placeholder="" type="text" <input readonly class=" form-control" placeholder="" type="text"
[(ngModel)]="modelItemDetail.rTelephone" /> [(ngModel)]="modelItemDetail.eTelephone" />
</div> </div>
</div> </div>
</div> </div>
......
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http'; import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Equirment, SearchEquirmentModel } from '../models/equirment.model'; import { Equirment, SearchEquirmentModel } from '../models/equirment.model';
import { ItemDetail } from '../models/itemDetail.model';
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
export class EquirmentService { export class EquirmentService {
...@@ -40,9 +41,12 @@ export class EquirmentService { ...@@ -40,9 +41,12 @@ export class EquirmentService {
addEquirment(model: Equirment) { addEquirment(model: Equirment) {
this.listEquirment.push(model); this.listEquirment.push(model);
} }
// bookEquirment(models: ItemDetail){
// this.listEquirment.push(models);
// }
getListEquirment() { getListEquirment() {
return this.listEquirment; return this.listEquirment;
} }
......
...@@ -32,8 +32,8 @@ export class ItemDetailService { ...@@ -32,8 +32,8 @@ export class ItemDetailService {
}, },
eStatus: 'รอการอนุมัติ', eStatus: 'รอการอนุมัติ',
Quantity: '1', Quantity: '1',
eTelephone: undefined, eTelephone: '0123456789',
email: undefined, email: 'qwerty@qwerty',
Remark: 'test', Remark: 'test',
}, },
{ {
...@@ -46,8 +46,8 @@ export class ItemDetailService { ...@@ -46,8 +46,8 @@ export class ItemDetailService {
eqPic: "assets/img/notebook.jpg" eqPic: "assets/img/notebook.jpg"
}, },
userName: 'แป๊ะ', userName: 'แป๊ะ',
sDate: '', sDate: '13/12/2560',
eDate: '', eDate: '13/12/2561',
sTime: { sTime: {
hour: 22, hour: 22,
minute: 30, minute: 30,
...@@ -60,8 +60,8 @@ export class ItemDetailService { ...@@ -60,8 +60,8 @@ export class ItemDetailService {
}, },
eStatus: 'รอการอนุมัติ', eStatus: 'รอการอนุมัติ',
Quantity: '1', Quantity: '1',
eTelephone: undefined, eTelephone: '0123456789',
email: undefined, email: 'qwerty@qwerty',
Remark: 'test', Remark: 'test',
}, },
......
...@@ -32,8 +32,8 @@ export class RoomDetailService { ...@@ -32,8 +32,8 @@ export class RoomDetailService {
second: 0 second: 0
}, },
rStatus: 'รอการอนุมัติ', rStatus: 'รอการอนุมัติ',
rTelephone: undefined, rTelephone: '0123456789',
email: undefined, email: 'qwerty@qwerty',
Remark: 'test', Remark: 'test',
}, },
{ {
...@@ -60,8 +60,8 @@ export class RoomDetailService { ...@@ -60,8 +60,8 @@ export class RoomDetailService {
second: 0 second: 0
}, },
rStatus: 'รอการอนุมัติ', rStatus: 'รอการอนุมัติ',
rTelephone: undefined, rTelephone: '0123456789',
email: undefined, email: 'qwerty@qwerty',
Remark: 'test', Remark: 'test',
}, },
......
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