Commit 9849c018 by Your Name

Updae contact-admin

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