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
6c297a2e
Commit
6c297a2e
authored
Dec 26, 2024
by
LAPTOP-CV4JFSHE\kantavee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
การจัดการสมรรถนะ>ตัวชี้วัดเเละหลักสูตร>การจัดการตัวชี้วัดเเละหลักสูตร
parent
b9b98825
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
322 additions
and
7 deletions
+322
-7
competency-management.component.html
...ompetency-management/competency-management.component.html
+4
-4
competency-management.component.ts
.../competency-management/competency-management.component.ts
+4
-2
edit-group-indicators.html
...rriculum/edit-group-indicators/edit-group-indicators.html
+0
-0
edit-group-indicators.scss
...rriculum/edit-group-indicators/edit-group-indicators.scss
+182
-0
edit-group-indicators.ts
...curriculum/edit-group-indicators/edit-group-indicators.ts
+123
-0
indicators-and-curriculum.component.html
...s-and-curriculum/indicators-and-curriculum.component.html
+1
-1
indicators-and-curriculum.component.ts
...ors-and-curriculum/indicators-and-curriculum.component.ts
+6
-0
dashboard.module.ts
src/app/components/dashboard/dashboard.module.ts
+2
-0
No files found.
src/app/components/competency-management/competency-management.component.html
View file @
6c297a2e
...
...
@@ -27,14 +27,14 @@
</div>
<div
class=
"mt-3 px-3rem"
>
<div
id=
"underline-1"
role=
"tabpanel"
aria-labelledby=
"underline-item-1"
>
<app-indicators-and-curriculum
[
pathTitle
]="
pathTitle
"
(
sendPathTitle
)="
pathTitle=
$event"
></app-indicators-and-curriculum>
<app-indicators-and-curriculum
*
ngIf=
"groupShow=='1'"
[
pathTitle
]="
pathTitle
"
(
sendPathTitle
)="
pathTitle=
$event"
(
sendGroupShow
)="
groupShow=
$event"
></app-indicators-and-curriculum>
<app-edit-group-indicators
*
ngIf=
"groupShow=='2'"
[
pathTitle
]="
pathTitle
"
(
sendPathTitle
)="
pathTitle=
$event"
(
sendGroupShow
)="
groupShow=
$event"
></app-edit-group-indicators>
</div>
<div
id=
"underline-2"
role=
"tabpanel"
aria-labelledby=
"underline-item-2"
>
....
</div>
<div
id=
"underline-3"
role=
"tabpanel"
aria-labelledby=
"underline-item-3"
>
...
</div>
</div>
</div>
...
...
src/app/components/competency-management/competency-management.component.ts
View file @
6c297a2e
...
...
@@ -6,5 +6,6 @@ import { Component } from '@angular/core';
styleUrls
:
[
'./competency-management.component.scss'
]
})
export
class
CompetencyManagementComponent
{
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'การจัดการสมรรถนะ'
,
'ตัวชี้วัดและหลักสูตร'
]
}
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'การจัดการสมรรถนะ'
,
'ตัวชี้วัดและหลักสูตร'
];
groupShow
:
string
=
'1'
;
// Initialize groupShow property
}
\ No newline at end of file
src/app/components/competency-management/indicators-and-curriculum/edit-group-indicators/edit-group-indicators.html
0 → 100644
View file @
6c297a2e
This diff is collapsed.
Click to expand it.
src/app/components/competency-management/indicators-and-curriculum/edit-group-indicators/edit-group-indicators.scss
0 → 100644
View file @
6c297a2e
.button-clear
{
position
:
absolute
;
top
:
96px
;
z-index
:
1
;
right
:
41vw
;
}
.button-help
{
position
:
absolute
;
top
:
0px
;
z-index
:
1
;
right
:
0vw
;
margin
:
4
.2rem
;
margin-right
:
10px
;
/* เพิ่มใหม่ 12/16*/
}
.htable
{
height
:
400px
;
}
table
.ti-custom-table
thead
{
height
:
60px
;
}
table
.ti-custom-table
thead
th
span
{
font-size
:
12px
;
font-weight
:
bold
;
}
.ti-custom-table
td
{
padding-left
:
0
.9rem
;
padding-right
:
1rem
;
}
.ti-custom-table
thead
th
:first-child
{
width
:
120px
;
/* ปรับความกว้างตามที่ต้องการ */
text-align
:
left
;
/* จัดตำแหน่งข้อความถ้าต้องการ */
padding-left
:
2px
;
padding-right
:
2px
;
}
.ti-custom-table
thead
th
:last-child
{
width
:
400px
;
/* ปรับความกว้างตามที่ต้องการ */
}
a
.custom-link
{
padding
:
10px
40px
;
/* ปรับ padding ให้เพิ่มขนาด */
}
/* สไตล์ของแถบเมนู */
.nav-tabs
{
display
:
flex
;
width
:
100%
;
cursor
:
pointer
;
margin-bottom
:
10px
;
height
:
20%
;
}
.nav-item
{
list-style
:
none
;
margin-right
:
10px
;
/* ช่องว่างระหว่างเมนู */
}
.nav-link
{
text-decoration
:
none
;
padding
:
10px
20px
;
display
:
inline-block
;
font-size
:
large
;
border-width
:
2px
2px
0px
2px
;
border-style
:
solid
;
border-color
:
#ccc
;
border-radius
:
5px
5px
0px
0px
;
}
.nav-link
:hover
{
background-color
:
#f0f0f0
;
/* เปลี่ยนสีเมื่อ hover */
}
.nav-link.active
{
color
:
#ffffff
;
/* สีตัวอักษรในสถานะ active */
font-size
:
large
;
border-bottom
:
3
.5px
solid
rgb
(
var
(
--
color-primary
));
/* เส้นใต้ */
background-color
:
rgb
(
var
(
--
color-primary
));
border-width
:
2px
2px
0px
2px
;
border-style
:
solid
;
border-color
:
rgb
(
var
(
--
color-primary
));
border-radius
:
5px
5px
0px
0px
;
}
.tab-content
{
margin-top
:
20px
;
}
.tab-pane.active
{
display
:
block
;
}
.nav-item-text
{
list-style
:
none
;
margin-right
:
10px
;
/* ช่องว่างระหว่างเมนู */
}
.nav-link-text
{
text-decoration
:
none
;
display
:
inline-block
;
font-size
:
large
;
color
:
#569bf5
;
border-bottom
:
2px
solid
#569bf5
;
line-height
:
0
.8
;
}
.ti-pagination
.page-link.active
{
background-color
:
#569bf5
;
color
:
white
;
border-radius
:
50%
;
padding
:
8px
12px
;
}
.box-body
{
padding
:
0rem
;
}
.page
{
min-height
:
0vh
;
}
.ti-modal-content
{
padding
:
1rem
;
height
:
650px
;
overflow-y
:
auto
;
}
// .ti-modal-body-content {
// display: flex; /* ใช้ flexbox เพื่อจัดตำแหน่ง */
// justify-content: center; /* จัดฟอร์มให้อยู่กลางในแนวนอน */
// flex-direction: column; /* ทำให้ฟอร์มแสดงผลในรูปแบบคอลัมน์ */
// height: calc(100% - 50px); /* ให้ความสูงเป็น 100% ลบด้วยระยะห่างข้างบน */
// margin-left: calc(15% - 30px);
// margin-right: 20px;
// }
.ti-modal-content-alert
{
width
:
35%
;
/* ความกว้างที่คุณต้องการ */
position
:
absolute
;
/* ทำให้สามารถจัดตำแหน่งได้ */
top
:
50%
;
/* ให้อยู่กลางในแนวตั้ง */
left
:
50%
;
/* ให้อยู่กลางในแนวนอน */
transform
:
translate
(
-50%
,
-50%
);
/* เคลื่อนที่ modal กลับมาให้ตรงกลาง */
background-color
:
#ffffff
;
}
// .header-title-type{
// width: 100%;
// height: 50px;
// margin-top: 10px;
// margin-bottom: 10px;
// }
.header-title-type
{
width
:
100%
;
min-height
:
50px
;
/* ใช้ min-height เพื่อให้มีความยืดหยุ่น */
// margin-top: 50px;
// margin-bottom: 10px;
justify-content
:
space-between
;
/* จัดเรียงองค์ประกอบภายใน */
align-items
:
center
;
/* จัดกลางแนวตั้ง */
padding-top
:
10px
;
padding-bottom
:
1rem
;
}
.body-content
{
margin-bottom
:
30px
;
height
:
400px
;
overflow-y
:
auto
;
}
.bg-input-readonly
{
background-color
:
#ccc
;
}
.ciricon
{
height
:
12px
;
/* กำหนดความสูงของวงกลม */
width
:
12px
;
/* กำหนดความกว้างของวงกลม */
background-color
:
#ffffff
;
font-weight
:
bold
;
display
:
flex
;
/* ใช้ Flexbox */
justify-content
:
center
;
/* จัดตำแหน่งแนวนอนให้กึ่งกลาง */
align-items
:
center
;
/* จัดตำแหน่งแนวตั้งให้กึ่งกลาง */
border-radius
:
2px
;
/* ทำให้เป็นวงกลม */
}
.ri-close-line
{
font-size
:
15px
;
/* ขนาดไอคอน */
}
\ No newline at end of file
src/app/components/competency-management/indicators-and-curriculum/edit-group-indicators/edit-group-indicators.ts
0 → 100644
View file @
6c297a2e
import
{
Component
,
EventEmitter
,
Input
,
Output
,
OnInit
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
@
Component
({
selector
:
'app-edit-group-indicators'
,
templateUrl
:
'./edit-group-indicators.html'
,
styleUrls
:
[
'./edit-group-indicators.scss'
]
})
export
class
EditGroupIndicators
implements
OnInit
{
@
Input
()
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'ทะเบียนกำหนดชื่อ'
,
'ประเภทสมรรถนะ'
];
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
activeTab
:
string
=
'tab1'
;
isChecked
:
boolean
=
false
;
// ข้อมูลที่จะใช้แสดงในตาราง
@
Input
()
items
:
any
[]
=
[
[
'1'
,
''
,
'CC'
],
[
'2'
,
''
,
'MC'
],
[
'3'
,
''
,
'PC'
]
];
// ฟังก์ชันในการเปลี่ยนแท็บ
changeTab
(
tab
:
{
id
:
string
,
text
:
string
})
{
this
.
sendPathTitle
.
emit
([
'การประเมินสมรรถนะ'
,
'ทะเบียนกำหนดชื่อ'
,
tab
.
text
]);
this
.
activeTab
=
tab
.
id
;
}
onEdit
(){
this
.
sendGroupShow
.
emit
(
'1'
);
}
// ฟังก์ชันในการบันทึกข้อมูลที่แก้ไข
saveData
(
event
:
any
,
id
:
any
):
void
{
const
updatedText
=
event
.
target
.
innerText
;
// ข้อความที่พิมพ์เข้าไป
console
.
log
(
'บันทึกข้อมูล:'
,
id
,
updatedText
);
// เก็บข้อมูลใน localStorage
localStorage
.
setItem
(
`item-
${
id
}
`
,
updatedText
);
// ฟังก์ชันอัปเดตข้อมูล (หากต้องการส่งไปยัง API)
this
.
updateItem
(
id
,
updatedText
);
}
// ฟังก์ชันในการอัพเดตข้อมูล
updateItem
(
id
:
any
,
updatedText
:
string
):
void
{
// ส่งข้อมูลไปยัง API เพื่อบันทึกข้อมูลในฐานข้อมูล
// ตัวอย่างเช่น:
// this.myService.updateItem(id, updatedText).subscribe(response => {
// this.showSuccessEdit(); // เรียกฟังก์ชันแจ้งเตือน
// });
}
// เมื่อหน้าเว็บโหลดใหม่ดึงข้อมูลจาก localStorage
ngOnInit
():
void
{
this
.
items
.
forEach
(
item
=>
{
const
savedText
=
localStorage
.
getItem
(
`item-
${
item
[
0
]}
`
);
if
(
savedText
)
{
item
[
1
]
=
savedText
;
// ใช้ข้อมูลที่เก็บไว้
}
});
}
modalOptions
:
{
[
nameModal
:
string
]:
{
isModalOpen
:
boolean
;
modalSize
:
string
;
backdropClose
:
boolean
;
};
}
=
{
"add"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
},
"edit"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
}
};
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
;
document
.
body
.
style
.
overflow
=
'hidden'
;
}
closeModal
(
name
:
string
)
{
this
.
modalOptions
[
name
].
isModalOpen
=
false
;
if
(
!
this
.
isAnyModalOpen
())
{
document
.
body
.
style
.
overflow
=
''
;
}
}
isAnyModalOpen
():
boolean
{
return
Object
.
values
(
this
.
modalOptions
).
some
(
modal
=>
modal
.
isModalOpen
);
}
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
addUser
()
{
console
.
log
(
'เพิ่มผู้ใช้งาน'
);
}
deleteUser
()
{
console
.
log
(
'ลบผู้ใช้งาน'
);
}
editUser
()
{
console
.
log
(
'แก้ไขผู้ใช้งาน'
);
}
currentModal
=
""
;
constructor
(
private
toastr
:
ToastrService
)
{
}
// แสดงข้อความแจ้งเตือนเมื่อการบันทึกสำเร็จ
showSuccess
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
});
}
showSuccessEdit
()
{
this
.
toastr
.
success
(
'เเก้ไขข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
});
}
showSuccessDelete
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
});
}
}
src/app/components/competency-management/indicators-and-curriculum/indicators-and-curriculum.component.html
View file @
6c297a2e
...
...
@@ -62,7 +62,7 @@
<td
style=
"font-size: 12px; padding-left: 1.5rem;"
>
{{item[1]}}
</td>
<td
style=
"font-size: 12px; padding-left: 1.5rem; width: 400px;"
>
{{item[2]}}
</td>
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#indicators-and-curriculum-component-modal-edit
"
></i>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
onEdit
()
"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
""
></i>
</td>
</tr>
...
...
src/app/components/competency-management/indicators-and-curriculum/indicators-and-curriculum.component.ts
View file @
6c297a2e
...
...
@@ -9,8 +9,10 @@ import { ToastrService } from 'ngx-toastr';
export
class
IndicatorsAndCurriculumComponent
{
@
Input
()
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'การจัดการสมรรถนะ'
,
'ตัวชี้วัดเเละหลักสูตร'
];
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
activeTab
:
string
=
'tab1'
;
// กำหนด tab เริ่มต้น
isChecked
:
boolean
=
false
;
// ฟังก์ชันในการเปลี่ยนแท็บ
changeTab
(
tab
:
{
id
:
string
,
text
:
string
})
{
...
...
@@ -18,6 +20,10 @@ export class IndicatorsAndCurriculumComponent {
this
.
activeTab
=
tab
.
id
;
}
onEdit
(){
this
.
sendGroupShow
.
emit
(
'2'
);
}
toggleCheckbox
():
void
{
this
.
isChecked
=
!
this
.
isChecked
;
}
...
...
src/app/components/dashboard/dashboard.module.ts
View file @
6c297a2e
...
...
@@ -61,6 +61,7 @@ import { JobDetailManagementComponent } from '../job-detail-components/job-detai
import
{
DevelopmentCourseComponent
}
from
'../course-registration/development-course/development-course.component'
;
import
{
IndicatorsAndCurriculumComponent
}
from
'../competency-management/indicators-and-curriculum/indicators-and-curriculum.component'
;
import
{
CourseRegistrationComponent
}
from
'../course-registration/course-registration.component'
;
import
{
EditGroupIndicators
}
from
'../competency-management/indicators-and-curriculum/edit-group-indicators/edit-group-indicators'
;
...
...
@@ -107,6 +108,7 @@ import { CourseRegistrationComponent } from '../course-registration/course-regis
CourseRegistrationComponent
,
DevelopmentCourseComponent
,
IndicatorsAndCurriculumComponent
,
EditGroupIndicators
,
],
imports
:
[
CommonModule
,
...
...
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