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
a1386f08
Commit
a1386f08
authored
Dec 09, 2021
by
DESKTOP-HF0LVOG\myhr
Browse files
Options
Browse Files
Download
Plain Diff
updae code
parents
937f7353
bb2ef4af
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
29 deletions
+67
-29
app.module.ts
src/app/app.module.ts
+2
-0
admin-pending.component.html
src/app/pages/admin-pending/admin-pending.component.html
+0
-0
admin-pending.component.ts
src/app/pages/admin-pending/admin-pending.component.ts
+63
-25
room-detail.service.ts
src/app/service/room-detail.service.ts
+2
-2
room.service.ts
src/app/service/room.service.ts
+0
-2
No files found.
src/app/app.module.ts
View file @
a1386f08
...
@@ -23,6 +23,8 @@ import { AdminPendingComponent } from './pages/admin-pending/admin-pending.compo
...
@@ -23,6 +23,8 @@ import { AdminPendingComponent } from './pages/admin-pending/admin-pending.compo
import
{
PendingComponent
}
from
'./pages/pending/pending.component'
;
import
{
PendingComponent
}
from
'./pages/pending/pending.component'
;
import
{
AdminEquirmentComponent
}
from
'./pages/admin-equirment/admin-equirment.component'
;
import
{
AdminEquirmentComponent
}
from
'./pages/admin-equirment/admin-equirment.component'
;
import
{
ReactiveFormsModule
}
from
'@angular/forms'
;
FullCalendarModule
.
registerPlugins
([
// register FullCalendar plugins
FullCalendarModule
.
registerPlugins
([
// register FullCalendar plugins
dayGridPlugin
,
dayGridPlugin
,
interactionPlugin
interactionPlugin
...
...
src/app/pages/admin-pending/admin-pending.component.html
View file @
a1386f08
This diff is collapsed.
Click to expand it.
src/app/pages/admin-pending/admin-pending.component.ts
View file @
a1386f08
...
@@ -2,11 +2,11 @@ import { Component, OnInit } from '@angular/core';
...
@@ -2,11 +2,11 @@ import { Component, OnInit } from '@angular/core';
import
{
NgbDate
,
NgbCalendar
,
NgbDateParserFormatter
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
NgbDate
,
NgbCalendar
,
NgbDateParserFormatter
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
NgbModal
,
ModalDismissReasons
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
NgbModal
,
ModalDismissReasons
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
Equirment
}
from
'src/app/models/equirment.model'
;
import
{
Equirment
}
from
'src/app/models/equirment.model'
;
import
{
ItemDetail
}
from
'src/app/models/I
temDetail.model'
;
import
{
itemDetail
}
from
'src/app/models/i
temDetail.model'
;
import
{
I
temDetailService
}
from
'src/app/service/item-detail.service'
;
import
{
i
temDetailService
}
from
'src/app/service/item-detail.service'
;
import
{
RoomDetail
}
from
'src/app/models/R
oomDetail.model'
;
import
{
roomDetail
}
from
'src/app/models/r
oomDetail.model'
;
import
{
R
oomDetailService
}
from
'src/app/service/room-detail.service'
;
import
{
r
oomDetailService
}
from
'src/app/service/room-detail.service'
;
import
{
MyRoom
,
Room
}
from
'src/app/models/rooms.model'
;
import
{
Room
}
from
'src/app/models/rooms.model'
;
@
Component
({
@
Component
({
selector
:
'app-admin-pending'
,
selector
:
'app-admin-pending'
,
...
@@ -46,28 +46,38 @@ export class AdminPendingComponent implements OnInit {
...
@@ -46,28 +46,38 @@ export class AdminPendingComponent implements OnInit {
closeResult
=
''
;
closeResult
=
''
;
list
ItemDetail
:
I
temDetail
[]
=
[];
list
itemDetail
:
i
temDetail
[]
=
[];
list
RoomDetail
:
R
oomDetail
[]
=
[];
list
roomDetail
:
r
oomDetail
[]
=
[];
modelEquirment
=
new
Equirment
();
modelEquirment
=
new
Equirment
();
modelRoom
=
new
My
Room
();
modelRoom
=
new
Room
();
model
ItemDetail
=
new
I
temDetail
();
model
itemDetail
=
new
i
temDetail
();
model
RoomDetail
=
new
R
oomDetail
();
model
roomDetail
=
new
r
oomDetail
();
collectionSize
=
this
.
list
I
temDetail
.
length
;
collectionSize
=
this
.
list
i
temDetail
.
length
;
hoveredDate
:
NgbDate
|
null
=
null
;
hoveredDate
:
NgbDate
|
null
=
null
;
fromDate
:
NgbDate
|
null
;
fromDate
:
NgbDate
|
null
;
toDate
:
NgbDate
|
null
;
toDate
:
NgbDate
|
null
;
constructor
(
private
calendar
:
NgbCalendar
,
public
formatter
:
NgbDateParserFormatter
,
private
modalService
:
NgbModal
,
private
ItemDetailService
:
ItemDetailService
,
private
RoomDetailService
:
RoomDetailService
)
{
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
.
fromDate
=
calendar
.
getToday
();
this
.
toDate
=
calendar
.
getNext
(
calendar
.
getToday
(),
'd'
,
10
);
this
.
toDate
=
calendar
.
getNext
(
calendar
.
getToday
(),
'd'
,
10
);
this
.
refresh
I
temDetail
();
this
.
refresh
i
temDetail
();
}
}
refresh
I
temDetail
()
{
refresh
i
temDetail
()
{
this
.
list
ItemDetail
=
this
.
listI
temDetail
this
.
list
itemDetail
=
this
.
listi
temDetail
.
map
((
country
,
i
)
=>
({
id
:
i
+
1
,
...
country
}))
.
map
((
country
,
i
)
=>
({
id
:
i
+
1
,
...
country
}))
.
slice
((
this
.
page
-
1
)
*
this
.
pageSize
,
(
this
.
page
-
1
)
*
this
.
pageSize
+
this
.
pageSize
);
.
slice
((
this
.
page
-
1
)
*
this
.
pageSize
,
(
this
.
page
-
1
)
*
this
.
pageSize
+
this
.
pageSize
);
}
}
...
@@ -90,10 +100,20 @@ export class AdminPendingComponent implements OnInit {
...
@@ -90,10 +100,20 @@ export class AdminPendingComponent implements OnInit {
this
.
closeResult
=
`Dismissed
${
this
.
getDismissReason
(
reason
)}
`
;
this
.
closeResult
=
`Dismissed
${
this
.
getDismissReason
(
reason
)}
`
;
});
});
}
}
date
=
'10-12-2561'
openItemDetail
(
content
:
string
,
item
:
ItemDetail
)
{
show
(
a
:
string
){
this
.
modelItemDetail
=
item
;
console
.
log
(
a
)
console
.
log
(
item
);
}
sDate
=
""
eDate
=
""
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
(
'/'
)
this
.
eDate
=
EDate
[
2
]
+
"-"
+
EDate
[
1
]
+
"-"
+
EDate
[
0
]
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
this
.
closeResult
=
`Closed with:
${
result
}
`
;
},
(
reason
)
=>
{
},
(
reason
)
=>
{
...
@@ -101,9 +121,27 @@ export class AdminPendingComponent implements OnInit {
...
@@ -101,9 +121,27 @@ export class AdminPendingComponent implements OnInit {
});
});
}
}
openRoomDetail
(
content
:
string
,
item
:
RoomDetail
)
{
rDate
(
item
:
string
,
item2
:
string
){
this
.
modelRoomDetail
=
item
;
let
Dates
=
item
.
split
(
"-"
)
console
.
log
(
item
);
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
)
}
openRoomDetail
(
content
:
string
,
item
:
roomDetail
)
{
this
.
modelroomDetail
=
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
.
eDate
=
EDate
[
2
]
+
"-"
+
EDate
[
1
]
+
"-"
+
EDate
[
0
]
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
this
.
closeResult
=
`Closed with:
${
result
}
`
;
},
(
reason
)
=>
{
},
(
reason
)
=>
{
...
@@ -139,9 +177,9 @@ export class AdminPendingComponent implements OnInit {
...
@@ -139,9 +177,9 @@ export class AdminPendingComponent implements OnInit {
}
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
list
ItemDetail
=
this
.
ItemDetailService
.
getListI
temDetail
();
this
.
list
itemDetail
=
this
.
itemDetailService
.
getListi
temDetail
();
this
.
list
RoomDetail
=
this
.
RoomDetailService
.
getListR
oomDetail
();
this
.
list
roomDetail
=
this
.
roomDetailService
.
getListr
oomDetail
();
console
.
log
(
this
.
list
I
temDetail
);
console
.
log
(
this
.
list
i
temDetail
);
}
}
...
...
src/app/service/room-detail.service.ts
View file @
a1386f08
...
@@ -13,7 +13,7 @@ export class RoomDetailService {
...
@@ -13,7 +13,7 @@ export class RoomDetailService {
room
:
{
room
:
{
rId
:
1
,
rId
:
1
,
rName
:
"ห้องเดียว"
,
rName
:
"ห้องเดียว"
,
rType
:
"ห้อง"
,
rType
:
"ห้อง"
,
rPic
:
"assets/img/room.jpg"
,
rPic
:
"assets/img/room.jpg"
,
roomLimit
:
25
,
roomLimit
:
25
,
rDesc
:
"จำนวนคน 25 คน"
,
rDesc
:
"จำนวนคน 25 คน"
,
...
@@ -40,7 +40,7 @@ export class RoomDetailService {
...
@@ -40,7 +40,7 @@ export class RoomDetailService {
room
:
{
room
:
{
rId
:
2
,
rId
:
2
,
rName
:
"ห้องคู่"
,
rName
:
"ห้องคู่"
,
rType
:
"ห้อง"
,
rType
:
"ห้อง"
,
rPic
:
"assets/img/room.jpg"
,
rPic
:
"assets/img/room.jpg"
,
roomLimit
:
50
,
roomLimit
:
50
,
rDesc
:
"จำนวนคน 50 คน"
,
rDesc
:
"จำนวนคน 50 คน"
,
...
...
src/app/service/room.service.ts
View file @
a1386f08
...
@@ -3,8 +3,6 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
...
@@ -3,8 +3,6 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
import
{
Room
,
SearchRoomModel
}
from
'../models/rooms.model'
;
import
{
Room
,
SearchRoomModel
}
from
'../models/rooms.model'
;
import
{
RoomDetail
}
from
'../models/RoomDetail.model'
;
import
{
RoomDetail
}
from
'../models/RoomDetail.model'
;
@
Injectable
({
providedIn
:
'root'
})
@
Injectable
({
providedIn
:
'root'
})
export
class
RoomService
{
export
class
RoomService
{
...
...
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