Commit 686a402d by Chanachai

Update เอาหน้าเพิ่มรายการออกจากUser

parent b0670726
......@@ -204,8 +204,7 @@
<div class=" col-md-12">
<div class=" form-group">
<label> ชื่อ </label>
<input class=" form-control" placeholder="" type="text" [(ngModel)]="modelRoom.rName"
formControlName="rName">
<input class=" form-control" placeholder="" type="text" formControlName="rName">
<div style="color: red;" *ngIf="myFormRoom.controls.rName.status=='INVALID'">กรุณากรอกชื่อ.</div>
</div>
</div>
......
......@@ -258,16 +258,15 @@ export class AdminEquirmentComponent implements OnInit {
// TODO: Use EventEmitter with form value
console.warn(this.RoomForm.value);
}
updateRoomProfile() {
let temp = {
rName: this.listRoomModelEdit.rName,
rType: this.listRoomModelEdit.rType,
rDesc: this.listRoomModelEdit.rDesc,
rId: this.listRoomModelEdit.rId,
rPic: this.listRoomModelEdit.rPic,
roomLimit: this.listRoomModelEdit.roomLimit,
}
this.listRoomModel[this.index] = temp
this.listRoomModel[this.index].rName = this.myFormRoom.value.rName
this.listRoomModel[this.index].rDesc = this.myFormRoom.value.rDesc
this.listRoomModel[this.index].rType = this.myFormRoom.value.rType
this.roomService.updateRoomProfile(this.listRoomModel[this.index])
this.modalService.dismissAll();
this.ngOnInit();
console.log("this.listRoomModelEdit",this.listRoomModel)
}
updateItemProfile() {
......
......@@ -18,10 +18,6 @@
<div class="col-sm-12">
<div class="">
<div class="card-body">
<button class="btn btn-lg btn-outline-primary"
(click)="Ropen(contentroom)">เพิ่มรายการ</button>
<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="card" style="
......@@ -73,9 +69,6 @@
<div class="col-sm-12">
<div class="">
<div class="card-body">
<button class="btn btn-lg btn-outline-primary"
(click)="Eopen(contentequirment)">เพิ่มรายการ</button>
<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="card" style="
......
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