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
716d2d9e
Commit
716d2d9e
authored
Dec 13, 2021
by
Chanachai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add หน้าสามารถเปลี่ยนหน้าได้
parent
79a0101a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
141 additions
and
18 deletions
+141
-18
admin-equirment.component.ts
src/app/pages/admin-equirment/admin-equirment.component.ts
+1
-0
equipment.component.html
src/app/pages/equipment/equipment.component.html
+12
-11
equipment.component.ts
src/app/pages/equipment/equipment.component.ts
+11
-2
equirment.service.ts
src/app/service/equirment.service.ts
+113
-1
item-detail.service.ts
src/app/service/item-detail.service.ts
+4
-4
No files found.
src/app/pages/admin-equirment/admin-equirment.component.ts
View file @
716d2d9e
...
...
@@ -63,6 +63,7 @@ export class AdminEquirmentComponent implements OnInit {
this
.
listEquirmentModel
=
this
.
equirmentService
.
getListEquirment
();
this
.
listRoomModel
=
this
.
roomService
.
getListRoom
();
this
.
collectionSizeListRoom
=
this
.
listRoomModel
.
length
this
.
collectionSize
=
this
.
listEquirmentModel
.
length
console
.
log
(
"listRoom"
,
this
.
listRoomModel
)
this
.
myFormRoom
=
new
FormGroup
({
userNameForm
:
new
FormControl
(
''
,[
Validators
.
required
]),
...
...
src/app/pages/equipment/equipment.component.html
View file @
716d2d9e
...
...
@@ -23,7 +23,7 @@
(
click
)="
Ropen
(
contentroom
)"
>
เพิ่มรายการ
</button>
<div
class=
"row"
>
<div
class=
"col-sm-3"
*
ngFor=
"let item of listRoomModel"
>
<div
class=
"col-sm-3"
*
ngFor=
"let item of listRoomModel
|slice: (pageListRoom-1) * pageSizeListRoom :(pageListRoom-1) * pageSizeListRoom + pageSizeListRoom ;let i = index
"
>
<div
class=
"card"
style=
"
padding: 10px;"
>
<div
class=
"card-body"
>
...
...
@@ -47,12 +47,13 @@
</div>
<div
class=
"d-flex justify-content-between p-2"
>
<ngb-pagination
[
collectionSize
]="
collectionSize
"
[(
page
)]="
page
"
[
pageSize
]="
pageSize
"
(
pageChange
)="
refreshCountries
()"
>
<ngb-pagination
[
collectionSize
]="
collectionSizeListRoom
"
[(
page
)]="
pageListRoom
"
[
pageSize
]="
pageSizeListRoom
"
>
<ng-template
ngbPaginationPrevious
>
Previous
</ng-template>
<ng-template
ngbPaginationNext
>
Next
</ng-template>
</ngb-pagination>
<select
class=
"custom-select"
style=
"width: auto"
[(
ngModel
)]="
pageSize
"
(
ngModelChange
)="
refreshCountries
()"
>
<select
class=
"custom-select"
style=
"width: auto"
[(
ngModel
)]="
pageSizeListRoom
"
(
ngModelChange
)="
pageListRoom=
1"
>
<option
[
ngValue
]="
10
"
>
10 items per page
</option>
<option
[
ngValue
]="
50
"
>
50 items per page
</option>
<option
[
ngValue
]="
100
"
>
100 items per page
</option>
...
...
@@ -76,7 +77,7 @@
(
click
)="
Eopen
(
contentequirment
)"
>
เพิ่มรายการ
</button>
<div
class=
"row"
>
<div
class=
"col-sm-3"
*
ngFor=
"let item of listEquirmentModel"
>
<div
class=
"col-sm-3"
*
ngFor=
"let item of listEquirmentModel
|slice: (page-1) * pageSize :(page-1) * pageSize + pageSize ;let i = index
"
>
<div
class=
"card"
style=
"
padding: 10px;"
>
<div
class=
"card-body"
>
...
...
@@ -101,18 +102,18 @@
</div>
<div
class=
"d-flex justify-content-between p-2"
>
<ngb-pagination
[
collectionSize
]="
collectionSize
"
[(
page
)]="
page
"
[
pageSize
]="
pageSize
"
(
pageChange
)="
refreshCountries
()"
>
<ngb-pagination
[
collectionSize
]="
collectionSize
"
[(
page
)]="
page
"
[
pageSize
]="
pageSize
"
>
<ng-template
ngbPaginationPrevious
>
Previous
</ng-template>
<ng-template
ngbPaginationNext
>
Next
</ng-template>
</ngb-pagination>
<select
class=
"custom-select"
style=
"width: auto"
[(
ngModel
)]="
pageSize
"
(
ngModelChange
)="
refreshCountries
()
"
>
(
ngModelChange
)="
page=
1
"
>
<option
[
ngValue
]="
10
"
>
10 items per page
</option>
<option
[
ngValue
]="
50
"
>
50 items per page
</option>
<option
[
ngValue
]="
100
"
>
100 items per page
</option>
</select>
</div>
</div>
</div>
</div>
...
...
src/app/pages/equipment/equipment.component.ts
View file @
716d2d9e
...
...
@@ -18,14 +18,21 @@ import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'
})
export
class
EquipmentComponent
implements
OnInit
{
time
=
{
hour
:
13
,
minute
:
30
};
closeResult
=
''
;
page
=
1
;
pageSize
=
10
;
collectionSize
=
0
;
closeResult
=
''
;
pageListRoom
=
1
;
pageSizeListRoom
=
10
;
collectionSizeListRoom
=
0
;
listEquirmentModel
:
Equirment
[]
=
[];
listRoomModel
:
Room
[]
=
[];
collectionSize
=
this
.
listEquirmentModel
.
length
;
listItemDetail
:
ItemDetail
[]
=
[];
listRoomDetail
:
RoomDetail
[]
=
[];
modelEquirment
=
new
Equirment
();
modelRoom
=
new
MyRoom
();
...
...
@@ -55,6 +62,8 @@ export class EquipmentComponent implements OnInit {
ngOnInit
()
{
this
.
listEquirmentModel
=
this
.
equirmentService
.
getListEquirment
();
this
.
listRoomModel
=
this
.
roomService
.
getListRoom
();
this
.
collectionSizeListRoom
=
this
.
listRoomModel
.
length
this
.
collectionSize
=
this
.
listEquirmentModel
.
length
this
.
myFormRoom
=
new
FormGroup
({
userNameForm
:
new
FormControl
(
''
,[
Validators
.
required
]),
rTelephone
:
new
FormControl
(
''
,[
Validators
.
required
]),
...
...
src/app/service/equirment.service.ts
View file @
716d2d9e
...
...
@@ -36,7 +36,119 @@ export class EquirmentService {
eqDesc
:
"..."
,
eqType
:
"it"
,
eqPic
:
"assets/img/keyboard.png"
}
},
{
eqId
:
1
,
eqName
:
"จอคอมพิวเตอร์"
,
eqDesc
:
"หน้าจอขนาด 22 นิ้ว"
,
eqType
:
"it"
,
eqPic
:
"assets/img/mo1.jpg"
},
{
eqId
:
2
,
eqName
:
"เมาส์"
,
eqDesc
:
"..."
,
eqType
:
"it"
,
eqPic
:
"assets/img/mou.jpg"
},
{
eqId
:
3
,
eqName
:
"โน๊ตบุ๊ค"
,
eqDesc
:
"หน้าจอขนาด 20 นิ้ว"
,
eqType
:
"it"
,
eqPic
:
"assets/img/notebook.jpg"
},
{
eqId
:
4
,
eqName
:
"คีย์บอร์ด"
,
eqDesc
:
"..."
,
eqType
:
"it"
,
eqPic
:
"assets/img/keyboard.png"
},
{
eqId
:
1
,
eqName
:
"จอคอมพิวเตอร์"
,
eqDesc
:
"หน้าจอขนาด 22 นิ้ว"
,
eqType
:
"it"
,
eqPic
:
"assets/img/mo1.jpg"
},
{
eqId
:
2
,
eqName
:
"เมาส์"
,
eqDesc
:
"..."
,
eqType
:
"it"
,
eqPic
:
"assets/img/mou.jpg"
},
{
eqId
:
3
,
eqName
:
"โน๊ตบุ๊ค"
,
eqDesc
:
"หน้าจอขนาด 20 นิ้ว"
,
eqType
:
"it"
,
eqPic
:
"assets/img/notebook.jpg"
},
{
eqId
:
4
,
eqName
:
"คีย์บอร์ด"
,
eqDesc
:
"..."
,
eqType
:
"it"
,
eqPic
:
"assets/img/keyboard.png"
},
{
eqId
:
1
,
eqName
:
"จอคอมพิวเตอร์"
,
eqDesc
:
"หน้าจอขนาด 22 นิ้ว"
,
eqType
:
"it"
,
eqPic
:
"assets/img/mo1.jpg"
},
{
eqId
:
2
,
eqName
:
"เมาส์"
,
eqDesc
:
"..."
,
eqType
:
"it"
,
eqPic
:
"assets/img/mou.jpg"
},
{
eqId
:
3
,
eqName
:
"โน๊ตบุ๊ค"
,
eqDesc
:
"หน้าจอขนาด 20 นิ้ว"
,
eqType
:
"it"
,
eqPic
:
"assets/img/notebook.jpg"
},
{
eqId
:
4
,
eqName
:
"คีย์บอร์ด"
,
eqDesc
:
"..."
,
eqType
:
"it"
,
eqPic
:
"assets/img/keyboard.png"
},
{
eqId
:
1
,
eqName
:
"จอคอมพิวเตอร์"
,
eqDesc
:
"หน้าจอขนาด 22 นิ้ว"
,
eqType
:
"it"
,
eqPic
:
"assets/img/mo1.jpg"
},
{
eqId
:
2
,
eqName
:
"เมาส์"
,
eqDesc
:
"..."
,
eqType
:
"it"
,
eqPic
:
"assets/img/mou.jpg"
},
{
eqId
:
3
,
eqName
:
"โน๊ตบุ๊ค"
,
eqDesc
:
"หน้าจอขนาด 20 นิ้ว"
,
eqType
:
"it"
,
eqPic
:
"assets/img/notebook.jpg"
},
{
eqId
:
4
,
eqName
:
"คีย์บอร์ด"
,
eqDesc
:
"..."
,
eqType
:
"it"
,
eqPic
:
"assets/img/keyboard.png"
},
]
addEquirment
(
model
:
Equirment
)
{
...
...
src/app/service/item-detail.service.ts
View file @
716d2d9e
...
...
@@ -18,8 +18,8 @@ export class ItemDetailService {
eqPic
:
"assets/img/mou.jpg"
},
userName
:
'เกม'
,
sDate
:
'
2021/12/14
'
,
eDate
:
'
2021/12/14
'
,
sDate
:
'
09/12/2021
'
,
eDate
:
'
09/12/2021
'
,
sTime
:
{
hour
:
22
,
minute
:
30
,
...
...
@@ -46,8 +46,8 @@ export class ItemDetailService {
eqPic
:
"assets/img/notebook.jpg"
},
userName
:
'แป๊ะ'
,
sDate
:
'
2021/12/14
'
,
eDate
:
'
2021/12/14
'
,
sDate
:
'
09/12/2021
'
,
eDate
:
'
09/12/2021
'
,
sTime
:
{
hour
:
22
,
minute
:
30
,
...
...
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