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
74c076f9
Commit
74c076f9
authored
Feb 07, 2022
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update cal detail
parent
5b5cd234
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
56 deletions
+61
-56
roomDetail.model.ts
src/app/models/roomDetail.model.ts
+1
-0
equipment.component.ts
src/app/pages/equipment/equipment.component.ts
+0
-4
home-page-calendar.component.html
src/app/pages/home-page/home-page-calendar.component.html
+2
-0
home-page-lend-calendar.component.html
...pp/pages/home-page/home-page-lend-calendar.component.html
+7
-4
home-page.component.html
src/app/pages/home-page/home-page.component.html
+4
-4
home-page.component.ts
src/app/pages/home-page/home-page.component.ts
+47
-44
No files found.
src/app/models/roomDetail.model.ts
View file @
74c076f9
...
@@ -13,6 +13,7 @@ export class RoomDetail {
...
@@ -13,6 +13,7 @@ export class RoomDetail {
email
:
string
;
email
:
string
;
remark
:
string
;
remark
:
string
;
allDay
:
boolean
;
allDay
:
boolean
;
constructor
(
init
?:
RoomDetail
)
{
constructor
(
init
?:
RoomDetail
)
{
Object
.
assign
(
this
,
init
);
Object
.
assign
(
this
,
init
);
this
.
id
=
0
;
this
.
id
=
0
;
...
...
src/app/pages/equipment/equipment.component.ts
View file @
74c076f9
...
@@ -195,10 +195,6 @@ export class EquipmentComponent implements OnInit {
...
@@ -195,10 +195,6 @@ export class EquipmentComponent implements OnInit {
.
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
);
}
}
NgbdTimepickerBasic
()
{
}
saveEquirment
()
{
saveEquirment
()
{
this
.
equirmentService
.
addEquirment
(
this
.
modelEquirment
);
this
.
equirmentService
.
addEquirment
(
this
.
modelEquirment
);
...
...
src/app/pages/home-page/home-page-calendar.component.html
View file @
74c076f9
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
</button>
</button>
</div>
</div>
<div
class=
" modal-body"
>
<div
class=
" modal-body"
>
<img
style=
"object-fit: cover;"
[
src
]="
roomSelect
.
room
.
rPic
"
width=
"150px"
height=
"150px"
class=
"nav justify-content-center"
><br>
<div
class=
" row"
>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
...
...
src/app/pages/home-page/home-page-lend-calendar.component.html
View file @
74c076f9
...
@@ -5,11 +5,13 @@
...
@@ -5,11 +5,13 @@
</button>
</button>
</div>
</div>
<div
class=
" modal-body"
>
<div
class=
" modal-body"
>
<img
style=
"object-fit: cover;"
[
src
]="
itemSelect
.
equirments
.
eqPic
"
width=
"150px"
height=
"150px"
text-align =
"center"
class=
"nav justify-content-center"
><br>
<div
class=
" row"
>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
ชื่อผู้เบิก
</label>
<label>
ชื่อผู้เบิก
</label>
<input
readonly
class=
" form-control"
type=
"text"
value=
{{name}}
style=
"color: aliceblue;"
/>
<input
readonly
class=
" form-control"
type=
"text"
[
value
]="
itemSelect
.
userName
"
style=
"color: aliceblue;"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -17,20 +19,20 @@
...
@@ -17,20 +19,20 @@
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<label>
เบอร์โทร
</label>
<input
readonly
class=
" form-control"
type=
"text"
value=
{{telephone}}
style=
"color: aliceblue;"
/>
<input
readonly
class=
" form-control"
type=
"text"
[
value
]="
itemSelect
.
eTelephone
"
style=
"color: aliceblue;"
/>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-12 mb-1"
>
<div
class=
"col-sm-12 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
ชื่ออุปกรณ์
</label>
<label
for=
"exampleFormControlSelect1"
>
ชื่ออุปกรณ์
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
{{eqName}}
style=
"color: aliceblue;"
>
<input
readonly
class=
"form-control"
type=
"text"
[
value
]="
itemSelect
.
equirments
.
eqName
"
style=
"color: aliceblue;"
>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-12 mb-1"
>
<div
class=
"col-sm-12 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
จำนวน
</label>
<label
for=
"exampleFormControlSelect1"
>
จำนวน
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
{{quantity}}
style=
"color: aliceblue;"
>
<input
readonly
class=
"form-control"
type=
"text"
[
value
]="
itemSelect
.
quantity
"
style=
"color: aliceblue;"
>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/pages/home-page/home-page.component.html
View file @
74c076f9
...
@@ -69,17 +69,17 @@
...
@@ -69,17 +69,17 @@
<div
class=
"card-body"
>
<div
class=
"card-body"
>
<ul
ngbNav
#
nav=
"ngbNav"
[(
activeId
)]="
active
"
(
navChange
)="
onNavChange
($
event
)"
class=
"nav-tabs"
>
<ul
ngbNav
#
nav=
"ngbNav"
[(
activeId
)]="
active
"
(
navChange
)="
onNavChange
($
event
)"
class=
"nav-tabs"
>
<li
[
ngbNavItem
]="
1
"
>
<li
[
ngbNavItem
]="
1
"
>
<a
ngbNavLink
>
ปฏิทินการจอง
ห้อง
</a>
<a
ngbNavLink
>
ปฏิทินการจอง
</a>
<ng-template
ngbNavContent
>
<ng-template
ngbNavContent
>
<full-calendar
#
calendarBook
[
options
]="
calendarRoom
"
style=
"
<full-calendar
#
calendarBook
[
options
]="
calendarRoom
"
style=
"
margin-top: 20px;"
></full-calendar>
margin-top: 20px;"
*
ngIf=
"listRoomDetail.length > 0"
></full-calendar>
</ng-template>
</ng-template>
</li>
</li>
<li
[
ngbNavItem
]="
2
"
>
<li
[
ngbNavItem
]="
2
"
>
<a
ngbNavLink
>
ปฏิทินการยืม
รถ
</a>
<a
ngbNavLink
>
ปฏิทินการยืม
อุปกรณ์
</a>
<ng-template
ngbNavContent
>
<ng-template
ngbNavContent
>
<full-calendar
#
calendar
[
options
]="
calendarEquirment
"
style=
"
<full-calendar
#
calendar
[
options
]="
calendarEquirment
"
style=
"
margin-top: 20px;"
></full-calendar>
margin-top: 20px;"
*
ngIf=
"listRoomDetail.length > 0"
></full-calendar>
</ng-template>
</ng-template>
</li>
</li>
</ul>
</ul>
...
...
src/app/pages/home-page/home-page.component.ts
View file @
74c076f9
...
@@ -18,6 +18,7 @@ import { RoomDetail } from 'src/app/models/RoomDetail.model';
...
@@ -18,6 +18,7 @@ import { RoomDetail } from 'src/app/models/RoomDetail.model';
export
class
NgbdModalContent
{
export
class
NgbdModalContent
{
@
Input
()
roomSelect
:
RoomDetail
;
@
Input
()
roomSelect
:
RoomDetail
;
telephone
;
telephone
;
rPic
;
rName
;
rName
;
sTime
;
sTime
;
eTime
;
eTime
;
...
@@ -44,14 +45,15 @@ export class NgbdModalContent {
...
@@ -44,14 +45,15 @@ export class NgbdModalContent {
})
})
export
class
NgbdModalLendContent
{
export
class
NgbdModalLendContent
{
@
Input
()
name
;
@
Input
()
itemSelect
:
ItemDetail
;
telephone
;
telephone
;
eqPic
;
eqName
;
eqName
;
quantity
;
quantity
;
sDate
;
sDate
;
constructor
(
public
activeModal
:
NgbActiveModal
)
{
constructor
(
public
activeModal
:
NgbActiveModal
)
{
console
.
log
(
"name"
,
this
.
itemSelect
)
}
}
}
}
...
@@ -204,28 +206,9 @@ export class HomePageComponent implements OnInit {
...
@@ -204,28 +206,9 @@ export class HomePageComponent implements OnInit {
setTimeout
(
function
()
{
setTimeout
(
function
()
{
window
.
dispatchEvent
(
new
Event
(
'resize'
))
window
.
dispatchEvent
(
new
Event
(
'resize'
))
},
1
)
},
1
)
this
.
ItemDetailService
.
getListItemDetail
().
subscribe
(
result
=>
{
this
.
ItemDetailService
.
getListItemDetail
().
subscribe
(
result
=>
{
this
.
listItemDetail
=
result
;
this
.
listItemDetail
=
result
;
});
console
.
log
(
"2"
,
this
.
listItemDetail
)
this
.
RoomDetailService
.
getListRoomDetail
().
subscribe
(
result
=>
{
this
.
listRoomDetail
=
result
;
});
for
(
let
i
=
0
;
i
<
this
.
listRoomDetail
.
length
;
i
++
)
{
if
(
this
.
listRoomDetail
[
i
].
rStatus
==
0
)
{
this
.
eventRoom
.
push
({
id
:
this
.
listRoomDetail
[
i
].
id
,
title
:
this
.
listRoomDetail
[
i
].
room
.
rName
+
" ("
+
this
.
listRoomDetail
[
i
].
userName
+
")"
,
start
:
'2021-12-16T10:30:00'
,
end
:
'2021-12-16T11:30:00'
,
extendedProps
:
this
.
listRoomDetail
[
i
],
description
:
this
.
listRoomDetail
[
i
].
remark
,
allDay
:
this
.
listRoomDetail
[
i
].
allDay
}
)
}
}
for
(
let
i
=
0
;
i
<
this
.
listItemDetail
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
listItemDetail
.
length
;
i
++
)
{
if
(
this
.
listItemDetail
[
i
].
eStatus
==
0
)
{
if
(
this
.
listItemDetail
[
i
].
eStatus
==
0
)
{
this
.
eventEquirment
.
push
({
this
.
eventEquirment
.
push
({
...
@@ -242,34 +225,52 @@ export class HomePageComponent implements OnInit {
...
@@ -242,34 +225,52 @@ export class HomePageComponent implements OnInit {
}
}
}
}
this
.
calendarEquirment
=
{
this
.
calendarRoom
=
{
initialView
:
'dayGridMonth'
,
initialView
:
'dayGridMonth'
,
themeSystem
:
'bootstrap'
,
themeSystem
:
'bootstrap'
,
dayMaxEventRows
:
true
,
dayMaxEventRows
:
true
,
locale
:
"th"
,
locale
:
"th"
,
events
:
this
.
eventRoom
,
events
:
this
.
eventEquirment
,
eventClick
:
this
.
handleDateClick
.
bind
(
this
),
eventClick
:
this
.
handleLendClick
.
bind
(
this
),
// this.selectedRoomDetail = info.event.extendedProps;
};
// console.log(this.selectedRoomDetail)
// this.test();
// // alert('Coordinates: ' + info.jsEvent.pageX + ',' + info.jsEvent.pageY);
// // alert('View: ' + info.view.type);
// // // change the border color just for fun
// // info.el.style.borderColor = 'red';
// }
});
};
this
.
RoomDetailService
.
getListRoomDetail
().
subscribe
(
result
=>
{
this
.
listRoomDetail
=
result
;
console
.
log
(
"1"
,
this
.
listRoomDetail
)
for
(
let
i
=
0
;
i
<
this
.
listRoomDetail
.
length
;
i
++
)
{
if
(
this
.
listRoomDetail
[
i
].
rStatus
==
0
)
{
this
.
eventRoom
.
push
({
id
:
this
.
listRoomDetail
[
i
].
id
,
title
:
this
.
listRoomDetail
[
i
].
room
.
rName
+
" ("
+
this
.
listRoomDetail
[
i
].
userName
+
")"
,
start
:
'2021-12-16T10:30:00'
,
end
:
'2021-12-16T11:30:00'
,
extendedProps
:
this
.
listRoomDetail
[
i
],
description
:
this
.
listRoomDetail
[
i
].
remark
,
allDay
:
this
.
listRoomDetail
[
i
].
allDay
}
)
}
this
.
calendarEquirment
=
{
}
this
.
calendarRoom
=
{
initialView
:
'dayGridMonth'
,
initialView
:
'dayGridMonth'
,
themeSystem
:
'bootstrap'
,
themeSystem
:
'bootstrap'
,
dayMaxEventRows
:
true
,
dayMaxEventRows
:
true
,
locale
:
"th"
,
locale
:
"th"
,
events
:
this
.
eventEquirment
,
events
:
this
.
eventRoom
,
eventClick
:
this
.
handleLend
Click
.
bind
(
this
),
eventClick
:
this
.
handleDate
Click
.
bind
(
this
),
};
};
});
}
}
test
()
{
test
()
{
...
@@ -297,10 +298,11 @@ export class HomePageComponent implements OnInit {
...
@@ -297,10 +298,11 @@ export class HomePageComponent implements OnInit {
eventLendShow
()
{
eventLendShow
()
{
const
modalRef
=
this
.
modalService
.
open
(
NgbdModalLendContent
);
const
modalRef
=
this
.
modalService
.
open
(
NgbdModalLendContent
);
modalRef
.
componentInstance
.
name
=
this
.
selectedItemDetail
.
userName
;
modalRef
.
componentInstance
.
itemSelect
=
this
.
selectedItemDetail
;
modalRef
.
componentInstance
.
telephone
=
this
.
selectedItemDetail
.
eTelephone
;
// modalRef.componentInstance.name = this.selectedItemDetail.userName;
modalRef
.
componentInstance
.
eqName
=
this
.
selectedItemDetail
.
equirments
.
eqName
;
// modalRef.componentInstance.telephone = this.selectedItemDetail.eTelephone;
modalRef
.
componentInstance
.
quantity
=
this
.
selectedItemDetail
.
quantity
;
// modalRef.componentInstance.eqName = this.selectedItemDetail.equirments.eqName;
modalRef
.
componentInstance
.
sDate
=
this
.
selectedRoomDetail
.
sDate
;
// modalRef.componentInstance.quantity = this.selectedItemDetail.quantity;
// modalRef.componentInstance.sDate = this.selectedRoomDetail.sDate;
}
}
}
}
\ No newline at end of file
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