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
bb2ef4af
Commit
bb2ef4af
authored
Dec 09, 2021
by
Chanachai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ปุ่มค้นหาสามารถเอาข้อมูลมา
parent
2886356c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
65 additions
and
10 deletions
+65
-10
app.module.ts
src/app/app.module.ts
+3
-0
rooms.model.ts
src/app/models/rooms.model.ts
+1
-0
admin-equirment.component.html
src/app/pages/admin-equirment/admin-equirment.component.html
+0
-0
admin-equirment.component.ts
src/app/pages/admin-equirment/admin-equirment.component.ts
+18
-3
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
+41
-3
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 @
bb2ef4af
...
...
@@ -23,6 +23,8 @@ import { AdminPendingComponent } from './pages/admin-pending/admin-pending.compo
import
{
PendingComponent
}
from
'./pages/pending/pending.component'
;
import
{
AdminEquirmentComponent
}
from
'./pages/admin-equirment/admin-equirment.component'
;
import
{
ReactiveFormsModule
}
from
'@angular/forms'
;
FullCalendarModule
.
registerPlugins
([
// register FullCalendar plugins
dayGridPlugin
,
interactionPlugin
...
...
@@ -39,6 +41,7 @@ FullCalendarModule.registerPlugins([ // register FullCalendar plugins
AppRoutingModule
,
ToastrModule
.
forRoot
(),
FullCalendarModule
,
ReactiveFormsModule
,
],
declarations
:
[
AppComponent
,
AdminLayoutComponent
,
AuthLayoutComponent
,
HomePageComponent
,
EquipmentComponent
,
CalenRoomComponent
,
AdminPendingComponent
,
PendingComponent
,
AdminEquirmentComponent
],
providers
:
[],
...
...
src/app/models/rooms.model.ts
View file @
bb2ef4af
...
...
@@ -11,6 +11,7 @@ export class Room {
Object
.
assign
(
this
,
init
);
this
.
rId
=
0
;
this
.
rName
=
''
;
this
.
rType
=
''
;
this
.
rPic
=
''
;
this
.
roomLimit
=
0
;
this
.
rDesc
=
''
;
...
...
src/app/pages/admin-equirment/admin-equirment.component.html
View file @
bb2ef4af
This diff is collapsed.
Click to expand it.
src/app/pages/admin-equirment/admin-equirment.component.ts
View file @
bb2ef4af
...
...
@@ -7,6 +7,7 @@ import { Room } from 'src/app/models/rooms.model';
import
{
EquirmentService
}
from
'src/app/service/equirment.service'
;
import
{
RoomService
}
from
'src/app/service/room.service'
;
import
{
roomDetailService
}
from
'src/app/service/room-detail.service'
;
import
{
FormBuilder
,
FormGroup
}
from
'@angular/forms'
;
@
Component
({
selector
:
'app-admin-equirment'
,
...
...
@@ -14,6 +15,7 @@ import { roomDetailService } from 'src/app/service/room-detail.service';
styleUrls
:
[
'./admin-equirment.component.scss'
]
})
export
class
AdminEquirmentComponent
implements
OnInit
{
myForm
:
FormGroup
;
time
=
{
hour
:
13
,
minute
:
30
};
page
=
1
;
pageSize
=
10
;
...
...
@@ -33,8 +35,21 @@ export class AdminEquirmentComponent implements OnInit {
modelitemDetail
=
new
itemDetail
();
modelroomDetail
=
new
roomDetail
();
constructor
(
private
modalService
:
NgbModal
,
private
equirmentService
:
EquirmentService
,
private
roomService
:
RoomService
,
private
roomDetailService
:
roomDetailService
)
{
constructor
(
private
modalService
:
NgbModal
,
private
equirmentService
:
EquirmentService
,
private
roomService
:
RoomService
,
private
roomDetailService
:
roomDetailService
,
private
fb
:
FormBuilder
)
{
this
.
myForm
=
this
.
fb
.
group
({
firstName
:
''
,
lastName
:
''
,
email
:
''
,
phone
:
''
,
address
:
this
.
fb
.
group
({
address1
:
''
,
address2
:
''
,
province
:
''
,
postalCode
:
''
})
});
this
.
myForm
.
valueChanges
.
subscribe
(
console
.
log
);
}
ngOnInit
()
{
...
...
@@ -144,7 +159,7 @@ export class AdminEquirmentComponent implements OnInit {
}
editRoom
()
{
this
.
room
Service
.
editroom
(
this
.
modelRoom
);
this
.
room
DetailService
.
editroomDetail
(
this
.
modelroomDetail
);
this
.
modalService
.
dismissAll
();
this
.
ngOnInit
();
}
...
...
src/app/pages/admin-pending/admin-pending.component.html
View file @
bb2ef4af
This diff is collapsed.
Click to expand it.
src/app/pages/admin-pending/admin-pending.component.ts
View file @
bb2ef4af
...
...
@@ -60,6 +60,16 @@ export class AdminPendingComponent 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
);
...
...
@@ -90,10 +100,20 @@ export class AdminPendingComponent implements OnInit {
this
.
closeResult
=
`Dismissed
${
this
.
getDismissReason
(
reason
)}
`
;
});
}
date
=
'10-12-2561'
show
(
a
:
string
){
console
.
log
(
a
)
}
sDate
=
""
eDate
=
""
openItemDetail
(
content
:
string
,
item
:
itemDetail
)
{
this
.
modelitemDetail
=
item
;
console
.
log
(
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
.
closeResult
=
`Closed with:
${
result
}
`
;
},
(
reason
)
=>
{
...
...
@@ -101,9 +121,27 @@ export class AdminPendingComponent 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
)
}
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
.
eDate
=
EDate
[
2
]
+
"-"
+
EDate
[
1
]
+
"-"
+
EDate
[
0
]
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
},
(
reason
)
=>
{
...
...
src/app/service/room-detail.service.ts
View file @
bb2ef4af
...
...
@@ -13,7 +13,7 @@ export class roomDetailService {
room
:
{
rId
:
1
,
rName
:
"ห้องเดียว"
,
rType
:
"ห้อง"
,
rType
:
"ห้อง"
,
rPic
:
"assets/img/room.jpg"
,
roomLimit
:
25
,
rDesc
:
"จำนวนคน 25 คน"
,
...
...
@@ -39,7 +39,7 @@ export class roomDetailService {
room
:
{
rId
:
2
,
rName
:
"ห้องคู่"
,
rType
:
"ห้อง"
,
rType
:
"ห้อง"
,
rPic
:
"assets/img/room.jpg"
,
roomLimit
:
50
,
rDesc
:
"จำนวนคน 50 คน"
,
...
...
src/app/service/room.service.ts
View file @
bb2ef4af
...
...
@@ -3,8 +3,6 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
import
{
Room
,
SearchRoomModel
}
from
'../models/rooms.model'
;
import
{
roomDetail
}
from
'../models/roomDetail.model'
;
@
Injectable
({
providedIn
:
'root'
})
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