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
4fdd3fa9
Commit
4fdd3fa9
authored
Dec 20, 2021
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update แสดง Detail ได้แล้ว
parent
a6d6b12b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
57 deletions
+61
-57
contact.model.ts
src/app/models/contact.model.ts
+0
-3
admin-pending.component.html
src/app/pages/admin-pending/admin-pending.component.html
+3
-3
admin-pending.component.ts
src/app/pages/admin-pending/admin-pending.component.ts
+1
-2
contact-admin.component.html
src/app/pages/contact-admin/contact-admin.component.html
+38
-34
contact-admin.component.ts
src/app/pages/contact-admin/contact-admin.component.ts
+18
-13
contact.service.ts
src/app/service/contact.service.ts
+1
-2
No files found.
src/app/models/contact.model.ts
View file @
4fdd3fa9
...
...
@@ -6,7 +6,6 @@ export class Contact {
ctHead
:
string
;
ctStatus
:
number
;
sDate
:
string
;
remark
:
string
;
constructor
(
init
?:
Contact
){
Object
.
assign
(
this
,
init
);
this
.
id
=
1
;
...
...
@@ -16,6 +15,5 @@ export class Contact {
this
.
ctHead
=
''
;
this
.
ctStatus
=
0
;
this
.
sDate
=
''
;
this
.
remark
=
''
;
}
}
\ No newline at end of file
src/app/pages/admin-pending/admin-pending.component.html
View file @
4fdd3fa9
...
...
@@ -294,7 +294,7 @@
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
formControlName=
"
R
emark"
></textarea>
placeholder=
"......"
formControlName=
"
r
emark"
></textarea>
</div>
</div>
</div>
...
...
@@ -398,8 +398,8 @@
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
[(
ngModel
)]="
modelItemDetail
.
R
emark
"
formControlName=
"
R
emark"
></textarea>
placeholder=
"......"
[(
ngModel
)]="
modelItemDetail
.
r
emark
"
formControlName=
"
r
emark"
></textarea>
</div>
</div>
</div>
...
...
src/app/pages/admin-pending/admin-pending.component.ts
View file @
4fdd3fa9
...
...
@@ -100,7 +100,6 @@ export class AdminPendingComponent implements OnInit {
this
.
closeResult
=
`Dismissed
${
this
.
getDismissReason
(
reason
)}
`
;
});
}
date
=
'10-12-2561'
sDate
=
""
eDate
=
""
...
...
@@ -124,7 +123,7 @@ export class AdminPendingComponent implements OnInit {
sTime
:
new
FormControl
(
this
.
modelItemDetail
.
sTime
,
[
Validators
.
required
]),
eTime
:
new
FormControl
(
this
.
modelItemDetail
.
eTime
,
[
Validators
.
required
]),
Quantity
:
new
FormControl
(
this
.
modelItemDetail
.
Quantity
,
[
Validators
.
required
]),
R
emark
:
new
FormControl
(
this
.
modelItemDetail
.
remark
),
r
emark
:
new
FormControl
(
this
.
modelItemDetail
.
remark
),
eStatus
:
new
FormControl
(
this
.
modelItemDetail
.
eStatus
),
allDay
:
new
FormControl
(
this
.
modelItemDetail
.
allDay
),
returnItem
:
new
FormControl
(
this
.
modelItemDetail
.
returnItem
)
...
...
src/app/pages/contact-admin/contact-admin.component.html
View file @
4fdd3fa9
<div
class=
"content"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<div
class=
"row"
>
<div
class=
"col-6 md-1"
>
<label>
ชื่อผู้แจ้ง Bug:
</label>
<input
input
class=
" form-control"
placeholder=
""
type=
"text"
/>
</div>
<div
class=
"col-6 md-1"
>
<label
for=
"typeahead-focus"
>
หัวข้อการแจ้ง Bug:
</label>
<input
input
class=
" form-control"
placeholder=
""
type=
"text"
/>
</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
)]="
model
"
[
ngbTypeahead
]="
search
"
(
focus
)="
focus
$.
next
($
any
($
event
).
target
.
value
)"
(
click
)="
click
$.
next
($
any
($
event
).
target
.
value
)"
#
instance=
"ngbTypeahead"
/>
<form
[
formGroup
]="
myFormContact
"
>
<div
class=
"row"
>
<div
class=
"col-6 md-1"
>
<label>
ชื่อผู้แจ้ง Bug:
</label>
<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"
/>
</div>
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่มต้น
</label>
<input
type=
"date"
class=
"form-control"
value=
""
>
<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
"
[
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"
>
</div>
</div>
</div
>
<div
class=
" row
"
>
<div
class=
" col-md-12
"
>
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
></textarea
>
<div
class=
" row"
>
<div
class=
" col-md-12
"
>
<div
class=
" form-group
"
>
<label>
หมายเหตุ
</label
>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
formControlName=
"ctDesc"
></textarea>
</div
>
</div>
</div>
</
div
>
</
form
>
<div
class=
"card-footer"
>
<div
class=
"d-grid gap-2 d-md-flex justify-content-md-center"
>
<button
class=
"btn btn-primary btn-sm"
[
disabled
]=""
type=
"submit"
...
...
@@ -102,13 +104,13 @@
<h5
class=
" title"
>
รายละเอียดทั้งหมด
</h5>
</div>
<div
class=
" card-body"
>
<form
[
formGroup
]="
myF
ro
mContact
"
>
<form
[
formGroup
]="
myF
or
mContact
"
>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
ชื่อหัวข้อ
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
formControlName=
"
ctHead"
/>
formControlName=
"ctHead"
[(
ngModel
)]="
modelContact
.
ctHead
"
/>
</div>
</div>
</div>
...
...
@@ -117,7 +119,7 @@
<div
class=
" form-group"
>
<label>
หน้าต่างที่มี BUG
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
formControlName =
"
ctTab"
/>
formControlName=
"ctTab"
[(
ngModel
)]="
modelContact
.
ctTab
"
/>
</div>
</div>
</div>
...
...
@@ -126,14 +128,15 @@
<div
class=
" form-group"
>
<label>
ชื่อผู้แจ้ง
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
formControlName =
"
ctName"
/>
formControlName=
"ctName"
[(
ngModel
)]="
modelContact
.
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
)]="
sDate
"
formControlName=
"sDate"
/>
<input
readonly
type=
"date"
class=
"form-control"
[(
ngModel
)]="
modelContact
.
sDate
"
formControlName=
"sDate"
[(
ngModel
)]="
modelContact
.
sDate
"
/>
</div>
</div>
<div
class=
" row"
>
...
...
@@ -141,7 +144,7 @@
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
formControlName
=
"remark
"
></textarea>
placeholder=
"......"
formControlName
=
"ctDesc"
[(
ngModel
)]="
modelContact
.
ctDesc
"
></textarea>
</div>
</div>
</div>
...
...
@@ -159,7 +162,8 @@
</form>
<div
class=
" card-footer"
>
<button
class=
" btn btn-fill btn-danger"
type=
"submit"
(
click
)="
saveStatusContact
()"
>
บันทึก
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"cancel"
(
click
)="
modal
.
dismiss
('
Cross
click
')"
>
ยกเลิก
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"cancel"
(
click
)="
modal
.
dismiss
('
Cross
click
')"
>
ยกเลิก
</button>
</div>
</div>
</div>
...
...
src/app/pages/contact-admin/contact-admin.component.ts
View file @
4fdd3fa9
...
...
@@ -30,13 +30,13 @@ export class ContactAdminComponent implements OnInit {
modelContact
=
new
Contact
();
myF
ro
mContact
:
FormGroup
;
myF
or
mContact
:
FormGroup
;
sDate
=
""
;
@
ViewChild
(
'instance'
,
{
static
:
true
})
instance
:
NgbTypeahead
;
focus$
=
new
Subject
<
string
>
();
click$
=
new
Subject
<
string
>
();
sDate
:
string
;
constructor
(
private
ContactService
:
ContactService
,
private
modalService
:
NgbModal
)
{
}
...
...
@@ -44,6 +44,15 @@ export class ContactAdminComponent implements OnInit {
this
.
listContact
=
this
.
ContactService
.
getListContact
();
this
.
collectionSizeListRoom
=
this
.
listContact
.
length
;
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
)
});
}
search
:
OperatorFunction
<
string
,
readonly
string
[]
>
=
(
text
$
:
Observable
<
string
>
)
=>
{
...
...
@@ -73,13 +82,12 @@ export class ContactAdminComponent implements OnInit {
let
sDate
=
this
.
modelContact
.
sDate
.
split
(
'/'
)
this
.
sDate
=
sDate
[
0
]
+
"-"
+
sDate
[
1
]
+
"-"
+
sDate
[
2
]
this
.
myF
ro
mContact
=
new
FormGroup
({
this
.
myF
or
mContact
=
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
),
remark
:
new
FormControl
(
this
.
modelContact
.
remark
),
ctStatus
:
new
FormControl
(
this
.
modelContact
.
ctStatus
)
});
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
...
...
@@ -98,15 +106,12 @@ export class ContactAdminComponent implements OnInit {
saveStatusContact
()
{
console
.
log
(
"this.modelContact"
,
this
.
modelContact
)
console
.
log
(
"form"
,
this
.
myFromContact
)
this
.
modelContact
.
ctName
=
this
.
myFromContact
.
value
.
ctName
this
.
modelContact
.
ctDesc
=
this
.
myFromContact
.
value
.
ctDesc
this
.
modelContact
.
ctTab
=
this
.
myFromContact
.
value
.
ctTab
this
.
modelContact
.
ctHead
=
this
.
myFromContact
.
value
.
ctHead
this
.
modelContact
.
ctStatus
=
this
.
myFromContact
.
value
.
ctStatus
this
.
modelContact
.
sDate
=
this
.
myFromContact
.
value
.
sDate
console
.
log
(
"this.modelRoomDetail"
,
this
.
modelContact
)
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
();
...
...
src/app/service/contact.service.ts
View file @
4fdd3fa9
...
...
@@ -15,11 +15,10 @@ export class ContactService {
ctTab
:
'รายการอุปกรณ์'
,
ctHead
:
'กดจองไม่ได้'
,
ctStatus
:
0
,
remark
:
'test'
,
sDate
:
'2021/12/17'
},
]
addContact
(
model
:
Contact
)
{
this
.
listContact
.
push
(
model
);
}
...
...
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