Commit cc7be9b5 by Ooh-Ao

Merge branch 'DEV' of https://mygit.myhr.co.th/angular/myAppraisal into DEV

parents 50a0d875 c3ac06f0
......@@ -45,6 +45,7 @@
</nav>
</div>
<div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1">
<div class="overflow-auto table-bordered" style="border-radius: 5px;">
<div class="overflow-auto shadow-md">
<table class="ti-custom-table ti-custom-table-head">
<thead>
......@@ -93,6 +94,7 @@
</table>
</div>
</div>
</div>
<div class="body-content" style="margin-top: 20px; margin-left: 10px;">
<ul class="nav-tabs">
<div class="px-1 py-1 bg-white rounded-2 shadow justify-content-center align-items-center">
......
......@@ -45,6 +45,7 @@
</nav>
</div>
<div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1">
<div class="overflow-auto table-bordered" style="border-radius: 5px;">
<div class="overflow-auto shadow-md">
<table class="ti-custom-table ti-custom-table-head">
<thead>
......@@ -92,6 +93,7 @@
</table>
</div>
</div>
</div>
<div class="body-content" style="margin-top: 20px; margin-left: 10px;">
<ul class="nav-tabs">
<div class="px-1 py-1 bg-white rounded-2 shadow justify-content-center align-items-center">
......
......@@ -52,6 +52,7 @@ import { PLService } from 'src/app/shared/services/pl.service';
import { EmpGroupService } from 'src/app/shared/services/emp_group.service';
import { EmpTypeService } from 'src/app/shared/services/employee-type.service';
import { NameRegistrationComponent } from '../name-registration/name-registration.component';
import { TypeRegistration } from '../name-registration/type-registration/type-registration.component';
import { CompetencyTopic } from '../name-registration/competency-topic/competency-topic.component';
......@@ -89,7 +90,8 @@ import { CompetencyTopic } from '../name-registration/competency-topic/competenc
EmployeeLevel,
SetAPasswordComponent,
NameRegistrationComponent,
CompetencyTopic
TypeRegistration,
CompetencyTopic,
],
imports: [
CommonModule,
......
......@@ -45,6 +45,7 @@
</a>
</nav>
</div>
<div class="overflow-auto table-bordered" style="border-radius: 5px;">
<div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1">
<div class="overflow-auto shadow-md">
<table class="ti-custom-table ti-custom-table-head">
......@@ -103,6 +104,7 @@
</tbody>
</table>
</div>
</div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="page.length">
<ul class="ti-pagination">
<li>
......
......@@ -47,6 +47,9 @@ table.ti-custom-table thead th span {
font-size: 12px;
font-weight: bold;
}
.ti-custom-table thead th:first-child {
width: 250px; /* ปรับความกว้างของ th ที่ 1 */
}
a.custom-link {
padding: 10px 40px; /* ปรับ padding ให้เพิ่มขนาด */
}
......
......@@ -45,7 +45,9 @@
</a>
</nav>
</div>
<div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1">
<div class="overflow-auto table-bordered" style="border-radius: 5px;">
<div class="overflow-auto shadow-md">
<table class="ti-custom-table ti-custom-table-head">
<thead>
......@@ -93,6 +95,7 @@
</tbody>
</table>
</div>
</div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="page.length">
<ul class="ti-pagination">
<li>
......
......@@ -46,6 +46,7 @@
</nav>
</div>
<div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1">
<div class="overflow-auto table-bordered" style="border-radius: 5px;">
<div class="overflow-auto shadow-md">
<table class="ti-custom-table ti-custom-table-head">
<thead>
......@@ -101,6 +102,7 @@
</tbody>
</table>
</div>
</div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="page.length">
<ul class="ti-pagination">
<li>
......
......@@ -46,6 +46,7 @@
</nav>
</div>
<div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1">
<div class="overflow-auto table-bordered" style="border-radius: 5px;">
<div class="overflow-auto shadow-md">
<table class="ti-custom-table ti-custom-table-head">
<thead>
......@@ -93,6 +94,7 @@
</tbody>
</table>
</div>
</div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="page.length">
<ul class="ti-pagination">
<li>
......
......@@ -22,7 +22,8 @@
</div>
<div class="mt-3 px-3rem">
<div id="underline-1" role="tabpanel" aria-labelledby="underline-item-1">
<app-type-registration [pathTitle]="pathTitle"
(sendPathTitle)="pathTitle=$event"></app-type-registration>
</div>
<div id="underline-2" class="hidden" role="tabpanel" aria-labelledby="underline-item-2">
<app-competency-topic [pathTitle]="pathTitle"
......
......@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./name-registration.component.scss']
})
export class NameRegistrationComponent {
pathTitle = ['การประเมินสมรรถนะ', 'ทะเบียนกำหนดชื่อ']
pathTitle = ['การประเมินสมรรถนะ', 'ทะเบียนกำหนดชื่อ','ประเภทสมรรถนะ']
}
.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*/
}
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: 105px; /* ปรับความกว้างตามที่ต้องการ */
text-align: left; /* จัดตำแหน่งข้อความถ้าต้องการ */
}
.ti-custom-table thead th:last-child {
width: 150px; /* ปรับความกว้างตามที่ต้องการ */
}
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 {
// width: 70%;
// position: absolute;
// top: 50%;
// left: 50%;
// transform: translate(-50%, -50%);
// max-height: 90%; /* จำกัดความสูงให้อยู่ใน modal */
// 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: 10px;
margin-bottom: 10px;
justify-content: space-between; /* จัดเรียงองค์ประกอบภายใน */
align-items: center; /* จัดกลางแนวตั้ง */
}
\ No newline at end of file
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
@Component({
selector: 'app-type-registration',
templateUrl: './type-registration.component.html',
styleUrls: ['./type-registration.component.scss']
})
export class TypeRegistration {
@Input() pathTitle = ['การประเมินสมรรถนะ', 'ทะเบียนกำหนดชื่อ', 'ประเภทสมรรถนะ'];
@Output() sendPathTitle: EventEmitter<string[]> = new EventEmitter<string[]>();
activeTab: string = 'tab1'; // กำหนด tab เริ่มต้น
isChecked: boolean = false;
// ฟังก์ชันในการเปลี่ยนแท็บ
changeTab(tab: { id: string, text: string }) {
this.sendPathTitle.emit(['การประเมินสมรรถนะ', 'ทะเบียนกำหนดชื่อ', tab.text]);
this.activeTab = tab.id;
}
toggleCheckbox(): void {
this.isChecked = !this.isChecked;
}
// การจัดการการเปิดปิด modal
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; // ตั้งค่าค่าของ currentModal เป็น 'add' หรือ 'edit'
document.body.style.overflow = 'hidden';
}
closeModal(name: string) {
this.modalOptions[name].isModalOpen = false;
if (!this.isAnyModalOpen()) {
document.body.style.overflow = ''; // คืนค่าการ Scroll เฉพาะเมื่อ Modal ทั้งหมดปิดแล้ว
}
}
isAnyModalOpen(): boolean {
return Object.values(this.modalOptions).some(modal => modal.isModalOpen); // ตรวจสอบว่า modal อื่นยังเปิดอยู่หรือไม่
}
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
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',
});
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment