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
a832ba11
Project 'angular/myAppraisal' was moved to 'angular/mySkill-x'. Please update any links and bookmarks that may still have the old path.
Commit
a832ba11
authored
2 months ago
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPDATEเพิ่มการเก็บลิ้ง myLearn
parent
ad8285ad
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
116 additions
and
47 deletions
+116
-47
development-course.component.html
...tion/development-course/development-course.component.html
+4
-0
development-course.component.ts
...ration/development-course/development-course.component.ts
+5
-4
sub-job-competency.component.html
...ency/sub-job-competency/sub-job-competency.component.html
+0
-0
sub-job-competency.component.ts
...etency/sub-job-competency/sub-job-competency.component.ts
+95
-35
assessment-types.component.html
...rfomance/assessment-types/assessment-types.component.html
+9
-8
competencycourse.model.ts
src/app/shared/model/competencycourse.model.ts
+3
-0
IMPORT_MJOBCODEV2.xlsx
src/assets/template/IMPORT_MJOBCODEV2.xlsx
+0
-0
No files found.
src/app/components/competency-assessment/course-registration/development-course/development-course.component.html
View file @
a832ba11
...
...
@@ -217,6 +217,8 @@
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
หัวข้อเรื่อง
</label>
<textarea
type=
"text"
id=
"detail_eng"
class=
"ti-form-input"
rows=
"4"
cols=
"50"
[(
ngModel
)]="
dataSelect
.
topic
"
>
</textarea>
<label
for=
"input-label"
class=
"ti-form-label"
>
Link myLearn
</label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input h-10"
[(
ngModel
)]="
dataSelect
.
courseLinkMylearn
"
>
<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"
...
...
@@ -289,6 +291,8 @@
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
หัวข้อเรื่อง
</label>
<textarea
type=
"text"
id=
"detail_eng"
class=
"ti-form-input"
rows=
"4"
cols=
"50"
[(
ngModel
)]="
dataSelect
.
topic
"
>
</textarea>
<label
for=
"input-label"
class=
"ti-form-label"
>
Link myLearn
</label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input h-10"
[(
ngModel
)]="
dataSelect
.
courseLinkMylearn
"
>
<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"
...
...
src/app/components/competency-assessment/course-registration/development-course/development-course.component.ts
View file @
a832ba11
...
...
@@ -8,6 +8,7 @@ export interface DataModel {
edesc
:
string
detail
:
string
topic
:
string
courseLinkMylearn
:
string
checked
:
boolean
}
@
Component
({
...
...
@@ -82,7 +83,7 @@ export class DevelopmentCourseComponent {
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
addUser
()
{
const
body
=
new
MyCompetencycourseModel
({
competencyCourseId
:
this
.
dataSelect
.
id
,
tdesc
:
this
.
dataSelect
.
name
,
edesc
:
this
.
dataSelect
.
edesc
,
courseTopic
:
this
.
dataSelect
.
topic
,
courseDetail
:
this
.
dataSelect
.
detail
})
const
body
=
new
MyCompetencycourseModel
({
competencyCourseId
:
this
.
dataSelect
.
id
,
tdesc
:
this
.
dataSelect
.
name
,
edesc
:
this
.
dataSelect
.
edesc
,
courseTopic
:
this
.
dataSelect
.
topic
,
courseDetail
:
this
.
dataSelect
.
detail
,
courseLinkMylearn
:
this
.
dataSelect
.
courseLinkMylearn
})
this
.
competencycourseService
.
post
(
body
).
subscribe
((
response
:
any
)
=>
{
if
(
response
.
success
)
{
this
.
showSuccess
()
...
...
@@ -91,7 +92,7 @@ export class DevelopmentCourseComponent {
})
}
deleteUser
()
{
const
body
=
new
MyCompetencycourseModel
({
competencyCourseId
:
this
.
dataSelect
.
id
,
tdesc
:
this
.
dataSelect
.
name
,
edesc
:
this
.
dataSelect
.
edesc
,
courseTopic
:
this
.
dataSelect
.
topic
,
courseDetail
:
this
.
dataSelect
.
detail
})
const
body
=
new
MyCompetencycourseModel
({
competencyCourseId
:
this
.
dataSelect
.
id
,
tdesc
:
this
.
dataSelect
.
name
,
edesc
:
this
.
dataSelect
.
edesc
,
courseTopic
:
this
.
dataSelect
.
topic
,
courseDetail
:
this
.
dataSelect
.
detail
,
courseLinkMylearn
:
this
.
dataSelect
.
courseLinkMylearn
})
this
.
competencycourseService
.
delete
(
body
).
subscribe
((
response
:
any
)
=>
{
if
(
response
.
success
)
{
this
.
showSuccessDelete
()
...
...
@@ -104,7 +105,7 @@ export class DevelopmentCourseComponent {
mockData
:
DataModel
[]
=
[]
dataLoading
=
false
dataSelect
:
DataModel
=
{
id
:
""
,
name
:
""
,
edesc
:
""
,
topic
:
""
,
detail
:
""
,
checked
:
false
}
dataSelect
:
DataModel
=
{
id
:
""
,
name
:
""
,
edesc
:
""
,
topic
:
""
,
detail
:
""
,
courseLinkMylearn
:
""
,
checked
:
false
}
mockDataSelect
:
any
=
[]
...
...
@@ -119,7 +120,7 @@ export class DevelopmentCourseComponent {
this
.
dataLoading
=
true
this
.
competencycourseService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
mockData
=
response
.
map
(
x
=>
({
id
:
x
.
competencyCourseId
,
name
:
x
.
tdesc
,
edesc
:
x
.
edesc
,
topic
:
x
.
courseTopic
,
detail
:
x
.
courseDetail
,
checked
:
false
}))
this
.
mockData
=
response
.
map
(
x
=>
({
id
:
x
.
competencyCourseId
,
name
:
x
.
tdesc
,
edesc
:
x
.
edesc
,
topic
:
x
.
courseTopic
,
detail
:
x
.
courseDetail
,
courseLinkMylearn
:
x
.
courseLinkMylearn
,
checked
:
false
}))
this
.
dataLoading
=
false
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
...
...
src/app/components/job-detail-components/job-competency/sub-job-competency/sub-job-competency.component.html
View file @
a832ba11
This diff is collapsed.
Click to expand it.
src/app/components/job-detail-components/job-competency/sub-job-competency/sub-job-competency.component.ts
View file @
a832ba11
import
{
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
C
hangeDetectorRef
,
C
omponent
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
JobCodeModel
,
MyJobCodeModel
}
from
'src/app/shared/model/job-code.model'
;
import
{
JobModel
,
MyJobModel
}
from
'src/app/shared/model/job.model'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
import
{
JobCodeService
}
from
'src/app/shared/services/่job-code.service'
;
@
Component
({
...
...
@@ -9,31 +12,108 @@ import { JobModel, MyJobModel } from 'src/app/shared/model/job.model';
styleUrls
:
[
'./sub-job-competency.component.scss'
]
})
export
class
SubJobCompetencyComponent
{
currentPage
=
1
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
jobList
:
JobModel
[]
=
[]
job
:
JobModel
=
new
MyJobModel
({})
search
=
""
jobCodeList
:
JobCodeModel
[]
=
[]
loading
=
false
selectedFile
:
File
|
null
=
null
;
selectedFileName
:
string
=
'กรุณาเลือกไฟล์'
;
constructor
(
private
toastr
:
ToastrService
private
toastr
:
ToastrService
,
private
fileService
:
FileService
,
private
jobcodeService
:
JobCodeService
,
private
cdr
:
ChangeDetectorRef
,
)
{
}
ngOnInit
():
void
{
this
.
getListJob
();
}
getListJob
(){
this
.
loading
=
false
this
.
jobcodeService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
jobCodeList
=
response
.
map
((
x
:
any
)
=>
new
MyJobCodeModel
(
x
))
console
.
log
(
"🚀 ~ SubJobCompetencyComponent ~ this.jobcodeService.getList ~ this.jobCodeList:"
,
this
.
jobCodeList
)
this
.
loading
=
false
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
searchChange
()
{
this
.
currentPage
=
1
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
this
.
job
List
Filter
().
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
this
.
job
code
Filter
().
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
jobListFilter
()
{
return
this
.
jobList
.
filter
(
x
=>
x
.
jobid
.
includes
(
this
.
search
)
||
x
.
tdesc
.
includes
(
this
.
search
)
||
x
.
edesc
.
includes
(
this
.
search
))
jobcodeFilter
()
{
return
this
.
jobCodeList
.
filter
(
x
=>
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
jobcodeId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
)
}
selectJob
(
job
:
JobModel
)
{
// this.showSuccess()
this
.
job
=
new
MyJobModel
(
job
)
onFileSelected
(
event
:
any
)
{
this
.
selectedFile
=
event
.
target
.
files
.
length
>
0
?
event
.
target
.
files
[
0
]
:
null
;
this
.
selectedFileName
=
this
.
selectedFile
?.
name
||
"กรุณาเลือกไฟล์"
}
uploadFile
()
{
if
(
!
this
.
selectedFile
)
{
alert
(
'กรุณาเลือกไฟล์ก่อนอัปโหลด'
)
return
}
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
// this.bu3ListLoading = true
this
.
fileService
.
upload
(
formData
,
'MJOBCODE_COMPETENCY'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
// this.getBu3List()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
// this.bu3ListLoading = false
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
// this.bu3ListLoading = false
}
})
}
downloadFile
()
{
const
fileName
=
'IMPORT_MJOBCODEV2.xlsx'
this
.
fileService
.
download
(
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
);
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
}
})
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
})
}
showSuccessAdd
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
...
...
@@ -54,27 +134,7 @@ export class SubJobCompetencyComponent {
positionClass
:
'toast-top-right'
,
});
}
addBu1
()
{
// this.bu1Service.post(this.bu1).subscribe((response:any) => {
// if (response.success) {
// this.getBu1List()
// }
// })
}
editBu1
()
{
// this.bu1Service.post(this.bu1).subscribe((response:any) => {
// if (response.success) {
// this.getBu1List()
// }
// })
}
deleteJob
(
job
:
JobModel
)
{
// this.bu1Service.delete(new MyBu1Model(bu1)).subscribe((response:any) => {
// if (response.success) {
// this.getBu1List()
// }
// })
}
}
src/app/components/performance-management-evaluation/name-registration-perfomance/assessment-types/assessment-types.component.html
View file @
a832ba11
...
...
@@ -2,7 +2,7 @@
<div
class=
"flex justify-between"
>
<div
class=
"flex pr-2"
>
<div
class=
"flex"
>
<div
class=
"flex items-center"
>
<
!-- <
div class="flex items-center">
<input type="checkbox" class="ti-form-checkbox pointer-events-none" id="hs-default-checkbox"
[(ngModel)]="isDataListChecked">
<label for="hs-default-checkbox" class="text-sm text-gray-500 mx-2 pointer-events-none">
...
...
@@ -15,7 +15,7 @@
[ngClass]="{'ri-checkbox-multiple-line text-gray-500': !isDataListCheckedAll, 'ri-checkbox-multiple-fill text-primary': isDataListCheckedAll}"></i>
</button>
<label class="text-sm text-gray-500 ml-2">Select All</label>
</div>
</div>
-->
</div>
</div>
<div
class=
"flex justify-end"
>
...
...
@@ -30,7 +30,7 @@
</div>
</div>
</div>
<div
class=
"px-1"
>
<
!-- <
div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md"
(click)="modalStatus='add';dataListSelect()" data-hs-overlay="#assessment-types-modal">
<i class="ri-add-line"></i>
...
...
@@ -43,7 +43,7 @@
<i class="ti ti-trash fs-l"></i>
Delete
</button>
</div>
</div>
-->
<div
class=
"px-1"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-warning h-45px m-0 shadow-md"
>
<i
class=
"ti ti-book fs-l"
></i>
...
...
@@ -81,19 +81,20 @@
<tbody
*
ngIf=
"dataListFilter().length"
>
<tr
*
ngFor=
"let item of dataListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"flex justify-around"
>
<
!-- <
td class="flex justify-around">
<input type="checkbox" class="ti-form-checkbox cursor-pointer" [(ngModel)]="item.check"
(ngModelChange)="dataListCheck()">
<label>{{item.code}}</label>
</td>
</td> -->
<td
class=
"text-center"
>
{{item.code}}
</td>
<td>
{{item.nameTypeTh}} ({{item.nameTypeEn}})
</td>
<td>
{{item.name}}
</td>
<td
class=
"flex justify-center items-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
dataListSelect
(
item
)"
data-hs-overlay=
"#assessment-types-modal"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#assessment-types-delete-modal"
></i>
<
!-- <
i class="ti ti-trash cursor-pointer i-gray fs-l px-1"
data-hs-overlay="#assessment-types-delete-modal"></i>
-->
</td>
</tr>
</tbody>
...
...
src/app/shared/model/competencycourse.model.ts
View file @
a832ba11
...
...
@@ -5,6 +5,7 @@ export interface CompetencycourseModel {
tdesc
:
string
courseDetail
:
string
courseTopic
:
string
courseLinkMylearn
:
string
}
export
class
MyCompetencycourseModel
implements
CompetencycourseModel
{
...
...
@@ -14,6 +15,7 @@ export class MyCompetencycourseModel implements CompetencycourseModel {
tdesc
:
string
courseDetail
:
string
courseTopic
:
string
courseLinkMylearn
:
string
constructor
(
data
:
Partial
<
CompetencycourseModel
>
)
{
this
.
competencyCourseId
=
data
.
competencyCourseId
||
""
this
.
companyId
=
data
.
companyId
||
""
...
...
@@ -21,6 +23,7 @@ export class MyCompetencycourseModel implements CompetencycourseModel {
this
.
tdesc
=
data
.
tdesc
||
""
this
.
courseDetail
=
data
.
courseDetail
||
""
this
.
courseTopic
=
data
.
courseTopic
||
""
this
.
courseLinkMylearn
=
data
.
courseLinkMylearn
||
""
}
}
src/assets/template/IMPORT_MJOBCODEV2.xlsx
0 → 100644
View file @
a832ba11
File added
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