Commit e0532566 by Nattana Chaiyamat

การจัดการรายละเอียดงาน แปลภาษา

parent 1de53efd
import { Component, Renderer2 } from '@angular/core';
import { TranslationService } from './shared/services/translation.service';
import { L10n } from '@syncfusion/ej2-base';
L10n.load({
'en-US': {
'pager': {
'currentPageInfo': '',
'totalItemInfo': '{0} Item',
'pagerDropDown': 'Items',
'totalItemsInfo': '{0} Items',
}
},
'th-TH': {
'grid': {
'EmptyRecord': 'ไม่มีข้อมูลที่จะแสดง',
'Item': '1 รายการ',
'Items': '{0} รายการ'
},
'pager': {
'All': 'ทั้งหมด',
'pagerAllDropDown': 'รายการ',
'currentPageInfo': '',
'totalItemsInfo': '{0} รายการ',
'totalItemInfo': '{0} รายการ',
'totalRecordsInfo': '{0} รายการ',
'firstPageTooltip': 'หน้าแรก',
'lastPageTooltip': 'หน้าสุดท้าย',
'nextPageTooltip': 'ถัดไป',
'previousPageTooltip': 'ก่อนหน้า',
'nextPagerTooltip': 'ถัดไป',
'previousPagerTooltip': 'ก่อนหน้า',
'pageInput': '{0}',
'page': 'หน้า',
'pagerDropDown': 'รายการ',
'pagerAll': 'ทั้งหมด',
'pageSize': 'รายการต่อหน้า',
'pageSizeAll': 'ทั้งหมด',
'pageCount': 'จำนวนหน้า',
'pageCountAll': 'ทั้งหมด'
}
}
});
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
......
......@@ -3,7 +3,7 @@
</div>
<div class="block-main-content">
<div class="text-lg font-bold py-2 px-8 text-primary">
ตั้งค่าผู้ใช้งาน
{{'menu.UserSetting' |translate}}
</div>
<div class="page">
<div class="border-b border-gray-200 dark:border-white/10 px-8">
......@@ -11,20 +11,20 @@
<a class="text-base font-medium hs-tab-active:text-lg hs-tab-active:font-bold 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 dark:text-white/70 hover:text-secondary active"
href="javascript:void(0);" id="underline-item-1" data-hs-tab="#underline-1"
aria-controls="underline-1"
(click)="currentPage =1 ;pathTitle = ['การจัดการข้อมูลองค์กร', 'ตั้งค่าผู้ใช้งาน','สร้างชื่อผู้ใช้งาน']">
สร้างชื่อผู้ใช้งาน
(click)="currentPage =1 ;pathTitle = ['menu.Organization', 'menu.UserSetting','CreateUsername']">
{{'CreateUsername' | translate}}
</a>
<a class="text-base font-medium hs-tab-active:text-lg hs-tab-active:font-bold hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 px-1 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary"
href="javascript:void(0);" id="underline-item-2" data-hs-tab="#underline-2"
aria-controls="underline-2"
(click)="currentPage =2 ;pathTitle = ['การจัดการข้อมูลองค์กร', 'ตั้งค่าผู้ใช้งาน','กำหนดรหัสผ่าน']">
กำหนดรหัสผ่าน
(click)="currentPage =2 ;pathTitle = ['menu.Organization', 'menu.UserSetting','SetPassword']">
{{'SetPassword' | translate}}
</a>
<a class="text-base font-medium hs-tab-active:text-lg hs-tab-active:font-bold hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 px-1 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary"
href="javascript:void(0);" id="underline-item-3" data-hs-tab="#underline-3"
aria-controls="underline-3"
(click)="currentPage =3 ;pathTitle = ['การจัดการข้อมูลองค์กร', 'ตั้งค่าผู้ใช้งาน','จัดการผู้ใช้งาน']">
จัดการผู้ใช้งาน
(click)="currentPage =3 ;pathTitle = ['menu.Organization', 'menu.UserSetting','ManageUsers']">
{{'ManageUsers' | translate}}
</a>
</nav>
</div>
......
......@@ -6,6 +6,6 @@ import { Component } from '@angular/core';
styleUrls: ['./account-settings.component.scss']
})
export class AccountSettingsComponent {
pathTitle = ['การจัดการข้อมูลองค์กร', 'ตั้งค่าผู้ใช้งาน', 'สร้างชื่อผู้ใช้งาน']
pathTitle = ['menu.Organization', 'menu.UserSetting', 'CreateUsername']
currentPage = 1
}
......@@ -3,7 +3,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="search">
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search">
<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>
......
......@@ -33,28 +33,28 @@ export class ManageUserComponent {
columns: ColumnModel[] = [{
field: "usernameId",
headerText: "ชื่อล็อกอิน",
headerText: "LoginName",
type: "string",
isPrimaryKey: true,
},
{
field: "empId",
headerText: "รหัสพนักงาน",
headerText: "EmployeeCode",
type: "string"
},
{
field: "employee.fname",
headerText: "ชื่อ",
headerText: "FirstName",
type: "string"
},
{
field: "employee.lname",
headerText: "นามสกุล",
headerText: "LastName",
type: "string"
},
{
field: "status",
headerText: "สถานะ",
headerText: "Status",
type: "string"
}]
searchSettings = {
......
......@@ -3,7 +3,7 @@
</div>
<div class="block-main-content">
<div class="text-lg font-bold py-2 px-8 text-primary">
กำหนดสิทธิการเข้าใช้งาน
{{'menu.AccessPermissions' | translate}}
</div>
<div class="page">
<div class="border-b border-gray-200 dark:border-white/10 px-8">
......@@ -11,7 +11,7 @@
<a class="text-base font-medium hs-tab-active:text-lg hs-tab-active:font-bold 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 dark:text-white/70 hover:text-secondary active"
href="javascript:void(0);" id="underline-item-1" data-hs-tab="#underline-1"
aria-controls="underline-1">
กำหนดสิทธิการเข้าใช้งาน
{{'menu.AccessPermissions' | translate}}
</a>
</nav>
</div>
......@@ -31,7 +31,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="search">
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search">
<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>
......@@ -43,14 +43,14 @@
data-hs-overlay="#role-permission-config-modal"
(click)="currentModal='add';selectConfigPermission()">
<i class="ri-add-line"></i>
Add
{{'Add' | translate}}
</button>
</div>
<div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
data-hs-overlay="#role-permission-config-alert-modal" (click)="currentModal='delete'">
<i class="ri-delete-bin-6-line"></i>
Delete
{{'Delete' | translate}}
</button>
</div>
</div>
......
......@@ -11,7 +11,7 @@ import { NavService } from 'src/app/shared/services/navservice';
styleUrls: ['./role-permission-config.component.scss']
})
export class RolePermissionConfigComponent {
pathTitle = ['การจัดการข้อมูลองค์กร', 'กำหนดสิทธิการเข้าใช้งาน']
pathTitle = ['menu.Organization', 'menu.AccessPermissions']
search = ""
......@@ -26,18 +26,18 @@ export class RolePermissionConfigComponent {
columns: ColumnModel[] = [{
field: "userLevel",
headerText: "ระดับ",
headerText: "Level",
type: "string",
isPrimaryKey: true,
},
{
field: "tdesc",
headerText: "รายละเอียด (ไทย)",
headerText: "DescriptionThai",
type: "string"
},
{
field: "edesc",
headerText: "รายละเอียด (อังกฤษ)",
headerText: "DescriptionEng",
type: "string"
}]
searchSettings = {
......
......@@ -3,7 +3,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="search">
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search">
<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>
......
......@@ -35,28 +35,28 @@ export class SetAPasswordComponent {
columns: ColumnModel[] = [{
field: "usernameId",
headerText: "ชื่อล็อกอิน",
headerText: "LoginName",
type: "string",
isPrimaryKey: true,
},
{
field: "empId",
headerText: "รหัสพนักงาน",
headerText: "EmployeeCode",
type: "string"
},
{
field: "employee.fname",
headerText: "ชื่อ",
headerText: "FirstName",
type: "string"
},
{
field: "employee.lname",
headerText: "นามสกุล",
headerText: "LastName",
type: "string"
},
{
field: "status",
headerText: "สถานะ",
headerText: "Status",
type: "string"
}]
searchSettings = {
......
......@@ -3,7 +3,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="search">
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search">
<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>
......@@ -16,21 +16,21 @@
data-hs-overlay="#user-setting-upload-modal"
(click)="fileInput.value = '';selectedFile=null;selectedFileName = 'กรุณาเลือกไฟล์'">
<i class="ti ti-file-plus"></i>
import
{{'Import' | translate}}
</button>
</div>
<div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md"
data-hs-overlay="#user-setting-modal" (click)="currentModal='add';selectUser()">
<i class="ri-add-line"></i>
Add
{{'Add' | translate}}
</button>
</div>
<div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
data-hs-overlay="#user-setting-alert-modal" (click)="currentModal='delete'">
<i class="ri-delete-bin-6-line"></i>
Delete
{{'Delete' | translate}}
</button>
</div>
</div>
......@@ -187,7 +187,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" [(ngModel)]="modal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="modal.search"
(ngModelChange)="searchModalChange(employeeListFilter())">
<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">
......@@ -326,7 +326,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" [(ngModel)]="modal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="modal.search"
(ngModelChange)="searchModalChange(roleListFilter())">
<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">
......@@ -462,7 +462,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" [(ngModel)]="modal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="modal.search"
(ngModelChange)="searchModalChange(levelListFilter())">
<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">
......
......@@ -37,28 +37,28 @@ export class UserSettingsComponent {
columns: ColumnModel[] = [{
field: "usernameId",
headerText: "ชื่อล็อกอิน",
headerText: "LoginName",
type: "string",
isPrimaryKey: true,
},
{
field: "empId",
headerText: "รหัสพนักงาน",
headerText: "EmployeeCode",
type: "string"
},
{
field: "employee.fname",
headerText: "ชื่อ",
headerText: "FirstName",
type: "string"
},
{
field: "employee.lname",
headerText: "นามสกุล",
headerText: "LastName",
type: "string"
},
{
field: "status",
headerText: "สถานะ",
headerText: "Status",
type: "string"
}]
searchSettings = {
......
<div class="font-size-16px font-weight-600 pt-2rem pb-1rem text-primary">
รายละเอียดหน่วยธุรกิจ
{{'BusinessUnitDetails' | translate}}
</div>
<div class="page">
<nav class="flex rtl:space-x-reverse space-x-2">
<a (click)="onSendPathTitle('ทะเบียนฝ่าย');currentTab=1"
<a (click)="onSendPathTitle('Division');currentTab=1"
class="border w-32 justify-center rounded-4px hs-tab-active:!bg-primary hs-tab-active:border-primary hs-tab-active:!text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center text-gray-600 hover:text-gray-900 active"
href="javascript:void(0);" id="card-type-item-1" data-hs-tab="#card-type-1" aria-controls="card-type-1">
ทะเบียนฝ่าย
{{'Division' | translate}}
</a>
<a (click)="onSendPathTitle('ทะเบียนแผนก');currentTab=2"
<a (click)="onSendPathTitle('Department');currentTab=2"
class="border w-32 justify-center rounded-4px hs-tab-active:!bg-primary hs-tab-active:border-primary hs-tab-active:!text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center text-gray-600 hover:text-gray-900"
href="javascript:void(0);" id="card-type-item-2" data-hs-tab="#card-type-2" aria-controls="card-type-2">
ทะเบียนแผนก
{{'Department' | translate}}
</a>
<a (click)="onSendPathTitle('ทะเบียนส่วน');currentTab=3"
<a (click)="onSendPathTitle('Section');currentTab=3"
class="border w-32 justify-center rounded-4px hs-tab-active:!bg-primary hs-tab-active:border-primary hs-tab-active:!text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center text-gray-600 hover:text-gray-900"
href="javascript:void(0);" id="card-type-item-3" data-hs-tab="#card-type-3" aria-controls="card-type-3">
ทะเบียนส่วน
{{'Section' | translate}}
</a>
<a (click)="onSendPathTitle('ส่วนย่อย1');currentTab=4"
<a (click)="onSendPathTitle('SubSection 1');currentTab=4"
class="border w-32 justify-center rounded-4px hs-tab-active:!bg-primary hs-tab-active:border-primary hs-tab-active:!text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center text-gray-600 hover:text-gray-900"
href="javascript:void(0);" id="card-type-item-4" data-hs-tab="#card-type-4" aria-controls="card-type-4">
ส่วนย่อย1
{{ 'SubSection 1' | translate }}
</a>
<a (click)="onSendPathTitle('ส่วนย่อย2');currentTab=5"
<a (click)="onSendPathTitle('SubSection 2');currentTab=5"
class="border w-32 justify-center rounded-4px hs-tab-active:!bg-primary hs-tab-active:border-primary hs-tab-active:!text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center text-gray-600 hover:text-gray-900"
href="javascript:void(0);" id="card-type-item-5" data-hs-tab="#card-type-5" aria-controls="card-type-5">
ส่วนย่อย2
{{ 'SubSection 2' | translate }}
</a>
<a (click)="onSendPathTitle('ส่วนย่อย3');currentTab=6"
<a (click)="onSendPathTitle('SubSection 3');currentTab=6"
class="border w-32 justify-center rounded-4px hs-tab-active:!bg-primary hs-tab-active:border-primary hs-tab-active:!text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center text-gray-600 hover:text-gray-900"
href="javascript:void(0);" id="card-type-item-6" data-hs-tab="#card-type-6" aria-controls="card-type-6">
ส่วนย่อย3
{{ 'SubSection 3' | translate }}
</a>
<a (click)="onSendPathTitle('ส่วนย่อย4');currentTab=7"
<a (click)="onSendPathTitle('SubSection 4');currentTab=7"
class="border w-32 justify-center rounded-4px hs-tab-active:!bg-primary hs-tab-active:border-primary hs-tab-active:!text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center text-gray-600 hover:text-gray-900"
href="javascript:void(0);" id="card-type-item-7" data-hs-tab="#card-type-7" aria-controls="card-type-7">
ส่วนย่อย4
{{ 'SubSectio 4' | translate }}
</a>
</nav>
<div class="pt-50px">
......
......@@ -6,12 +6,12 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
styleUrls: ['./branch-business-unit.component.scss']
})
export class BranchBusinessUnitComponent {
@Input() pathTitle = ['การจัดการข้อมูลองค์กร', 'ทะเบียนบริษัท', 'หน่วยธุรกิจ', 'ทะเบียนฝ่าย']
@Input() pathTitle = ['menu.Organization', 'menu.Company', 'BusinessUnit', 'Division']
@Output() sendPathTitle: EventEmitter<string[]> = new EventEmitter<string[]>();
currentTab = 1
onSendPathTitle(pathTitle: string) {
this.sendPathTitle.emit(['การจัดการข้อมูลองค์กร', 'ทะเบียนบริษัท', 'หน่วยธุรกิจ', pathTitle])
this.sendPathTitle.emit(['menu.Organization', 'menu.Company', 'BusinessUnit', pathTitle])
}
}
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<div
......@@ -132,7 +132,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" [(ngModel)]="bu1Modal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="bu1Modal.search"
(ngModelChange)="onBu1ModalSearchChange()">
<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">
......
......@@ -21,7 +21,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="search">
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search">
<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>
......@@ -34,21 +34,21 @@
data-hs-overlay="#department-register-upload-modal"
(click)="fileInput.value = '';selectedFile=null;selectedFileName = 'กรุณาเลือกไฟล์'">
<i class="ti ti-file-plus"></i>
import
{{'Import' | translate}}
</button>
</div>
<div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md"
(click)="currentModal='add';selectBu1()" (click)="openDialog()">
<i class="ri-add-line"></i>
Add
{{'Add' | translate}}
</button>
</div>
<div class="px-1">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
(click)="currentModal='delete';deleteBu1()">
<i class="ri-delete-bin-6-line"></i>
Delete
{{'Delete' | translate}}
</button>
</div>
</div>
......
......@@ -24,18 +24,18 @@ export class DepartmentRegisterComponent implements OnInit {
bu1: { loading: boolean, select: Bu1Model, dataList: Bu1Model[] } = { loading: false, select: new MyBu1Model(), dataList: [] }
columns: ColumnModel[] = [{
field: "bu1id",
headerText: "รหัสฝ่าย",
headerText: "CompanyCode",
type: "string",
isPrimaryKey: true,
},
{
field: "tdesc",
headerText: "รายละเอียดฝ่าย (ไทย)",
headerText: "CompanyDescThai",
type: "string"
},
{
field: "edesc",
headerText: "รายละเอียดฝ่าย (อังกฤษ)",
headerText: "CompanyDescEng",
type: "string"
}]
searchSettings = {
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<div
......@@ -124,7 +124,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" [(ngModel)]="bu2Modal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="bu2Modal.search"
(ngModelChange)="onBu2ModalSearchChange()">
<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">
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<div
......@@ -125,7 +125,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" [(ngModel)]="bu6Modal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="bu6Modal.search"
(ngModelChange)="onBu6ModalSearchChange()">
<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">
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<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">
......@@ -121,7 +121,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" [(ngModel)]="bu3Modal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="bu3Modal.search"
(ngModelChange)="onBu3ModalSearchChange()">
<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">
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<div
......@@ -124,7 +124,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" [(ngModel)]="bu5Modal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="bu5Modal.search"
(ngModelChange)="onBu5ModalSearchChange()">
<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">
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<div
......@@ -122,7 +122,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" [(ngModel)]="bu4Modal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="bu4Modal.search"
(ngModelChange)="onBu4ModalSearchChange()">
<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">
......
......@@ -11,14 +11,14 @@
<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 = ['การจัดการข้อมูลองค์กร', 'ทะเบียนบริษัท','ทะเบียนบริษัท'];currentPath=1">
(click)="pathTitle = ['menu.Organization', 'menu.Company','menu.Company'];currentPath=1">
{{'menu.Company' | translate}}
</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 px-1 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 = ['การจัดการข้อมูลองค์กร', 'ทะเบียนบริษัท','หน่วยธุรกิจ' ,'ทะเบียนฝ่าย'];currentPath=2">
หน่วยธุรกิจ
(click)="pathTitle = ['menu.Organization', 'menu.Company','BusinessUnit' ,'Division'];currentPath=2">
{{'BusinessUnit' | translate}}
</a>
</nav>
</div>
......
......@@ -6,6 +6,6 @@ import { Component } from '@angular/core';
styleUrls: ['./company-registration.component.scss']
})
export class CompanyRegistrationComponent {
pathTitle = ['การจัดการข้อมูลองค์กร', 'ทะเบียนบริษัท', 'ทะเบียนบริษัท']
pathTitle = ['menu.Organization', 'menu.Company', 'menu.Company']
currentPath = 1
}
......@@ -9,12 +9,12 @@ import { FileService } from 'src/app/shared/services/file.service';
styleUrls: ['./day-type-registry.component.scss']
})
export class DayTypeRegistryComponent {
pathTitle = ['การจัดการข้อมูลองค์กร', 'ทะเบียนประเภทวัน', 'ข้อมูลประเภทวัน']
pathTitle = ['menu.Organization', 'menu.LeaveType', 'LeaveInfo']
currentPage = 1
selectedItems: string[] = [];
search = ""
selectedFile: File | null = null;
selectedFileName: string = 'กรุณาเลือกไฟล์';
selectedFileName: string = 'selectedFileName';
modalStatus: 'add' | 'edit' | 'delete' | 'deleteGroup' = 'add'
page = Array.from({ length: 1 }, (_, i) => i + 1);
numDataListChecked = 0
......
......@@ -3,15 +3,16 @@
</div>
<div class="block-main-content">
<div class="text-lg font-bold py-2 px-8 text-primary">
ทะเบียนพนักงาน
{{'menu.Employee' | translate}}
</div>
<div class="page">
<div class="border-b border-gray-200 dark:border-white/10 px-8">
<nav class="-mb-0.5 flex space-x-6 rtl:space-x-reverse">
<a class="text-base font-medium hs-tab-active:text-lg hs-tab-active:font-bold 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 dark:text-white/70 hover:text-secondary active"
href="javascript:void(0);" id="underline-item-1" data-hs-tab="#underline-1"
aria-controls="underline-1" (click)="pathTitle = ['การจัดการข้อมูลองค์กร','ทะเบียนพนักงาน', 'ทะเบียนพนักงาน']">
ทะเบียนพนักงาน
aria-controls="underline-1"
(click)="pathTitle = ['menu.Organization','menu.Employee', 'menu.Employee']">
{{'menu.Employee' | translate}}
</a>
</nav>
</div>
......
......@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./employee-registration.component.scss']
})
export class EmployeeRegistrationComponent {
pathTitle = ['การจัดการข้อมูลองค์กร','ทะเบียนพนักงาน', 'ทะเบียนพนักงาน']
pathTitle = ['menu.Organization', 'menu.Employee', 'menu.Employee']
}
......@@ -60,23 +60,23 @@ export class SubEmployeeRegistrationComponent {
type: "string",
}, {
field: "employeeId",
headerText: "รหัสพนักงาน",
headerText: "EmployeeCode",
type: "string",
isPrimaryKey: true,
},
{
field: "fname",
headerText: "ชื่อ",
headerText: "FirstName",
type: "string"
},
{
field: "lname",
headerText: "นามสกุล",
headerText: "LastName",
type: "string"
},
{
field: "position.tdesc",
headerText: "ตำแหน่ง",
headerText: "Position",
type: "string"
}]
searchSettings = {
......
......@@ -3,7 +3,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="search">
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search">
<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>
......@@ -16,13 +16,14 @@
data-hs-overlay="#employee-categories-upload-modal"
(click)="fileInput.value = '';selectedFile=null;selectedFileName = 'กรุณาเลือกไฟล์'">
<i class="ti ti-file-plus"></i>
import
{{'Import' | translate}}
</button>
</div>
<div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md" (click)="currentModal='add';selectEmp_type();openDialog()">
<button type="button" class="ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md"
(click)="currentModal='add';selectEmp_type();openDialog()">
<i class="ri-add-line"></i>
Add
{{'Add' | translate}}
</button>
</div>
<div class="px-1">
......@@ -30,7 +31,7 @@
data-hs-overlay="#employee-categories-page-alert-modal"
(click)="currentModal='delete';selectEmp_type();deleteEmp_type()">
<i class="ri-delete-bin-6-line"></i>
Delete
{{'Delete' | translate}}
</button>
</div>
</div>
......@@ -38,8 +39,9 @@
<div class="page px-rem">
<app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" [dataSource]="emp_type.dataList"
[columns]="columns" [selectedItems]="selectedItems"
(sendSelectData)="currentModal='edit';selectEmp_type($event);openDialog()" (sendSelectedItems)="onSelectItemChange($event)">
[columns]="columns" [selectedItems]="selectedItems"
(sendSelectData)="currentModal='edit';selectEmp_type($event);openDialog()"
(sendSelectedItems)="onSelectItemChange($event)">
</app-datagrid-syncfution>
</div>
......@@ -67,8 +69,8 @@
</span></label>
<input type="text" id="input-label" class="ti-form-input w-1/2"
[class.!border-red]="currentModal=='add'&&checkPrimary()"
[ngClass]="{'bg-input-readonly':currentModal=='edit'}" [readonly]="currentModal=='edit'"
[maxLength]="5" [(ngModel)]="emp_type.select.codeId">
[ngClass]="{'bg-input-readonly':currentModal=='edit'}" [readonly]="currentModal=='edit'" [maxLength]="5"
[(ngModel)]="emp_type.select.codeId">
<label for="detail_th" class="ti-form-label mt-2rem">รายละเอียดประเภทพนักงาน (ไทย)<span
class="text-danger">*</span></label>
<input type="text" id="detail_th" class="ti-form-input h-16" [(ngModel)]="emp_type.select.tdesc">
......@@ -77,15 +79,15 @@
</mat-dialog-content>
<mat-dialog-actions align="end">
<button type="button" mat-button [mat-dialog-close]
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">
ย้อนกลับ
</button>
<button type="button" class="ti-btn ti-btn-success" mat-button (click)="addEmp_type()"
[class.ti-btn-disabled]="!emp_type.select.codeId||!emp_type.select.tdesc||(currentModal=='add'&&checkPrimary())"
[disabled]="!emp_type.select.codeId||!emp_type.select.tdesc||(currentModal=='add'&&checkPrimary())">
บันทึกข้อมูล
</button>
</mat-dialog-actions>
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">
ย้อนกลับ
</button>
<button type="button" class="ti-btn ti-btn-success" mat-button (click)="addEmp_type()"
[class.ti-btn-disabled]="!emp_type.select.codeId||!emp_type.select.tdesc||(currentModal=='add'&&checkPrimary())"
[disabled]="!emp_type.select.codeId||!emp_type.select.tdesc||(currentModal=='add'&&checkPrimary())">
บันทึกข้อมูล
</button>
</mat-dialog-actions>
</ng-template>
......
......@@ -22,18 +22,18 @@ export class EmployeeCategories {
columns: ColumnModel[] = [{
field: "codeId",
headerText: "รหัสประเภทพนักงาน",
headerText: "EmploymentTypeCode",
type: "string",
isPrimaryKey: true,
},
{
field: "tdesc",
headerText: "รายละเอียดประเภทพนักงาน (ไทย)",
headerText: "EmploymentTypeDescThai",
type: "string"
},
{
field: "edesc",
headerText: "รายละเอียดประเภทพนักงาน (อังกฤษ)",
headerText: "EmploymentTypeDescEng",
type: "string"
}]
searchSettings = {
......
......@@ -3,7 +3,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="search">
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search">
<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>
......@@ -16,7 +16,7 @@
data-hs-overlay="#employee-group-unit-component-upload-modal"
(click)="fileInput.value = '';selectedFile=null;selectedFileName = 'กรุณาเลือกไฟล์'">
<i class="ti ti-file-plus"></i>
import
{{'Import' | translate}}
</button>
</div>
<div class="px-1">
......@@ -24,7 +24,7 @@
data-hs-overlay="#employee-group-unit-component-page-modal"
(click)="currentModal='add';selectEmp_group();openDialog()">
<i class="ri-add-line"></i>
Add
{{'Add' | translate}}
</button>
</div>
<div class="px-1">
......@@ -32,7 +32,7 @@
data-hs-overlay="#employee-group-unit-component-page-alert-modal"
(click)="currentModal='delete';selectEmp_group();deleteEmp_group()">
<i class="ri-delete-bin-6-line"></i>
Delete
{{'Delete' | translate}}
</button>
</div>
</div>
......@@ -40,7 +40,8 @@
<div class="page px-rem">
<app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" [dataSource]="emp_group.dataList"
[columns]="columns" [selectedItems]="selectedItems"
(sendSelectData)="currentModal='edit';selectEmp_group($event);openDialog()" (sendSelectedItems)="onSelectItemChange($event)">
(sendSelectData)="currentModal='edit';selectEmp_group($event);openDialog()"
(sendSelectedItems)="onSelectItemChange($event)">
</app-datagrid-syncfution>
</div>
......@@ -52,7 +53,8 @@
<div class="w-full flex justify-end mb-1rem">
<div class="absolute flex">
<div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md" (click)="selectEmp_group()">
<button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(click)="selectEmp_group()">
<i class="ti ti-eraser text-base"></i>
Clear
</button>
......@@ -80,15 +82,15 @@
</mat-dialog-content>
<mat-dialog-actions align="end">
<button type="button" mat-button [mat-dialog-close]
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">
ย้อนกลับ
</button>
<button type="button" class="ti-btn ti-btn-success" mat-button (click)="addEmp_group()"
[class.ti-btn-disabled]="!emp_group.select.groupId||!emp_group.select.tdesc||(currentModal=='add'&&checkPrimary())"
[disabled]="!emp_group.select.groupId||!emp_group.select.tdesc||(currentModal=='add'&&checkPrimary())">
บันทึกข้อมูล
</button>
</mat-dialog-actions>
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">
ย้อนกลับ
</button>
<button type="button" class="ti-btn ti-btn-success" mat-button (click)="addEmp_group()"
[class.ti-btn-disabled]="!emp_group.select.groupId||!emp_group.select.tdesc||(currentModal=='add'&&checkPrimary())"
[disabled]="!emp_group.select.groupId||!emp_group.select.tdesc||(currentModal=='add'&&checkPrimary())">
บันทึกข้อมูล
</button>
</mat-dialog-actions>
</ng-template>
......
......@@ -27,18 +27,18 @@ export class EmployeeGroupUnit implements OnInit {
columns: ColumnModel[] = [{
field: "groupId",
headerText: "รหัสกลุ่มพนักงาน",
headerText: "EmployeeGroupCode",
type: "string",
isPrimaryKey: true,
},
{
field: "tdesc",
headerText: "รายละเอียดกลุ่มพนักงาน (ไทย)",
headerText: "EmployeeGroupDescThai",
type: "string"
},
{
field: "edesc",
headerText: "รายละเอียดกลุ่มพนักงาน (อังกฤษ)",
headerText: "EmployeeGroupDescEng",
type: "string"
}]
searchSettings = {
......
......@@ -2,8 +2,8 @@
<div class="flex justify-end">
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " placeholder="Search by No. or Name"
[(ngModel)]="search">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search">
<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>
......@@ -16,21 +16,21 @@
data-hs-overlay="#employee-level-upload-modal"
(click)="fileInput.value = '';selectedFile=null;selectedFileName = 'กรุณาเลือกไฟล์'">
<i class="ti ti-file-plus"></i>
import
{{'Import' | translate}}
</button>
</div>
<div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md"
data-hs-overlay="#employee-level-page-modal" (click)="currentModal='add';selectPl();openDialog()">
<i class="ri-add-line"></i>
Add
{{'Add' | translate}}
</button>
</div>
<div class="px-1">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
data-hs-overlay="#employee-level-page-alert-modal" (click)="currentModal='delete';selectPl();deletePL();">
<i class="ri-delete-bin-6-line"></i>
Delete
{{'Delete' | translate}}
</button>
</div>
</div>
......@@ -39,7 +39,8 @@
<div class="page px-rem">
<app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" [dataSource]="pl.dataList"
[columns]="columns" [selectedItems]="selectedItems"
(sendSelectData)="currentModal='edit';selectPl($event);openDialog()" (sendSelectedItems)="onSelectItemChange($event)">
(sendSelectData)="currentModal='edit';selectPl($event);openDialog()"
(sendSelectedItems)="onSelectItemChange($event)">
</app-datagrid-syncfution>
</div>
......@@ -48,14 +49,14 @@
{{currentModal=='add'?'เพิ่มข้อมูลระดับพนักงาน(JL)':'แก้ไขข้อมูลระดับพนักงาน(JL)'}}
</h3>
<div class="w-full flex justify-end mb-1rem">
<div class="absolute flex">
<div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md" (click)="selectPl()">
<i class="ti ti-eraser text-base"></i>
Clear
</button>
</div>
<div class="absolute flex">
<div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md" (click)="selectPl()">
<i class="ti ti-eraser text-base"></i>
Clear
</button>
</div>
</div>
</div>
<mat-dialog-content>
<label for="input-label" class="ti-form-label">รหัสระดับพนักงาน(JL)
......@@ -67,9 +68,8 @@
</span>
</label>
<input type="text" id="input-label" class="ti-form-input w-1/2"
[class.!border-red]="currentModal=='add'&&checkPrimary()"
[ngClass]="{'bg-input-readonly':currentModal=='edit'}" [readonly]="currentModal=='edit'"
[(ngModel)]="pl.select.plId">
[class.!border-red]="currentModal=='add'&&checkPrimary()" [ngClass]="{'bg-input-readonly':currentModal=='edit'}"
[readonly]="currentModal=='edit'" [(ngModel)]="pl.select.plId">
<label for="detail_th" class="ti-form-label mt-2rem">รายละเอียดระดับพนักงาน(JL) (ไทย)<span
class="text-danger">*</span></label>
<input type="text" id="detail_th" class="ti-form-input h-16" [(ngModel)]="pl.select.tdesc">
......@@ -77,16 +77,16 @@
<input type="text" id="detail_eng" class="ti-form-input h-16" [(ngModel)]="pl.select.edesc">
</mat-dialog-content>
<mat-dialog-actions align="end">
<button type="button" mat-button [mat-dialog-close]
<button type="button" mat-button [mat-dialog-close]
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">
ย้อนกลับ
</button>
<button type="button" class="ti-btn ti-btn-success" mat-button (click)="addPL()"
[class.ti-btn-disabled]="!pl.select.plId||!pl.select.tdesc||(currentModal=='add'&&checkPrimary())"
[disabled]="!pl.select.plId||!pl.select.tdesc||(currentModal=='add'&&checkPrimary())">
</button>
<button type="button" class="ti-btn ti-btn-success" mat-button (click)="addPL()"
[class.ti-btn-disabled]="!pl.select.plId||!pl.select.tdesc||(currentModal=='add'&&checkPrimary())"
[disabled]="!pl.select.plId||!pl.select.tdesc||(currentModal=='add'&&checkPrimary())">
บันทึกข้อมูล
</button>
</mat-dialog-actions>
</button>
</mat-dialog-actions>
</ng-template>
......@@ -126,4 +126,4 @@
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -23,18 +23,18 @@ export class EmployeeLevel implements OnInit {
columns: ColumnModel[] = [{
field: "plId",
headerText: "รหัสระดับพนักงาน",
headerText: "JobLevelCode",
type: "string",
isPrimaryKey: true,
},
{
field: "tdesc",
headerText: "รายละเอียดระดับพนักงาน (ไทย)",
headerText: "JobLevelDescThai",
type: "string"
},
{
field: "edesc",
headerText: "รายละเอียดระดับพนักงาน (อังกฤษ)",
headerText: "JobLevelDescEng",
type: "string"
}]
searchSettings = {
......
......@@ -3,7 +3,7 @@
</div>
<div class="block-main-content">
<div class="text-lg font-bold py-2 text-primary px-8">
ข้อมูลลักษณะงาน
{{'menu.JobDescription' | translate}}
</div>
<div class="page">
<div class="border-b border-gray-200 dark:border-white/10 px-8">
......@@ -11,32 +11,32 @@
<a class="text-base font-medium hs-tab-active:text-lg hs-tab-active:font-bold 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 dark:text-white/70 hover:text-secondary active"
href="javascript:void(0);" id="underline-item-1" data-hs-tab="#underline-1"
aria-controls="underline-1"
(click)="currentPath = 1;pathTitle = ['การจัดการข้อมูลองค์กร','ข้อมูลลักษณะงาน','กลุ่มพนักงาน']">
กลุ่มพนักงาน
(click)="currentPath = 1;pathTitle = ['menu.Organization','menu.JobDescription','EmployeeGroup']">
{{'EmployeeGroup' | translate}}
</a>
<a class="text-base font-medium hs-tab-active:text-lg hs-tab-active:font-bold hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 px-1 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary"
href="javascript:void(0);" id="underline-item-2" data-hs-tab="#underline-2"
aria-controls="underline-2"
(click)="currentPath = 2;pathTitle = ['การจัดการข้อมูลองค์กร','ข้อมูลลักษณะงาน','ตำเเหน่ง']">
ตำเเหน่ง
(click)="currentPath = 2;pathTitle = ['menu.Organization','menu.JobDescription','Position']">
{{'Position' | translate}}
</a>
<!-- <a class="text-base font-medium hs-tab-active:text-lg hs-tab-active:font-bold hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 px-1 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary"
href="javascript:void(0);" id="underline-item-3" data-hs-tab="#underline-3"
aria-controls="underline-3"
(click)="currentPath = 3;pathTitle = ['การจัดการข้อมูลองค์กร','ข้อมูลลักษณะงาน','ลักษณะงาน']">
(click)="currentPath = 3;pathTitle = ['menu.Organization','menu.JobDescription','ลักษณะงาน']">
ลักษณะงาน
</a> -->
<a class="text-base font-medium hs-tab-active:text-lg hs-tab-active:font-bold hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 px-1 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary"
href="javascript:void(0);" id="underline-item-4" data-hs-tab="#underline-4"
aria-controls="underline-4"
(click)="currentPath = 4;pathTitle = ['การจัดการข้อมูลองค์กร','ข้อมูลลักษณะงาน','ประเภทพนักงาน']">
ประเภทพนักงาน
(click)="currentPath = 4;pathTitle = ['menu.Organization','menu.JobDescription','EmploymentType']">
{{'EmploymentType' | translate}}
</a>
<a class="text-base font-medium hs-tab-active:text-lg hs-tab-active:font-bold hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 px-1 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary"
href="javascript:void(0);" id="underline-item-5" data-hs-tab="#underline-5"
aria-controls="underline-5"
(click)="currentPath = 5;pathTitle = ['การจัดการข้อมูลองค์กร','ข้อมูลลักษณะงาน','ระดับพนักงาน (JL)']">
ระดับพนักงาน (JL)
(click)="currentPath = 5;pathTitle = ['menu.Organization','menu.JobDescription','JobLevelJL']">
{{'JobLevelJL' | translate}}
</a>
</nav>
</div>
......
......@@ -6,6 +6,6 @@ import { Component } from '@angular/core';
styleUrls: ['./job-description.component.scss']
})
export class JobDescriptionComponent {
pathTitle = ['การจัดการข้อมูลองค์กร', 'ข้อมูลลักษณะงาน', 'กลุ่มพนักงาน']
pathTitle = ['menu.Organization', 'menu.JobDescription', 'EmployeeGroup']
currentPath = 1
}
......@@ -3,7 +3,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="search">
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search">
<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>
......@@ -16,14 +16,15 @@
data-hs-overlay="#position-unit-component-upload-modal"
(click)="fileInput.value = '';selectedFile=null;selectedFileName = 'กรุณาเลือกไฟล์'">
<i class="ti ti-file-plus"></i>
import
{{'Import' | translate}}
</button>
</div>
<div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md"
data-hs-overlay="#position-unit-component-page-modal" (click)="currentModal='add';selectPosition();openDialog()">
data-hs-overlay="#position-unit-component-page-modal"
(click)="currentModal='add';selectPosition();openDialog()">
<i class="ri-add-line"></i>
Add
{{'Add' | translate}}
</button>
</div>
<div class="px-1">
......@@ -31,7 +32,7 @@
data-hs-overlay="#position-unit-component-page-alert-modal"
(click)="currentModal='delete';selectPosition();deletePosition()">
<i class="ri-delete-bin-6-line"></i>
Delete
{{'Delete' | translate}}
</button>
</div>
</div>
......@@ -40,7 +41,8 @@
<div class="page px-rem">
<app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" [dataSource]="position.dataList"
[columns]="columns" [selectedItems]="selectedItems"
(sendSelectData)="currentModal='edit';selectPosition($event);openDialog()" (sendSelectedItems)="onSelectItemChange($event)">
(sendSelectData)="currentModal='edit';selectPosition($event);openDialog()"
(sendSelectedItems)="onSelectItemChange($event)">
</app-datagrid-syncfution>
</div>
<ng-template #positionUnitModal let-modal>
......@@ -77,15 +79,15 @@
</mat-dialog-content>
<mat-dialog-actions align="end">
<button type="button" mat-button [mat-dialog-close]
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">
ย้อนกลับ
</button>
<button type="button" class="ti-btn ti-btn-success" mat-button (click)="addPosition()"
[class.ti-btn-disabled]="!position.select.positionId||!position.select.tdesc||(currentModal=='add'&&checkPrimary())"
[disabled]="!position.select.positionId||!position.select.tdesc||(currentModal=='add'&&checkPrimary())">
บันทึกข้อมูล
</button>
</mat-dialog-actions>
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">
ย้อนกลับ
</button>
<button type="button" class="ti-btn ti-btn-success" mat-button (click)="addPosition()"
[class.ti-btn-disabled]="!position.select.positionId||!position.select.tdesc||(currentModal=='add'&&checkPrimary())"
[disabled]="!position.select.positionId||!position.select.tdesc||(currentModal=='add'&&checkPrimary())">
บันทึกข้อมูล
</button>
</mat-dialog-actions>
</ng-template>
......
......@@ -18,19 +18,19 @@ export class PositionUnitComponent implements OnInit {
position: { loading: boolean, select: PositionModel, dataList: PositionModel[] } = { loading: false, select: new MyPositionModel(), dataList: [] }
columns: ColumnModel[] = [{
field: "positionId",
field: "PositionCode",
headerText: "รหัสตำเเหน่ง",
type: "string",
isPrimaryKey: true,
},
{
field: "tdesc",
headerText: "รายละเอียดตำเเหน่ง (ไทย)",
headerText: "PositionDescThai",
type: "string"
},
{
field: "edesc",
headerText: "รายละเอียดตำเเหน่ง (อังกฤษ)",
headerText: "PositionDescEng",
type: "string"
}]
searchSettings = {
......
......@@ -4,7 +4,7 @@
<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]="'SearchByNoOrName' | translate"
[(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">
......
......@@ -73,7 +73,7 @@
<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]="'SearchByNoOrName' | translate"
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">
......@@ -239,7 +239,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" [(ngModel)]="searchModal"
[placeholder]="'SearchByNoOrName' | translate" [(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">
......
......@@ -4,7 +4,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<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">
......
......@@ -257,7 +257,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="searchModal"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="searchModal"
(ngModelChange)="assessmentToolsModalSearchChange()">
<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">
......@@ -360,7 +360,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="searchModal"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="searchModal"
(ngModelChange)="curriculumModalSearchChange()">
<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">
......
......@@ -3,7 +3,7 @@
<div class="flex justify-end">
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " placeholder="Search by No. or Name"
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<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">
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<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">
......@@ -181,7 +181,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search" (ngModelChange)="searchEMP()">
<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">
......
......@@ -8,7 +8,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search" style="height: 40px;">
<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">
......
......@@ -7,7 +7,7 @@
<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]="'SearchByNoOrName' | translate"
[(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">
......
......@@ -9,7 +9,7 @@
<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]="'SearchByNoOrName' | translate"
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">
......@@ -194,7 +194,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="PLsearchmodal.search" (ngModelChange)="onPLModalSearchChange()">
<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">
......@@ -679,7 +679,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="modal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="modal.search"
(ngModelChange)="searchModalChange(plListFilter())">
<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">
......
......@@ -21,7 +21,7 @@
<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]="'SearchByNoOrName' | translate"
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">
......
......@@ -20,7 +20,7 @@
<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]="'SearchByNoOrName' | translate"
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">
......
......@@ -21,7 +21,7 @@
<!-- <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" style="height: 40px;">
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" style="height: 40px;">
<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>
......
......@@ -7,7 +7,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search" style="height: 40px;">
<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">
......@@ -151,7 +151,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="typeModal.search" (ngModelChange)="searchCompetencytypeChange()">
<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">
......
......@@ -8,7 +8,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search" style="height: 40px;">
<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">
......
......@@ -8,7 +8,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search" style="height: 40px;">
<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">
......
......@@ -85,7 +85,7 @@ const routes: Routes = [
{ path: "ess/self-evaluation", title: 'ประเมินตนเอง', component: SelfEvaluationComponent },
{ path: "ess/self-evaluation/:part", title: 'ประเมินตนเอง', component: SelfEvaluationComponent },
{ path: "admin/day-type-registry", title: 'ประเมินตนเอง', component: DayTypeRegistryComponent },
{ path: "admin/company-registration", title: 'ทะเบียนบริษัท', component: CompanyRegistrationComponent },
{ path: "admin/company-registration", title: 'menu.Company', component: CompanyRegistrationComponent },
{ path: "admin/job-description", title: 'ข้อมูลลักษณะงาน', component: JobDescriptionComponent },
{ path: "admin/account-settings", title: 'ตั้งค่าผู้ใช้งาน', component: AccountSettingsComponent },
{ path: "admin/name-registration", title: 'ทะเบียนกำหนดชื่อ', component: NameRegistrationComponent },
......
......@@ -36,52 +36,12 @@ import {
} from '@syncfusion/ej2-angular-grids';
import { GroupSettingsModel, FilterSettingsModel, ColumnModel } from '@syncfusion/ej2-angular-grids';
import { DataManager, Query } from '@syncfusion/ej2-data';
import { L10n, setCulture } from '@syncfusion/ej2-base';
import { setCulture } from '@syncfusion/ej2-base';
import { Status } from '../../shared/model/evaluation-form.modal';
import { FileService } from 'src/app/shared/services/file.service';
import { TranslateService } from '@ngx-translate/core';
L10n.load({
'en-US': {
'pager': {
'currentPageInfo': '',
'totalItemsInfo': '{1} to {2} of {0}',
},
'grid': {
'pagerInfo': 'Total {0} items',
'pageCountMsg': 'Total {0} items'
}
},
'th-TH': {
'grid': {
'EmptyRecord': 'ไม่มีข้อมูลที่จะแสดง',
'Item': '1 รายการ',
'Items': '{0} รายการ'
},
'pager': {
'All': 'ทั้งหมด',
'pagerAllDropDown': 'รายการ',
'currentPageInfo': '',
'totalItemsInfo': '{0} รายการ',
'totalItemInfo': '{0} รายการ',
'totalRecordsInfo': '{0} รายการ',
'firstPageTooltip': 'หน้าแรก',
'lastPageTooltip': 'หน้าสุดท้าย',
'nextPageTooltip': 'ถัดไป',
'previousPageTooltip': 'ก่อนหน้า',
'nextPagerTooltip': 'ถัดไป',
'previousPagerTooltip': 'ก่อนหน้า',
'pageInput': '{0}',
'page': 'หน้า',
'pagerDropDown': 'รายการ',
'pagerAll': 'ทั้งหมด',
'pageSize': 'รายการต่อหน้า',
'pageSizeAll': 'ทั้งหมด',
'pageCount': 'จำนวนหน้า',
'pageCountAll': 'ทั้งหมด'
}
}
});
@Component({
selector: 'app-datagrid-syncfution',
templateUrl: './datagrid-syncfution.component.html',
......@@ -177,6 +137,7 @@ export class DatagridSyncfutionComponent implements OnInit {
private fileService: FileService,
private translateService: TranslateService,
) {
this.locale = this.translateService.getCurrentLang() == 'th' ? 'th-TH' : 'en-US'
}
ngOnInit(): void {
// this.query = new Query().addParams('dataCount', '1000');
......@@ -186,10 +147,8 @@ export class DatagridSyncfutionComponent implements OnInit {
this.toolbarOptions = [
{ text: this.translateService.instant('Print'), prefixIcon: 'e-print', id: 'Print' },
{ text: this.translateService.instant('ExcelExport'), prefixIcon: 'e-excelexport', id: 'ExcelExport' },
{ text: this.translateService.instant('CsvExport'), prefixIcon: 'e-csvexport', id: 'CsvExport' }
{ text: this.translateService.instant('CSVExport'), prefixIcon: 'e-csvexport', id: 'CsvExport' }
];
// setCulture('en-US');
// setCulture('th-TH');
this.translateService.onLangChange.subscribe((event) => {
if (event.lang === 'th') {
setCulture('th-TH');
......@@ -201,7 +160,7 @@ export class DatagridSyncfutionComponent implements OnInit {
this.toolbarOptions = [
{ text: this.translateService.instant('Print'), prefixIcon: 'e-print', id: 'Print' },
{ text: this.translateService.instant('ExcelExport'), prefixIcon: 'e-excelexport', id: 'ExcelExport' },
{ text: this.translateService.instant('CsvExport'), prefixIcon: 'e-csvexport', id: 'CsvExport' }
{ text: this.translateService.instant('CSVExport'), prefixIcon: 'e-csvexport', id: 'CsvExport' }
];
});
......
......@@ -135,7 +135,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="searchModal" (ngModelChange)="currentPage=1">
<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">
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search" (ngModelChange)="searchChange()">
<div
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<div
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<div
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<div
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<div
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<div
......
......@@ -1536,7 +1536,7 @@
<input
type="search" [class.active]="isActive"
class="search-chat-input focus-visible:outline-0 border-0 focus:border-0 focus:shadow-none focus:ring-0 bg-transparent py-0 leading-[0]"
placeholder="Search by No. or Name"
[placeholder]="'SearchByNoOrName' | translate"
/>
<i (click)="searchclick()" class="text-base leading-none ti ti-search"></i>
</div>
......
......@@ -9,6 +9,7 @@ import { SharedModule } from 'src/app/shared/sharedmodule';
import { NgSelectModule } from '@ng-select/ng-select';
import { SwiperModule } from 'swiper/angular';
import { FormsModule } from '@angular/forms';
import { TranslateModule } from '@ngx-translate/core';
@NgModule({
declarations: [
......@@ -17,13 +18,14 @@ import { FormsModule } from '@angular/forms';
MailSettingsComponent
],
imports: [
TranslateModule,
CommonModule,
MailRoutingModule,
SharedModule,
NgSelectModule,
SwiperModule,
FormsModule
]
})
export class MailModule { }
......@@ -398,7 +398,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="competencycourseTable.search" (ngModelChange)="onCompetencycourseSearch()">
<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">
......
......@@ -170,7 +170,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search"
(ngModelChange)="searchDataGrid(search)">
<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">
......
......@@ -44,43 +44,6 @@ import { GroupSettingsModel, FilterSettingsModel, ColumnModel } from '@syncfusio
import { DataManager, Query } from '@syncfusion/ej2-data';
import { L10n, setCulture } from '@syncfusion/ej2-base';
setCulture('th-TH');
L10n.load({
'en-US': {
'pager': {
'currentPageInfo': '',
'totalItemsInfo': '{1} to {2} of {0}',
}
},
'th-TH': {
'grid': {
'EmptyRecord': 'ไม่มีข้อมูลที่จะแสดง',
'Item': '1 รายการ',
'Items': '{0} รายการ'
},
'pager': {
'All': 'ทั้งหมด',
'pagerAllDropDown': 'รายการ',
'currentPageInfo': '',
'totalItemsInfo': '{0} รายการ',
'totalItemInfo': '{0} รายการ',
'totalRecordsInfo': '{0} รายการ',
'firstPageTooltip': 'หน้าแรก',
'lastPageTooltip': 'หน้าสุดท้าย',
'nextPageTooltip': 'ถัดไป',
'previousPageTooltip': 'ก่อนหน้า',
'nextPagerTooltip': 'ถัดไป',
'previousPagerTooltip': 'ก่อนหน้า',
'pageInput': '{0}',
'page': 'หน้า',
'pagerDropDown': 'รายการ',
'pagerAll': 'ทั้งหมด',
'pageSize': 'รายการต่อหน้า',
'pageSizeAll': 'ทั้งหมด',
'pageCount': 'จำนวนหน้า',
'pageCountAll': 'ทั้งหมด'
}
}
});
@Component({
selector: 'app-supervisor-evaluation',
templateUrl: './supervisor-evaluation.component.html',
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search" (ngModelChange)="searchEMP()">
<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">
......@@ -286,7 +286,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" [(ngModel)]="employeeModal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="employeeModal.search"
(ngModelChange)="searchEMP()">
<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">
......
......@@ -67,7 +67,7 @@
<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]="'SearchByNoOrName' | translate"
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">
......@@ -233,7 +233,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" [(ngModel)]="modal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="modal.search"
(ngModelChange)="searchModalChange(pmstopicListFilter())">
<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">
......
......@@ -5,7 +5,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<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">
......
......@@ -3,7 +3,7 @@
<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]="'SearchByNoOrName' | translate"
[(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">
......
......@@ -6,7 +6,7 @@
<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]="'SearchByNoOrName' | translate"
style="height: 40px;" [(ngModel)]="search">
<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">
......@@ -37,7 +37,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<div
......@@ -216,7 +216,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="PLsearchmodal.search" (ngModelChange)="onPLModalSearchChange()">
<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">
......@@ -660,7 +660,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="modal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="modal.search"
(ngModelChange)="searchModalChange(plListFilter())">
<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">
......
......@@ -4,7 +4,7 @@
<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]="'SearchByNoOrName' | translate"
[(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">
......
......@@ -21,7 +21,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search" (ngModelChange)="searchChange()" style="height: 40px;">
<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">
......@@ -60,7 +60,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<div
......@@ -292,7 +292,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" [(ngModel)]="pmstypemodal.search" (ngModelChange)="modalSearchChange(pmstypeListFilter())">
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="pmstypemodal.search" (ngModelChange)="modalSearchChange(pmstypeListFilter())">
<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>
......@@ -407,7 +407,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="modal.search" (ngModelChange)="modalSearchChange(pmstypeListFilter())">
<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">
......
......@@ -8,7 +8,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search" style="height: 40px;">
<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">
......
......@@ -4,7 +4,7 @@
<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]="'SearchByNoOrName' | translate"
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">
......
......@@ -20,7 +20,7 @@
<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]="'SearchByNoOrName' | translate"
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">
......
......@@ -20,7 +20,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" style="height: 40px;" [(ngModel)]="search"
[placeholder]="'SearchByNoOrName' | translate" style="height: 40px;" [(ngModel)]="search"
>
<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">
......@@ -57,7 +57,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="search">
<div
......@@ -388,7 +388,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" [(ngModel)]="eventgrpmodal.search" (ngModelChange)="oneventgrpModalSearchChange()">
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="eventgrpmodal.search" (ngModelChange)="oneventgrpModalSearchChange()">
<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>
......@@ -754,7 +754,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="modal.search"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="modal.search"
(ngModelChange)="modalSearchChange(eventgrpListFilter())">
<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">
......
......@@ -32,7 +32,7 @@
<div class="px-1">
<div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="search">
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search">
<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>
......
......@@ -397,7 +397,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="modalData.search">
<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">
......@@ -555,7 +555,7 @@
<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]="'SearchByNoOrName' | translate"
[(ngModel)]="modalData.search">
<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">
......
......@@ -56,9 +56,9 @@
<button id="dropdown-flag" type="button"
class="hs-dropdown-toggle ti-dropdown-toggle p-0 flex-shrink-0 h-[2.375rem] w-[2.375rem] border-0 rounded-full shadow-none focus:ring-gray-400 text-xs dark:focus:ring-white/10">
<i class="flag-icon flag-icon-active flag-icon-th h-[1.375rem] w-[1.375rem]"
[class.active]="translationService.getCurrentLang()=='th'"></i>
[class.active]="translateService.getCurrentLang()=='th'"></i>
<i class="flag-icon flag-icon-active flag-icon-us h-[1.375rem] w-[1.375rem]"
[class.active]="translationService.getCurrentLang()=='en'"></i>
[class.active]="translateService.getCurrentLang()=='en'"></i>
</button>
<div class="hs-dropdown-menu ti-dropdown-menu min-w-[10rem]" aria-labelledby="dropdown-flag">
<div class="ti-dropdown-divider divide-y divide-gray-200 dark:divide-white/10">
......@@ -770,7 +770,7 @@
<i class="ri ri-search-2-line search-btn-icon"></i>
</div>
<input type="text" id="icon" name="icon" class="py-2 ltr:pl-11 rtl:pr-11 ti-form-input focus:z-10"
placeholder="Search by No. or Name" />
[placeholder]="'SearchByNoOrName' | translate" />
<div class="voice-search">
<i class="ri ri-mic-2-line voice-btn-icon"></i>
</div>
......
......@@ -9,7 +9,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { environment } from 'src/environments/environment';
import { HttpClient } from '@angular/common/http';
import { FileService } from '../../services/file.service';
import { TranslationService } from '../../services/translation.service';
import { TranslateService } from '@ngx-translate/core';
@Component({
selector: 'app-header',
......@@ -29,11 +29,13 @@ export class HeaderComponent {
private fileService: FileService,
private navService: NavService,
private http: HttpClient,
public translationService: TranslationService) {
public translateService: TranslateService) {
this.getEvaluatee();
this.translationService.setDefaultLang('th');
this.translationService.useLang('th');
const lang = localStorage.getItem('Lang') ?? (() => {
localStorage.setItem('Lang', 'th');
return 'th';
})();
this.translateService.use(lang);
}
imageUrl = ''
......@@ -170,6 +172,7 @@ export class HeaderComponent {
}
switchLang(lang: string) {
this.translationService.useLang(lang);
localStorage.setItem('Lang', lang);
this.translateService.use(lang);
}
}
......@@ -7,7 +7,7 @@
<ol class="flex items-center whitespace-nowrap min-w-0">
<li class="text-sm" *ngFor="let item of pathTitle;let l = last">
<a class="flex items-center text-gray-500 hover:text-primary dark:text-white" href="javascript:void(0);">
{{item}}
{{item | translate}}
<svg *ngIf="!l"
class="flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-300 dark:text-white/10 rtl:rotate-180"
width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
......@@ -26,20 +26,20 @@
<!-- Page Header Original -->
<div class="block justify-between page-header sm:flex">
<div>
<h3 class="text-gray-700 hover:text-gray-900 dark:text-white dark:hover:text-white text-2xl font-medium">{{title}}
<h3 class="text-gray-700 hover:text-gray-900 dark:text-white dark:hover:text-white text-2xl font-medium">{{title | translate}}
</h3>
</div>
<ol class="flex items-center whitespace-nowrap min-w-0">
<li class="text-sm">
<a class="flex items-center font-semibold text-primary hover:text-primary dark:text-primary truncate"
href="javascript:void(0);">
{{activeitem}}
{{activeitem | translate}}
<i
class="ti ti-chevrons-right flex-shrink-0 mx-3 overflow-visible text-gray-300 dark:text-gray-300 rtl:rotate-180"></i>
</a>
</li>
<li class="text-sm text-gray-500 hover:text-primary dark:text-white/70 " aria-current="page">
{{title1}}
{{title1| translate}}
</li>
</ol>
</div>
......
......@@ -189,7 +189,7 @@ export class NavService implements OnDestroy {
],
},
{
title: 'จัดการรายละเอียดงาน',
title: 'menu.JobDescriptionJD',
type: 'sub',
selected: false,
active: false,
......@@ -198,12 +198,12 @@ export class NavService implements OnDestroy {
show: true,
icon: 'assets/img/icons-menu/job-detail-management.png',
children: [
{ id: 'm31', path: 'admin/job-detail-management', title: 'ข้อมูลทั่วไป', type: 'link', show: true },
{ id: 'm32', path: 'admin/command-structure', title: 'โครงสร้างสายการบังคับบัญชา', type: 'link', show: true },
{ id: 'm33', path: 'admin/job-detail', title: 'รายละเอียดของงาน', type: 'link', show: true },
{ id: 'm34', path: 'admin/job-qualifications', title: 'คุณสมบัติที่จำเป็น', type: 'link', show: true },
{ id: 'm35', path: 'admin/job-competency', title: 'ความสามารถในตำเเหน่งงาน', type: 'link', show: true },
{ id: 'm36', path: 'admin/job-position-indicators', title: 'ตัวชี้วัดของตำแหน่งงาน', type: 'link', show: true },
{ id: 'm31', path: 'admin/job-detail-management', title: 'menu.GeneralInformation', type: 'link', show: true },
{ id: 'm32', path: 'admin/command-structure', title: 'menu.OrganizationChart', type: 'link', show: true },
{ id: 'm33', path: 'admin/job-detail', title: 'menu.JobDetail', type: 'link', show: true },
{ id: 'm34', path: 'admin/job-qualifications', title: 'menu.JobSpecification', type: 'link', show: true },
{ id: 'm35', path: 'admin/job-competency', title: 'menu.JobCompetency', type: 'link', show: true },
{ id: 'm36', path: 'admin/job-position-indicators', title: 'menu.KeyPerformanceIndicators', type: 'link', show: true },
],
},
......
import { Injectable } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
@Injectable({
providedIn: 'root'
})
export class TranslationService {
constructor(private translate: TranslateService) { }
setDefaultLang(lang: string) {
this.translate.setDefaultLang(lang);
}
useLang(lang: string) {
this.translate.use(lang);
}
get(key: string) {
return this.translate.get(key);
}
getCurrentLang() {
return this.translate.getCurrentLang()
}
}
......@@ -9,7 +9,14 @@
"Employee": "Employee",
"LeaveType": "LeaveType",
"UserSetting": "UserSetting",
"AccessPermissions": "AccessPermissions"
"AccessPermissions": "AccessPermissions",
"JobDescriptionJD": "Job Description (JD)",
"GeneralInformation": "General Information",
"OrganizationChart": "Organization Chart",
"JobDetail": "Job Detail",
"JobSpecification": "Job Specification",
"JobCompetency": "Job Competency",
"KeyPerformanceIndicators": "Key Performance Indicators: KPIs"
},
"SearchByNoOrName": "Search by No. or Name",
"Import": "Import",
......@@ -17,11 +24,56 @@
"Delete": "Delete",
"Print": "Print",
"ExcelExport": "Excel Export",
"CsvExport": "CSV Export",
"CSVExport": "CSV Export",
"Selected": "Selected",
"CompanyCode": "Company Code",
"CompanyDescThai": "Company Desc. (Thai)",
"CompanyDescEng": "Company Desc. (Eng)",
"Action": "Action",
"Item": "Item"
"Item": "Item",
"BusinessUnit": "Business Unit",
"BusinessUnitDetails": "Business Unit Details",
"Division": "Division",
"Department": "Department",
"Section": "Section",
"SubSection": "Sub Section {{n}}",
"Items": "Items",
"EmployeeGroup": "Employee Group",
"Position": "Position",
"EmploymentType": "Employment Type",
"JobLevelJL": "Job Level (JL)",
"EmployeeGroupCode": "Employee Group Code",
"EmployeeGroupDescThai": "Employee Group Desc. (Thai)",
"EmployeeGroupDescEng": "Employee Group Desc. (Eng)",
"PositionCode": "Position Code",
"PositionDescThai": "Position Desc. (Thai)",
"PositionDescEng": "Position Desc. (Eng)",
"EmploymentTypeCode": "Employment Type Code",
"EmploymentTypeDescThai": "Employment Type Desc. (Thai)",
"EmploymentTypeDescEng": "Employment Type Desc. (Eng)",
"JobLevelCode": "Job Level Code",
"JobLevelDescThai": "Job Level Desc. (Thai)",
"JobLevelDescEng": "Job Level Desc. (Eng)",
"EmployeeCode": "Employee Code",
"FirstName": "First Name",
"LastName": "Last Name",
"LeaveInfo": "Leave Info.",
"Selected_ed": "Selected",
"SelectAll": "Select All",
"ImportData": "Import Data",
"DownloadSampleFile": "Download Sample File",
"LeaveCode": "Leave Code",
"DescriptionThai": "Description (Thai)",
"DescriptionEng": "Description (Eng)",
"Show": "Show",
"ImportLeaveType": "Import Leave Type",
"File": "File",
"PleaseSelectFile": "Please select a file.",
"Upload": "Upload",
"CreateUsername": "Create Username",
"SetPassword": "Set Password",
"ManageUsers": "Manage Users",
"LoginName": "Login Name",
"Status": "Status",
"Level": "Level"
}
\ No newline at end of file
......@@ -9,7 +9,14 @@
"Employee": "ทะเบียนพนักงาน",
"LeaveType": "ทะเบียนประเภทวัน",
"UserSetting": "ตั้งค่าผู้ใช้งาน",
"AccessPermissions": "กำหนดสิทธิการเข้าใช้งาน"
"AccessPermissions": "กำหนดสิทธิการเข้าใช้งาน",
"JobDescriptionJD": "จัดการรายละเอียดงาน",
"GeneralInformation": "ข้อมูลทั่วไป",
"OrganizationChart": "โครงสร้างสายการบังคับบัญชา",
"JobDetail": "รายละเอียดของงาน",
"JobSpecification": "คุณสมบัติที่จำเป็น",
"JobCompetency": "ความสามารถในตำแหน่งงาน",
"KeyPerformanceIndicators": "ตัวชี้วัดของตำแหน่งงาน"
},
"SearchByNoOrName": "ค้นหาตามรหัสหรือชื่อ",
"Import": "นำเข้า",
......@@ -17,11 +24,59 @@
"Delete": "ลบ",
"Print": "พิมพ์",
"ExcelExport": "ส่งออก Excel",
"CsvExport": "ส่งออก CSV",
"CSVExport": "ส่งออก CSV",
"Selected": "เลือก",
"CompanyCode": "รหัสบริษัท",
"CompanyDescThai": "รายละเอียดบริษัท (ไทย)",
"CompanyDescEng": "รายละเอียดบริษัท (อังกฤษ)",
"Action": "การจัดการ",
"Item": "รายการ"
"Item": "รายการ",
"BusinessUnit": "หน่วยธุรกิจ",
"BusinessUnitDetails": "รายละเอียดหน่วยธุรกิจ",
"Division": "ทะเบียนฝ่าย",
"Department": "ทะเบียนแผนก",
"Section": "ทะเบียนส่วน",
"SubSection 1": "ทะเบียนส่วนย่อย 1",
"SubSection 2": "ทะเบียนส่วนย่อย 2",
"SubSection 3": "ทะเบียนส่วนย่อย 3",
"SubSection 4": "ทะเบียนส่วนย่อย 4",
"Items": "รายการ",
"EmployeeGroup": "กลุ่มพนักงาน",
"Position": "ตำแหน่ง",
"EmploymentType": "ประเภทพนักงาน",
"JobLevelJL": "ระดับพนักงาน (JL)",
"EmployeeGroupCode": "รหัสกลุ่มพนักงาน",
"EmployeeGroupDescThai": "รายละเอียดกลุ่มพนักงาน (ไทย)",
"EmployeeGroupDescEng": "รายละเอียดกลุ่มพนักงาน (อังกฤษ)",
"PositionCode": "รหัสตำแหน่ง",
"PositionDescThai": "รายละเอียดตำแหน่ง (ไทย)",
"PositionDescEng": "รายละเอียดตำแหน่ง (อังกฤษ)",
"EmploymentTypeCode": "รหัสประเภทพนักงาน",
"EmploymentTypeDescThai": "รายละเอียดประเภทพนักงาน (ไทย)",
"EmploymentTypeDescEng": "รายละเอียดประเภทพนักงาน (อังกฤษ)",
"JobLevelCode": "รหัสระดับพนักงาน",
"JobLevelDescThai": "รายละเอียดระดับพนักงาน (ไทย)",
"JobLevelDescEng": "รายละเอียดระดับพนักงาน (อังกฤษ)",
"EmployeeCode": "รหัสพนักงาน",
"FirstName": "ชื่อ",
"LastName": "นามสกุล",
"LeaveInfo": "ข้อมูลประเภทวัน",
"Selected_ed": "เลือกแล้ว",
"SelectAll": "เลือกทั้งหมด",
"ImportData": "นำเข้าข้อมูล",
"DownloadSampleFile": "ดาวน์โหลดตัวอย่างไฟล์",
"LeaveCode": "รหัสประเภทวัน",
"DescriptionThai": "รายละเอียด (ไทย)",
"DescriptionEng": "รายละเอียด (อังกฤษ)",
"Show": "แสดง",
"ImportLeaveType": "นำเข้าข้อมูลประเภทวัน",
"File": "ไฟล์",
"PleaseSelectFile": "กรุณาเลือกไฟล์",
"Upload": "อัปโหลด",
"CreateUsername": "สร้างชื่อผู้ใช้งาน",
"SetPassword": "กำหนดรหัสผ่าน",
"ManageUsers": "จัดการผู้ใช้งาน",
"LoginName": "ชื่อล็อคอิน",
"Status": "สถานะ",
"Level": "ระดับ"
}
\ 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