Compare commits

..

17 commits
v1.1.0 ... dev

Author SHA1 Message Date
4a2a4eb3a3 Merge branch 'dev' of https://forgejo.chamomind.com/hrms-bangkok/hrms-admin into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m0s
* 'dev' of https://forgejo.chamomind.com/hrms-bangkok/hrms-admin:
2026-05-28 09:53:31 +07:00
0420b4cdbd Merge branch 'develop' into dev
* develop:
  update manage web services list add access
  fix: default profileImg
  fix(issues): statusOptions value
  fix
  reafactor(issues): add status HELPDESK_IN_PROGRESS and REPLIED
2026-05-28 09:53:24 +07:00
4a8d6fb5d7 Merge branch 'develop' of github.com:Frappet/hrms-admin into develop
* 'develop' of github.com:Frappet/hrms-admin:
  fix: default profileImg
2026-05-28 09:53:09 +07:00
dfd20c97dc update manage web services list add access 2026-05-28 09:52:24 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
066cc2dfcf Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m7s
2026-05-26 15:01:07 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
7489c9d2aa fix: default profileImg 2026-05-26 15:00:49 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
1a1b8ed2cf Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m53s
2026-05-08 10:42:23 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
d82d138c76 fix(issues): statusOptions value 2026-05-08 10:42:10 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
9fcea3ba95 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m6s
2026-05-08 10:18:00 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
ef2e9bd6a8 Merge branch 'develop' of https://github.com/Frappet/bma-ehr-admin into develop 2026-05-08 10:17:29 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
5f0c6756d9 fix 2026-05-08 10:17:23 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
bfcbe96678 reafactor(issues): add status HELPDESK_IN_PROGRESS and REPLIED 2026-05-08 10:16:45 +07:00
13aa604a33 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m31s
* develop:
  fixed dialog reset password
2026-04-28 18:46:50 +07:00
fc6a42ee91 fixed dialog reset password 2026-04-28 18:46:30 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
8c2f100cba Merge branch 'dev' of https://forgejo.chamomind.com/hrms-bangkok/hrms-admin into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m15s
2026-04-28 16:06:06 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
0119ecec6d Merge branch 'develop' into dev 2026-04-28 16:02:03 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
3a0d655ab0 feat:resetPassword
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 16:01:46 +07:00
7 changed files with 135 additions and 39 deletions

View file

@ -16,4 +16,6 @@ export default {
/** กำหนดสิทธิ์*/ /** กำหนดสิทธิ์*/
managementPermission, managementPermission,
resetPassword: `${management}/user/reset-password`,
}; };

View file

@ -36,8 +36,11 @@ const {
hideLoader, hideLoader,
success, success,
dialogConfirm, dialogConfirm,
dialogMessage,
} = useCounterMixin(); } = useCounterMixin();
const NODE_ENV = ref<string>(process.env.NODE_ENV || "development");
/** Tree*/ /** Tree*/
const activeId = ref<string>(""); // id const activeId = ref<string>(""); // id
const orgId = ref<string | null>(null); // id node const orgId = ref<string | null>(null); // id node
@ -195,6 +198,12 @@ const itemMenu = ref<ItemsMenu[]>([
color: "blue-9", color: "blue-9",
type: "managementRole", type: "managementRole",
}, },
{
label: "รีเซ็ตรหัสผ่าน",
icon: "mdi-lock-reset",
color: "teal-4",
type: "resetPassword",
},
{ {
label: "ลบ", label: "ลบ",
icon: "delete", icon: "delete",
@ -281,7 +290,7 @@ async function fetchListUsers() {
e.name === "STAFF" || e.name === "STAFF" ||
e.name === "SUPER_ADMIN" || e.name === "SUPER_ADMIN" ||
e.name === "ADMIN" || e.name === "ADMIN" ||
e.name === "USER" e.name === "USER",
) )
: [], : [],
})); }));
@ -319,6 +328,8 @@ function onClickAction(type: string, data: Users) {
// / // /
const status = type === "open" ? true : false; const status = type === "open" ? true : false;
onLockUser(data.id, status); onLockUser(data.id, status);
} else if (type === "resetPassword") {
onReSetPassword(data.id);
} }
} }
@ -346,7 +357,7 @@ async function onDeleteUser(id: string) {
currentPage.value = await updateCurrentPage( currentPage.value = await updateCurrentPage(
currentPage.value, currentPage.value,
maxPage.value, maxPage.value,
rows.value.length rows.value.length,
); );
await fetchListUsers(); await fetchListUsers();
success($q, "ลบข้อมูลสำเร็จ"); success($q, "ลบข้อมูลสำเร็จ");
@ -385,7 +396,7 @@ function onLockUser(id: string, type: boolean) {
type ? "ยืนยันการเปิดใช้" : "ยืนยันการระงับใช้งาน", type ? "ยืนยันการเปิดใช้" : "ยืนยันการระงับใช้งาน",
type type
? "ต้องการยืนยันการเปิดใช้นี้หรือไม่ ?" ? "ต้องการยืนยันการเปิดใช้นี้หรือไม่ ?"
: "ต้องการยืนยันระงับการใช้งานนี้หรือไม่ ?" : "ต้องการยืนยันระงับการใช้งานนี้หรือไม่ ?",
); );
} }
@ -410,7 +421,7 @@ function filterFnOptions(val: string, update: Function, type: string) {
case "employeeClass": case "employeeClass":
update(() => { update(() => {
employeeClassOption.value = employeeClassMain.value.filter( employeeClassOption.value = employeeClassMain.value.filter(
(v: DataOption) => v.name.indexOf(val) > -1 (v: DataOption) => v.name.indexOf(val) > -1,
); );
}); });
break; break;
@ -430,6 +441,42 @@ async function onSearchData() {
await fetchListUsers(); await fetchListUsers();
} }
function onReSetPassword(id: string) {
dialogConfirm(
$q,
async () => {
try {
showLoader();
const messsage =
NODE_ENV.value === "production"
? "รหัสผ่านจะถูกเปลี่ยนเป็น วันเดือนปีพุทธศักราชเกิด ของผู้ใช้งาน (รูปแบบ ววดดปปปป เช่น 14042533)"
: "ระบบจะตั้งรหัสผ่านใหม่เป็น P@ssw0rd";
await http.post(config.API.resetPassword, {
keycloak: id,
});
// success($q, "");
dialogMessage(
$q,
"รีเซ็ตรหัสผ่านสำเร็จ",
messsage,
"mdi-check-circle",
"ตกลง",
"green",
() => {},
() => {},
true,
);
} catch (error) {
messageError($q, error);
} finally {
hideLoader();
}
},
"ยืนยันการรีเซ็ตรหัสผ่าน",
"ต้องการยืนยันการรีเซ็ตรหัสผ่านนี้หรือไม่ ?",
);
}
/** /**
* การเปลยนแปลงของจำนวนขอมลตอหน * การเปลยนแปลงของจำนวนขอมลตอหน
* งขอมลรายชอผใชงานตามจำนวนขอมลตอหน * งขอมลรายชอผใชงานตามจำนวนขอมลตอหน
@ -438,7 +485,7 @@ watch(
() => pageSize.value, () => pageSize.value,
() => { () => {
fetchListUsers(); fetchListUsers();
} },
); );
const tokenParsedData = ref<string[]>([]); const tokenParsedData = ref<string[]>([]);
@ -473,7 +520,7 @@ onMounted(async () => {
<template> <template>
<div class="row items-center"> <div class="row items-center">
<div class="toptitle text-dark row items-center q-py-xs"> <div class="toptitle text-dark row items-center q-py-xs">
ดการผใชงาน ดการผใชงาน {{ NODE_ENV }}
</div> </div>
</div> </div>

View file

@ -37,6 +37,7 @@ const visibleColumns = ref<string[]>([
"amount", "amount",
"createdAt", "createdAt",
"createdFullName", "createdFullName",
"accessType",
]); ]);
const columns = ref<QTableProps["columns"]>([ const columns = ref<QTableProps["columns"]>([
{ {
@ -62,6 +63,22 @@ const columns = ref<QTableProps["columns"]>([
.join(""); .join("");
}, },
}, },
{
name: "accessType",
align: "left",
label: "การเข้าถึง",
sortable: true,
field: "accessType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
if (val === "ALL") {
return `ทั้งหมด`;
} else {
return `${val} (${row.orgName})`;
}
},
},
{ {
name: "amount", name: "amount",
align: "left", align: "left",
@ -147,7 +164,7 @@ function serchDataTable() {
rows.value = onSearchDataTable( rows.value = onSearchDataTable(
keyword.value, keyword.value,
rowsMain.value, rowsMain.value,
columns.value ? columns.value : [] columns.value ? columns.value : [],
); );
} }

View file

@ -13,8 +13,10 @@ export const useIssueStore = defineStore("issue", () => {
const statusOptions = ref<Options[]>([ const statusOptions = ref<Options[]>([
{ label: "ทั้งหมด", value: "" }, { label: "ทั้งหมด", value: "" },
{ label: "ใหม่", value: "NEW" }, { label: "ใหม่", value: "NEW" },
{ label: "กำลังดำเนินการ", value: "IN_PROGRESS" }, { label: "Dev กำลังดำเนินการ", value: "IN_PROGRESS" },
{ label: "แก้ไขแล้ว", value: "RESOLVED" }, { label: "แก้ไขแล้ว", value: "RESOLVED" },
{ label: "Helpdesk กำลังดำเนินการ", value: "HELPDESK_IN_PROGRESS" },
{ label: "แจ้งกลับแล้ว", value: "REPLIED" },
{ label: "ปิดแล้ว", value: "CLOSED" }, { label: "ปิดแล้ว", value: "CLOSED" },
]); ]);
@ -24,11 +26,15 @@ export const useIssueStore = defineStore("issue", () => {
case "NEW": case "NEW":
return "ใหม่"; return "ใหม่";
case "IN_PROGRESS": case "IN_PROGRESS":
return "กำลังดำเนินการ"; return "Dev กำลังดำเนินการ";
case "RESOLVED": case "RESOLVED":
return "แก้ไขแล้ว"; return "แก้ไขแล้ว";
case "CLOSED": case "CLOSED":
return "ปิดแล้ว"; return "ปิดแล้ว";
case "HELPDESK_IN_PROGRESS":
return "Helpdesk กำลังดำเนินการ";
case "REPLIED":
return "แจ้งกลับแล้ว";
default: default:
return "-"; return "-";
} }

View file

@ -22,6 +22,7 @@ const { convertStatus, convertSystem } = store;
const { systemOptions, statusOptions } = storeToRefs(store); const { systemOptions, statusOptions } = storeToRefs(store);
const visibleColumns = ref<string[]>([ const visibleColumns = ref<string[]>([
"codeIssue",
"title", "title",
"description", "description",
"system", "system",
@ -34,6 +35,43 @@ const visibleColumns = ref<string[]>([
"status", "status",
]); ]);
const columns = ref<QTableProps["columns"]>([ const columns = ref<QTableProps["columns"]>([
{
name: "codeIssue",
align: "left",
label: "รหัส",
sortable: false,
field: "codeIssue",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "createdAt",
align: "left",
label: "วันที่สร้าง",
sortable: false,
field: "createdAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val: string) => date2Thai(new Date(val), false, true),
},
{
name: "createdFullName",
align: "left",
label: "ชื่อผู้สร้าง",
sortable: false,
field: "createdFullName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "org",
align: "left",
label: "หน่วยงาน",
sortable: false,
field: "org",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{ {
name: "title", name: "title",
align: "left", align: "left",
@ -71,16 +109,6 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px", headerStyle: "font-size: 14px",
style: "font-size: 14px", style: "font-size: 14px",
}, },
{
name: "org",
align: "left",
label: "หน่วยงาน",
sortable: false,
field: "org",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{ {
name: "email", name: "email",
align: "left", align: "left",
@ -100,25 +128,6 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px", style: "font-size: 14px",
}, },
{
name: "createdAt",
align: "left",
label: "วันที่สร้าง",
sortable: false,
field: "createdAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val: string) => date2Thai(new Date(val), false, true),
},
{
name: "createdFullName",
align: "left",
label: "ชื่อผู้สร้าง",
sortable: false,
field: "createdFullName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{ {
name: "status", name: "status",
align: "left", align: "left",
@ -194,6 +203,7 @@ onMounted(async () => {
await fetchListIssues(); await fetchListIssues();
}); });
</script> </script>
<template> <template>
<div class="row items-center"> <div class="row items-center">
<div class="toptitle text-dark row items-center q-py-xs"> <div class="toptitle text-dark row items-center q-py-xs">
@ -231,6 +241,7 @@ onMounted(async () => {
</div> </div>
<div class="col-xs-12 col-sm-8 col-md-6"> <div class="col-xs-12 col-sm-8 col-md-6">
<q-select <q-select
class="select_ellipsis2"
dense dense
outlined outlined
v-model="statusFilter" v-model="statusFilter"

View file

@ -187,5 +187,18 @@ h3.resigtry-tab-title
text-overflow: ellipsis text-overflow: ellipsis
width: 200px width: 200px
.select_ellipsis2 .q-field__native > span
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
width: 300px
.select_ellipsis3 .q-field__native > span
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
width: auto
max-width: 60ch
.dialog-content-top .q-dialog__inner .dialog-content-top .q-dialog__inner
align-items: start align-items: start

View file

@ -357,7 +357,7 @@ async function fetchKeycloakPosition() {
}); });
} }
const profileImg = ref<string>(""); const profileImg = ref<string>(avatar);
async function getImg(id: string, pathName: string) { async function getImg(id: string, pathName: string) {
await http await http
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, pathName)) .get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, pathName))