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
050194e9
Commit
050194e9
authored
Feb 18, 2025
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'DEV' of
https://mygit.myhr.co.th/angular/myAppraisal
into DEV
parents
ecaaa3cf
491a02aa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
199 additions
and
109 deletions
+199
-109
user-settings.component.ts
...account-settings/user-settings/user-settings.component.ts
+2
-2
department-list.component.ts
...usiness-unit/department-list/department-list.component.ts
+2
-2
department-register.component.ts
...unit/department-register/department-register.component.ts
+2
-2
section-registration.component.ts
...it/section-registration/section-registration.component.ts
+2
-2
sub-department-four.component.ts
...unit/sub-department-four/sub-department-four.component.ts
+2
-2
sub-department-one.component.ts
...s-unit/sub-department-one/sub-department-one.component.ts
+2
-2
sub-department-three.component.ts
...it/sub-department-three/sub-department-three.component.ts
+2
-2
sub-department-two.component.ts
...s-unit/sub-department-two/sub-department-two.component.ts
+2
-2
company-registration-page.component.ts
...-registration-page/company-registration-page.component.ts
+2
-2
sub-employee-registration.component.ts
...loyee-registration/sub-employee-registration.component.ts
+2
-2
employee-categories.component.ts
...tion/employee-categories/employee-categories.component.ts
+2
-2
employee-group-unit.component.ts
...tion/employee-group-unit/employee-group-unit.component.ts
+2
-2
employee-level.component.ts
...ob-description/employee-level/employee-level.component.ts
+2
-2
position-unit.component.ts
...nents/job-description/position/position-unit.component.ts
+2
-2
edit-group-competencies.component.html
...group-competencies/edit-group-competencies.component.html
+2
-2
edit-group-competencies.component.ts
...t-group-competencies/edit-group-competencies.component.ts
+20
-8
competency-topic.component.html
...stration/competency-topic/competency-topic.component.html
+33
-20
competency-topic.component.ts
...gistration/competency-topic/competency-topic.component.ts
+81
-28
type-registration.component.html
...ration/type-registration/type-registration.component.html
+9
-3
type-registration.component.ts
...stration/type-registration/type-registration.component.ts
+2
-2
assessment-tool.component.html
...l-register/assessment-tool/assessment-tool.component.html
+0
-0
assessment-tool.component.ts
...ool-register/assessment-tool/assessment-tool.component.ts
+0
-0
tool-register.component.html
...ncy-assessment/tool-register/tool-register.component.html
+2
-3
sub-job-competency.component.ts
...etency/sub-job-competency/sub-job-competency.component.ts
+2
-2
assessment.model.ts
src/app/shared/model/assessment.model.ts
+6
-6
assessment.service.ts
src/app/shared/services/assessment.service.ts
+6
-4
file.service.ts
src/app/shared/services/file.service.ts
+8
-3
No files found.
src/app/components/company-components/account-settings/user-settings/user-settings.component.ts
View file @
050194e9
...
...
@@ -178,7 +178,7 @@ export class UserSettingsComponent {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
user
.
loading
=
true
this
.
fileService
.
upload
(
formData
,
'muser'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'muser'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -195,7 +195,7 @@ export class UserSettingsComponent {
}
downloadFile
()
{
const
fileName
=
'IMPORT_USER.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/company-components/company-registration/branch-business-unit/department-list/department-list.component.ts
View file @
050194e9
...
...
@@ -65,7 +65,7 @@ export class DepartmentListComponent implements OnInit {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
bu2ListLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu2'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'mbu2'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -83,7 +83,7 @@ export class DepartmentListComponent implements OnInit {
downloadFile
()
{
const
fileName
=
'IMPORT_BU.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/company-components/company-registration/branch-business-unit/department-register/department-register.component.ts
View file @
050194e9
...
...
@@ -42,7 +42,7 @@ export class DepartmentRegisterComponent implements OnInit {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
bu1ListLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu1'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'mbu1'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -60,7 +60,7 @@ export class DepartmentRegisterComponent implements OnInit {
downloadFile
()
{
const
fileName
=
'IMPORT_BU.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/company-components/company-registration/branch-business-unit/section-registration/section-registration.component.ts
View file @
050194e9
...
...
@@ -66,7 +66,7 @@ export class SectionRegistrationComponent implements OnInit {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
bu3ListLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu3'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'mbu3'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -84,7 +84,7 @@ export class SectionRegistrationComponent implements OnInit {
downloadFile
()
{
const
fileName
=
'IMPORT_BU.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-four/sub-department-four.component.ts
View file @
050194e9
...
...
@@ -66,7 +66,7 @@ export class SubDepartmentFourComponent implements OnInit {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
bu7ListLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu7'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'mbu7'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -84,7 +84,7 @@ export class SubDepartmentFourComponent implements OnInit {
downloadFile
()
{
const
fileName
=
'IMPORT_BU.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-one/sub-department-one.component.ts
View file @
050194e9
...
...
@@ -66,7 +66,7 @@ export class SubDepartmentOneComponent implements OnInit {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
bu4ListLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu4'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'mbu4'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -84,7 +84,7 @@ export class SubDepartmentOneComponent implements OnInit {
downloadFile
()
{
const
fileName
=
'IMPORT_BU.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-three/sub-department-three.component.ts
View file @
050194e9
...
...
@@ -66,7 +66,7 @@ export class SubDepartmentThreeComponent implements OnInit {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
bu6ListLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu6'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'mbu6'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -84,7 +84,7 @@ export class SubDepartmentThreeComponent implements OnInit {
downloadFile
()
{
const
fileName
=
'IMPORT_BU.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-two/sub-department-two.component.ts
View file @
050194e9
...
...
@@ -65,7 +65,7 @@ export class SubDepartmentTwoComponent implements OnInit {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
bu5ListLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu5'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'mbu5'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -83,7 +83,7 @@ export class SubDepartmentTwoComponent implements OnInit {
downloadFile
()
{
const
fileName
=
'IMPORT_BU.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/company-components/company-registration/company-registration-page/company-registration-page.component.ts
View file @
050194e9
...
...
@@ -142,7 +142,7 @@ export class CompanyRegistrationPageComponent {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
dataLoading
=
true
this
.
fileService
.
upload
(
formData
,
''
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
''
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -161,7 +161,7 @@ export class CompanyRegistrationPageComponent {
}
downloadFile
()
{
const
fileName
=
'.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/company-components/employee-registration/sub-employee-registration/sub-employee-registration.component.ts
View file @
050194e9
...
...
@@ -98,7 +98,7 @@ export class SubEmployeeRegistrationComponent {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
employee
.
loading
=
true
this
.
fileService
.
upload
(
formData
,
''
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
''
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -117,7 +117,7 @@ export class SubEmployeeRegistrationComponent {
}
downloadFile
()
{
const
fileName
=
'IMPORT_MPOSITION.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/company-components/job-description/employee-categories/employee-categories.component.ts
View file @
050194e9
...
...
@@ -54,7 +54,7 @@ export class EmployeeCategories {
const
formData
=
new
FormData
();
this
.
dataLoading
=
true
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
fileService
.
upload
(
formData
,
'employment_type'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'employment_type'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -74,7 +74,7 @@ export class EmployeeCategories {
downloadFile
()
{
const
fileName
=
'IMPORT_MEMPLOYMENTTYPE.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/company-components/job-description/employee-group-unit/employee-group-unit.component.ts
View file @
050194e9
...
...
@@ -55,7 +55,7 @@ export class EmployeeGroupUnit implements OnInit {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
dataLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mgroup'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'mgroup'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -73,7 +73,7 @@ export class EmployeeGroupUnit implements OnInit {
downloadFile
()
{
const
fileName
=
'IMPORT_MGROUP.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/company-components/job-description/employee-level/employee-level.component.ts
View file @
050194e9
...
...
@@ -56,7 +56,7 @@ export class EmployeeLevel implements OnInit {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
dataLoading
=
true
this
.
fileService
.
upload
(
formData
,
'pl'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'pl'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -76,7 +76,7 @@ export class EmployeeLevel implements OnInit {
downloadFile
()
{
const
fileName
=
'IMPORT_PL.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/company-components/job-description/position/position-unit.component.ts
View file @
050194e9
...
...
@@ -55,7 +55,7 @@ export class PositionUnitComponent implements OnInit {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
dataLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mposition'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'mposition'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -75,7 +75,7 @@ export class PositionUnitComponent implements OnInit {
downloadFile
()
{
const
fileName
=
'IMPORT_MPOSITION.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/competency-assessment/competency-management/group-competencies/edit-group-competencies/edit-group-competencies.component.html
View file @
050194e9
...
...
@@ -158,7 +158,7 @@
</label>
</td>
<td
style=
"font-size: 12px; width: 60%;"
>
{{item.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.
competencyTopic.
tdesc}}
{{item.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.tdesc}}
</td>
<td
style=
"font-size: 12px;text-align: center;"
>
{{item.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.expectation}}
...
...
@@ -316,7 +316,7 @@
<td
style=
"font-size: 12px; width: 60%;"
>
{{item.data.competencyIndicatorsCourses0.tdesc}}
</td>
<td
style=
"font-size: 12px;text-align: center;"
>
<td
style=
"font-size: 12px;text-align: center;
width: 20%;
"
>
{{item.data.competencyIndicatorsCourses0.expectation}}
</td>
<td
class=
"flex justify-center"
>
<div
class=
"px-1"
>
...
...
src/app/components/competency-assessment/competency-management/group-competencies/edit-group-competencies/edit-group-competencies.component.ts
View file @
050194e9
...
...
@@ -78,14 +78,27 @@ export class EditGroupCompetenciesComponent {
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
dataListFilter
()
{
return
this
.
dataList
.
filter
(
x
=>
{
const
data
=
x
.
data
const
match
=
data
.
competencyIndicatorsCourses1Mini
.
competencyIndicatorsCourses0
.
competencyTopic
.
competencyTopicId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
competencyIndicatorsCourses1Mini
.
competencyIndicatorsCourses0
.
competencyTopic
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
competencyIndicatorsCourses1Mini
.
competencyIndicatorsCourses0
.
expectation
.
toLocaleLowerCase
().
includes
(
this
.
search
.
toLocaleLowerCase
())
return
match
;
});
return
this
.
dataList
.
filter
(
x
=>
{
const
data
=
x
.
data
;
const
match
=
data
.
competencyIndicatorsCourses1Mini
.
competencyIndicatorsCourses0
.
competencyTopic
.
competencyTopicId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
competencyIndicatorsCourses1Mini
.
competencyIndicatorsCourses0
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
competencyIndicatorsCourses1Mini
.
competencyIndicatorsCourses0
.
expectation
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
());
return
match
;
})
.
sort
((
a
,
b
)
=>
{
const
topicA
=
a
.
data
.
competencyIndicatorsCourses1Mini
.
competencyIndicatorsCourses0
.
competencyTopic
.
competencyTopicId
.
toLowerCase
();
const
topicB
=
b
.
data
.
competencyIndicatorsCourses1Mini
.
competencyIndicatorsCourses0
.
competencyTopic
.
competencyTopicId
.
toLowerCase
();
const
expectationA
=
a
.
data
.
competencyIndicatorsCourses1Mini
.
competencyIndicatorsCourses0
.
expectation
.
toLowerCase
();
const
expectationB
=
b
.
data
.
competencyIndicatorsCourses1Mini
.
competencyIndicatorsCourses0
.
expectation
.
toLowerCase
();
return
topicA
.
localeCompare
(
topicB
)
||
expectationA
.
localeCompare
(
expectationB
);
});
}
getIndicatorsCoursesList
()
{
this
.
dataModalLoading
=
true
...
...
@@ -131,7 +144,6 @@ export class EditGroupCompetenciesComponent {
this
.
groupCompetencies
.
groupAssessment1List
=
this
.
dataList
.
map
(
x
=>
x
.
data
);
this
.
groupAssessmentService
.
post
(
this
.
groupCompetencies
).
subscribe
({
next
:
(
response
)
=>
{
console
.
log
(
response
)
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
);
}
else
{
...
...
src/app/components/competency-assessment/name-registration/competency-topic/competency-topic.component.html
View file @
050194e9
...
...
@@ -39,7 +39,8 @@
</div>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-10 m-0 shadow-md"
data-hs-overlay=
"#competency-topic-page-modal"
(
click
)="
modalStatus=
'add'
;
setData
()"
>
data-hs-overlay=
"#competency-topic-page-modal"
(
click
)="
modalStatus=
'add'
;
setData
();
fileInputMedium
.
value =
''
;
examFile=
null;examFileName
=
'กรุณาเลือกไฟล์'"
>
<i
class=
"ri-add-line"
></i>
Add
</button>
...
...
@@ -176,7 +177,8 @@
<div
class=
"ti-modal-center"
>
<div
class=
"flex justify-end"
style=
"padding-right: 1rem;"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(
click
)="
clearData
(
modalStatus
)"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(
click
)="
clearData
(
modalStatus
)"
>
<svg
class=
"svg-indigo"
width=
"16"
height=
"16"
viewBox=
"0 0 64.00 64.00"
xmlns=
"http://www.w3.org/2000/svg"
fill=
"none"
stroke=
"#595BEA"
stroke-width=
"3.84"
transform=
"rotate(45)matrix(-1, 0, 0, 1, 0, 0)"
>
...
...
@@ -233,25 +235,31 @@
</div>
</div>
<label
class=
"ti-form-label mt-2rem"
>
แนบไฟล์ข้อสอบ
</label>
<div>
<
div
class=
"flex rounded-md"
>
<label
for=
"file-input-medium"
class=
"sr-only"
>
อัปโหลดไฟล์
</label
>
<input
type=
"file"
id=
"file-input-medium"
name=
"file-input-medium
"
class=
"
block w-full border border-gray-200 focus:shadow-sm dark:focus:shadow-white/10 ltr:rounded-l-md rtl:rounded-r-none text-sm focus:z-10 focus:outline-0 focus:border-gray-200 dark:focus:border-white/10 dark:border-white/10 dark:text-white/70 file:border-0 file:bg-gray-100 ltr:file:mr-4 rtl:file:ml-4 file:py-3 file:px-4 dark:file:bg-black/20 dark:file:text-white/70"
>
<span
class=
"px-4 inline-flex items-center min-w-fit ltr:rounded-r-md rtl:rounded-l-none border ltr:border-l-0 rtl:border-r-0 border-gray-200 bg-gray-50 text-sm dark:bg-black/20 dark:border-white/10"
>
<button
class=
"text-sm text-gray-500 dark:text-white/70"
onclick=
"document.getElementById('file-input-medium')
.click();"
>
Browse
</button>
</span>
<div
class=
"flex items-center ml-2"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-10px m-0 shadow-md rounded-md"
>
<i
class=
"ri-delete-bin-6-line"
></i
>
Delete
</button>
</
div
>
<div
class=
"flex rounded-md"
>
<
label
class=
"sr-only"
>
อัปโหลดไฟล์
</label
>
<input
#
fileInputMedium
id=
"fileInputMedium"
type=
"file"
(
change
)="
onExamSelected
($
event
)"
hidden
>
<input
type=
"text"
[
value
]="
examFileName
"
readonly
onclick=
"fileInputMedium.click();
"
class=
" cursor-pointer
block w-full border border-gray-200 focus:shadow-sm dark:focus:shadow-white/10 ltr:rounded-l-md rtl:rounded-r-none text-sm focus:z-10 focus:outline-0 focus:border-gray-200 dark:focus:border-white/10 dark:border-white/10 dark:text-white/70 file:border-0 file:bg-gray-100 ltr:file:mr-4 rtl:file:ml-4 file:py-3 file:px-4 dark:file:bg-black/20 dark:file:text-white/70"
>
<span
class=
"px-4 inline-flex items-center min-w-fit ltr:rounded-r-md rtl:rounded-l-none border ltr:border-l-0 rtl:border-r-0 border-gray-200 bg-gray-50 text-sm dark:bg-black/20 dark:border-white/10"
>
<button
class=
"text-sm text-gray-500 dark:text-white/70"
onclick=
"fileInputMedium
.click();"
>
Browse
</button>
</span>
<div
class=
"flex items-center ml-2"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-10px m-0 shadow-md rounded-md"
(
click
)="
fileInputMedium
.
value =
''
;
examFile=
null;examFileName
=
'กรุณาเลือกไฟล์'"
>
<i
class=
"ri-delete-bin-6-line"
></i>
Delete
</
button
>
</div>
</div>
<div
class=
"flex"
*
ngIf=
"examFileName==dataSelect.file"
>
<h1
class=
"cursor-pointer justify-center -mb-px inline-flex items-center gap-2 font-weight-500 font-size-12px
text-center text-secondary border-secondary border-b-2 align-items-end"
(
click
)="
dowloadExam
(
examFileName
)"
>
ดาวน์โหลดไฟล์ข้อสอบ
</h1>
</div>
<div
class=
"flex justify-end mt-3rem mb-1rem space-x-4"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
...
...
@@ -560,7 +568,7 @@
<div
class=
"flex justify-end"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#competency-topic-page-
alert-
modal"
>
data-hs-overlay=
"#competency-topic-page-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
...
...
@@ -632,6 +640,11 @@
<i
class=
"ti ti-upload"
></i>
</button>
</div>
<div
class=
"flex justify-center mt-2rem "
>
<h1
class=
"cursor-pointer justify-center -mb-px inline-flex items-center gap-2 font-weight-500 font-size-12px
text-center text-secondary border-secondary border-b-2 align-items-end"
(
click
)="
downloadFile
()"
>
ดาวน์โหลดตัวอย่างไฟล์
</h1>
</div>
<div
class=
"flex justify-center mt-2rem mb-1rem space-x-4"
>
<button
type=
"submit"
class=
"ti-btn ti-btn-secondary"
data-hs-overlay=
"#competency-topic-upload-modal"
[
class
.
ti-btn-disabled
]="!
selectedFile
"
...
...
src/app/components/competency-assessment/name-registration/competency-topic/competency-topic.component.ts
View file @
050194e9
...
...
@@ -12,6 +12,7 @@ export interface DataModel {
code
:
string
definition
:
string
type
:
DataModel2
file
:
string
checked
:
boolean
}
export
interface
DataModel2
{
...
...
@@ -50,13 +51,15 @@ export class CompetencyTopic {
currentModal
=
""
;
dataLoading
=
false
dataSelectList
:
DataModel
[]
=
[];
dataSelect
:
DataModel
=
{
id
:
""
,
name
:
""
,
edesc
:
""
,
code
:
""
,
definition
:
""
,
type
:
{
id
:
""
,
name
:
""
,
edesc
:
""
,
code
:
""
,
level
:
""
},
checked
:
false
}
dataSelect
:
DataModel
=
{
id
:
""
,
name
:
""
,
edesc
:
""
,
code
:
""
,
definition
:
""
,
file
:
""
,
type
:
{
id
:
""
,
name
:
""
,
edesc
:
""
,
code
:
""
,
level
:
""
},
checked
:
false
}
competencytypeListLoading
=
false
competencytypeList
:
DataModel2
[]
=
[]
competoncyTopicList
:
{
check
:
boolean
;
data
:
DataModel
&
{
checked
?:
boolean
}
}[]
=
[]
modalStatus
=
'add'
selectedFile
:
File
|
null
=
null
;
selectedFileName
:
string
=
'กรุณาเลือกไฟล์'
;
examFile
:
File
|
null
=
null
;
examFileName
:
string
=
'กรุณาเลือกไฟล์'
;
selectedItems
:
string
[]
=
[];
...
...
@@ -74,6 +77,52 @@ export class CompetencyTopic {
this
.
getCompetencytypeList
()
}
onExamSelected
(
event
:
any
)
{
this
.
examFile
=
event
.
target
.
files
.
length
>
0
?
event
.
target
.
files
[
0
]
:
null
;
this
.
examFileName
=
this
.
examFile
?.
name
||
"กรุณาเลือกไฟล์"
}
uploadExam
()
{
if
(
!
this
.
examFile
)
{
return
}
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
examFile
);
this
.
fileService
.
uploadFiles
(
formData
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
examFile
=
null
this
.
addCompetency_topic
(
response
.
resultObject
)
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
cdr
.
detectChanges
()
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
cdr
.
detectChanges
()
}
})
}
dowloadExam
(
fileName
:
string
)
{
this
.
fileService
.
dowloadFiles
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
a
.
href
=
url
;
a
.
download
=
fileName
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
document
.
body
.
removeChild
(
a
);
window
.
URL
.
revokeObjectURL
(
url
);
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
cdr
.
detectChanges
()
}
})
}
onFileSelected
(
event
:
any
)
{
this
.
selectedFile
=
event
.
target
.
files
.
length
>
0
?
event
.
target
.
files
[
0
]
:
null
;
this
.
selectedFileName
=
this
.
selectedFile
?.
name
||
"กรุณาเลือกไฟล์"
...
...
@@ -87,7 +136,7 @@ export class CompetencyTopic {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
dataLoading
=
true
this
.
fileService
.
upload
(
formData
,
'competency_topic'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'competency_topic'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -108,7 +157,7 @@ export class CompetencyTopic {
downloadFile
()
{
const
fileName
=
'IMPORT_COMPETENCY_TOPIC.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
@@ -159,7 +208,7 @@ export class CompetencyTopic {
next
:
response
=>
{
this
.
competoncyTopicList
=
response
.
map
(
x
=>
({
check
:
false
,
data
:
{
id
:
x
.
competencyTopicId
,
name
:
x
.
tdesc
,
edesc
:
x
.
edesc
,
code
:
x
.
competencyType
.
shortName
,
definition
:
x
.
competencyDetail
,
id
:
x
.
competencyTopicId
,
name
:
x
.
tdesc
,
edesc
:
x
.
edesc
,
code
:
x
.
competencyType
.
shortName
,
definition
:
x
.
competencyDetail
,
file
:
x
.
competencyFiles
,
type
:
{
id
:
x
.
competencyType
.
competencyTypeId
,
name
:
x
.
competencyType
.
tdesc
,
edesc
:
x
.
competencyType
.
edesc
,
code
:
x
.
competencyType
.
shortName
,
level
:
x
.
expectationLevel
},
checked
:
false
}
...
...
@@ -171,7 +220,6 @@ export class CompetencyTopic {
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
dataLoading
=
false
console
.
error
(
'Error fetching employee types:'
,
error
);
this
.
cdr
.
detectChanges
()
}
})
...
...
@@ -189,33 +237,38 @@ export class CompetencyTopic {
});
}
setData
(
data
?:
DataModel
)
{
this
.
dataSelect
=
JSON
.
parse
(
JSON
.
stringify
(
data
||
{
id
:
""
,
name
:
""
,
edesc
:
""
,
code
:
""
,
definition
:
""
,
type
:
{
id
:
""
,
name
:
""
,
edesc
:
""
,
code
:
""
,
level
:
""
},
checked
:
false
}));
this
.
examFileName
=
data
?.
file
||
'กรุณาเลือกไฟล์'
this
.
dataSelect
=
JSON
.
parse
(
JSON
.
stringify
(
data
||
{
id
:
""
,
name
:
""
,
edesc
:
""
,
code
:
""
,
definition
:
""
,
file
:
""
,
type
:
{
id
:
""
,
name
:
""
,
edesc
:
""
,
code
:
""
,
level
:
""
},
checked
:
false
}));
}
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
addCompetency_topic
()
{
const
body
=
new
MyCompetencytopicModel
({
competencyTopicId
:
this
.
dataSelect
.
id
,
tdesc
:
this
.
dataSelect
.
name
,
edesc
:
this
.
dataSelect
.
edesc
,
competencyDetail
:
this
.
dataSelect
.
definition
,
competencyType
:
new
MyCompetencytypeModel
({
competencyTypeId
:
this
.
dataSelect
.
type
.
id
,
tdesc
:
this
.
dataSelect
.
type
.
name
,
edesc
:
this
.
dataSelect
.
type
.
edesc
,
shortName
:
this
.
dataSelect
.
type
.
code
,
expectationLevel
:
this
.
dataSelect
.
type
.
level
}),
})
this
.
dataLoading
=
true
this
.
competencytopicService
.
post
(
body
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getCompetencytypeList
()
this
.
getCompetencytopicList
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
addCompetency_topic
(
competencyFiles
?:
string
)
{
if
(
this
.
examFile
)
{
this
.
uploadExam
()
}
else
{
const
body
=
new
MyCompetencytopicModel
({
competencyTopicId
:
this
.
dataSelect
.
id
,
tdesc
:
this
.
dataSelect
.
name
,
edesc
:
this
.
dataSelect
.
edesc
,
competencyDetail
:
this
.
dataSelect
.
definition
,
competencyType
:
new
MyCompetencytypeModel
({
competencyTypeId
:
this
.
dataSelect
.
type
.
id
,
tdesc
:
this
.
dataSelect
.
type
.
name
,
edesc
:
this
.
dataSelect
.
type
.
edesc
,
shortName
:
this
.
dataSelect
.
type
.
code
,
expectationLevel
:
this
.
dataSelect
.
type
.
level
}),
competencyFiles
:
competencyFiles
||
""
})
this
.
dataLoading
=
true
this
.
competencytopicService
.
post
(
body
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getCompetencytypeList
()
this
.
getCompetencytopicList
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
dataLoading
=
false
this
.
cdr
.
detectChanges
()
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
dataLoading
=
false
this
.
cdr
.
detectChanges
()
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
dataLoading
=
false
this
.
cdr
.
detectChanges
()
}
})
})
}
}
deleteCompetency_topic
()
{
let
body
:
any
...
...
@@ -261,7 +314,7 @@ export class CompetencyTopic {
if
(
modalStatus
==
'add'
)
{
this
.
setData
()
}
else
if
(
modalStatus
==
'edit'
)
{
this
.
setData
({
id
:
this
.
dataSelect
.
id
,
name
:
""
,
edesc
:
""
,
code
:
""
,
definition
:
""
,
type
:
{
id
:
""
,
name
:
""
,
edesc
:
""
,
code
:
""
,
level
:
""
},
checked
:
this
.
dataSelect
.
checked
})
this
.
setData
({
id
:
this
.
dataSelect
.
id
,
name
:
""
,
edesc
:
""
,
code
:
""
,
definition
:
""
,
file
:
""
,
type
:
{
id
:
""
,
name
:
""
,
edesc
:
""
,
code
:
""
,
level
:
""
},
checked
:
this
.
dataSelect
.
checked
})
}
}
...
...
src/app/components/competency-assessment/name-registration/type-registration/type-registration.component.html
View file @
050194e9
...
...
@@ -215,7 +215,7 @@
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input w-2/3"
[(
ngModel
)]="
dataSelect
.
code
"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-1rem"
>
ระดับความคาดหวัง *
</label>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input"
style=
"width: 200px;"
[(
ngModel
)]="
dataSelect
.
level
"
>
oninput=
"this.value = this.value.replace(/\D/g, '')"
[(
ngModel
)]="
dataSelect
.
level
"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
...
...
@@ -318,10 +318,16 @@
<i
class=
"ti ti-upload"
></i>
</button>
</div>
<div
class=
"flex justify-center mt-2rem "
>
<h1
class=
"cursor-pointer justify-center -mb-px inline-flex items-center gap-2 font-weight-500 font-size-12px
text-center text-secondary border-secondary border-b-2 align-items-end"
(
click
)="
downloadFile
()"
>
ดาวน์โหลดตัวอย่างไฟล์
</h1>
</div>
<div
class=
"flex justify-center mt-2rem mb-1rem space-x-4"
>
<button
type=
"submit"
class=
"ti-btn ti-btn-secondary"
data-hs-overlay=
"#type-registration-component-upload-modal"
[
class
.
ti-btn-disabled
]="!
selectedFile
"
(
click
)="
uploadFile
()"
[
disabled
]="!
selectedFile
"
[
disabled
]="!
selectedFile
"
>
data-hs-overlay=
"#type-registration-component-upload-modal"
[
class
.
ti-btn-disabled
]="!
selectedFile
"
(
click
)="
uploadFile
()"
[
disabled
]="!
selectedFile
"
[
disabled
]="!
selectedFile
"
>
อัปโหลด
</button>
</div>
...
...
src/app/components/competency-assessment/name-registration/type-registration/type-registration.component.ts
View file @
050194e9
...
...
@@ -60,7 +60,7 @@ export class TypeRegistration {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
dataLoading
=
true
this
.
fileService
.
upload
(
formData
,
'competency_type'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'competency_type'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -80,7 +80,7 @@ export class TypeRegistration {
downloadFile
()
{
const
fileName
=
'IMPORT_COMPETENCY_TYPE.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/components/competency-assessment/tool-register/assessment-tool/assessment-tool.component.html
View file @
050194e9
This diff is collapsed.
Click to expand it.
src/app/components/competency-assessment/tool-register/assessment-tool/assessment-tool.component.ts
View file @
050194e9
This diff is collapsed.
Click to expand it.
src/app/components/competency-assessment/tool-register/tool-register.component.html
View file @
050194e9
...
...
@@ -15,10 +15,9 @@
</a>
</nav>
</div>
<div
class=
"mt-3 px-
3
rem !-mt-3 pt-50px"
>
<div
class=
"mt-3 px-
2
rem !-mt-3 pt-50px"
>
<div
id=
"underline-1"
role=
"tabpanel"
aria-labelledby=
"underline-item-1"
>
<app-assessment-tool
[
pathTitle
]="
pathTitle
"
(
sendPathTitle
)="
pathTitle=
$event"
></app-assessment-tool>
<app-assessment-tool></app-assessment-tool>
</div>
</div>
</div>
...
...
src/app/components/job-detail-components/job-competency/sub-job-competency/sub-job-competency.component.ts
View file @
050194e9
...
...
@@ -103,7 +103,7 @@ export class SubJobCompetencyComponent {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
loading
=
true
this
.
fileService
.
upload
(
formData
,
'MJOBCODE_COMPETENCY'
).
subscribe
({
this
.
fileService
.
upload
Excel
(
formData
,
'MJOBCODE_COMPETENCY'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
@@ -122,7 +122,7 @@ export class SubJobCompetencyComponent {
downloadFile
()
{
const
fileName
=
'IMPORT_MJOBCODEV2.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
this
.
fileService
.
download
Template
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
...
...
src/app/shared/model/assessment.model.ts
View file @
050194e9
...
...
@@ -13,12 +13,12 @@ export class MyAssessmentModel implements AssessmentModel {
edesc
:
string
tdesc
:
string
shortName
:
string
constructor
(
data
:
Partial
<
AssessmentModel
>
)
{
this
.
assessmentId
=
data
.
assessmentId
||
""
this
.
companyId
=
data
.
companyId
||
""
this
.
edesc
=
data
.
edesc
||
""
this
.
tdesc
=
data
.
tdesc
||
""
this
.
shortName
=
data
.
shortName
||
""
constructor
(
data
?
:
Partial
<
AssessmentModel
>
)
{
this
.
assessmentId
=
data
?
.
assessmentId
||
""
this
.
companyId
=
data
?
.
companyId
||
""
this
.
edesc
=
data
?
.
edesc
||
""
this
.
tdesc
=
data
?
.
tdesc
||
""
this
.
shortName
=
data
?
.
shortName
||
""
}
}
src/app/shared/services/assessment.service.ts
View file @
050194e9
...
...
@@ -3,6 +3,7 @@ import { Injectable } from '@angular/core';
import
{
Observable
}
from
'rxjs'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
AssessmentModel
}
from
'../model/assessment.model'
;
import
{
AlertModel
}
from
'../model/alert.model'
;
@
Injectable
({
providedIn
:
'root'
})
...
...
@@ -17,16 +18,16 @@ export class AssessmentService {
getList
():
Observable
<
AssessmentModel
[]
>
{
return
this
.
http
.
get
<
AssessmentModel
[]
>
(
this
.
urlApi
+
"/lists"
)
}
post
(
body
:
AssessmentModel
)
{
return
this
.
http
.
post
(
this
.
urlApi
,
body
)
post
(
body
:
AssessmentModel
)
:
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
delete
(
body
:
AssessmentModel
)
{
delete
(
body
:
AssessmentModel
)
:
Observable
<
AlertModel
>
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
body
};
return
this
.
http
.
delete
(
this
.
urlApi
,
options
)
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
}
\ No newline at end of file
src/app/shared/services/file.service.ts
View file @
050194e9
...
...
@@ -9,11 +9,16 @@ import { AlertModel } from '../model/alert.model';
export
class
FileService
{
constructor
(
private
http
:
HttpClient
)
{
}
upload
(
formData
:
any
,
table
:
string
):
Observable
<
AlertModel
>
{
uploadFiles
(
formData
:
any
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
environment
.
baseUrl
+
'/files/upload'
,
formData
)
}
dowloadFiles
(
filename
:
string
)
{
return
this
.
http
.
get
(
environment
.
baseUrl
+
'/files/download/'
+
filename
,
{
responseType
:
"blob"
})
}
uploadExcel
(
formData
:
any
,
table
:
string
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
environment
.
baseUrl
+
'/import/excel/'
+
table
,
formData
)
}
download
(
fileName
:
string
)
{
download
Template
(
fileName
:
string
)
{
return
this
.
http
.
get
(
"/assets/template/"
+
fileName
,
{
responseType
:
"blob"
})
}
}
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