Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mySkill-x
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
mySkill-x
Commits
9402de38
Commit
9402de38
authored
Jul 14, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
แก้ไข รายงาน Excel portal
parent
11d5447a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
excel-report.service.ts
src/app/shared/services/excel-report.service.ts
+11
-10
http-request.interceptor.ts
src/app/shared/services/http-request.interceptor.ts
+3
-1
No files found.
src/app/shared/services/excel-report.service.ts
View file @
9402de38
...
...
@@ -15,10 +15,10 @@ export class ExcelReportService {
constructor
(
private
http
:
HttpClient
,
)
{
}
getExcelList
():
Observable
<
TemplateModel
[]
>
{
return
this
.
http
.
get
<
TemplateModel
[]
>
(
environment
.
portal
+
"/template/lists?companyid=
eb2f4f30-edaf-11ee-a69a-c7680edc0e47
"
)
return
this
.
http
.
get
<
TemplateModel
[]
>
(
environment
.
portal
+
"/template/lists?companyid=
MYSKIL-X
"
)
}
getModuleList
():
Observable
<
ModuleModel
[]
>
{
return
this
.
http
.
get
<
ModuleModel
[]
>
(
environment
.
portal
+
"/template/lists/module?companyid=
eb2f4f30-edaf-11ee-a69a-c7680edc0e47
"
)
return
this
.
http
.
get
<
ModuleModel
[]
>
(
environment
.
portal
+
"/template/lists/module?companyid=
MYSKIL-X
"
)
}
getExcelPortalList
():
Observable
<
ExcelPortalModel
[]
>
{
return
this
.
http
.
get
<
ExcelPortalModel
[]
>
(
environment
.
portal
+
"/excel-center/content/lists"
)
...
...
@@ -38,7 +38,7 @@ export class ExcelReportService {
edesc
:
string
,
module
:
string
})
{
return
this
.
http
.
post
(
environment
.
portal
+
"/template?companyid=
eb2f4f30-edaf-11ee-a69a-c7680edc0e47
"
,
body
)
return
this
.
http
.
post
(
environment
.
portal
+
"/template?companyid=
MYSKIL-X
"
,
body
)
}
deleteTemplate
(
body
:
TemplateModel
):
Observable
<
AlertModel
>
{
let
option
=
{
...
...
@@ -47,10 +47,10 @@ export class ExcelReportService {
}),
body
:
body
}
return
this
.
http
.
delete
<
AlertModel
>
(
environment
.
portal
+
"/template?companyid=
eb2f4f30-edaf-11ee-a69a-c7680edc0e47
"
,
option
)
return
this
.
http
.
delete
<
AlertModel
>
(
environment
.
portal
+
"/template?companyid=
MYSKIL-X
"
,
option
)
}
postTemplateFile
(
body
:
TemplateFileModel
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
environment
.
portal
+
"/template-file?companyid=
eb2f4f30-edaf-11ee-a69a-c7680edc0e47
"
,
body
)
return
this
.
http
.
post
<
AlertModel
>
(
environment
.
portal
+
"/template-file?companyid=
MYSKIL-X
"
,
body
)
}
deleteTemplateFile
(
body
:
TemplateFileModel
):
Observable
<
AlertModel
>
{
let
option
=
{
...
...
@@ -59,22 +59,22 @@ export class ExcelReportService {
}),
body
:
body
}
return
this
.
http
.
delete
<
AlertModel
>
(
environment
.
portal
+
"/template-file?companyid=
eb2f4f30-edaf-11ee-a69a-c7680edc0e47
"
,
option
)
return
this
.
http
.
delete
<
AlertModel
>
(
environment
.
portal
+
"/template-file?companyid=
MYSKIL-X
"
,
option
)
}
downloadTemplateFile
(
fileName
:
string
)
{
return
this
.
http
.
get
(
environment
.
portal
+
"/template-file/download/excel/"
+
fileName
+
"?companyid=
eb2f4f30-edaf-11ee-a69a-c7680edc0e47
"
,
{
responseType
:
'blob'
})
return
this
.
http
.
get
(
environment
.
portal
+
"/template-file/download/excel/"
+
fileName
+
"?companyid=
MYSKIL-X
"
,
{
responseType
:
'blob'
})
}
printExcelReport
(
body
:
{
fileName
:
string
,
paramObj
:
string
})
{
return
this
.
http
.
post
(
environment
.
portal
+
"/template-file/export-to-excel?companyid=
eb2f4f30-edaf-11ee-a69a-c7680edc0e47
"
,
body
,
{
responseType
:
'blob'
})
return
this
.
http
.
post
(
environment
.
portal
+
"/template-file/export-to-excel?companyid=
MYSKIL-X
"
,
body
,
{
responseType
:
'blob'
})
}
getTemplateFile
(
templateid
:
string
,
filename
:
string
):
Observable
<
AlertModel
>
{
return
this
.
http
.
get
<
AlertModel
>
(
environment
.
portal
+
"/template-file/"
+
templateid
+
"/"
+
filename
+
"?companyid=
eb2f4f30-edaf-11ee-a69a-c7680edc0e47
"
,)
return
this
.
http
.
get
<
AlertModel
>
(
environment
.
portal
+
"/template-file/"
+
templateid
+
"/"
+
filename
+
"?companyid=
MYSKIL-X
"
,)
}
getTemplateFileLists
():
Observable
<
TemplateFileMiniModel
[]
>
{
return
this
.
http
.
get
<
TemplateFileMiniModel
[]
>
(
environment
.
portal
+
"/template-file/menuitem/mini/lists?companyid=
eb2f4f30-edaf-11ee-a69a-c7680edc0e47
"
,)
return
this
.
http
.
get
<
TemplateFileMiniModel
[]
>
(
environment
.
portal
+
"/template-file/menuitem/mini/lists?companyid=
MYSKIL-X
"
,)
}
}
\ No newline at end of file
src/app/shared/services/http-request.interceptor.ts
View file @
9402de38
...
...
@@ -24,9 +24,11 @@ export class HttpRequestInterceptor {
}
else
if
(
req
.
url
.
startsWith
(
"./"
))
{
return
next
.
handle
(
req
);
}
else
{
const
portalUrl
=
req
.
url
.
includes
(
"portal.myhr"
)
const
portalToken
=
'Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBdXRoIiwidWlkIjoiOGFhNDUzMzAtMzE0Yy0xMWU3LWJhZjMtMmQ3ZDA5ODc3NzQ0Iiwicm9sZSI6InVzZXIiLCJpc3MiOiJDb21wdXRlciBTY2llbmNlIENvcnBvcmF0aW9uIExpbWl0ZWQiLCJmdWxsTmFtZSI6InRlZXJhZGFjaCBrdWhhdGFuYXNhdGllbiIsIm1lbWJlcklkIjoiOGFhNDUzMzAtMzE0Yy0xMWU3LWJhZjMtMmQ3ZDA5ODc3NzQ0In0.FO7u8g7KfzkmZFTuuniBCEQxduPjcvzMbH7iug3DT90'
let
authReq
=
req
;
const
fullUrl
=
req
.
url
.
startsWith
(
"http"
)
?
req
.
url
:
environment
.
baseUrl
+
req
.
url
;
const
token
=
this
.
tokenService
.
getToken
()
const
token
=
portalUrl
?
portalToken
:
this
.
tokenService
.
getToken
()
if
(
token
!=
null
&&
!
req
.
url
.
includes
(
"/refresh-token"
))
{
authReq
=
this
.
addTokenHeader
(
req
,
"Bearer "
+
token
,
fullUrl
);
}
else
{
...
...
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