Commit 038a89a0 by Nattana Chaiyamat

ข้อมูลลักษณะงาน (JD)

parent e70c95d7
......@@ -8,7 +8,7 @@
<p class="mt-3 text-2xl font-bold text-gray-800 dark:text-white">Oops, something went wrong.</p>
<p class="text-gray-600 dark:text-white/70">Sorry, we couldn't find your page.</p>
<div class="mt-5 flex flex-col justify-center items-center gap-2 sm:flex-row sm:gap-3">
<a class="w-full sm:w-auto inline-flex justify-center items-center gap-x-3 text-center bg-primary hover:bg-primary border border-transparent text-white text-sm font-medium rounded-sm focus:outline-none focus:ring-0 focus:ring-primary focus:ring-offset-0 focus:ring-offset-white transition py-2 px-3 dark:focus:ring-offset-white/10" href="/dashboard/sales">
<a class="w-full sm:w-auto inline-flex justify-center items-center gap-x-3 text-center bg-primary hover:bg-primary border border-transparent text-white text-sm font-medium rounded-sm focus:outline-none focus:ring-0 focus:ring-primary focus:ring-offset-0 focus:ring-offset-white transition py-2 px-3 dark:focus:ring-offset-white/10" href="/#/ess/my-skill-x-module">
<i class="ri-arrow-left-line"></i>
Get Back to Home
</a>
......
......@@ -56,9 +56,9 @@ import { EssProfileComponent } from '../ess-profile/ess-profile.component';
import { ExcelReportComponent } from '../excel-report/excel-report.component';
import { SettingIndividualKpiComponent } from '../setting-individual-kpi/setting-individual-kpi.component';
import { SettingIndividualKpiSupervisorComponent } from '../setting-individual-kpi-supervisor/setting-individual-kpi-supervisor.component';
import { JobDescriptionEssComponent } from '../job-description-ess/job-description-ess.component';
import { CompetencyEvaluationFactorsComponent } from '../competency-assessment/competency-evaluation-factors/competency-evaluation-factors.component';
import { ReportCompetencySummaryComponent } from '../report-component/report-com/report-competency-summary/report-competency-summary.component';
import { JobDescriptionEmpComponent } from '../job-description-emp/job-description-emp.component';
......@@ -130,7 +130,7 @@ const routes: Routes = [
{ path: "ess/self-setting-individual-kpi", title: 'แก้ไข Individual KPI ตนเอง', component: SettingIndividualKpiComponent },
{ path: "ess/supervisor-setting-individual-kpi", title: 'แก้ไข Individual KPI โดยหัวหน้า', component: SettingIndividualKpiSupervisorComponent },
{ path: "ess/job-description", title: 'รายละเอียดของงาน', component: JobDescriptionEssComponent },
{ path: "admin/job-description-emp", title: 'รายละเอียดของงาน', component: JobDescriptionEmpComponent },
]
}
];
......
......@@ -204,12 +204,12 @@ import {
} from '@syncfusion/ej2-angular-grids';
import { SettingIndividualKpiComponent } from '../setting-individual-kpi/setting-individual-kpi.component';
import { SettingIndividualKpiSupervisorComponent } from '../setting-individual-kpi-supervisor/setting-individual-kpi-supervisor.component';
import { JobDescriptionEssComponent } from '../job-description-ess/job-description-ess.component';
import { MoneyInputDirective } from 'src/app/shared/directive/money-input/money-input.directive';
import { CompetencyEvaluationFactorsComponent } from '../competency-assessment/competency-evaluation-factors/competency-evaluation-factors.component';
import { CompetencyDefineEvaluationFactorsComponent } from '../competency-assessment/competency-evaluation-factors/competency-define-evaluation-factors/competency-define-evaluation-factors.component';
import { TranslateModule } from '@ngx-translate/core';
import { ReportCompetencySummaryComponent } from '../report-component/report-com/report-competency-summary/report-competency-summary.component';
import { JobDescriptionEmpComponent } from '../job-description-emp/job-description-emp.component';
export const MY_DATE_FORMATS = {
parse: {
......@@ -358,7 +358,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
PivotSyncfutionComponent,
SettingIndividualKpiComponent,
SettingIndividualKpiSupervisorComponent,
JobDescriptionEssComponent,
JobDescriptionEmpComponent,
MoneyInputDirective
], imports: [
TranslateModule,
......
import { ViewportScroller } from '@angular/common';
import { ChangeDetectorRef, Component } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { TranslateService } from '@ngx-translate/core';
import { ToastrService } from 'ngx-toastr';
import { EmployeeModel, MyEmployeeModel } from 'src/app/shared/model/employee.model';
import { JobCodeModel, MyJobCodeModel } from 'src/app/shared/model/job-code.model';
import { MyStatusModel, StatusModel } from 'src/app/shared/model/status.model';
import { EmpStatusService } from 'src/app/shared/services/emp-status.service';
import { EmployeeService } from 'src/app/shared/services/employee.service';
import { EventgrpService } from 'src/app/shared/services/eventgrp.service';
import { FileService } from 'src/app/shared/services/file.service';
import { JobcodeService } from 'src/app/shared/services/jobcode.service';
import { PmsWorkingTimeService } from 'src/app/shared/services/pms-working-time.service';
export interface BiModel {
name: string,
tools: string[],
degree: string
}
@Component({
selector: 'app-job-description-emp',
templateUrl: './job-description-emp.component.html',
styleUrls: ['./job-description-emp.component.scss']
})
export class JobDescriptionEmpComponent {
pathTitle = ['menu.Organization', 'ข้อมูลลักษณะงาน (JD)']
currentPage = 1
empDetail: { loading: boolean, data: JobCodeModel } = { loading: false, data: new MyJobCodeModel({}) }
constructor(
private toastr: ToastrService,
private cdr: ChangeDetectorRef,
private dialog: MatDialog,
private fileService: FileService,
private eventgrpService: EventgrpService,
private jobcode: JobcodeService,
private translateService: TranslateService
) {
this.translateService.onLangChange.subscribe((event) => {
});
}
ngOnInit(): void {
this.getEmp()
}
getEmp() {
this.empDetail.loading = true
this.jobcode.getEmp().subscribe({
next: response => {
this.empDetail.data = new MyJobCodeModel(response)
this.empDetail.loading = false
this.cdr.detectChanges()
}, error: error => {
this.empDetail.loading = false
this.cdr.detectChanges()
}
})
}
}
\ No newline at end of file
import { ViewportScroller } from '@angular/common';
import { ChangeDetectorRef, Component } from '@angular/core';
import { EmployeeModel, MyEmployeeModel } from 'src/app/shared/model/employee.model';
import { MyStatusModel, StatusModel } from 'src/app/shared/model/status.model';
import { EmpStatusService } from 'src/app/shared/services/emp-status.service';
import { EmployeeService } from 'src/app/shared/services/employee.service';
import { FileService } from 'src/app/shared/services/file.service';
export interface BiModel {
name: string,
tools: string[],
degree: string
}
@Component({
selector: 'app-job-description-ess',
templateUrl: './job-description-ess.component.html',
styleUrls: ['./job-description-ess.component.scss']
})
export class JobDescriptionEssComponent {
}
\ No newline at end of file
......@@ -52,6 +52,7 @@ export interface JobCodeModel {
jl: JlModel
supervisorJobCode: SupervisorJobCodeModel
expectation: number | null
positionInJob: PositionInJobModel[]
}
export class MyJobCodeModel implements JobCodeModel {
......@@ -98,6 +99,7 @@ export class MyJobCodeModel implements JobCodeModel {
jl: JlModel
supervisorJobCode: SupervisorJobCodeModel
expectation: number | null
positionInJob: PositionInJobModel[]
constructor(data: Partial<JobCodeModel>) {
this.jobcodeId = data.jobcodeId || ""
this.companyId = data.companyId || ""
......@@ -142,11 +144,26 @@ export class MyJobCodeModel implements JobCodeModel {
this.jl = new MyJlModel(data?.jl)
this.supervisorJobCode = new MySupervisorJobCodeModel(data?.supervisorJobCode)
this.expectation = data?.expectation ?? null
this.positionInJob = (data?.positionInJob || []).map(e => new MyPositionInJobModel(e))
}
}
export interface PositionInJobModel {
countPosition: number
position: PositionModel
}
export class MyPositionInJobModel implements PositionInJobModel {
countPosition: number
position: PositionModel
constructor(data?: Partial<PositionInJobModel>) {
this.countPosition = data?.countPosition ?? 0
this.position = new MyPositionModel(data?.position || {})
}
}
export interface SupervisorJobCodeModel {
jobCodeId: string
tdesc: string
......
......@@ -4,6 +4,7 @@ import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import { AlertModel } from '../model/alert.model';
import { JobcodeModel } from '../model/jobcode.model';
import { JobCodeModel } from '../model/job-code.model';
@Injectable({
providedIn: 'root'
})
......@@ -12,6 +13,9 @@ export class JobcodeService {
urlApi = environment.baseUrl + this.api
constructor(private http: HttpClient) {
}
getEmp(): Observable<JobCodeModel> {
return this.http.get<JobCodeModel>(this.urlApi + "/emp")
}
getById(plId: string): Observable<JobcodeModel> {
return this.http.get<JobcodeModel>(this.urlApi + "/" + plId)
}
......
......@@ -186,6 +186,7 @@ export class NavService implements OnDestroy {
{ id: 'm24', path: 'admin/day-type-registry', title: 'menu.LeaveType', type: 'link', show: true },
{ id: 'm25', path: 'admin/account-settings', title: 'menu.UserSetting', type: 'link', show: true },
{ id: 'm26', path: 'admin/role-permission-config', title: 'menu.AccessPermissions', type: 'link', show: true },
{ id: 'm27', path: 'admin/job-description-emp', title: 'ข้อมูลลักษณะงาน (JD)', type: 'link', show: true },
],
},
{
......
......@@ -196,5 +196,11 @@
"ExcelReport": "Excel Report",
"EvaluationPeriod": "Evaluation Period",
"JobDescription(JD)": "Job Description (JD)",
"NoteIfYouDoNotSelectAJDLevelTheSystemWillSelectAll": "Note: If you do not select a JD level, The system will select all."
"NoteIfYouDoNotSelectAJDLevelTheSystemWillSelectAll": "Note: If you do not select a JD level, The system will select all.",
"Part 1 : General Information": "Part 1 : General Information",
"Part 2 : Organization Chart": "Part 2 : Organization Chart",
"Part 3 : Job Detail": "Part 3 : Job Detail",
"Part 4 : Job Specification": "Part 4 : Job Specification",
"Part 5 : Job Competency": "Part 5 : Job Competency",
"Part 6 : Key Performance Indicators: KPIs": "Part 6 : Key Performance Indicators: KPIs"
}
\ No newline at end of file
......@@ -199,5 +199,11 @@
"ExcelReport": "รายงาน",
"EvaluationPeriod": "แก้ไขรอบการประเมิน",
"JobDescription(JD)": "ลักษณะงาน (JD)",
"NoteIfYouDoNotSelectAJDLevelTheSystemWillSelectAll": "หมายเหตุ ถ้าไม่เลือกระดับ JD ระบบจะทำการเลือกทั้งหมด"
"NoteIfYouDoNotSelectAJDLevelTheSystemWillSelectAll": "หมายเหตุ ถ้าไม่เลือกระดับ JD ระบบจะทำการเลือกทั้งหมด",
"Part 1 : General Information": "ส่วนที่ 1 : ข้อมูลทั่วไป",
"Part 2 : Organization Chart": "ส่วนที่ 2 : โครงสร้างสายการบังคับบัญชา",
"Part 3 : Job Detail": "ส่วนที่ 3 : รายละเอียดของงาน",
"Part 4 : Job Specification": "ส่วนที่ 4 : คุณสมบัติที่จำเป็นต่อการปฏิบัติหน้าที่",
"Part 5 : Job Competency": "ส่วนที่ 5 : ความรู้ ทักษะ ความสามารถในตำแหน่งงาน",
"Part 6 : Key Performance Indicators: KPIs": "ส่วนที่ 6 : ตัวชี้วัดของตำแหน่งงาน"
}
\ No newline at end of file
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