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
37cab6c1
Commit
37cab6c1
authored
Dec 03, 2021
by
Chanachai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ปุ่มอนุมัติได้
parent
c709d9e1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
10 deletions
+47
-10
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
+40
-4
equipment.component.ts
src/app/pages/equipment/equipment.component.ts
+0
-0
pending.component.html
src/app/pages/pending/pending.component.html
+7
-6
No files found.
src/app/pages/admin-pending/admin-pending.component.html
View file @
37cab6c1
This diff is collapsed.
Click to expand it.
src/app/pages/admin-pending/admin-pending.component.ts
View file @
37cab6c1
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
NgbDate
,
NgbCalendar
,
NgbDateParserFormatter
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
NgbModal
,
ModalDismissReasons
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
Equirment
}
from
'src/app/models/equirment.model'
;
import
{
itemDetail
}
from
'src/app/models/itemDetail.model'
;
import
{
itemDetailService
}
from
'src/app/service/item-detail.service'
;
import
{
roomDetail
}
from
'src/app/models/roomDetail.model'
;
import
{
roomDetailService
}
from
'src/app/service/room-detail.service'
;
import
{
Room
}
from
'src/app/models/rooms.model'
;
@
Component
({
selector
:
'app-admin-pending'
,
...
...
@@ -41,21 +46,28 @@ export class AdminPendingComponent implements OnInit {
closeResult
=
''
;
item
:
itemDetail
[]
=
[];
listitemDetail
:
itemDetail
[]
=
[];
listroomDetail
:
roomDetail
[]
=
[];
collectionSize
=
this
.
item
.
length
;
modelEquirment
=
new
Equirment
();
modelRoom
=
new
Room
();
modelitemDetail
=
new
itemDetail
();
modelroomDetail
=
new
roomDetail
();
collectionSize
=
this
.
listitemDetail
.
length
;
hoveredDate
:
NgbDate
|
null
=
null
;
fromDate
:
NgbDate
|
null
;
toDate
:
NgbDate
|
null
;
constructor
(
private
calendar
:
NgbCalendar
,
public
formatter
:
NgbDateParserFormatter
,
private
modalService
:
NgbModal
)
{
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
);
this
.
refreshitemDetail
();
}
refreshitemDetail
()
{
this
.
item
=
this
.
item
this
.
listitemDetail
=
this
.
listitemDetail
.
map
((
country
,
i
)
=>
({
id
:
i
+
1
,
...
country
}))
.
slice
((
this
.
page
-
1
)
*
this
.
pageSize
,
(
this
.
page
-
1
)
*
this
.
pageSize
+
this
.
pageSize
);
}
...
...
@@ -79,6 +91,26 @@ export class AdminPendingComponent implements OnInit {
});
}
openItemDetail
(
content
:
string
,
item
:
itemDetail
)
{
this
.
modelitemDetail
=
item
;
console
.
log
(
item
);
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
},
(
reason
)
=>
{
this
.
closeResult
=
`Dismissed
${
this
.
getDismissReason
(
reason
)}
`
;
});
}
openRoomDetail
(
content
:
string
,
item
:
roomDetail
)
{
this
.
modelroomDetail
=
item
;
console
.
log
(
item
);
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
},
(
reason
)
=>
{
this
.
closeResult
=
`Dismissed
${
this
.
getDismissReason
(
reason
)}
`
;
});
}
private
getDismissReason
(
reason
:
any
):
string
{
if
(
reason
===
ModalDismissReasons
.
ESC
)
{
return
'by pressing ESC'
;
...
...
@@ -107,8 +139,12 @@ export class AdminPendingComponent implements OnInit {
}
ngOnInit
():
void
{
this
.
listitemDetail
=
this
.
itemDetailService
.
getListitemDetail
();
this
.
listroomDetail
=
this
.
roomDetailService
.
getListroomDetail
();
console
.
log
(
this
.
listitemDetail
);
}
}
export
class
NgbdDropdownBasic
{
...
...
src/app/pages/equipment/equipment.component.ts
View file @
37cab6c1
src/app/pages/pending/pending.component.html
View file @
37cab6c1
...
...
@@ -182,9 +182,9 @@
<div
[
ngbNavOutlet
]="
nav
"
></div>
</div>
<ng-template
#
Room
let-modal
style=
"padding: 0; "
>
<div
class=
" col-md-12"
>
<div
class=
"card"
>
<ng-template
#
Room
let-modal
>
<div
class=
" col-md-12"
style=
"padding: 0; "
>
<div
class=
"card"
style=
"margin: 0; "
>
<div
class=
" card-header"
>
<h5
class=
" title"
>
การจอง
</h5>
</div>
...
...
@@ -253,9 +253,9 @@
</div>
</ng-template>
<ng-template
#
lend
let-modal
style=
"padding: 0; "
>
<div
class=
" col-md-12"
>
<div
class=
"card"
>
<ng-template
#
lend
let-modal
>
<div
class=
" col-md-12"
style=
"padding: 0; "
>
<div
class=
"card"
style=
"margin: 0; "
>
<div
class=
" card-header"
>
<h5
class=
" title"
>
Lend Equirment
</h5>
</div>
...
...
@@ -329,3 +329,4 @@
</div>
</div>
</ng-template>
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