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
513f6499
Commit
513f6499
authored
Dec 09, 2021
by
Chanachai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update แก้ไขข้อมูลที่หายไป
parent
e8f906c9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
21 deletions
+58
-21
admin-pending.component.ts
src/app/pages/admin-pending/admin-pending.component.ts
+15
-15
pending.component.html
src/app/pages/pending/pending.component.html
+4
-4
pending.component.ts
src/app/pages/pending/pending.component.ts
+39
-2
No files found.
src/app/pages/admin-pending/admin-pending.component.ts
View file @
513f6499
...
...
@@ -51,8 +51,8 @@ export class AdminPendingComponent implements OnInit {
modelEquirment
=
new
Equirment
();
modelRoom
=
new
MyRoom
();
model
i
temDetail
=
new
ItemDetail
();
model
r
oomDetail
=
new
RoomDetail
();
model
I
temDetail
=
new
ItemDetail
();
model
R
oomDetail
=
new
RoomDetail
();
collectionSize
=
this
.
listitemDetail
.
length
;
hoveredDate
:
NgbDate
|
null
=
null
;
...
...
@@ -66,7 +66,7 @@ export class AdminPendingComponent implements OnInit {
let
timeSplit
=
time
.
split
(
":"
)
item
.
hour
=
parseInt
(
timeSplit
[
0
])
item
.
minute
=
parseInt
(
timeSplit
[
1
])
console
.
log
(
this
.
model
r
oomDetail
)
console
.
log
(
this
.
model
R
oomDetail
)
}
...
...
@@ -107,12 +107,12 @@ export class AdminPendingComponent implements OnInit {
sDate
=
""
eDate
=
""
openItemDetail
(
content
:
string
,
item
:
ItemDetail
)
{
this
.
model
i
temDetail
=
item
;
this
.
thStime
=
this
.
model
itemDetail
.
sTime
.
hour
+
':'
+
this
.
modeli
temDetail
.
sTime
.
minute
this
.
thEtime
=
this
.
model
itemDetail
.
eTime
.
hour
+
':'
+
this
.
modeli
temDetail
.
eTime
.
minute
let
SDate
=
this
.
model
i
temDetail
.
sDate
.
split
(
'/'
)
this
.
model
I
temDetail
=
item
;
this
.
thStime
=
this
.
model
ItemDetail
.
sTime
.
hour
+
':'
+
this
.
modelI
temDetail
.
sTime
.
minute
this
.
thEtime
=
this
.
model
ItemDetail
.
eTime
.
hour
+
':'
+
this
.
modelI
temDetail
.
eTime
.
minute
let
SDate
=
this
.
model
I
temDetail
.
sDate
.
split
(
'/'
)
this
.
sDate
=
SDate
[
2
]
+
"-"
+
SDate
[
1
]
+
"-"
+
SDate
[
0
]
let
EDate
=
this
.
model
i
temDetail
.
eDate
.
split
(
'/'
)
let
EDate
=
this
.
model
I
temDetail
.
eDate
.
split
(
'/'
)
this
.
eDate
=
EDate
[
2
]
+
"-"
+
EDate
[
1
]
+
"-"
+
EDate
[
0
]
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
...
...
@@ -126,21 +126,21 @@ export class AdminPendingComponent implements OnInit {
let
dates
=
Dates
[
2
]
+
"/"
+
Dates
[
1
]
+
"/"
+
Dates
[
0
]
if
(
item2
==
"sdate"
){
this
.
model
i
temDetail
.
sDate
=
dates
this
.
model
I
temDetail
.
sDate
=
dates
}
if
(
item2
==
"edate"
){
this
.
model
i
temDetail
.
eDate
=
dates
this
.
model
I
temDetail
.
eDate
=
dates
}
console
.
log
(
this
.
sDate
)
}
openRoomDetail
(
content
:
string
,
item
:
RoomDetail
)
{
this
.
model
r
oomDetail
=
item
;
this
.
thStime
=
this
.
model
roomDetail
.
sTime
.
hour
+
':'
+
this
.
modelr
oomDetail
.
sTime
.
minute
this
.
thEtime
=
this
.
model
roomDetail
.
eTime
.
hour
+
':'
+
this
.
modelr
oomDetail
.
eTime
.
minute
let
SDate
=
this
.
model
r
oomDetail
.
sDate
.
split
(
'/'
)
this
.
model
R
oomDetail
=
item
;
this
.
thStime
=
this
.
model
RoomDetail
.
sTime
.
hour
+
':'
+
this
.
modelR
oomDetail
.
sTime
.
minute
this
.
thEtime
=
this
.
model
RoomDetail
.
eTime
.
hour
+
':'
+
this
.
modelR
oomDetail
.
eTime
.
minute
let
SDate
=
this
.
model
R
oomDetail
.
sDate
.
split
(
'/'
)
this
.
sDate
=
SDate
[
2
]
+
"-"
+
SDate
[
1
]
+
"-"
+
SDate
[
0
]
let
EDate
=
this
.
model
r
oomDetail
.
eDate
.
split
(
'/'
)
let
EDate
=
this
.
model
R
oomDetail
.
eDate
.
split
(
'/'
)
this
.
eDate
=
EDate
[
2
]
+
"-"
+
EDate
[
1
]
+
"-"
+
EDate
[
0
]
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
...
...
src/app/pages/pending/pending.component.html
View file @
513f6499
...
...
@@ -90,8 +90,8 @@
<td>
{{ item.room.rName }}
</td>
<td>
{{ item.room.rDesc }}
</td>
<td>
{{ item.userName }}
</td>
<td>
{{ item.sDate }} {{ item.sTime.hour }}:{{ item.sTime.minute }}
</td>
<td>
{{ item.eDate }} {{ item.eTime.hour }}:{{ item.eTime.minute }}
</td>
<td>
{{ item.sDate
.replaceAll("/","-")
}} {{ item.sTime.hour }}:{{ item.sTime.minute }}
</td>
<td>
{{ item.eDate
.replaceAll("/","-")
}} {{ item.eTime.hour }}:{{ item.eTime.minute }}
</td>
<td>
{{ item.rStatus }}
</td>
<div
class=
"col-auto align-self-sm-center"
>
<button
type=
"button"
class=
"btn btn-info btn-sm btn-circle "
...
...
@@ -148,8 +148,8 @@
<td>
{{ item.equirment.eqName }}
</td>
<td>
{{ item.equirment.eqDesc }}
</td>
<td>
{{ item.userName }}
</td>
<td>
{{ item.sDate }} {{ item.sTime.hour }}:{{ item.sTime.minute }}
</td>
<td>
{{ item.eDate }} {{ item.eTime.hour }}:{{ item.eTime.minute }}
</td>
<td>
{{ item.sDate
.replaceAll("/","-")
}} {{ item.sTime.hour }}:{{ item.sTime.minute }}
</td>
<td>
{{ item.eDate
.replaceAll("/","-")
}} {{ item.eTime.hour }}:{{ item.eTime.minute }}
</td>
<td>
{{ item.Quantity }}
</td>
<td>
{{ item.eStatus }}
</td>
<div
class=
"col-auto align-self-sm-center"
>
...
...
src/app/pages/pending/pending.component.ts
View file @
513f6499
...
...
@@ -59,6 +59,15 @@ export class PendingComponent implements OnInit {
fromDate
:
NgbDate
|
null
;
toDate
:
NgbDate
|
null
;
thStime
:
string
;
thEtime
:
string
;
thtimeChange
(
time
:
string
,
item
:
any
){
let
timeSplit
=
time
.
split
(
":"
)
item
.
hour
=
parseInt
(
timeSplit
[
0
])
item
.
minute
=
parseInt
(
timeSplit
[
1
])
console
.
log
(
this
.
modelRoomDetail
)
}
constructor
(
private
calendar
:
NgbCalendar
,
public
formatter
:
NgbDateParserFormatter
,
private
modalService
:
NgbModal
,
private
ItemDetailService
:
ItemDetailService
,
private
RoomDetailService
:
RoomDetailService
)
{
this
.
fromDate
=
calendar
.
getToday
();
this
.
toDate
=
calendar
.
getNext
(
calendar
.
getToday
(),
'd'
,
10
);
...
...
@@ -92,6 +101,11 @@ export class PendingComponent implements OnInit {
openItemDetail
(
content
:
string
,
item
:
ItemDetail
)
{
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
(
'/'
)
console
.
log
(
item
);
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
...
...
@@ -99,10 +113,20 @@ export class PendingComponent implements OnInit {
this
.
closeResult
=
`Dismissed
${
this
.
getDismissReason
(
reason
)}
`
;
});
}
date
=
'10-12-2561'
show
(
a
:
string
){
console
.
log
(
a
)
}
sDate
=
""
eDate
=
""
openRoomDetail
(
content
:
string
,
item
:
RoomDetail
)
{
this
.
modelRoomDetail
=
item
;
console
.
log
(
item
);
this
.
thStime
=
this
.
modelRoomDetail
.
sTime
.
hour
+
':'
+
this
.
modelRoomDetail
.
sTime
.
minute
this
.
thEtime
=
this
.
modelRoomDetail
.
eTime
.
hour
+
':'
+
this
.
modelRoomDetail
.
eTime
.
minute
let
SDate
=
this
.
modelRoomDetail
.
sDate
.
split
(
'/'
)
this
.
sDate
=
SDate
[
2
]
+
"-"
+
SDate
[
1
]
+
"-"
+
SDate
[
0
]
let
EDate
=
this
.
modelRoomDetail
.
eDate
.
split
(
'/'
)
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
},
(
reason
)
=>
{
...
...
@@ -110,6 +134,19 @@ export class PendingComponent implements OnInit {
});
}
rDate
(
item
:
string
,
item2
:
string
){
let
Dates
=
item
.
split
(
"-"
)
let
dates
=
Dates
[
2
]
+
"/"
+
Dates
[
1
]
+
"/"
+
Dates
[
0
]
if
(
item2
==
"sdate"
){
this
.
modelItemDetail
.
sDate
=
dates
}
if
(
item2
==
"edate"
){
this
.
modelItemDetail
.
eDate
=
dates
}
console
.
log
(
this
.
sDate
)
}
private
getDismissReason
(
reason
:
any
):
string
{
if
(
reason
===
ModalDismissReasons
.
ESC
)
{
...
...
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