Compare commits

..

No commits in common. "dev" and "v1.1.0" have entirely different histories.
dev ... v1.1.0

7 changed files with 39 additions and 135 deletions

View file

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

View file

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

View file

@ -37,7 +37,6 @@ const visibleColumns = ref<string[]>([
"amount",
"createdAt",
"createdFullName",
"accessType",
]);
const columns = ref<QTableProps["columns"]>([
{
@ -63,22 +62,6 @@ const columns = ref<QTableProps["columns"]>([
.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",
align: "left",
@ -164,7 +147,7 @@ function serchDataTable() {
rows.value = onSearchDataTable(
keyword.value,
rowsMain.value,
columns.value ? columns.value : [],
columns.value ? columns.value : []
);
}

View file

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

View file

@ -22,7 +22,6 @@ const { convertStatus, convertSystem } = store;
const { systemOptions, statusOptions } = storeToRefs(store);
const visibleColumns = ref<string[]>([
"codeIssue",
"title",
"description",
"system",
@ -35,43 +34,6 @@ const visibleColumns = ref<string[]>([
"status",
]);
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",
align: "left",
@ -109,6 +71,16 @@ const columns = ref<QTableProps["columns"]>([
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: "email",
align: "left",
@ -128,6 +100,25 @@ const columns = ref<QTableProps["columns"]>([
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",
align: "left",
@ -203,7 +194,6 @@ onMounted(async () => {
await fetchListIssues();
});
</script>
<template>
<div class="row items-center">
<div class="toptitle text-dark row items-center q-py-xs">
@ -241,7 +231,6 @@ onMounted(async () => {
</div>
<div class="col-xs-12 col-sm-8 col-md-6">
<q-select
class="select_ellipsis2"
dense
outlined
v-model="statusFilter"

View file

@ -187,18 +187,5 @@ h3.resigtry-tab-title
text-overflow: ellipsis
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
align-items: start

View file

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