Commit d6f5d177 by DESKTOP-HF0LVOG\myhr

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

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