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
0a2da74a
Commit
0a2da74a
authored
Dec 13, 2021
by
DESKTOP-HF0LVOG\myhr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update หน้าเบิกให้สามารถเบิกได้ ติด การจอง
parent
05949bf0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
30 deletions
+51
-30
itemDetail.model.ts
src/app/models/itemDetail.model.ts
+2
-2
roomDetail.model.ts
src/app/models/roomDetail.model.ts
+4
-2
equipment.component.html
src/app/pages/equipment/equipment.component.html
+14
-2
equipment.component.ts
src/app/pages/equipment/equipment.component.ts
+6
-0
pending.component.html
src/app/pages/pending/pending.component.html
+8
-8
pending.component.ts
src/app/pages/pending/pending.component.ts
+3
-2
item-detail.service.ts
src/app/service/item-detail.service.ts
+6
-6
room-detail.service.ts
src/app/service/room-detail.service.ts
+8
-8
No files found.
src/app/models/itemDetail.model.ts
View file @
0a2da74a
...
...
@@ -16,7 +16,7 @@ export class ItemDetail {
minute
:
number
;
second
:
number
;
};
eStatus
:
string
;
eStatus
:
number
;
Quantity
:
string
;
eTelephone
:
string
;
email
:
string
;
...
...
@@ -28,7 +28,7 @@ export class ItemDetail {
this
.
userName
=
''
;
this
.
sDate
=
''
;
this
.
eDate
=
''
;
this
.
eStatus
=
''
;
this
.
eStatus
=
0
;
this
.
Quantity
=
''
;
this
.
eTelephone
=
''
;
this
.
email
=
''
;
...
...
src/app/models/roomDetail.model.ts
View file @
0a2da74a
import
{
Room
}
from
"./rooms.model"
;
export
class
RoomDetail
{
Id
?:
number
;
room
:
Room
;
...
...
@@ -16,7 +18,7 @@ export class RoomDetail {
minute
:
number
;
second
:
number
;
};
rStatus
:
string
;
rStatus
:
number
;
rTelephone
:
string
;
email
:
string
;
Remark
:
string
;
...
...
@@ -27,7 +29,7 @@ export class RoomDetail {
this
.
userName
=
''
;
this
.
sDate
=
''
;
this
.
eDate
=
''
;
this
.
rStatus
=
''
;
this
.
rStatus
=
0
;
this
.
rTelephone
=
''
;
this
.
email
=
''
;
this
.
Remark
=
''
;
...
...
src/app/pages/equipment/equipment.component.html
View file @
0a2da74a
...
...
@@ -257,7 +257,7 @@
<div
class=
" form-group"
>
<label>
ชื่อผู้จอง
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
formControlName=
"userNameForm"
/>
[(
ngModel
)]="
modelRoomDetail
.
userName
"
formControlName=
"userNameForm"
/>
<div
style=
"color: red;"
*
ngIf=
"myFormRoom.controls.userNameForm.status=='INVALID'"
>
กรุณากรอกชื่อผู้จอง.
</div>
</div>
...
...
@@ -330,7 +330,7 @@
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<ngb-timepicker
[(
ngModel
)]="
modelRoomDetail
.
e
t
ime
"
formControlName=
"eTime"
>
<ngb-timepicker
[(
ngModel
)]="
modelRoomDetail
.
e
T
ime
"
formControlName=
"eTime"
>
</ngb-timepicker>
<div
style=
"color: red;"
*
ngIf=
"myFormRoom.controls.eTime.status=='INVALID'"
>
กรุณากรอกเวลาที่สิ้นสุดการจอง.
...
...
@@ -380,6 +380,18 @@
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
อีเมลผู้เบิก
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
[(
ngModel
)]="
modelItemDetail
.
email
"
formControlName=
"email"
/>
<div
style=
"color: red;"
*
ngIf=
"myFormEquir.controls.email.status=='INVALID'"
>
กรุณากรอกอีเมล.
</div>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
[(
ngModel
)]="
modelItemDetail
.
eTelephone
"
formControlName=
"eTelephone"
/>
...
...
src/app/pages/equipment/equipment.component.ts
View file @
0a2da74a
...
...
@@ -176,9 +176,15 @@ export class EquipmentComponent implements OnInit {
}
saveBook
()
{
this
.
modelRoomDetail
.
sDate
=
this
.
modelRoomDetail
.
sDate
.
split
(
"-"
)[
2
]
+
"/"
+
this
.
modelRoomDetail
.
sDate
.
split
(
"-"
)[
1
]
+
"/"
+
this
.
modelRoomDetail
.
sDate
.
split
(
"-"
)[
0
];
this
.
modelRoomDetail
.
eDate
=
this
.
modelRoomDetail
.
eDate
.
split
(
"-"
)[
2
]
+
"/"
+
this
.
modelRoomDetail
.
eDate
.
split
(
"-"
)[
1
]
+
"/"
+
this
.
modelRoomDetail
.
eDate
.
split
(
"-"
)[
0
];
this
.
modelRoomDetail
.
rStatus
=
0
;
this
.
RoomDetailService
.
addRoomDetail
(
this
.
modelRoomDetail
);
this
.
modalService
.
dismissAll
();
this
.
ngOnInit
();
}
}
src/app/pages/pending/pending.component.html
View file @
0a2da74a
...
...
@@ -90,11 +90,11 @@
<td>
{{ item.room.rName }}
</td>
<td>
{{ item.room.rDesc }}
</td>
<td>
{{ item.userName }}
</td>
<td>
{{ item.sDate
.replaceAll("/","-")
}} {{ item.sTime.hour }}:{{
<td>
{{ item.sDate
| date : 'dd-MM-yyyy'
}} {{ item.sTime.hour }}:{{
item.sTime.minute }}
</td>
<td>
{{ item.eDate
.replaceAll("/","-")
}} {{ item.eTime.hour }}:{{
<td>
{{ item.eDate
| date : 'dd-MM-yyyy'
}} {{ item.eTime.hour }}:{{
item.eTime.minute }}
</td>
<td>
{{ item.rStatus }}
</td>
<td>
{{ item.rStatus
==0 ? "รอดำเนินการ" : "อนุมัติ"
}}
</td>
<div
class=
"col-auto align-self-sm-center"
>
<button
type=
"button"
class=
"btn btn-info btn-sm btn-circle "
style=
"line-height: 0px"
(
click
)="
openRoomDetail
(
Room
,
item
)"
><i
...
...
@@ -110,7 +110,7 @@
<ng-template
ngbPaginationPrevious
>
Previous
</ng-template>
<ng-template
ngbPaginationNext
>
Next
</ng-template>
</ngb-pagination>
<select
class=
"custom-select"
style=
"width: auto"
[(
ngModel
)]="
pageSizeListRoom
"
(
ngModelChange
)="
pageListRoom=
1"
>
<option
[
ngValue
]="
10
"
>
10 items per page
</option>
...
...
@@ -153,12 +153,12 @@
<td>
{{ item.equirment.eqName }}
</td>
<td>
{{ item.equirment.eqDesc }}
</td>
<td>
{{ item.userName }}
</td>
<td>
{{ item.sDate
.replaceAll("/","-")
}} {{ item.sTime.hour }}:{{
<td>
{{ item.sDate
| date : 'dd-MM-yyyy'
}} {{ item.sTime.hour }}:{{
item.sTime.minute }}
</td>
<td>
{{ item.eDate
.replaceAll("/","-")
}} {{ item.eTime.hour }}:{{
<td>
{{ item.eDate
| date : 'dd-MM-yyyy'
}} {{ item.eTime.hour }}:{{
item.eTime.minute }}
</td>
<td>
{{ item.Quantity }}
</td>
<td>
{{ item.eStatus }}
</td>
<td>
{{ item.eStatus
==0 ? "รอดำเนินการ" : "อนุมัติ"
}}
</td>
<div
class=
"col-auto align-self-sm-center"
>
<button
type=
"button"
class=
"btn btn-info btn-sm btn-circle "
style=
"line-height: 0px"
(
click
)="
openItemDetail
(
lend
,
item
)"
><i
...
...
@@ -174,7 +174,7 @@
<ng-template
ngbPaginationPrevious
>
Previous
</ng-template>
<ng-template
ngbPaginationNext
>
Next
</ng-template>
</ngb-pagination>
<select
class=
"custom-select"
style=
"width: auto"
[(
ngModel
)]="
pageSizeListRoom
"
(
ngModelChange
)="
pageListRoom=
1"
>
<option
[
ngValue
]="
10
"
>
10 items per page
</option>
...
...
src/app/pages/pending/pending.component.ts
View file @
0a2da74a
...
...
@@ -114,6 +114,7 @@ export class PendingComponent implements OnInit {
this
.
modelItemDetail
=
item
;
this
.
thStime
=
this
.
modelItemDetail
.
sTime
.
hour
+
':'
+
this
.
modelItemDetail
.
sTime
.
minute
this
.
thEtime
=
this
.
modelItemDetail
.
eTime
.
hour
+
':'
+
this
.
modelItemDetail
.
eTime
.
minute
let
SDate
=
this
.
modelItemDetail
.
sDate
.
split
(
'/'
)
this
.
sDate
=
SDate
[
2
]
+
"-"
+
SDate
[
1
]
+
"-"
+
SDate
[
0
]
let
EDate
=
this
.
modelItemDetail
.
eDate
.
split
(
'/'
)
...
...
@@ -139,6 +140,7 @@ export class PendingComponent implements OnInit {
},
(
reason
)
=>
{
this
.
closeResult
=
`Dismissed
${
this
.
getDismissReason
(
reason
)}
`
;
});
console
.
log
(
"date"
,
this
.
sDate
)
}
rDate
(
item
:
string
,
item2
:
string
){
...
...
@@ -151,7 +153,6 @@ export class PendingComponent implements OnInit {
if
(
item2
==
"edate"
){
this
.
modelItemDetail
.
eDate
=
dates
}
console
.
log
(
this
.
sDate
)
}
...
...
@@ -186,7 +187,7 @@ export class PendingComponent implements OnInit {
this
.
listItemDetail
=
this
.
ItemDetailService
.
getListItemDetail
();
this
.
listRoomDetail
=
this
.
RoomDetailService
.
getListRoomDetail
();
this
.
collectionSizeListRoom
=
this
.
listRoomDetail
.
length
;
console
.
log
(
this
.
list
Ite
mDetail
);
console
.
log
(
this
.
list
Roo
mDetail
);
}
}
...
...
src/app/service/item-detail.service.ts
View file @
0a2da74a
...
...
@@ -18,8 +18,8 @@ export class ItemDetailService {
eqPic
:
"assets/img/mou.jpg"
},
userName
:
'เกม'
,
sDate
:
'
10/12/2560
'
,
eDate
:
'
10/11/256
1'
,
sDate
:
'
09/12/2021
'
,
eDate
:
'
09/12/202
1'
,
sTime
:
{
hour
:
22
,
minute
:
30
,
...
...
@@ -30,7 +30,7 @@ export class ItemDetailService {
minute
:
30
,
second
:
0
},
eStatus
:
'รอการอนุมัติ'
,
eStatus
:
0
,
Quantity
:
'1'
,
eTelephone
:
'0123456789'
,
email
:
'qwerty@qwerty'
,
...
...
@@ -46,8 +46,8 @@ export class ItemDetailService {
eqPic
:
"assets/img/notebook.jpg"
},
userName
:
'แป๊ะ'
,
sDate
:
'
13/12/2560
'
,
eDate
:
'
13/12/256
1'
,
sDate
:
'
09/12/2021
'
,
eDate
:
'
09/12/202
1'
,
sTime
:
{
hour
:
22
,
minute
:
30
,
...
...
@@ -58,7 +58,7 @@ export class ItemDetailService {
minute
:
30
,
second
:
0
},
eStatus
:
'รอการอนุมัติ'
,
eStatus
:
1
,
Quantity
:
'1'
,
eTelephone
:
'0123456789'
,
email
:
'qwerty@qwerty'
,
...
...
src/app/service/room-detail.service.ts
View file @
0a2da74a
...
...
@@ -19,8 +19,8 @@ export class RoomDetailService {
rDesc
:
"จำนวนคน 25 คน"
,
},
userName
:
'เกม'
,
sDate
:
'
10/12/2560
'
,
eDate
:
'
10/11/2561
'
,
sDate
:
'
2021/12/09
'
,
eDate
:
'
2021/12/09
'
,
sTime
:
{
hour
:
22
,
minute
:
30
,
...
...
@@ -31,7 +31,7 @@ export class RoomDetailService {
minute
:
30
,
second
:
0
},
rStatus
:
'รอการอนุมัติ'
,
rStatus
:
1
,
rTelephone
:
'0123456789'
,
email
:
'qwerty@qwerty'
,
Remark
:
'test'
,
...
...
@@ -47,8 +47,8 @@ export class RoomDetailService {
rDesc
:
"จำนวนคน 50 คน"
,
},
userName
:
'เกม'
,
sDate
:
'
10/12/2560
'
,
eDate
:
'
10/11/2561
'
,
sDate
:
'
2021/12/09
'
,
eDate
:
'
2021/12/09
'
,
sTime
:
{
hour
:
22
,
minute
:
30
,
...
...
@@ -59,7 +59,7 @@ export class RoomDetailService {
minute
:
30
,
second
:
0
},
rStatus
:
'รอการอนุมัติ'
,
rStatus
:
1
,
rTelephone
:
'0123456789'
,
email
:
'qwerty@qwerty'
,
Remark
:
'test'
,
...
...
@@ -72,9 +72,9 @@ export class RoomDetailService {
}
addRoomDetail
(
model
:
RoomDetail
)
{
console
.
log
(
this
.
listRoomDetail
);
this
.
listRoomDetail
.
push
(
model
);
console
.
log
(
this
.
listRoomDetail
);
}
getListRoomDetail
()
{
...
...
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