Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
portal-apps-manage
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
portal-apps-manage
Commits
cc462cc0
Commit
cc462cc0
authored
Sep 02, 2025
by
Ooh-Ao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save
parent
eb235a94
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
9 deletions
+24
-9
dashboard-management.component.ts
...ge/dashboard-management/dashboard-management.component.ts
+4
-1
widgets.model.ts
src/app/portal-manage/models/widgets.model.ts
+6
-0
dashboard-data.service.ts
src/app/portal-manage/services/dashboard-data.service.ts
+1
-1
token.service.ts
src/app/shared/services/token.service.ts
+13
-7
No files found.
src/app/portal-manage/dashboard-management/dashboard-management.component.ts
View file @
cc462cc0
...
...
@@ -605,6 +605,7 @@ export class DashboardManagementComponent implements OnInit {
const
newDashboard
=
new
DashboardModel
({
dashboardId
:
`dash-
${
Date
.
now
()}
`
,
thName
:
newDashboardName
,
application
:
sessionStorage
.
getItem
(
'module'
)
||
''
,
widgets
:
[]
});
this
.
dashboardDataService
.
saveDashboard
(
newDashboard
).
subscribe
(
addedDashboard
=>
{
...
...
@@ -715,7 +716,7 @@ export class DashboardManagementComponent implements OnInit {
deleteDashboard
():
void
{
if
(
this
.
selectedDashboardId
&&
confirm
(
'Are you sure you want to delete this dashboard?'
))
{
this
.
dashboardDataService
.
deleteDashboard
(
this
.
selectedDashboardId
).
subscribe
(
result
=>
{
this
.
dashboardDataService
.
deleteDashboard
(
this
.
dashboardData
!
).
subscribe
(
result
=>
{
console
.
log
(
result
)
});
...
...
@@ -741,6 +742,8 @@ export class DashboardManagementComponent implements OnInit {
console
.
log
(
'Dataset selected:'
,
dataset
);
// Added for debugging/clarity
if
(
this
.
dashboardData
)
{
this
.
dashboardData
.
datasetId
=
dataset
.
itemId
;
this
.
dashboardData
.
templateId
=
dataset
.
templateId
;
this
.
dashboardData
.
fileName
=
dataset
.
fileName
;
this
.
dashboardStateService
.
selectDataset
(
dataset
);
// this.getDatasetByTemplate(dataset);
}
...
...
src/app/portal-manage/models/widgets.model.ts
View file @
cc462cc0
...
...
@@ -79,6 +79,8 @@ export interface IDashboard {
application
:
string
;
description
:
string
;
datasetId
?:
string
;
templateId
:
string
fileName
:
string
widgets
:
IWidget
[];
}
...
...
@@ -89,6 +91,8 @@ export class DashboardModel implements IDashboard {
application
:
string
;
description
:
string
;
datasetId
?:
string
;
templateId
:
string
fileName
:
string
widgets
:
IWidget
[];
constructor
(
data
:
Partial
<
IDashboard
>
)
{
...
...
@@ -98,6 +102,8 @@ export class DashboardModel implements IDashboard {
this
.
application
=
data
.
application
??
''
;
this
.
description
=
data
.
description
??
''
;
this
.
datasetId
=
data
.
datasetId
;
this
.
templateId
=
data
.
templateId
??
''
;
this
.
fileName
=
data
.
fileName
??
''
;
this
.
widgets
=
data
.
widgets
?
data
.
widgets
.
map
(
w
=>
new
WidgetModel
(
w
))
:
[];
}
}
src/app/portal-manage/services/dashboard-data.service.ts
View file @
cc462cc0
...
...
@@ -37,7 +37,7 @@ export class DashboardDataService {
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
{}
body
:
dashboard
};
return
this
.
http
.
delete
<
any
>
(
this
.
apiBaseUrl
,
options
);
}
...
...
src/app/shared/services/token.service.ts
View file @
cc462cc0
...
...
@@ -23,13 +23,13 @@ export class TokenService {
throw
new
Error
(
'Method not implemented.'
);
}
apptoken
:
any
=
{
"myhr-plus"
:
"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBd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oiQ29tcHV0ZXIgU2NpZW5jZSBDb3Jwb3JhdGlvbiBMaW1pdGVkIiwidXNlcm5hbWUiOiJhZG1pbiJ9.Um39_CTM01n1g4XpFyuAa3VPxOozNPnJ0mu7kxU6KUs"
,
"myjob"
:
"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBdXRoIiwidWlkIjoiOGFhNDUzMzAtMzE0Yy0xMWU3LWJhZjMtMmQ3ZDA5ODc3NzQ0Iiwicm9sZXMiOlsiYWRtaW4iXSwiaXNzIjoiQ29tcHV0ZXIgU2NpZW5jZSBDb3Jwb3JhdGlvbiBMaW1pdGVkIiwidXNlcm5hbWUiOiJhZG1pbiJ9.Um39_CTM01n1g4XpFyuAa3VPxOozNPnJ0mu7kxU6KUs"
,
"myskill-x"
:
"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBdXRoIiwidWlkIjoiOGFhNDUzMzAtMzE0Yy0xMWU3LWJhZjMtMmQ3ZDA5ODc3NzQ0Iiwicm9sZXMiOlsiYWRtaW4iXSwiaXNzIjoiQ29tcHV0ZXIgU2NpZW5jZSBDb3Jwb3JhdGlvbiBMaW1pdGVkIiwidXNlcm5hbWUiOiJhZG1pbiJ9.Um39_CTM01n1g4XpFyuAa3VPxOozNPnJ0mu7kxU6KUs"
,
}
constructor
(
private
router
:
Router
)
{
}
...
...
@@ -114,6 +114,7 @@ export class TokenService {
public
saveAppToken
(
module
:
string
):
void
{
let
tokenkey
=
this
.
apptoken
[
module
]
window
.
sessionStorage
.
setItem
(
"module"
,
module
);
// window.localStorage.removeItem(APP_TOKEN_KEY);
// window.localStorage.setItem(APP_TOKEN_KEY, tokenkey);
window
.
sessionStorage
.
removeItem
(
APP_TOKEN_KEY
);
...
...
@@ -125,4 +126,9 @@ export class TokenService {
return
window
.
sessionStorage
.
getItem
(
APP_TOKEN_KEY
);
}
public
getModule
():
string
|
null
{
// return window.localStorage.getItem("module");
return
window
.
sessionStorage
.
getItem
(
"module"
);
}
}
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