Commit 9849c018 by Your Name

Updae contact-admin

parent 4fdd3fa9
......@@ -33,7 +33,7 @@ export const ROUTES: RouteInfo[] = [
path: "/pending",
title: "รายการทั้งหมด",
rtlTitle: "",
icon: "icon-notes",
icon: "icon-paper",
class: ""
},
{
......@@ -43,14 +43,13 @@ export const ROUTES: RouteInfo[] = [
icon: "icon-bag-16",
class: ""
},
{
path: "/contact-admin",
title: "ติดต่อแอดมิน",
rtlTitle: "",
icon: "icon-bag-16",
icon: "icon-settings",
class: ""
},
}
];
@Component({
......
......@@ -5,11 +5,11 @@
<div class="row">
<div class="col-6 md-1">
<label>ชื่อผู้แจ้ง Bug:</label>
<input input class=" form-control" placeholder="" type="text" formControlName="ctName" />
<input input class=" form-control" placeholder="" type="text" formControlName="ctName" [(ngModel)]="modelContact.ctName" />
</div>
<div class="col-6 md-1">
<label for="typeahead-focus">หัวข้อการแจ้ง Bug:</label>
<input input class=" form-control" placeholder="" type="text" formControlName="ctHead" />
<input input class=" form-control" placeholder="" type="text" formControlName="ctHead" [(ngModel)]="modelContact.ctHead" />
</div>
</div>
<div class="row">
......@@ -21,7 +21,7 @@
</div>
<div class="col-6 mb-1">
<label for="exampleFormControlSelect1">วันที่เริ่มต้น</label>
<input type="date" class="form-control" value="" formControlName="sDate">
<input type="date" class="form-control" value="" formControlName="sDate" [(ngModel)]="modelContact.sDate">
</div>
</div>
<div class=" row">
......@@ -29,7 +29,7 @@
<div class=" form-group">
<label> หมายเหตุ </label>
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3"
placeholder="......" formControlName="ctDesc"></textarea>
placeholder="......" formControlName="ctDesc" [(ngModel)]="modelContact.ctDesc"></textarea>
</div>
</div>
</div>
......
......@@ -106,12 +106,12 @@ export class ContactAdminComponent implements OnInit {
saveStatusContact() {
this.modelContact.ctName = this.myFormContact.value.ctName
this.modelContact.ctDesc = this.myFormContact.value.ctDesc
this.modelContact.ctTab = this.myFormContact.value.ctTab
this.modelContact.ctHead = this.myFormContact.value.ctHead
this.modelContact.ctStatus = this.myFormContact.value.ctStatus
this.modelContact.sDate = this.myFormContact.value.sDate
this.modelContact.ctName = new this.myFormContact.value.ctName
this.modelContact.ctDesc = new this.myFormContact.value.ctDesc
this.modelContact.ctTab = new this.myFormContact.value.ctTab
this.modelContact.ctHead = new this.myFormContact.value.ctHead
this.modelContact.ctStatus = new this.myFormContact.value.ctStatus
this.modelContact.sDate = new this.myFormContact.value.sDate
this.ContactService.updateContact(this.modelContact)
this.modalService.dismissAll();
this.ngOnInit();
......
......@@ -15,7 +15,7 @@ export class ContactService {
ctTab: 'รายการอุปกรณ์',
ctHead: 'กดจองไม่ได้',
ctStatus: 0,
sDate: '2021/12/17'
sDate: '2021-12-17'
},
]
......
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