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
1ffef9dc
Commit
1ffef9dc
authored
Feb 18, 2025
by
Natthaphat Pankiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
การประเมินสมรรถนะ > การจัดการสมรรถนะ > จัดกลุ่มสมรรถนะ
parent
33e760c9
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
563 additions
and
391 deletions
+563
-391
competency-management.component.html
...ompetency-management/competency-management.component.html
+7
-10
competency-management.component.ts
.../competency-management/competency-management.component.ts
+1
-1
edit-group-competencies.component.html
...group-competencies/edit-group-competencies.component.html
+137
-75
edit-group-competencies.component.ts
...t-group-competencies/edit-group-competencies.component.ts
+133
-75
group-competencies.component.html
...ment/group-competencies/group-competencies.component.html
+66
-148
group-competencies.component.ts
...gement/group-competencies/group-competencies.component.ts
+68
-62
dashboard.module.ts
src/app/components/dashboard/dashboard.module.ts
+2
-0
competency-indicators-courses0.model.ts
src/app/shared/model/competency-indicators-courses0.model.ts
+32
-0
competency-indicators-courses1-list.model.ts
...shared/model/competency-indicators-courses1-list.model.ts
+6
-6
competency-indicators-courses1-mini.model.ts
...shared/model/competency-indicators-courses1-mini.model.ts
+25
-0
group-assessment.model.ts
src/app/shared/model/group-assessment.model.ts
+21
-0
group-assessment1-list.model.ts
src/app/shared/model/group-assessment1-list.model.ts
+14
-0
indicators-courses.model.ts
src/app/shared/model/indicators-courses.model.ts
+11
-8
pl.model.ts
src/app/shared/model/pl.model.ts
+5
-5
group-assessment.service.ts
src/app/shared/services/group-assessment.service.ts
+34
-0
indicators-courses.service.ts
src/app/shared/services/indicators-courses.service.ts
+1
-1
No files found.
src/app/components/competency-assessment/competency-management/competency-management.component.html
View file @
1ffef9dc
...
...
@@ -11,34 +11,31 @@
<a
class=
"font-size-16px font-weight-500 hs-tab-active:font-weight-700 hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active"
href=
"javascript:void(0);"
id=
"underline-item-1"
data-hs-tab=
"#underline-1"
aria-controls=
"underline-1"
(
click
)="
pathTitle =
['การประเมินสมรรถนะ','การจัดการสมรรถนะ','ตัวชี้วัดเเละหลักสูตร']"
>
(
click
)="
currentPath =
1;
pathTitle
=
['การประเมินสมรรถนะ','การจัดการสมรรถนะ','ตัวชี้วัดเเละหลักสูตร']"
>
ตัวชี้วัดเเละหลักสูตร
</a>
<a
class=
"font-size-16px font-weight-500 hs-tab-active:font-weight-700 hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary"
href=
"javascript:void(0);"
id=
"underline-item-2"
data-hs-tab=
"#underline-2"
aria-controls=
"underline-2"
(
click
)="
pathTitle =
['การประเมินสมรรถนะ','การจัดการสมรรถนะ','จัดกลุ่มสมรรถนะ']"
>
(
click
)="
currentPath =
2;
pathTitle
=
['การประเมินสมรรถนะ','การจัดการสมรรถนะ','จัดกลุ่มสมรรถนะ']"
>
จัดกลุ่มสมรรถนะ
</a>
<a
class=
"font-size-16px font-weight-500 hs-tab-active:font-weight-700 hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary"
href=
"javascript:void(0);"
id=
"underline-item-3"
data-hs-tab=
"#underline-3"
aria-controls=
"underline-3"
(
click
)="
pathTitle =
['การประเมินสมรรถนะ','การจัดการสมรรถนะ','กำหนดผู้ประเมิน']"
>
(
click
)="
currentPath =
3;
pathTitle
=
['การประเมินสมรรถนะ','การจัดการสมรรถนะ','กำหนดผู้ประเมิน']"
>
กำหนดผู้ประเมิน
</a>
</nav>
</div>
<div
class=
"mt-3 px-3rem !-mt-3 pt-50px"
>
<div
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>
</div>
<div
id=
"underline-2"
class=
"hidden"
role=
"tabpanel"
aria-labelledby=
"underline-item-2"
>
<app-group-competencies
*
ngIf=
"groupShow=='1'"
[
pathTitle
]="
pathTitle
"
(
sendPathTitle
)="
pathTitle=
$event"
(
sendGroupShow
)="
groupShow=
$event"
></app-group-competencies>
<app-edit-group-competencies
*
ngIf=
"groupShow=='2'"
[
pathTitle
]="
pathTitle
"
(
sendPathTitle
)="
pathTitle=
$event"
(
sendGroupShow
)="
groupShow=
$event"
></app-edit-group-competencies>
<div
*
ngIf=
"currentPath==2"
id=
"underline-2"
class=
"hidden"
role=
"tabpanel"
aria-labelledby=
"underline-item-2"
>
<app-group-competencies
(
sendPathTitle
)="
pathTitle=
$event"
></app-group-competencies>
</div>
<div
id=
"underline-3"
class=
"hidden"
role=
"tabpanel"
aria-labelledby=
"underline-item-3"
>
<div
*
ngIf=
"currentPath==3"
id=
"underline-3"
class=
"hidden"
role=
"tabpanel"
aria-labelledby=
"underline-item-3"
>
<app-set-approvers
[
pathTitle
]="
pathTitle
"
(
sendPathTitle
)="
pathTitle=
$event"
></app-set-approvers>
</div>
</div>
...
...
src/app/components/competency-assessment/competency-management/competency-management.component.ts
View file @
1ffef9dc
...
...
@@ -7,5 +7,5 @@ import { Component } from '@angular/core';
})
export
class
CompetencyManagementComponent
{
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'การจัดการสมรรถนะ'
,
'ตัวชี้วัดและหลักสูตร'
]
groupShow
=
'1'
currentPath
=
1
}
src/app/components/competency-assessment/competency-management/group-competencies/edit-group-competencies/edit-group-competencies.component.html
View file @
1ffef9dc
...
...
@@ -2,7 +2,7 @@
<div
class=
"flex justify-between"
>
<div
class=
"flex"
>
<button
type=
"button"
class=
"ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500"
(
click
)="
on
Back
()"
>
(
click
)="
on
Edit
()"
>
<i
class=
"ti ti-chevron-left"
></i>
ย้อนกลับ
</button>
...
...
@@ -12,7 +12,7 @@
</div>
</div>
</div>
<div
class=
"py-2 border-b-2 border-collapse "
>
<div
*
ngIf=
"pl"
class=
"py-2 border-b-2 border-collapse "
>
<div
class=
"grid grid-cols-3 gap-6"
>
<div
class=
"col-span-1"
>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label"
>
รหัส
</label>
...
...
@@ -22,7 +22,7 @@
<div
class=
"col-span-1"
>
<input
type=
"text"
id=
"input-label"
class=
"py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input w-2/3 rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
readonly
value=
"O1O2
"
>
readonly
[(
ngModel
)]="
pl
.
plId
"
>
</div>
</div>
<div
class=
"grid grid-cols-3 gap-6 mt-5"
>
...
...
@@ -37,12 +37,12 @@
<div
class=
"col-span-1"
>
<input
type=
"text"
id=
"input-label"
class=
"py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input w-2/3 rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
readonly
value=
"พนักงานระดับ O1-O2
"
>
readonly
[(
ngModel
)]="
pl
.
tdesc
"
>
</div>
<div
class=
"col-span-1"
>
<input
type=
"text"
id=
"input-label"
class=
"py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input w-2/3 rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
readonly
value=
"Employee level 01-02
"
>
readonly
[(
ngModel
)]="
pl
.
edesc
"
>
</div>
</div>
</div>
...
...
@@ -54,7 +54,7 @@
<div
class=
"flex gap-x-6"
>
<div
class=
"flex items-center"
>
<label
for=
"hs-checkbox-group-1"
class=
"text-sm text-gray-500 ltr:ml-2 rtl:mr-2 dark:text-white/70"
>
{{
checkSelect()
}}
class=
"text-sm text-gray-500 ltr:ml-2 rtl:mr-2 dark:text-white/70"
>
{{
dataSelectList.length
}}
Selected
</label>
</div>
...
...
@@ -73,7 +73,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
style=
"height: 40px;"
>
style=
"height: 40px;"
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()"
>
<div
class=
"absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4"
>
<i
class=
"ri-search-line text-gray"
></i>
...
...
@@ -128,59 +128,89 @@
</ng-container>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let item of mockDataList;let i = index"
>
<td
class=
"flex justify-center items-center"
style=
"height: 40px; font-size: 12px;"
>
<input
class=
"mr-1"
type=
"checkbox"
style=
"transform: scale(0.7);"
[(
ngModel
)]="
item
.
checked
"
>
<span
style=
"display: inline-block;"
class=
"w-10"
>
{{ item.id}}
</span>
<tbody
*
ngIf=
"dataLoading"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
aria-label=
"loading"
>
<span
class=
"sr-only"
>
Loading...
</span>
</div>
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!dataLoading&&!dataListFilter().length"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!dataLoading&&dataListFilter().length"
>
<tr
*
ngFor=
"let item of dataListFilter()| slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"text-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
id=
"checkbox-{{item.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}"
[(
ngModel
)]="
item
.
check
"
(
change
)="
checkSelect
()"
>
<label
for=
"checkbox-{{item.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}"
>
{{item.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}
</label>
</td>
<td
style=
"font-size: 12px; width: 60%;"
>
{{item.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc}}
</td>
<td
style=
"font-size: 12px;text-align: center;"
>
{{item.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.expectation}}
</td>
<td
style=
"font-size: 12px; width: 60%;"
>
{{item.name}}
</td>
<td
style=
"font-size: 12px;text-align: center;"
>
{{item.level}}
</td>
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#edit-group-competencies-alert-delete-modal"
></i>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"body-content"
style=
"margin-top: 20px;"
>
<ul
class=
"nav-tabs"
>
<div
class=
"px-1 py-1 bg-white rounded-2 shadow justify-content-center align-items-center"
>
<div
class=
"box-body"
>
<nav
class=
"pagination-style-3 overflow-auto"
>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li><a
class=
"page-link active"
href=
"javascript:void(0);"
aria-current=
"page"
>
1
</a>
<li
*
ngFor=
"let item of page;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&¤tPage!=1&¤tPage!=2&¤tPage!=3"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
<ng-container
*
ngIf=
"(f||l)||(item==currentPage-1||item==currentPage||item==currentPage+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPage"
(
click
)="
currentPage=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==page.length-2&¤tPage!=page.length&¤tPage!=page.length-1&¤tPage!=page.length-2"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
</li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
2
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
3
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
4
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
5
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
...
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
31
</a></li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage
>
page.length-1 ? currentPage: currentPage+1 )">
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
</ul>
</nav>
</div>
</div>
</ul>
<ul
class=
"nav-tabs mt-1"
>
<p>
Show 1 to 10 of 50 items
</p>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPage-1) * 10)+1}} to {{dataListFilter().length
<10
?
dataListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
dataListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
dataListFilter
().
length
}}
items
</
span
>
</ul>
</
di
v>
</
na
v>
</div>
...
...
@@ -207,7 +237,8 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
>
placeholder=
"Search by No. or Name"
[(
ngModel
)]="
searchModal
"
(
ngModelChange
)="
searchModalChange
()"
>
<div
class=
"absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4"
>
<i
class=
"ri-search-line text-gray"
></i>
...
...
@@ -253,21 +284,45 @@
</ng-container>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let item of[
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','1'],
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','2'],
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','3'],
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','4'],
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','5'],
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','6']];let i = index"
>
<td
class=
"flex justify-center"
style=
"font-size: 12px;"
>
{{item[0]}}
</td>
<td
style=
"font-size: 12px; width: 60%;"
>
{{item[1]}}
</td>
<td
style=
"font-size: 12px; width: 15%; text-align: center;"
>
{{item[2]}}
</td>
<tbody
*
ngIf=
"dataLoading"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
aria-label=
"loading"
>
<span
class=
"sr-only"
>
Loading...
</span>
</div>
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!dataLoading&&!dataListModalFilter().length"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!dataLoading&&dataListModalFilter().length"
>
<tr
*
ngFor=
"let item of dataListModalFilter()| slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"text-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
id=
"checkbox-{{item.data.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}"
[(
ngModel
)]="
item
.
check
"
(
change
)="
checkSelect
()"
>
<label
for=
"checkbox-{{item.data.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}"
>
{{item.data.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}
</label>
</td>
<td
style=
"font-size: 12px; width: 60%;"
>
{{item.data.competencyIndicatorsCourses0.tdesc}}
</td>
<td
style=
"font-size: 12px;text-align: center;"
>
{{item.data.competencyIndicatorsCourses0.expectation}}
</td>
<td
class=
"flex justify-center"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
(
click
)="
selectIndicatorsCourses
(
item
.
data
)"
data-hs-overlay=
"#edit-group-competencies-table-modal-select"
>
<i
class=
"ri-add-line"
></i>
Select
...
...
@@ -279,39 +334,46 @@
</table>
</div>
</div>
<div
class=
"body-content"
style=
"margin-top: 20px;"
>
<ul
class=
"nav-tabs"
>
<div
class=
"px-1 bg-white rounded-2 shadow justify-content-center align-items-center"
>
<div
class=
"box-body"
>
<nav
class=
"pagination-style-3 overflow-auto"
>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li><a
class=
"page-link active"
href=
"javascript:void(0);"
aria-current=
"page"
>
1
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
2
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
3
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
4
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
5
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
...
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
31
</a></li>
<li
*
ngFor=
"let item of page;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&¤tPage!=1&¤tPage!=2&¤tPage!=3"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
<ng-container
*
ngIf=
"(f||l)||(item==currentPage-1||item==currentPage||item==currentPage+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPage"
(
click
)="
currentPage=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==page.length-2&¤tPage!=page.length&¤tPage!=page.length-1&¤tPage!=page.length-2"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
</li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage
>
page.length-1 ? currentPage: currentPage+1 )">
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
</ul>
</nav>
</div>
</div>
</ul>
<ul
class=
"nav-tabs mt-1"
>
<p>
Show 1 to 10 of 50 items
</p>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPage-1) * 10)+1}} to {{dataListModalFilter().length
<10
?
dataListModalFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
dataListModalFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
dataListModalFilter
().
length
}}
items
</
span
>
</ul>
</
di
v>
</
na
v>
</div>
</div>
</div>
...
...
@@ -345,7 +407,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#edit-group-competencies-alert-add-modal"
(
click
)="
addUser
();
showSuccess
()"
>
data-hs-overlay=
"#edit-group-competencies-alert-add-modal"
(
click
)="
saveGroupAssessment1
()"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -381,8 +443,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#edit-group-competencies-alert-edit-modal"
(
click
)="
addUser
();
showSuccessEdit
()"
>
data-hs-overlay=
"#edit-group-competencies-alert-edit-modal"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -418,10 +479,11 @@
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#edit-group-competencies-alert-delete-modal"
(
click
)="
addUser
();
showSuccessDelete
()"
>
(
click
)="
deleteGroupAssessmentById
()"
>
ลบข้อมูล
</a>
</div>
</div>
</div>
</div>
...
...
src/app/components/competency-assessment/competency-management/group-competencies/edit-group-competencies/edit-group-competencies.component.ts
View file @
1ffef9dc
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
{
GroupAssessmentModel
,
MyGroupAssessmentModel
}
from
'src/app/shared/model/group-assessment.model'
;
import
{
GroupAssessment1ListModel
,
MyGroupAssessment1ListModel
}
from
'src/app/shared/model/group-assessment1-list.model'
;
import
{
MyPLModel
,
PLModel
}
from
'src/app/shared/model/pl.model'
;
import
{
GroupAssessmentService
}
from
'src/app/shared/services/group-assessment.service'
;
import
{
IndicatorsCoursesService
}
from
'src/app/shared/services/indicators-courses.service'
;
import
{
CompetencyIndicatorsCourses1MiniModel
,
MyCompetencyIndicatorsCourses1MiniModel
}
from
'src/app/shared/model/competency-indicators-courses1-mini.model'
;
@
Component
({
selector
:
'app-edit-group-competencies'
,
...
...
@@ -7,102 +13,154 @@ import { ToastrService } from 'ngx-toastr';
styleUrls
:
[
'./edit-group-competencies.component.scss'
]
})
export
class
EditGroupCompetenciesComponent
{
@
Input
()
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'การจัดการสมรรถนะ'
,
'จัดกลุ่มสมรรถนะ'
];
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
activeTab
:
string
=
'tab1'
;
// กำหนด tab เริ่มต้น
// ฟังก์ชันในการเปลี่ยนแท็บ
changeTab
(
tab
:
{
id
:
string
,
text
:
string
})
{
this
.
sendPathTitle
.
emit
([
'การประเมินสมรรถนะ'
,
'การจัดการสมรรถนะ'
,
tab
.
text
]);
this
.
activeTab
=
tab
.
id
;
}
onBack
()
{
this
.
sendGroupShow
.
emit
(
'1'
);
// เปลี่ยนกลับไปหน้า 1
}
// การจัดการการเปิดปิด modal
modalOptions
:
{
[
nameModal
:
string
]:
{
isModalOpen
:
boolean
;
modalSize
:
string
;
backdropClose
:
boolean
;
};
}
=
{
"add"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
},
"edit"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
}
};
mockDataList
=
[
{
checked
:
false
,
id
:
'CC-01'
,
name
:
'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)'
,
level
:
'ระดับที่ 1'
},
{
checked
:
false
,
id
:
'CC-02'
,
name
:
'การทำงานเป็นทีมแบบ TAT (TAT Teamwork)'
,
level
:
'ระดับที่ 1'
},
{
checked
:
false
,
id
:
'CC-03'
,
name
:
'ความรับผิดชอบในหน้าที่และโปร่งใส (Accountability & Ethics)'
,
level
:
'ระดับที่ 1'
},
{
checked
:
false
,
id
:
'CC-04'
,
name
:
'การพัฒนาอย่างต่อเนื่อง (Readiness to Learn & Continous Improvement)'
,
level
:
'ระดับที่ 1'
},
{
checked
:
false
,
id
:
'CC-05'
,
name
:
'การคิดอย่างเป็นระบบ (Systematic Thinking)'
,
level
:
'ระดับที่ 1'
}]
@
Input
()
pl
:
PLModel
=
new
MyPLModel
()
@
Output
()
sendEdit
:
EventEmitter
<
boolean
>
=
new
EventEmitter
<
boolean
>
();
groupCompetencies
:
GroupAssessmentModel
=
new
MyGroupAssessmentModel
()
dataSelectList
:
GroupAssessment1ListModel
[]
=
[];
dataSelect
:
GroupAssessment1ListModel
=
new
MyGroupAssessment1ListModel
()
dataList
:
{
check
:
boolean
,
data
:
GroupAssessment1ListModel
}[]
=
[]
dataListModal
:
{
check
:
boolean
,
data
:
CompetencyIndicatorsCourses1MiniModel
}[]
=
[]
search
=
""
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
isChecked
:
boolean
=
false
;
searchModal
=
""
currentPageModal
=
1
dataLoading
=
false
dataModalLoading
=
false
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
groupAssessmentService
:
GroupAssessmentService
,
private
indicatorsCoursesService
:
IndicatorsCoursesService
)
{
}
ngOnInit
()
{
this
.
getGroupAssessmentById
()
this
.
getIndicatorsCoursesList
()
}
onEdit
()
{
this
.
sendEdit
.
emit
(
false
);
}
checkSelect
()
{
return
this
.
mockDataList
.
filter
(
item
=>
item
.
checked
).
length
;
this
.
dataSelectList
=
this
.
dataList
.
filter
(
item
=>
item
.
check
).
map
(
item
=>
item
.
data
)
;
}
openModal
(
name
:
string
,
size
:
string
,
closeOnBackdrop
?:
boolean
)
{
this
.
modalOptions
[
name
].
modalSize
=
size
;
this
.
modalOptions
[
name
].
backdropClose
=
closeOnBackdrop
||
false
;
this
.
modalOptions
[
name
].
isModalOpen
=
true
;
this
.
currentModal
=
name
;
// ตั้งค่าค่าของ currentModal เป็น 'add' หรือ 'edit'
document
.
body
.
style
.
overflow
=
'hidden'
;
toggleCheckbox
()
{
this
.
isChecked
=
!
this
.
isChecked
;
this
.
dataList
.
forEach
((
item
)
=>
{
item
.
check
=
this
.
isChecked
;
});
this
.
checkSelect
();
}
closeModal
(
name
:
string
)
{
this
.
modalOptions
[
name
].
isModalOpen
=
false
;
if
(
!
this
.
isAnyModalOpen
())
{
document
.
body
.
style
.
overflow
=
''
;
// คืนค่าการ Scroll เฉพาะเมื่อ Modal ทั้งหมดปิดแล้ว
getGroupAssessmentById
()
{
this
.
dataLoading
=
true
;
this
.
groupAssessmentService
.
getById
(
this
.
pl
.
plId
).
subscribe
({
next
:
response
=>
{
this
.
groupCompetencies
=
new
MyGroupAssessmentModel
({
...
response
,
personalLevel
:
new
MyPLModel
(
this
.
pl
)
})
this
.
dataList
=
new
MyGroupAssessmentModel
(
response
).
groupAssessment1List
.
map
(
x
=>
({
check
:
false
,
data
:
new
MyGroupAssessment1ListModel
(
x
)
}))
this
.
dataLoading
=
false
;
this
.
searchChange
();
this
.
cdr
.
detectChanges
();
},
error
:
error
=>
{
this
.
dataLoading
=
false
;
this
.
cdr
.
detectChanges
();
}
});
}
isAnyModalOpen
():
boolean
{
return
Object
.
values
(
this
.
modalOptions
).
some
(
modal
=>
modal
.
isModalOpen
);
// ตรวจสอบว่า modal อื่นยังเปิดอยู่หรือไม่
searchChange
()
{
this
.
currentPage
=
1
;
const
filteredData
=
this
.
dataListFilter
();
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
;
});
}
// ฟังก์ชัน toggle checkbox
isChecked
:
boolean
=
false
;
// ใช้สำหรับตรวจสอบสถานะของ checkbox
getIndicatorsCoursesList
()
{
this
.
dataModalLoading
=
true
this
.
indicatorsCoursesService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
dataListModal
=
response
.
map
(
x
=>
({
check
:
false
,
data
:
new
MyCompetencyIndicatorsCourses1MiniModel
(
x
)
}));
this
.
dataModalLoading
=
false
;
this
.
searchModalChange
();
this
.
cdr
.
detectChanges
();
},
error
:
error
=>
{
this
.
dataModalLoading
=
false
;
this
.
cdr
.
detectChanges
();
}
});
}
toggleCheckbox
()
{
this
.
isChecked
=
!
this
.
isChecked
;
// สลับสถานะ
this
.
mockDataList
=
this
.
mockDataList
.
map
(
x
=>
({
...
x
,
checked
:
this
.
isChecked
}))
selectIndicatorsCourses
(
data
:
CompetencyIndicatorsCourses1MiniModel
)
{
this
.
dataList
.
push
({
check
:
false
,
data
:
new
MyGroupAssessment1ListModel
({
competencyIndicatorsCourses1Mini
:
new
MyCompetencyIndicatorsCourses1MiniModel
(
data
)
})
})
}
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
addUser
()
{
searchModalChange
()
{
this
.
currentPage
=
1
;
const
filteredData
=
this
.
dataListModalFilter
();
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
dataListModalFilter
()
{
return
this
.
dataListModal
.
filter
(
x
=>
{
const
data
=
x
.
data
const
match
=
data
.
competencyIndicatorsCourses0
.
competencyTopic
.
competencyTopicId
.
toLowerCase
().
includes
(
this
.
searchModal
.
toLowerCase
())
||
data
.
competencyIndicatorsCourses0
.
tdesc
.
toLowerCase
().
includes
(
this
.
searchModal
.
toLowerCase
())
||
data
.
competencyIndicatorsCourses0
.
expectation
.
toLocaleLowerCase
().
includes
(
this
.
searchModal
.
toLocaleLowerCase
())
return
match
;
});
}
currentModal
=
""
;
saveGroupAssessment1
()
{
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
{
this
.
showAlert
(
response
.
message
,
'error'
);
}
},
error
:
(
error
)
=>
{
this
.
showAlert
(
error
.
message
,
'error'
);
}
});
}
constructor
(
private
toastr
:
ToastrService
)
{
}
deleteGroupAssessmentById
()
{
const
selectedItems
=
this
.
dataList
.
filter
(
item
=>
item
.
check
);
showSuccess
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
if
(
selectedItems
.
length
>
0
)
{
this
.
dataList
=
this
.
dataList
.
filter
(
item
=>
!
item
.
check
);
}
else
if
(
this
.
dataList
.
length
>
0
)
{
this
.
dataList
.
pop
();
}
showSuccessEdit
()
{
this
.
toastr
.
success
(
'เเก้ไขข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
this
.
cdr
.
detectChanges
();
this
.
showAlert
(
'ลบข้อมูลสำเร็จ'
,
'success'
);
}
show
SuccessDelete
(
)
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'เเ
จ้งเตือน'
,
{
show
Alert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แ
จ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
})
;
})
}
}
src/app/components/competency-assessment/competency-management/group-competencies/group-competencies.component.html
View file @
1ffef9dc
<div
class=
"w-full min-height-50px mb-10px justify-between items-center"
>
<ng-container
*
ngIf=
"!editTab"
>
<div
class=
"w-full min-height-50px mb-10px justify-between items-center"
>
<div
class=
"flex"
>
</div>
...
...
@@ -6,7 +7,8 @@
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
>
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()"
>
<div
class=
"absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4"
>
<i
class=
"ri-search-line text-gray"
></i>
...
...
@@ -28,18 +30,19 @@
</button>
</div>
</div>
</div>
</div>
<div
class=
"page px-rem"
>
<div
class=
"page px-rem"
>
<div
class=
"overflow-auto shadow-md rounded-t-md"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover table-bordered"
>
<thead>
<tr>
<ng-container
*
ngFor=
"let item of ['รหัส','ชื่อระดับพนักงาน (ไทย)','การจัดการ']; let f = first; let l = last; let i = index"
>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary !text-center"
>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary !text-center"
>
<span
class=
"font-size-12px font-weight-700"
>
{{ item }}
</span>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!l"
>
<i
class=
"ti ti-dots-vertical fs-l"
></i>
...
...
@@ -48,164 +51,79 @@
</ng-container>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let item of[
['O1O2', 'พนักงานระดับ O1-O2'],
['O3O4', 'พนักงานระดับ O3-O4'],
['S1S2', 'พนักงานระดับ S1-S2'],
['S3S4', 'พนักงานระดับ S3-S4'],
['M1M2', 'พนักงานระดับ M1-M2'],
['M3M4', 'พนักงานระดับ M3-M4'],
['E1E2', 'พนักงานระดับ E1-E2'],
['E3E4', 'พนักงานระดับ E3-E4']];let i = index"
>
<td
class=
"text-center"
>
{{ item[0] }}
</td>
<td>
{{item[1]}}
</td>
<tbody
*
ngIf=
"dataLoading"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
aria-label=
"loading"
>
<span
class=
"sr-only"
>
Loading...
</span>
</div>
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!dataLoading&&!dataListFilter().length"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!dataLoading&&dataListFilter().length"
>
<tr
*
ngFor=
"let item of dataListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"text-center"
>
{{item.code}}
</td>
<td
class=
"text-center"
>
{{item.name}}
</td>
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
onEdit
()"
></i>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
selectGroupCompetencies
(
item
);
editTab=
true;pathTitleChange()"
></i>
</td>
</tr>
</tbody>
</table>
</div>
<div
class=
"body-content"
style=
"margin-top: 20px;"
>
<ul
class=
"nav-tabs"
>
<div
class=
"px-1 py-1 bg-white rounded-2 shadow justify-content-center align-items-center"
>
<div
class=
"box-body"
>
<nav
class=
"pagination-style-3 overflow-auto"
>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<a
aria-label=
"anchor"
class=
"page-link !pl-0"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li><a
class=
"page-link active"
href=
"javascript:void(0);"
aria-current=
"page"
>
1
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
2
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
3
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
4
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
5
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
...
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
31
</a></li>
<li
*
ngFor=
"let item of page;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&¤tPage!=1&¤tPage!=2&¤tPage!=3"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
<ng-container
*
ngIf=
"(f||l)||(item==currentPage-1||item==currentPage||item==currentPage+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPage"
(
click
)="
currentPage=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==page.length-2&¤tPage!=page.length&¤tPage!=page.length-1&¤tPage!=page.length-2"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
</li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage
>
page.length-1 ? currentPage: currentPage+1 )">
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
</ul>
</nav>
</div>
</div>
</ul>
<ul
class=
"nav-tabs mt-1"
>
<p>
Show 1 to 10 of 50 items
</p>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPage-1) * 10)+1}} to {{dataListFilter().length
<10
?
dataListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
dataListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
dataListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</div>
</div>
<div
id=
"group-competencies-alert-add-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#group-competencies-alert-add-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการบันทึกข้อมูลหรือไม่
</p>
<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"
data-hs-overlay=
"#group-competencies-modal-add"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#group-competencies-alert-add-modal"
(
click
)="
addUser
();
showSuccess
()"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
<div
id=
"group-competencies-alert-edit-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#group-competencies-alert-edit-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการเเก้ไขข้อมูลหรือไม่
</p>
<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"
data-hs-overlay=
"#group-competencies-modal-edit"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#group-competencies-alert-edit-modal"
(
click
)="
addUser
();
showSuccessEdit
()"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
<div
id=
"group-competencies-alert-delete-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#group-competencies-alert-delete-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการลบข้อมูลหรือไม่!
</p>
</ng-container>
<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"
data-hs-overlay=
"#group-competencies-alert-delete-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#group-competencies-alert-delete-modal"
(
click
)="
addUser
();
showSuccessDelete
()"
>
ลบข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<ng-container
*
ngIf=
"editTab"
>
<app-edit-group-competencies
[
pl
]="
groupCompetencies
"
(
sendEdit
)="
editTab=
$event;pathTitleChange()"
></app-edit-group-competencies>
</ng-container>
\ No newline at end of file
src/app/components/competency-assessment/competency-management/group-competencies/group-competencies.component.ts
View file @
1ffef9dc
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
{
MyPLModel
,
PLModel
}
from
'src/app/shared/model/pl.model'
;
import
{
PLService
}
from
'src/app/shared/services/pl.service'
;
export
interface
DataModel
{
code
:
string
name
:
string
edesc
:
string
companyId
:
string
}
@
Component
({
selector
:
'app-group-competencies'
,
...
...
@@ -7,81 +15,66 @@ import { ToastrService } from 'ngx-toastr';
styleUrls
:
[
'./group-competencies.component.scss'
]
})
export
class
GroupCompetenciesComponent
{
@
Input
()
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'การจัดการสมรรถนะ'
,
'จัดกลุ่มสมรรถนะ'
];
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
activeTab
:
string
=
'tab1'
;
// กำหนด tab เริ่มต้น
editTab
=
false
currentPage
=
1
search
=
""
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
// ฟังก์ชันในการเปลี่ยนแท็บ
changeTab
(
tab
:
{
id
:
string
,
text
:
string
})
{
this
.
sendPathTitle
.
emit
([
'การประเมินสมรรถนะ'
,
'การจัดการสมรรถนะ'
,
tab
.
text
]);
this
.
activeTab
=
tab
.
id
;
}
onEdit
(){
this
.
sendGroupShow
.
emit
(
'2'
);
}
// การจัดการการเปิดปิด modal
modalOptions
:
{
[
nameModal
:
string
]:
{
isModalOpen
:
boolean
;
modalSize
:
string
;
backdropClose
:
boolean
;
};
}
=
{
"add"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
},
"edit"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
}
};
dataList
:
DataModel
[]
=
[]
dataSelect
:
DataModel
=
{
code
:
''
,
name
:
''
,
edesc
:
''
,
companyId
:
''
}
groupCompetenciesList
:
PLModel
[]
=
[]
groupCompetencies
:
PLModel
=
new
MyPLModel
({})
dataLoading
=
false
openModal
(
name
:
string
,
size
:
string
,
closeOnBackdrop
?:
boolean
)
{
this
.
modalOptions
[
name
].
modalSize
=
size
;
this
.
modalOptions
[
name
].
backdropClose
=
closeOnBackdrop
||
false
;
this
.
modalOptions
[
name
].
isModalOpen
=
true
;
this
.
currentModal
=
name
;
// ตั้งค่าค่าของ currentModal เป็น 'add' หรือ 'edit'
document
.
body
.
style
.
overflow
=
'hidden'
;
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
pLService
:
PLService
,
)
{
this
.
pathTitleChange
()
}
closeModal
(
name
:
string
)
{
this
.
modalOptions
[
name
].
isModalOpen
=
false
;
if
(
!
this
.
isAnyModalOpen
())
{
document
.
body
.
style
.
overflow
=
''
;
// คืนค่าการ Scroll เฉพาะเมื่อ Modal ทั้งหมดปิดแล้ว
ngOnInit
():
void
{
this
.
getList
()
}
getList
()
{
this
.
dataLoading
=
true
this
.
pLService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
dataList
=
response
.
map
(
x
=>
({
code
:
x
.
plId
,
name
:
x
.
tdesc
,
edesc
:
x
.
edesc
,
companyId
:
x
.
companyId
}))
this
.
groupCompetenciesList
=
response
this
.
dataLoading
=
false
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
dataLoading
=
false
this
.
cdr
.
detectChanges
()
}
isAnyModalOpen
():
boolean
{
return
Object
.
values
(
this
.
modalOptions
).
some
(
modal
=>
modal
.
isModalOpen
);
// ตรวจสอบว่า modal อื่นยังเปิดอยู่หรือไม่
})
}
// ฟังก์ชัน toggle checkbox
isChecked
:
boolean
=
false
;
// ใช้สำหรับตรวจสอบสถานะของ checkbox
toggleCheckbox
()
{
this
.
isChecked
=
!
this
.
isChecked
;
// สลับสถานะ
selectData
(
data
?:
DataModel
)
{
this
.
dataSelect
=
JSON
.
parse
(
JSON
.
stringify
(
data
||
{
code
:
''
,
name
:
''
,
edesc
:
''
,
companyId
:
''
}))
}
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
addUser
()
{
console
.
log
(
'เพิ่มผู้ใช้งาน'
);
selectGroupCompetencies
(
data
:
DataModel
)
{
const
groupCompetencies
=
this
.
groupCompetenciesList
.
find
(
x
=>
x
.
plId
==
data
.
code
)
this
.
groupCompetencies
=
new
MyPLModel
(
groupCompetencies
)
}
deleteUser
()
{
console
.
log
(
'ลบผู้ใช้งาน'
);
pathTitleChange
()
{
this
.
sendPathTitle
.
emit
(
this
.
editTab
?
[
'การประเมินสมรรถนะ'
,
'การจัดการสมรรถนะ'
,
'จัดกลุ่มสมรรถนะ'
,
'แก้ไขกลุ่มสมรรถนะ'
]
:
[
'การประเมินสมรรถนะ'
,
'การจัดการสมรรถนะ'
,
'จัดกลุ่มสมรรถนะ'
])
}
editUser
()
{
console
.
log
(
'แก้ไขผู้ใช้งาน'
);
searchChange
()
{
this
.
currentPage
=
1
;
const
filteredData
=
this
.
dataListFilter
();
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
currentModal
=
""
;
constructor
(
private
toastr
:
ToastrService
)
{
}
dataListFilter
()
{
return
this
.
dataList
.
filter
(
x
=>
{
const
match
=
x
.
code
.
toLocaleLowerCase
().
includes
(
this
.
search
.
toLocaleLowerCase
())
||
x
.
name
.
toLocaleLowerCase
().
includes
(
this
.
search
.
toLocaleLowerCase
());
return
match
;
});
}
showSuccess
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
...
...
@@ -103,4 +96,17 @@ export class GroupCompetenciesComponent {
positionClass
:
'toast-top-right'
,
});
}
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
addUser
()
{
console
.
log
(
'เพิ่มผู้ใช้งาน'
);
}
deleteUser
()
{
console
.
log
(
'ลบผู้ใช้งาน'
);
}
editUser
()
{
console
.
log
(
'แก้ไขผู้ใช้งาน'
);
}
}
src/app/components/dashboard/dashboard.module.ts
View file @
1ffef9dc
...
...
@@ -134,6 +134,7 @@ import { FileService } from 'src/app/shared/services/file.service';
import
{
CompetencyGroupGradeService
}
from
'src/app/shared/services/competency-group-grade.service'
;
import
{
IndicatorsCoursesService
}
from
'src/app/shared/services/indicators-courses.service'
;
import
{
IdpDevelopmentService
}
from
'src/app/shared/services/idp-development.service'
;
import
{
GroupAssessmentService
}
from
'src/app/shared/services/group-assessment.service'
;
export
const
MY_DATE_FORMATS
=
{
parse
:
{
...
...
@@ -298,6 +299,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
CompetencyGroupGradeService
,
IndicatorsCoursesService
,
IdpDevelopmentService
,
GroupAssessmentService
,
{
provide
:
HTTP_INTERCEPTORS
,
useClass
:
HttpRequestInterceptor
,
...
...
src/app/shared/model/competency-indicators-courses0.model.ts
0 → 100644
View file @
1ffef9dc
import
{
CompetencytopicModel
,
MyCompetencytopicModel
}
from
"./competencytopic.model"
export
interface
CompetencyIndicatorsCourses0Model
{
competencyTopic
:
CompetencytopicModel
companyId
:
string
edesc
:
string
tdesc
:
string
indicatorsCourseDetailTh
:
string
indicatorsCourseDetailEn
:
string
expectation
:
string
}
export
class
MyCompetencyIndicatorsCourses0Model
implements
CompetencyIndicatorsCourses0Model
{
competencyTopic
:
CompetencytopicModel
companyId
:
string
edesc
:
string
tdesc
:
string
indicatorsCourseDetailTh
:
string
indicatorsCourseDetailEn
:
string
expectation
:
string
constructor
(
data
:
Partial
<
CompetencyIndicatorsCourses0Model
>
)
{
this
.
competencyTopic
=
new
MyCompetencytopicModel
(
data
.
competencyTopic
||
{})
this
.
companyId
=
data
.
companyId
||
""
this
.
edesc
=
data
.
edesc
||
""
this
.
tdesc
=
data
.
tdesc
||
""
this
.
indicatorsCourseDetailTh
=
data
.
indicatorsCourseDetailTh
||
""
this
.
indicatorsCourseDetailEn
=
data
.
indicatorsCourseDetailEn
||
""
this
.
expectation
=
data
.
expectation
||
""
}
}
src/app/shared/model/competency-indicators-courses1-list.model.ts
View file @
1ffef9dc
...
...
@@ -14,12 +14,12 @@ export class MyCompetencyIndicatorsCourses1ListModel implements CompetencyIndica
competencyCourseId
:
string
competencyCourse
:
CompetencyCourseModel
[]
competencyIndicatorsCourses2List
:
CompetencyIndicatorsCourses2ListModel
[]
constructor
(
data
:
Partial
<
CompetencyIndicatorsCourses1ListModel
>
)
{
this
.
lineNo
=
data
.
lineNo
??
0
this
.
companyId
=
data
.
companyId
||
""
this
.
competencyCourseId
=
data
.
competencyCourseId
||
""
this
.
competencyCourse
=
data
.
competencyCourse
?.
map
(
x
=>
new
MyCompetencyCourseModel
(
x
))
||
[]
this
.
competencyIndicatorsCourses2List
=
data
.
competencyIndicatorsCourses2List
?.
map
(
x
=>
new
MyCompetencyIndicatorsCourses2ListModel
(
x
))
||
[]
constructor
(
data
?
:
Partial
<
CompetencyIndicatorsCourses1ListModel
>
)
{
this
.
lineNo
=
data
?
.
lineNo
??
0
this
.
companyId
=
data
?
.
companyId
||
""
this
.
competencyCourseId
=
data
?
.
competencyCourseId
||
""
this
.
competencyCourse
=
data
?
.
competencyCourse
?.
map
(
x
=>
new
MyCompetencyCourseModel
(
x
))
||
[]
this
.
competencyIndicatorsCourses2List
=
data
?
.
competencyIndicatorsCourses2List
?.
map
(
x
=>
new
MyCompetencyIndicatorsCourses2ListModel
(
x
))
||
[]
}
}
src/app/shared/model/competency-indicators-courses1-mini.model.ts
0 → 100644
View file @
1ffef9dc
import
{
CompetencyCourseModel
,
MyCompetencyCourseModel
}
from
"./competency-course.model"
import
{
CompetencyIndicatorsCourses0Model
,
MyCompetencyIndicatorsCourses0Model
}
from
"./competency-indicators-courses0.model"
export
interface
CompetencyIndicatorsCourses1MiniModel
{
competencyIndicatorsCourses0
:
CompetencyIndicatorsCourses0Model
lineNo
:
number
companyId
:
string
competencyCourseId
:
string
competencyCourse
:
CompetencyCourseModel
[]
}
export
class
MyCompetencyIndicatorsCourses1MiniModel
implements
CompetencyIndicatorsCourses1MiniModel
{
competencyIndicatorsCourses0
:
CompetencyIndicatorsCourses0Model
lineNo
:
number
companyId
:
string
competencyCourseId
:
string
competencyCourse
:
CompetencyCourseModel
[]
constructor
(
data
?:
Partial
<
CompetencyIndicatorsCourses1MiniModel
>
)
{
this
.
competencyIndicatorsCourses0
=
new
MyCompetencyIndicatorsCourses0Model
(
data
?.
competencyIndicatorsCourses0
||
{})
this
.
lineNo
=
data
?.
lineNo
??
0
this
.
companyId
=
data
?.
companyId
||
""
this
.
competencyCourseId
=
data
?.
competencyCourseId
||
""
this
.
competencyCourse
=
data
?.
competencyCourse
?.
map
(
x
=>
new
MyCompetencyCourseModel
(
x
))
||
[]
}
}
src/app/shared/model/group-assessment.model.ts
0 → 100644
View file @
1ffef9dc
import
{
GroupAssessment1ListModel
,
MyGroupAssessment1ListModel
}
from
"./group-assessment1-list.model"
import
{
MyPLModel
,
PLModel
}
from
"./pl.model"
export
interface
GroupAssessmentModel
{
personalLevel
:
PLModel
companyId
:
string
groupAssessment1List
:
GroupAssessment1ListModel
[]
}
export
class
MyGroupAssessmentModel
implements
GroupAssessmentModel
{
personalLevel
:
PLModel
companyId
:
string
groupAssessment1List
:
GroupAssessment1ListModel
[]
constructor
(
data
?:
Partial
<
GroupAssessmentModel
>
)
{
this
.
personalLevel
=
new
MyPLModel
(
data
?.
personalLevel
||
{})
this
.
companyId
=
data
?.
companyId
||
""
this
.
groupAssessment1List
=
data
?.
groupAssessment1List
?.
map
(
x
=>
new
MyGroupAssessment1ListModel
(
x
))
||
[]
}
}
src/app/shared/model/group-assessment1-list.model.ts
0 → 100644
View file @
1ffef9dc
import
{
CompetencyIndicatorsCourses1MiniModel
,
MyCompetencyIndicatorsCourses1MiniModel
}
from
"./competency-indicators-courses1-mini.model"
export
interface
GroupAssessment1ListModel
{
competencyIndicatorsCourses1Mini
:
CompetencyIndicatorsCourses1MiniModel
companyId
:
string
}
export
class
MyGroupAssessment1ListModel
implements
GroupAssessment1ListModel
{
competencyIndicatorsCourses1Mini
:
CompetencyIndicatorsCourses1MiniModel
companyId
:
string
constructor
(
data
?:
Partial
<
GroupAssessment1ListModel
>
)
{
this
.
competencyIndicatorsCourses1Mini
=
new
MyCompetencyIndicatorsCourses1MiniModel
(
data
?.
competencyIndicatorsCourses1Mini
||
{})
this
.
companyId
=
data
?.
companyId
||
""
}
}
src/app/shared/model/indicators-courses.model.ts
View file @
1ffef9dc
...
...
@@ -9,6 +9,7 @@ export interface IndicatorsCoursesModel {
tdesc
:
string
indicatorsCourseDetailTh
:
string
indicatorsCourseDetailEn
:
string
expectation
:
string
competencyIndicatorsCourses1List
:
CompetencyIndicatorsCourses1ListModel
[]
}
...
...
@@ -19,15 +20,17 @@ export class MyIndicatorsCoursesModel implements IndicatorsCoursesModel {
tdesc
:
string
indicatorsCourseDetailTh
:
string
indicatorsCourseDetailEn
:
string
expectation
:
string
competencyIndicatorsCourses1List
:
CompetencyIndicatorsCourses1ListModel
[]
constructor
(
data
:
Partial
<
IndicatorsCoursesModel
>
)
{
this
.
competencyTopic
=
new
MyCompetencytopicModel
(
data
.
competencyTopic
||
{})
this
.
companyId
=
data
.
companyId
||
""
this
.
edesc
=
data
.
edesc
||
""
this
.
tdesc
=
data
.
tdesc
||
""
this
.
indicatorsCourseDetailTh
=
data
.
indicatorsCourseDetailTh
||
""
this
.
indicatorsCourseDetailEn
=
data
.
indicatorsCourseDetailEn
||
""
this
.
competencyIndicatorsCourses1List
=
data
.
competencyIndicatorsCourses1List
?.
map
(
x
=>
new
MyCompetencyIndicatorsCourses1ListModel
(
x
))
||
[]
constructor
(
data
?:
Partial
<
IndicatorsCoursesModel
>
)
{
this
.
competencyTopic
=
new
MyCompetencytopicModel
(
data
?.
competencyTopic
||
{})
this
.
companyId
=
data
?.
companyId
||
""
this
.
edesc
=
data
?.
edesc
||
""
this
.
tdesc
=
data
?.
tdesc
||
""
this
.
indicatorsCourseDetailTh
=
data
?.
indicatorsCourseDetailTh
||
""
this
.
indicatorsCourseDetailEn
=
data
?.
indicatorsCourseDetailEn
||
""
this
.
expectation
=
data
?.
expectation
||
""
this
.
competencyIndicatorsCourses1List
=
data
?.
competencyIndicatorsCourses1List
?.
map
(
x
=>
new
MyCompetencyIndicatorsCourses1ListModel
(
x
))
||
[]
}
}
src/app/shared/model/pl.model.ts
View file @
1ffef9dc
...
...
@@ -11,11 +11,11 @@ export class MyPLModel implements PLModel {
tdesc
:
string
;
edesc
:
string
;
companyId
:
string
constructor
(
data
:
Partial
<
PLModel
>
)
{
this
.
plId
=
data
.
plId
||
""
this
.
tdesc
=
data
.
tdesc
||
""
this
.
edesc
=
data
.
edesc
||
""
this
.
companyId
=
data
.
companyId
||
""
constructor
(
data
?
:
Partial
<
PLModel
>
)
{
this
.
plId
=
data
?
.
plId
||
""
this
.
tdesc
=
data
?
.
tdesc
||
""
this
.
edesc
=
data
?
.
edesc
||
""
this
.
companyId
=
data
?
.
companyId
||
""
}
}
src/app/shared/services/group-assessment.service.ts
0 → 100644
View file @
1ffef9dc
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
}
from
'rxjs'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
AlertModel
}
from
'../model/alert.model'
;
import
{
GroupAssessmentModel
}
from
'../model/group-assessment.model'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
GroupAssessmentService
{
api
=
"/groupassessment"
urlApi
=
environment
.
baseUrl
+
this
.
api
constructor
(
private
http
:
HttpClient
)
{
}
getById
(
plId
:
string
):
Observable
<
GroupAssessmentModel
>
{
return
this
.
http
.
get
<
GroupAssessmentModel
>
(
this
.
urlApi
+
"/"
+
plId
)
}
getList
():
Observable
<
GroupAssessmentModel
[]
>
{
return
this
.
http
.
get
<
GroupAssessmentModel
[]
>
(
this
.
urlApi
+
"/lists"
)
}
post
(
body
:
GroupAssessmentModel
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
delete
(
body
:
GroupAssessmentModel
|
GroupAssessmentModel
[]):
Observable
<
AlertModel
>
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
body
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
}
\ No newline at end of file
src/app/shared/services/indicators-courses.service.ts
View file @
1ffef9dc
...
...
@@ -13,7 +13,7 @@ export class IndicatorsCoursesService {
constructor
(
private
http
:
HttpClient
)
{
}
getList
():
Observable
<
IndicatorsCoursesModel
[]
>
{
return
this
.
http
.
get
<
IndicatorsCoursesModel
[]
>
(
this
.
urlApi
+
"/lists"
)
return
this
.
http
.
get
<
IndicatorsCoursesModel
[]
>
(
this
.
urlApi
+
"/lists
/indicators-courses
"
)
}
getById
(
competencyIndicatorsId
:
string
):
Observable
<
IndicatorsCoursesModel
>
{
return
this
.
http
.
get
<
IndicatorsCoursesModel
>
(
this
.
urlApi
+
"/"
+
competencyIndicatorsId
)
...
...
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