Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
myAppraisal
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
myAppraisal
Commits
94a59c94
Commit
94a59c94
authored
Feb 19, 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
13b192f3
0eb04ef7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
117 additions
and
20 deletions
+117
-20
competency-management.component.html
...ompetency-management/competency-management.component.html
+7
-5
edit-group-indicators.html
...rriculum/edit-group-indicators/edit-group-indicators.html
+45
-6
edit-group-indicators.ts
...curriculum/edit-group-indicators/edit-group-indicators.ts
+65
-1
set-approvers.component.ts
...tency-management/set-approvers/set-approvers.component.ts
+0
-8
No files found.
src/app/components/competency-assessment/competency-management/competency-management.component.html
View file @
94a59c94
...
@@ -28,15 +28,17 @@
...
@@ -28,15 +28,17 @@
</a>
</a>
</nav>
</nav>
</div>
</div>
<div
class=
"mt-3 px-3
rem !-mt-3 pt-50px"
>
<div
class=
"mt-3 px-2
rem !-mt-3 pt-50px"
>
<div
*
ngIf=
"currentPath==1"
id=
"underline-1"
role=
"tabpanel"
aria-labelledby=
"underline-item-1"
>
<div
*
ngIf=
"currentPath==1"
id=
"underline-1"
role=
"tabpanel"
aria-labelledby=
"underline-item-1"
>
<app-indicators-and-curriculum
(
sendPathTitle
)="
pathTitle=
$event"
></app-indicators-and-curriculum>
<app-indicators-and-curriculum
(
sendPathTitle
)="
pathTitle=
$event"
></app-indicators-and-curriculum>
</div>
</div>
<div
*
ngIf=
"currentPath==2"
id=
"underline-2"
class=
"hidden"
role=
"tabpanel"
aria-labelledby=
"underline-item-2"
>
<div
*
ngIf=
"currentPath==2"
id=
"underline-2"
class=
"hidden"
role=
"tabpanel"
<app-group-competencies
(
sendPathTitle
)="
pathTitle=
$event"
></app-group-competencies>
aria-labelledby=
"underline-item-2"
>
<app-group-competencies
(
sendPathTitle
)="
pathTitle=
$event"
></app-group-competencies>
</div>
</div>
<div
*
ngIf=
"currentPath==3"
id=
"underline-3"
class=
"hidden"
role=
"tabpanel"
aria-labelledby=
"underline-item-3"
>
<div
*
ngIf=
"currentPath==3"
id=
"underline-3"
class=
"hidden"
role=
"tabpanel"
<app-set-approvers
[
pathTitle
]="
pathTitle
"
(
sendPathTitle
)="
pathTitle=
$event"
></app-set-approvers>
aria-labelledby=
"underline-item-3"
>
<app-set-approvers
(
sendPathTitle
)="
pathTitle=
$event"
></app-set-approvers>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/components/competency-assessment/competency-management/indicators-and-curriculum/edit-group-indicators/edit-group-indicators.html
View file @
94a59c94
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</div>
</div>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(
click
)="
getIndicatorsCoursesById
()"
>
(
click
)="
clearDataList
()"
>
<svg
class=
"svg-indigo"
width=
"16"
height=
"16"
viewBox=
"0 0 64.00 64.00"
<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"
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)"
>
transform=
"rotate(45)matrix(-1, 0, 0, 1, 0, 0)"
>
...
@@ -38,7 +38,9 @@
...
@@ -38,7 +38,9 @@
</div>
</div>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
<button
type=
"button"
class=
"ti-btn ti-btn bg-pink-500/10 text-pink-500 hover:text-white hover:bg-pink-500 ring-offset-white focus:ring-pink-500 h-45px m-0 shadow-md"
>
class=
"ti-btn ti-btn bg-pink-500/10 text-pink-500 hover:text-white hover:bg-pink-500 ring-offset-white focus:ring-pink-500 h-45px m-0 shadow-md"
data-hs-overlay=
"#edit-group-indicators-upload-modal"
(
click
)="
fileInput
.
value =
''
;
selectedFile=
null;selectedFileName
=
'กรุณาเลือกไฟล์'"
>
<i
class=
"ti ti-file-plus"
></i>
<i
class=
"ti ti-file-plus"
></i>
import
import
</button>
</button>
...
@@ -66,17 +68,16 @@
...
@@ -66,17 +68,16 @@
<div
class=
"space-y-2 col-span-2"
>
<div
class=
"space-y-2 col-span-2"
>
<label
class=
"ti-form-label"
>
ประเภท
</label>
<label
class=
"ti-form-label"
>
ประเภท
</label>
<input
type=
"text"
class=
"ti-form-input bg-input-readonly"
readonly
<input
type=
"text"
class=
"ti-form-input bg-input-readonly"
readonly
[(
ngModel
)]="
indicatorsCourses
.
competencyTopic
.
competencyType
.
tdesc
"
>
[(
ngModel
)]="
indicatorsCourses
.
competencyTopic
.
competencyType
.
shortName
"
>
</div>
</div>
</div>
</div>
<div
class=
"space-y-2"
>
<div
class=
"space-y-2"
>
<label
class=
"ti-form-label"
>
ชื่อสมรรถนะ
</label>
<label
class=
"ti-form-label"
>
ชื่อสมรรถนะ
</label>
<textarea
type=
"text"
rows=
"2"
class=
"ti-form-input bg-input-readonly"
readonly
<textarea
type=
"text"
rows=
"2"
class=
"ti-form-input"
[(
ngModel
)]="
indicatorsCourses
.
tdesc
"
>
</textarea>
[(
ngModel
)]="
indicatorsCourses
.
tdesc
"
>
</textarea>
</div>
</div>
<div
class=
"space-y-2"
>
<div
class=
"space-y-2"
>
<label
class=
"ti-form-label"
>
นิยามสมรรถนะ
</label>
<label
class=
"ti-form-label"
>
นิยามสมรรถนะ
</label>
<textarea
type=
"text"
rows=
"3"
class=
"ti-form-input
bg-input-readonly"
readonly
<textarea
type=
"text"
rows=
"3"
class=
"ti-form-input
"
[(
ngModel
)]="
indicatorsCourses
.
indicatorsCourseDetailTh
"
></textarea>
[(
ngModel
)]="
indicatorsCourses
.
indicatorsCourseDetailTh
"
></textarea>
</div>
</div>
</div>
</div>
...
@@ -584,3 +585,40 @@
...
@@ -584,3 +585,40 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"edit-group-indicators-upload-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out rounded-md"
>
<div
class=
"ti-modal-header bg-primary !rounded-none !rounded-t-sm"
>
<h5
class=
"text-xxl font-bold text-white"
>
นำเข้าตัวชี้วัดเเละหลักสูตร
</h5>
</div>
<div
class=
"ti-modal-body max-h-full overflow-hidden ti-modal-content !rounded-t-none !rounded-b-sm"
>
<h1
class=
"mt-2"
style=
"text-align: center;"
>
ไฟล์
</h1>
<div
class=
"mt-2 p-2"
>
<div
class=
"flex rounded-md"
>
<input
#
fileInput
id=
"fileInput"
type=
"file"
(
change
)="
onFileSelected
($
event
)"
hidden
>
<input
type=
"text"
[
value
]="
selectedFileName
"
readonly
(
click
)="
fileInput
.
click
()"
class=
"ti-form-input rounded-none ltr:rounded-l-md rtl:rounded-r-md focus:z-10 cursor-pointer"
>
<button
type=
"button"
(
click
)="
fileInput
.
click
()"
class=
"inline-flex flex-shrink-0 justify-center items-center h-[2.875rem] w-[2.875rem] ltr:rounded-r-md rtl:rounded-l-md border border-transparent font-semibold bg-secondary text-white hover:bg-secondary focus:z-10 focus:outline-none focus:ring-0 focus:ring-secondary transition-all text-sm"
>
<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=
"#edit-group-indicators-upload-modal"
[
class
.
ti-btn-disabled
]="!
selectedFile
"
(
click
)="
uploadFile
()"
[
disabled
]="!
selectedFile
"
[
disabled
]="!
selectedFile
"
>
อัปโหลด
</button>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/components/competency-assessment/competency-management/indicators-and-curriculum/edit-group-indicators/edit-group-indicators.ts
View file @
94a59c94
...
@@ -9,6 +9,7 @@ import { CompetencytopicModel, MyCompetencytopicModel } from 'src/app/shared/mod
...
@@ -9,6 +9,7 @@ import { CompetencytopicModel, MyCompetencytopicModel } from 'src/app/shared/mod
import
{
IndicatorsCoursesModel
,
MyIndicatorsCoursesModel
}
from
'src/app/shared/model/indicators-courses.model'
;
import
{
IndicatorsCoursesModel
,
MyIndicatorsCoursesModel
}
from
'src/app/shared/model/indicators-courses.model'
;
import
{
AssessmentService
}
from
'src/app/shared/services/assessment.service'
;
import
{
AssessmentService
}
from
'src/app/shared/services/assessment.service'
;
import
{
CompetencycourseService
}
from
'src/app/shared/services/competencycourse.service'
;
import
{
CompetencycourseService
}
from
'src/app/shared/services/competencycourse.service'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
import
{
IndicatorsCoursesService
}
from
'src/app/shared/services/indicators-courses.service'
;
import
{
IndicatorsCoursesService
}
from
'src/app/shared/services/indicators-courses.service'
;
export
interface
DataModel
{
export
interface
DataModel
{
code
:
string
,
code
:
string
,
...
@@ -57,11 +58,15 @@ export class EditGroupIndicators implements OnInit {
...
@@ -57,11 +58,15 @@ export class EditGroupIndicators implements OnInit {
curriculumLoading
=
false
curriculumLoading
=
false
curriculumSelectIndex
:
number
=
-
1
curriculumSelectIndex
:
number
=
-
1
dataLoading
=
false
dataLoading
=
false
selectedFile
:
File
|
null
=
null
;
selectedFileName
:
string
=
'กรุณาเลือกไฟล์'
;
constructor
(
private
assessmentService
:
AssessmentService
,
constructor
(
private
assessmentService
:
AssessmentService
,
private
cdr
:
ChangeDetectorRef
,
private
cdr
:
ChangeDetectorRef
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
competencycourseService
:
CompetencycourseService
,
private
competencycourseService
:
CompetencycourseService
,
private
indicatorsCoursesService
:
IndicatorsCoursesService
)
{
private
indicatorsCoursesService
:
IndicatorsCoursesService
,
private
fileService
:
FileService
)
{
}
}
...
@@ -71,6 +76,65 @@ export class EditGroupIndicators implements OnInit {
...
@@ -71,6 +76,65 @@ export class EditGroupIndicators implements OnInit {
this
.
getCompetencycourseList
()
this
.
getCompetencycourseList
()
}
}
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
.
dataLoading
=
true
this
.
fileService
.
uploadExcel
(
formData
,
''
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getIndicatorsCoursesById
()
}
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
();
}
})
}
downloadFile
()
{
const
fileName
=
'.xlsx'
this
.
fileService
.
downloadTemplate
(
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'
)
}
})
}
clearDataList
()
{
this
.
indicatorsCourses
.
tdesc
=
""
this
.
indicatorsCourses
.
indicatorsCourseDetailTh
=
""
this
.
dataList
=
this
.
dataList
.
map
(
x
=>
({
code
:
x
.
code
,
behaviorIndicators
:
[],
assessmentTools
:
[],
curriculum
:
[]
}))
}
getIndicatorsCoursesById
()
{
getIndicatorsCoursesById
()
{
this
.
dataLoading
=
true
this
.
dataLoading
=
true
this
.
indicatorsCoursesService
.
getById
(
this
.
competencytopic
.
competencyTopicId
).
subscribe
({
this
.
indicatorsCoursesService
.
getById
(
this
.
competencytopic
.
competencyTopicId
).
subscribe
({
...
...
src/app/components/competency-assessment/competency-management/set-approvers/set-approvers.component.ts
View file @
94a59c94
...
@@ -16,15 +16,7 @@ interface table {
...
@@ -16,15 +16,7 @@ interface table {
styleUrls
:
[
'./set-approvers.component.scss'
]
styleUrls
:
[
'./set-approvers.component.scss'
]
})
})
export
class
SetApproversComponent
{
export
class
SetApproversComponent
{
@
Input
()
pathTitle
=
[
'การประเมินจัดประเมินสมรรถนะ'
,
'การจัดการสมรรถนะ'
,
'กำหนดผู้ประเมิน'
];
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
activeTab
:
string
=
'tab1'
;
changeTab
(
tab
:
{
id
:
string
,
text
:
string
})
{
this
.
sendPathTitle
.
emit
([
'การสมรรถนะจัดประเมินสมรรถนะ'
,
'การจัดการประเมิน'
,
tab
.
text
]);
this
.
activeTab
=
tab
.
id
;
}
currentPage
=
1
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
groupapprove_list
:
GroupApproveModel
[]
=
[]
groupapprove_list
:
GroupApproveModel
[]
=
[]
...
...
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