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
f25fa6ac
Commit
f25fa6ac
authored
Dec 20, 2021
by
Chanachai
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update กดบันทึกแล้วข้อมูลขึ้น
parent
352a8acf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
11 deletions
+41
-11
contact.model.ts
src/app/models/contact.model.ts
+12
-0
contact-admin.component.html
src/app/pages/contact-admin/contact-admin.component.html
+17
-9
contact.service.ts
src/app/service/contact.service.ts
+11
-1
room.service.ts
src/app/service/room.service.ts
+1
-1
No files found.
src/app/models/contact.model.ts
View file @
f25fa6ac
...
@@ -17,3 +17,14 @@ export class Contact {
...
@@ -17,3 +17,14 @@ export class Contact {
this
.
sDate
=
''
;
this
.
sDate
=
''
;
}
}
}
}
export
interface
SearchContactModel
{
sDate
:
string
;
}
export
class
SearchContactModel
{
constructor
(
init
?:
SearchContactModel
)
{
Object
.
assign
(
this
,
init
);
this
.
sDate
=
''
}
}
\ No newline at end of file
src/app/pages/contact-admin/contact-admin.component.html
View file @
f25fa6ac
...
@@ -2,20 +2,26 @@
...
@@ -2,20 +2,26 @@
<div
class=
"card"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<div
class=
"card-body"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-
4
md-1"
>
<div
class=
"col-
6
md-1"
>
<label>
ชื่อผู้แจ้ง Bug:
</label>
<label>
ชื่อผู้แจ้ง Bug:
</label>
<input
input
class=
" form-control"
placeholder=
""
type=
"text"
/>
<input
input
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelContact
.
ctName
"
/>
</div>
</div>
<div
class=
"col-
4
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"
/>
<input
input
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelContact
.
ctHead
"
/>
</div>
</div>
<div
class=
"col-4 md-1"
>
</div>
<div
class=
"row"
>
<div
class=
"col-6 md-1"
>
<label
for=
"typeahead-focus"
>
หน้าต่างที่ต้องการแจ้ง Bug:
</label>
<label
for=
"typeahead-focus"
>
หน้าต่างที่ต้องการแจ้ง Bug:
</label>
<input
id=
"typeahead-focus"
type=
"text"
class=
"form-control"
[(
ngModel
)]="
model
"
<input
id=
"typeahead-focus"
type=
"text"
class=
"form-control"
[(
ngModel
)]="
model
Contact
.
ctTab
"
[
ngbTypeahead
]="
search
"
(
focus
)="
focus
$.
next
($
any
($
event
).
target
.
value
)"
[
ngbTypeahead
]="
search
"
(
focus
)="
focus
$.
next
($
any
($
event
).
target
.
value
)"
(
click
)="
click
$.
next
($
any
($
event
).
target
.
value
)"
#
instance=
"ngbTypeahead"
/>
(
click
)="
click
$.
next
($
any
($
event
).
target
.
value
)"
#
instance=
"ngbTypeahead"
/>
</div>
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่มต้น
</label>
<input
type=
"date"
class=
"form-control"
value=
""
[(
ngModel
)]="
modelContact
.
sDate
"
>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
...
@@ -28,8 +34,10 @@
...
@@ -28,8 +34,10 @@
</div>
</div>
<div
class=
"card-footer"
>
<div
class=
"card-footer"
>
<div
class=
"d-grid gap-2 d-md-flex justify-content-md-center"
>
<div
class=
"d-grid gap-2 d-md-flex justify-content-md-center"
>
<button
class=
"btn btn-primary btn-sm"
type=
"submit"
[
disabled
]=""
(
click
)="
saveContact
()"
>
บันทึก
</button>
<button
class=
"btn btn-primary btn-sm"
[
disabled
]=""
type=
"submit"
<button
class=
"btn btn-primary btn-sm"
type=
"cancel"
(
click
)="
model
.
dismiss
('
Cross
click
')"
>
ยกเลิก
</button>
(
click
)="
saveContact
()"
>
บันทึก
</button>
<button
class=
"btn btn-primary btn-sm"
type=
"cancel"
(
click
)="
model
.
dismiss
('
Cross
click
')"
>
ยกเลิก
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -102,7 +110,6 @@
...
@@ -102,7 +110,6 @@
[(
ngModel
)]="
modelContact
.
ctHead
"
/>
[(
ngModel
)]="
modelContact
.
ctHead
"
/>
</div>
</div>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
...
@@ -130,4 +137,5 @@
...
@@ -130,4 +137,5 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</ng-template>
</ng-template>
src/app/service/contact.service.ts
View file @
f25fa6ac
import
{
HttpClient
}
from
'@angular/common/http'
;
import
{
HttpClient
}
from
'@angular/common/http'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Contact
}
from
"../models/contact.model"
;
import
{
Contact
,
SearchContactModel
}
from
"../models/contact.model"
;
@
Injectable
({
providedIn
:
'root'
})
@
Injectable
({
providedIn
:
'root'
})
export
class
ContactService
{
export
class
ContactService
{
...
@@ -25,5 +25,15 @@ export class ContactService {
...
@@ -25,5 +25,15 @@ export class ContactService {
getListContact
()
{
getListContact
()
{
return
this
.
listContact
;
return
this
.
listContact
;
}
}
searchListContact
(
searchModel
:
SearchContactModel
)
{
this
.
http
.
get
(
this
.
url
+
'&startDate='
+
searchModel
.
sDate
.
split
(
"-"
)[
2
]
+
'-'
+
searchModel
.
sDate
.
split
(
"-"
)[
1
]
+
'-'
+
searchModel
.
sDate
.
split
(
"-"
)[
0
]
).
subscribe
((
response
:
any
)
=>
{
console
.
log
(
response
);
this
.
listContact
=
response
;
},
error
=>
{
console
.
log
(
error
)
alert
(
"ไม่สามารถค้นหาได้ เนื่องจาก :
\
n"
+
error
.
message
)
})
}
}
}
src/app/service/room.service.ts
View file @
f25fa6ac
...
@@ -220,7 +220,7 @@ export class RoomService {
...
@@ -220,7 +220,7 @@ export class RoomService {
this
.
listRoomSearch
=
response
;
this
.
listRoomSearch
=
response
;
},
error
=>
{
},
error
=>
{
console
.
log
(
error
)
console
.
log
(
error
)
alert
(
"ไม่สามารถค้นหาห้องประ
ข
ุมที่ว่างได้ เนื่องจาก :
\
n"
+
error
.
message
)
alert
(
"ไม่สามารถค้นหาห้องประ
ช
ุมที่ว่างได้ เนื่องจาก :
\
n"
+
error
.
message
)
})
})
}
}
...
...
Chanachai
@chanachai.pmg.eng
mentioned in commit
903cd10c
Dec 20, 2021
mentioned in commit
903cd10c
mentioned in commit 903cd10caa3c48a77e415e0c2737d155f0b54140
Toggle commit list
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