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
d83e7382
Commit
d83e7382
authored
Nov 26, 2021
by
Chanachai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
เพิ่มให้มีอุปกรณ์หลายประเภท
parent
0d804d73
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
22 deletions
+44
-22
equipment.component.html
src/app/pages/equipment/equipment.component.html
+0
-0
equipment.component.ts
src/app/pages/equipment/equipment.component.ts
+44
-22
keyboard.png
src/assets/img/keyboard.png
+0
-0
No files found.
src/app/pages/equipment/equipment.component.html
View file @
d83e7382
This diff is collapsed.
Click to expand it.
src/app/pages/equipment/equipment.component.ts
View file @
d83e7382
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
NgbModal
,
ModalDismissReasons
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
NgbModal
,
ModalDismissReasons
}
from
'@ng-bootstrap/ng-bootstrap'
;
interface
Country
{
id
?:
number
;
equip
:
string
;
interface
EquirmentModel
{
id
:
number
;
name
:
string
;
sdate
:
string
;
edate
:
string
;
desc
:
string
;
type
:
string
;
pic
:
string
;
}
const
COUNTRIES
:
Country
[]
=
[
{
equip
:
'string'
,
name
:
'ray'
,
sdate
:
'string'
,
edate
:
'string'
}
];
@
Component
({
selector
:
'app-equipment'
,
templateUrl
:
'./equipment.component.html'
,
...
...
@@ -27,17 +17,48 @@ const COUNTRIES: Country[] = [
export
class
EquipmentComponent
implements
OnInit
{
page
=
1
;
pageSize
=
10
;
collectionSize
=
COUNTRIES
.
length
;
countries
:
Country
[];
closeResult
=
''
;
listEquirment
:
EquirmentModel
[]
=
[
{
id
:
1
,
name
:
"จอคอมพิวเตอร์"
,
desc
:
"หน้าจอขนาด 22 นิ้ว"
,
type
:
"it"
,
pic
:
"assets
\
img
\
mo1.jpg"
},
{
id
:
2
,
name
:
"เมาส์"
,
desc
:
"..."
,
type
:
"it"
,
pic
:
"assets
\
img
\
mou.jpg"
},
{
id
:
3
,
name
:
"โน๊ตบุ๊ค"
,
desc
:
"หน้าจอขนาด 20 นิ้ว"
,
type
:
"it"
,
pic
:
"assets
\
img
\
notebook.jpg"
},
{
id
:
4
,
name
:
"คีย์บอร์ด"
,
desc
:
"..."
,
type
:
"it"
,
pic
:
"assets
\
img
\
keyboard.png"
}
]
collectionSize
=
this
.
listEquirment
.
length
;
constructor
(
private
modalService
:
NgbModal
)
{
}
ngOnInit
():
void
{
}
open
(
content
)
{
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
}
`
;
},
(
reason
)
=>
{
this
.
closeResult
=
`Dismissed
${
this
.
getDismissReason
(
reason
)}
`
;
...
...
@@ -54,8 +75,8 @@ export class EquipmentComponent implements OnInit {
}
}
refreshCountries
()
{
this
.
countries
=
COUNTRIES
.
map
((
country
,
i
)
=>
({
id
:
i
+
1
,
...
country
}))
this
.
listEquirment
=
this
.
listEquirment
.
map
((
item
,
i
)
=>
({
id
:
i
+
1
,
...
item
}))
.
slice
((
this
.
page
-
1
)
*
this
.
pageSize
,
(
this
.
page
-
1
)
*
this
.
pageSize
+
this
.
pageSize
);
}
}
\ No newline at end of file
src/assets/img/keyboard.png
0 → 100644
View file @
d83e7382
This diff is collapsed.
Click to expand it.
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