Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BookingMyHrManagement
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chanachai
BookingMyHrManagement
Commits
9e9a7ed7
Commit
9e9a7ed7
authored
3 years ago
by
Chanachai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edit ไม่ให้ข้อมูลมาแสดง
parent
9849c018
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
24 deletions
+37
-24
contact-admin.component.html
src/app/pages/contact-admin/contact-admin.component.html
+11
-12
contact-admin.component.ts
src/app/pages/contact-admin/contact-admin.component.ts
+25
-12
contact.service.ts
src/app/service/contact.service.ts
+1
-0
No files found.
src/app/pages/contact-admin/contact-admin.component.html
View file @
9e9a7ed7
<div
class=
"content"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<form
[
formGroup
]="
myFormContact
"
>
<form
[
formGroup
]="
myForm
Add
Contact
"
>
<div
class=
"row"
>
<div
class=
"col-6 md-1"
>
<label>
ชื่อผู้แจ้ง Bug:
</label>
<input
input
class=
" form-control"
placeholder=
""
type=
"text"
formControlName=
"ctName"
[(
ngModel
)]="
modelContact
.
ctName
"
/>
<input
input
class=
" form-control"
placeholder=
""
type=
"text"
formControlName=
"ctName"
/>
</div>
<div
class=
"col-6 md-1"
>
<label
for=
"typeahead-focus"
>
หัวข้อการแจ้ง Bug:
</label>
<input
input
class=
" form-control"
placeholder=
""
type=
"text"
formControlName=
"ctHead"
[(
ngModel
)]="
modelContact
.
ctHead
"
/>
<input
input
class=
" form-control"
placeholder=
""
type=
"text"
formControlName=
"ctHead"
/>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-6 md-1"
>
<label
for=
"typeahead-focus"
>
หน้าต่างที่ต้องการแจ้ง Bug:
</label>
<input
id=
"typeahead-focus"
type=
"text"
class=
"form-control"
[(
ngModel
)]="
modelContact
.
ctTab
"
<input
id=
"typeahead-focus"
type=
"text"
class=
"form-control"
[
ngbTypeahead
]="
search
"
(
focus
)="
focus
$.
next
($
any
($
event
).
target
.
value
)"
(
click
)="
click
$.
next
($
any
($
event
).
target
.
value
)"
#
instance=
"ngbTypeahead"
formControlName=
"ctTab"
/>
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่มต้น
</label>
<input
type=
"date"
class=
"form-control"
value=
""
formControlName=
"sDate"
[(
ngModel
)]="
modelContact
.
sDate
"
>
<input
type=
"date"
class=
"form-control"
value=
""
formControlName=
"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"
[(
ngModel
)]="
modelContact
.
ctDesc
"
></textarea>
placeholder=
"......"
formControlName=
"ctDesc"
></textarea>
</div>
</div>
</div>
...
...
@@ -110,7 +110,7 @@
<div
class=
" form-group"
>
<label>
ชื่อหัวข้อ
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
formControlName=
"ctHead"
[(
ngModel
)]="
modelContact
.
ctHead
"
/>
formControlName=
"ctHead"
/>
</div>
</div>
</div>
...
...
@@ -119,7 +119,7 @@
<div
class=
" form-group"
>
<label>
หน้าต่างที่มี BUG
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
formControlName=
"ctTab"
[(
ngModel
)]="
modelContact
.
ctTab
"
/>
formControlName=
"ctTab"
/>
</div>
</div>
</div>
...
...
@@ -128,15 +128,14 @@
<div
class=
" form-group"
>
<label>
ชื่อผู้แจ้ง
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
formControlName=
"ctName"
[(
ngModel
)]="
modelContact
.
ctName
"
/>
formControlName=
"ctName"
/>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-12 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่แจ้ง
</label>
<input
readonly
type=
"date"
class=
"form-control"
[(
ngModel
)]="
modelContact
.
sDate
"
formControlName=
"sDate"
[(
ngModel
)]="
modelContact
.
sDate
"
/>
<input
readonly
type=
"date"
class=
"form-control"
formControlName=
"sDate"
/>
</div>
</div>
<div
class=
" row"
>
...
...
@@ -144,7 +143,7 @@
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
formControlName=
"ctDesc"
[(
ngModel
)]="
modelContact
.
ctDesc
"
></textarea>
placeholder=
"......"
formControlName=
"ctDesc"
></textarea>
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/contact-admin/contact-admin.component.ts
View file @
9e9a7ed7
...
...
@@ -31,6 +31,7 @@ export class ContactAdminComponent implements OnInit {
modelContact
=
new
Contact
();
myFormContact
:
FormGroup
;
myFormAddContact
:
FormGroup
;
sDate
=
""
;
...
...
@@ -46,12 +47,21 @@ export class ContactAdminComponent implements OnInit {
this
.
collectionSize
=
this
.
listContact
.
length
this
.
myFormContact
=
new
FormGroup
({
ctName
:
new
FormControl
(
this
.
modelContact
.
ctName
),
ctDesc
:
new
FormControl
(
this
.
modelContact
.
ctDesc
),
ctTab
:
new
FormControl
(
this
.
modelContact
.
ctTab
),
ctHead
:
new
FormControl
(
this
.
modelContact
.
ctHead
),
sDate
:
new
FormControl
(
this
.
modelContact
.
sDate
),
ctStatus
:
new
FormControl
(
this
.
modelContact
.
ctStatus
)
ctName
:
new
FormControl
(
''
),
ctDesc
:
new
FormControl
(
''
),
ctTab
:
new
FormControl
(
''
),
ctHead
:
new
FormControl
(
''
),
sDate
:
new
FormControl
(
''
),
ctStatus
:
new
FormControl
(
''
)
});
this
.
myFormAddContact
=
new
FormGroup
({
ctName
:
new
FormControl
(
''
),
ctDesc
:
new
FormControl
(
''
),
ctTab
:
new
FormControl
(
''
),
ctHead
:
new
FormControl
(
''
),
sDate
:
new
FormControl
(
''
),
ctStatus
:
new
FormControl
(
''
)
});
}
...
...
@@ -90,6 +100,7 @@ export class ContactAdminComponent implements OnInit {
sDate
:
new
FormControl
(
this
.
modelContact
.
sDate
),
ctStatus
:
new
FormControl
(
this
.
modelContact
.
ctStatus
)
});
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
},
(
reason
)
=>
{
...
...
@@ -99,6 +110,8 @@ export class ContactAdminComponent implements OnInit {
}
saveContact
()
{
this
.
modelContact
.
sDate
=
this
.
modelContact
.
sDate
.
split
(
"-"
)[
0
]
+
"/"
+
this
.
modelContact
.
sDate
.
split
(
"-"
)[
1
]
+
"/"
+
this
.
modelContact
.
sDate
.
split
(
"-"
)[
2
];
this
.
modelContact
.
ctStatus
=
0
;
this
.
ContactService
.
addContact
(
this
.
modelContact
);
this
.
modalService
.
dismissAll
();
this
.
ngOnInit
();
...
...
@@ -106,12 +119,12 @@ export class ContactAdminComponent implements OnInit {
saveStatusContact
()
{
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
.
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
.
ContactService
.
updateContact
(
this
.
modelContact
)
this
.
modalService
.
dismissAll
();
this
.
ngOnInit
();
...
...
This diff is collapsed.
Click to expand it.
src/app/service/contact.service.ts
View file @
9e9a7ed7
...
...
@@ -21,6 +21,7 @@ export class ContactService {
addContact
(
model
:
Contact
)
{
this
.
listContact
.
push
(
model
);
this
.
listContact
.
reverse
}
updateContact
(
row_obj
:
Contact
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment