Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dynacmic-myhr
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
angular
dynacmic-myhr
Commits
121fc94e
Commit
121fc94e
authored
Jul 23, 2024
by
Ooh-Ao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
layout
parent
5d42c4e0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
86 additions
and
4 deletions
+86
-4
app.routes.ts
src/app/app.routes.ts
+5
-0
layout-widjet.component.css
src/app/layout-widjet/layout-widjet.component.css
+0
-0
layout-widjet.component.html
src/app/layout-widjet/layout-widjet.component.html
+3
-0
layout-widjet.component.spec.ts
src/app/layout-widjet/layout-widjet.component.spec.ts
+28
-0
layout-widjet.component.ts
src/app/layout-widjet/layout-widjet.component.ts
+24
-0
widjet.service.ts
src/app/services/widjet.service.ts
+26
-4
No files found.
src/app/app.routes.ts
View file @
121fc94e
import
{
Routes
}
from
'@angular/router'
;
import
{
ServicesComponent
}
from
'./services/services.component'
;
import
{
SettingWidgetComponent
}
from
'./setting-widget/setting-widget.component'
;
import
{
LayoutWidjetComponent
}
from
'./layout-widjet/layout-widjet.component'
;
export
const
routes
:
Routes
=
[
{
...
...
@@ -20,5 +21,9 @@ export const routes: Routes = [
component
:
ServicesComponent
// loadComponent: () => import('./offerings/index')
// .then(x => x.ServicesComponent),
},
{
path
:
'layout'
,
component
:
LayoutWidjetComponent
}
];
src/app/layout-widjet/layout-widjet.component.css
0 → 100644
View file @
121fc94e
src/app/layout-widjet/layout-widjet.component.html
0 → 100644
View file @
121fc94e
<div
class=
"row"
>
<app-services
[
id
]="
item
.
id
"
*
ngFor=
"let item of widgetList"
class=
"col-{{item.width}} p-1"
></app-services>
</div>
src/app/layout-widjet/layout-widjet.component.spec.ts
0 → 100644
View file @
121fc94e
/* tslint:disable:no-unused-variable */
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
By
}
from
'@angular/platform-browser'
;
import
{
DebugElement
}
from
'@angular/core'
;
import
{
LayoutWidjetComponent
}
from
'./layout-widjet.component'
;
describe
(
'LayoutWidjetComponent'
,
()
=>
{
let
component
:
LayoutWidjetComponent
;
let
fixture
:
ComponentFixture
<
LayoutWidjetComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
LayoutWidjetComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
LayoutWidjetComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/layout-widjet/layout-widjet.component.ts
0 → 100644
View file @
121fc94e
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ServicesComponent
}
from
'../services/services.component'
;
import
{
WidjetService
}
from
'../services/widjet.service'
;
import
{
Service
}
from
'../components'
;
import
{
CommonModule
}
from
'@angular/common'
;
@
Component
({
selector
:
'app-layout-widjet'
,
standalone
:
true
,
imports
:
[
CommonModule
,
ServicesComponent
],
templateUrl
:
'./layout-widjet.component.html'
,
styleUrls
:
[
'./layout-widjet.component.css'
]
})
export
class
LayoutWidjetComponent
implements
OnInit
{
widjetId
=
0
widgetList
:
Service
[]
=
[]
constructor
(
private
widjetService
:
WidjetService
)
{
this
.
widgetList
=
this
.
widjetService
.
widjetList
}
ngOnInit
()
{
}
}
src/app/services/widjet.service.ts
View file @
121fc94e
...
...
@@ -12,7 +12,7 @@ export class WidjetService {
dataModel
:
"ss"
,
dataSoure
:
"sss"
,
api
:
""
,
width
:
12
,
width
:
6
,
heigth
:
""
,
tag
:
""
},
...
...
@@ -23,7 +23,7 @@ export class WidjetService {
dataModel
:
"ss"
,
dataSoure
:
"sss"
,
api
:
""
,
width
:
5
,
width
:
6
,
heigth
:
""
,
tag
:
""
},
...
...
@@ -45,10 +45,32 @@ export class WidjetService {
dataModel
:
"4444"
,
dataSoure
:
"2312"
,
api
:
"https://hrplus.myhr.co.th/hr/taapi/leave/statistic?yearId=2024"
,
width
:
5
,
width
:
3
,
heigth
:
""
,
tag
:
""
},
{
id
:
3
,
title
:
"4444"
,
description
:
"4444"
,
dataModel
:
"4444"
,
dataSoure
:
"2312"
,
api
:
"https://hrplus.myhr.co.th/hr/taapi/leave/statistic?yearId=2024"
,
width
:
3
,
heigth
:
""
,
tag
:
""
},
{
id
:
3
,
title
:
"4444"
,
description
:
"4444"
,
dataModel
:
"4444"
,
dataSoure
:
"2312"
,
api
:
"https://hrplus.myhr.co.th/hr/taapi/leave/statistic?yearId=2024"
,
width
:
3
,
heigth
:
""
,
tag
:
""
}]
}
,
]
constructor
()
{
}
}
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