start commit for admin system

This commit is contained in:
Warunee Tamkoo 2024-05-29 17:58:57 +07:00
commit badb676529
300 changed files with 58634 additions and 0 deletions

14
src/interface/main.ts Normal file
View file

@ -0,0 +1,14 @@
interface DataOption {
id: string;
label: string;
}
interface FormProfile {
id: string;
avatar: string;
fullName: string;
position: string;
positionLevel: string;
organization: string;
}
export type { DataOption, FormProfile };

View file

@ -0,0 +1,255 @@
import { readonly } from "vue";
interface ScrollType {
position: number;
direction: string;
directionChanged: boolean;
inflectionPoint: number;
delta: number;
}
interface tabType {
key: number;
label: string;
tag: string;
}
interface childrenType {
key: number;
label: string;
path?: string;
}
interface menuType {
key: number;
icon: string;
activeIcon: string;
label: string;
path: string;
children?: childrenType[];
}
interface notiType {
id: string;
sender: string;
body: string;
timereceive: string;
isOpen: boolean;
}
interface optionType {
icon: string;
label: string;
value: string;
color: string;
}
const menuList = readonly<any[]>([
{
key: 1,
icon: "mdi-home-variant-outline",
activeIcon: "mdi-home-variant",
label: "หน้าแรก",
path: "dashboard",
role: "dashboard",
},
{
key: 2,
icon: "o_person",
activeIcon: "person",
label: "ข้อมูลหลัก",
path: "metadata",
role: "metadata",
children: [
{
key: 2.0,
label: "ข้อมูลเกี่ยวกับบุคคล",
path: "masterPersonal",
},
{
key: 2.0,
label: "ข้อมูลตำแหน่งข้าราชการ ฯ",
path: "masterPosition",
},
{
key: 2.0,
label: "ข้อมูลตำแหน่งลูกจ้างประจำ",
path: "masterPositionEmployee",
},
{
key: 2.0,
label: "ข้อมูลปฏิทินวันหยุด",
path: "masterCalendarWork",
},
{
key: 2.0,
label: "ข้อมูลเครื่องราชอิสริยาภรณ์",
path: "masterInsignia",
},
],
},
{
key: 2,
icon: "mdi-account-badge",
activeIcon: "groups",
label: "จัดการผู้ใช้งานและสิทธิ์",
role: "user_role",
children: [
{
key: 2.0,
label: "จัดการผู้ใช้งาน",
path: "manageUsers",
},
{
key: 2.0,
label: "จัดการบทบาท (Roles)",
path: "manageRoles",
},
{
key: 2.0,
label: "จัดการสิทธิ์ (Permissions)",
path: "managePermission",
},
],
},
{
key: 4,
icon: "history",
activeIcon: "groups",
label: "ประวัติกิจกรรม (Logs)",
role: "user_role",
path: "viewLogs",
},
]);
const tabList = readonly<tabType[]>([
{
key: 1,
label: "ข้อมูลทั่วไป",
tag: "information",
},
{
key: 19,
label: "ประวัติการเปลี่ยนชื่อ",
tag: "oldName",
},
{
key: 16,
label: "ข้อมูลราชการ",
tag: "government",
},
{
key: 17,
label: "ข้อมูลที่อยู่",
tag: "address",
},
{
key: 18,
label: "ข้อมูลครอบครัว",
tag: "family",
},
{
key: 15,
label: "ใบอนุญาตประกอบวิชาชีพ",
tag: "certicate",
},
{
key: 2,
label: "ประวัติการศึกษา",
tag: "education",
},
{
key: 3,
label: "การฝึกอบรม/ดูงาน",
tag: "training",
},
{
key: 4,
label: "เครื่องราชอิสริยาภรณ์",
tag: "insignia",
},
{
key: 5,
label: "ประกาศเกียรติคุณ",
tag: "coined",
},
{
key: 6,
label: "ผลการประเมินปฏิบัติราชการ",
tag: "assessment",
},
{
key: 7,
label: "ตำแหน่ง/เงินเดือน/ค่าจ้าง",
tag: "position",
},
{
key: 8,
label: "วินัย",
tag: "rule",
},
{
key: 9,
label: "การลา",
tag: "leave",
},
{
key: 10,
label: "ความสามารถพิเศษ",
tag: "talent",
},
{
key: 11,
label: "ปฎิบัติราชการพิเศษ",
tag: "work",
},
{
key: 12,
label: "บันทึกวันที่ไม่ได้รับเงินเดือนฯ",
tag: "record",
},
{
key: 13,
label: "อื่นๆ",
tag: "other",
},
{
key: 14,
label: "เอกสารหลักฐาน",
tag: "document",
},
]);
const tabListPlacement = readonly<tabType[]>([
{
key: 1,
label: "ข้อมูลทั่วไป",
tag: "information",
},
{
key: 2,
label: "ใบอนุญาตประกอบอาชีพ",
tag: "certicate",
},
{
key: 3,
label: "ประวัติการศึกษา",
tag: "education",
},
{
key: 4,
label: "ผลการสอบ",
tag: "examresult",
},
{
key: 5,
label: "การคัดกรองคุณสมบัติ",
tag: "qualification",
},
{
key: 6,
label: "เอกสารหลักฐาน",
tag: "document",
},
]);
export { menuList, tabList, tabListPlacement };
export type { ScrollType, tabType, menuType, notiType, optionType };

View file

@ -0,0 +1,134 @@
diff a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts (rejected hunks)
@@ -374,104 +374,34 @@
},
],
},
- // {
- // key: 8,
- // icon: "mdi-medal-outline",
- // activeIcon: "mdi-medal",
- // label: "เครื่องราชฯ",
- // path: "insignia",
- // role: "insignia",
- // children: [
- // {
- // key: 8.1,
- // label: "เครื่องราชฯ",
- // path: "",
- // role: "insignia",
- // children: [
- // {
- // label: "รอบการเสนอขอ",
- // path: "insigniaProposals",
- // role: "insignia",
- // },
- // {
- // label: "จัดการคำขอ",
- // path: "insigniaManage",
- // role: "insignia",
- // },
- // {
- // label: "บันทึกผลการได้รับพระราช...",
- // path: "insigniaRecord",
- // role: "insignia",
- // },
- // {
- // label: "บันทึกผลการจ่ายใบกำกับ",
- // path: "VatInsignia",
- // role: "insignia",
- // },
-
- // {
- // label: "จัดสรรเครื่องราชฯ",
- // path: "insigniaAllocate",
- // role: "insignia",
- // },
- // {
- // label: "รายงาน",
- // path: "insigniaReport",
- // role: "insignia",
- // },
- // ],
- // },
- // {
- // key: 8.2,
- // label: "เหรียญจักรพรรดิมาลา",
- // path: "",
- // role: "coin",
- // children: [
- // {
- // label: "รอบการเสนอขอ",
- // path: "coinProposals",
- // role: "coin",
- // },
- // {
- // label: "จัดการคำขอ",
- // path: "coinManage",
- // role: "coin",
- // },
- // {
- // label: "บันทึกผลการได้รับพระราชทานเหรียญจักรพรรดิมาลา",
- // path: "coinReceive",
- // role: "coin",
- // },
- // {
- // label: "บันทึกผลการจ่ายใบกำกับ",
- // path: "coinPayment",
- // role: "coin",
- // },
- // {
- // label:
- // "รายชื่อที่ยื่นคำร้องขอแก้ไขข้อมูลการขอพระราชทานเหรียญจักรพรรดิมาลา",
- // path: "coinRequest",
- // role: "coin",
- // },
- // // {
- // // label: "ประวัติการยื่นขอ",
- // // path: "coinHistory",
- // // role: "coin",
- // // },
- // {
- // label: "จัดสรรเหรียญตรา",
- // path: "coinAllocate",
- // role: "coin",
- // },
- // {
- // label: "รายงาน",
- // path: "coinReport",
- // role: "coin",
- // },
- // ],
- // },
- // ],
- // },
+ {
+ key: 9,
+ icon: "mdi-calendar",
+ activeIcon: "mdi-calendar",
+ label: "การลา",
+ path: "leave",
+ role: "coin",
+ children: [
+ {
+ key: 9.1,
+ label: "รายการลงเวลาปฏิบัติงาน",
+ path: "/work-list",
+ role: "coin",
+ },
+ {
+ key: 9.2,
+ label: "รายการลา",
+ path: "/leave",
+ role: "coin",
+ },
+ {
+ key: 9.3,
+ label: "รายงานสถิติ",
+ path: "/statistics-report",
+ role: "coin",
+ },
+ ],
+ },
]);
const tabList = readonly<tabType[]>([

View file

@ -0,0 +1,46 @@
//response api เกี่ยวกับ status code กับ error
interface RequestHistoryObject {
message: String;
result: ResultHistoryObject;
status: number;
}
//rusult แนบ id version mongo
interface ResultHistoryObject {
id: String;
items: RequestPrefixHistoryObject;
version: String;
}
//ข้อมูล คำนำหน้าชื่อ
interface RequestPrefixHistoryObject {
createdAt?: Date;
createdFullName: String;
createdUserId: String;
id: String;
isActive: Boolean;
lastUpdateFullName: String;
lastUpdateUserId: String;
lastUpdatedAt?: Date;
name: String;
}
//columns
interface PrefixColumns {
[index: number]: {
name: String;
align: String;
label: String;
sortable: Boolean;
field: String;
headerStyle: String;
style: String;
};
}
export type {
RequestHistoryObject,
ResultHistoryObject,
RequestPrefixHistoryObject,
PrefixColumns,
};

View file

@ -0,0 +1,163 @@
interface OrgTree {
orgTreeId: string;
orgRootId: string;
orgLevel: number;
orgTreeName: string;
orgTreeShortName: string;
orgTreeCode: string;
orgCode: string;
orgTreeRank: string;
orgTreeOrder: number | null;
orgRootCode: string;
orgTreePhoneEx: string;
orgTreePhoneIn: string;
orgTreeFax: string;
orgRevisionId: string;
children: OrgTree[];
}
interface DataTree {
orgTreeId: string;
orgRootId?: string;
orgLevel: number;
orgName: string;
orgTreeName: string;
orgTreeShortName: string;
orgTreeCode: string;
orgCode: string;
orgTreeRank: string;
orgTreeOrder: number;
orgRootCode?: string;
orgTreePhoneEx: string;
orgTreePhoneIn: string;
orgTreeFax: string;
orgRevisionId: string;
orgRootName: string;
totalPosition: number;
totalPositionCurrentUse: number;
totalPositionCurrentVacant: number;
totalPositionNextUse: number;
totalPositionNextVacant: number;
totalRootPosition: number;
totalRootPositionCurrentUse: number;
totalRootPositionCurrentVacant: number;
totalRootPositionNextUse: number;
totalRootPositionNextVacant: number;
children?: DataTree[];
}
interface PositionMain {
fullNameCurrentHolder: string | null;
fullNameNextHolder: string | null;
id: string;
isPosition: boolean;
isSit: boolean;
orgRootId: string;
orgShortname: string;
posMasterNo: number;
posMasterNoPrefix: string;
posMasterNoSuffix: string;
posExecutiveId: string;
posExecutiveName: string;
posLevelId: string;
posLevelName: string;
posTypeId: string;
posTypeName: string;
positionArea: string;
positionExecutiveField: string;
positionField: string;
positionIsSelected: boolean;
positionName: string;
positions: Positions[];
node: number;
nodeId: string;
}
interface PositionNo {
fullNameCurrentHolder: string | null;
fullNameNextHolder: string | null;
id: string;
isPosition: boolean;
isSit: boolean;
orgRootId: string;
orgShortname: string;
posMasterNo: number;
posMasterNoPrefix: string;
posMasterNoSuffix: string;
positions: Positions[];
}
interface Positions {
id: string;
posExecutiveId: string;
posExecutiveName: string;
posLevelId: string;
posLevelName: string;
posTypeId: string;
posTypeName: string;
positionArea: string;
positionExecutiveField: string;
positionField: string;
positionIsSelected: boolean;
positionName: string;
}
interface DataPositionNo {
id: string;
isPosition: boolean;
posMasterNo: string;
positionName: string;
posTypeName: string;
posLevelName: string;
positionIsSelected: string | null;
isSit: boolean;
positions: Positions[];
}
interface FormActive {
activeId: string;
activeName: string;
draftId: string;
draftName: string;
orgPublishDate: Date | null;
isPublic: boolean;
}
interface TreeMain {
children: TreeMain[]; // ปรับเป็นชนิดข้อมูลที่ถูกต้องตามโครงสร้างของ children ถ้าเป็นไปได้
orgCode: string;
orgLevel: number;
orgName: string;
orgRevisionId: string;
orgRootName: string;
orgTreeCode: string;
orgTreeFax: string;
orgTreeId: string;
orgTreeName: string;
orgTreeOrder: number;
orgTreePhoneEx: string;
orgTreePhoneIn: string;
orgTreeRank: string;
orgTreeShortName: string;
totalPosition: number;
totalPositionCurrentUse: number;
totalPositionCurrentVacant: number;
totalPositionNextUse: number;
totalPositionNextVacant: number;
totalRootPosition: number;
totalRootPositionCurrentUse: number;
totalRootPositionCurrentVacant: number;
totalRootPositionNextUse: number;
totalRootPositionNextVacant: number;
}
export type {
OrgTree,
DataTree,
PositionMain,
PositionNo,
Positions,
DataPositionNo,
FormActive,
TreeMain,
};

View file

@ -0,0 +1,32 @@
interface attachments {
name: string;
url: string;
}
interface ResponseInbox {
body: string;
createdFullName: string;
createdUserId: string;
id: string;
isOpen: boolean;
lastUpdateFullName: string;
lastUpdateUserId: string;
lastUpdatedAt: Date;
openDate: Date | null;
payload: { attachments: attachments[] };
receiveDate: Date;
receiverUserId: string;
subject: string;
}
interface DataInbox {
no: string;
sender: string;
subject: string;
timereceive: Date;
body: string;
payload: { attachments: attachments[] };
ratingModel: number;
isOpen: boolean;
}
export type { ResponseInbox, DataInbox };

View file

@ -0,0 +1,16 @@
interface ResponsePreson {
personId: string; //id อ้างอิง profile
idcard: string; //เลขประจำตัวประชาชน
prefix: string; //คำนำหน้า
firstName: string; //ชื่อ
lastName: string; //นามสกุล
posNo: string; //เลขที่ตำแหน่ง
position: string; //ตำแหน่ง
positionLevel: string; //ระดับ
salaries: number; //เงินเดือน
organization: string; //สังกัด
email: string; //อีเมล
phone: string; //เบอร์โทรศัพท์
}
export type { ResponsePreson };

View file

@ -0,0 +1,14 @@
//ข้อมูล คำนำหน้าชื่อ
interface ResponsePrefixHistoryObject {
createdAt?: Date;
createdFullName: String;
createdUserId: String;
id: String;
isActive: Boolean;
lastUpdateFullName: String;
lastUpdateUserId: String;
lastUpdatedAt?: Date;
name: String;
}
export type { ResponsePrefixHistoryObject };