Compare commits

...

2 commits

Author SHA1 Message Date
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
b0b834cb9b Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m54s
2026-04-10 16:06:04 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
0d5cb36fb2 feat(registry): enable edit for items from command list 2026-04-10 16:05:30 +07:00
2 changed files with 23 additions and 14 deletions

View file

@ -402,6 +402,7 @@ const modalDialogSalary = ref<boolean>(false); //แสดง popup ตำแห
const isStatusEdit = ref<boolean>(false); //
const salaryId = ref<string>(""); //id
const dataLevel = ref<DataPosType[]>([]); //
const idCommandId = ref<boolean>(false); // commandId
const commandCodeOptions = ref<DataOption[]>(store.commandCodeData); //
const posTypeOptions = ref<DataOption[]>(store.posTypeData); // |
@ -658,6 +659,7 @@ async function onClickOpenDialog(
} else {
await fetchOptionGroup();
}
idCommandId.value = statusEdit ? (data.commandId ? true : false) : false;
commandCodeOptions.value = store.commandCodeData;
posTypeOptions.value = store.posTypeData;
posLevelOptions.value = store.posLevelData;
@ -978,6 +980,7 @@ onMounted(async () => {
<q-tooltip>ประวแกไขตำแหน/เงนเดอน</q-tooltip>
</q-btn>
<!-- :disable="(props.row.commandId !== null && props.row.commandId !== '') || props.row.commandType === 'C-PM-47'" -->
<q-btn
v-if="
!isLeave &&
@ -985,11 +988,7 @@ onMounted(async () => {
checkPermission($route)?.attrOwnership === 'OWNER'
"
flat
:disable="
(props.row.commandId !== null && props.row.commandId !== '') ||
props.row.commandType === 'C-PM-47'
"
:color="props.row.commandId ? 'grey' : 'edit'"
color="edit"
dense
round
icon="edit"
@ -1154,7 +1153,8 @@ onMounted(async () => {
<div class="row q-col-gutter-sm">
<div class="col-6">
<q-input
:class="classInput(true)"
:class="classInput(!idCommandId)"
:readonly="idCommandId"
outlined
dense
lazy-rules
@ -1174,7 +1174,8 @@ onMounted(async () => {
autoApply
year-picker
:enableTimePicker="false"
class="inputgreen"
:class="classInput(!idCommandId)"
:disabled="idCommandId"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
@ -1191,6 +1192,8 @@ onMounted(async () => {
: formData.commandYear + 543
"
label="ปี พ.ศ."
:class="classInput(!idCommandId)"
:readonly="idCommandId"
>
<template v-slot:prepend>
<q-icon

View file

@ -66,6 +66,7 @@ const keyword = ref<string>(""); //คำค้นหา
const modalCommand = ref<boolean>(false);
const command = ref<string>("");
const commandId = ref<string>("");
const idCommandId = ref<boolean>(false); //
const baseColumns = ref<QTableColumn[]>([
{
name: "commandDateAffect",
@ -638,6 +639,7 @@ async function onClickOpenDialog(
} else {
await fetchOptionGroup();
}
idCommandId.value = statusEdit && data.commandId ? true : false;
commandCodeOptions.value = store.commandCodeData;
posTypeOptions.value = store.posTypeData;
posLevelOptions.value = store.posLevelData;
@ -939,6 +941,10 @@ onMounted(async () => {
>
<q-tooltip>ประวแกไขตำแหน/เงนเดอน</q-tooltip>
</q-btn>
<!-- :disable="
(props.row.commandId !== null && props.row.commandId !== '') ||
props.row.commandType === 'C-PM-47'
" -->
<q-btn
v-if="
!isLeave &&
@ -946,11 +952,7 @@ onMounted(async () => {
checkPermission($route)?.attrOwnership === 'OWNER'
"
flat
:disable="
(props.row.commandId !== null && props.row.commandId !== '') ||
props.row.commandType === 'C-PM-47'
"
:color="props.row.commandId ? 'grey' : 'edit'"
color="edit"
dense
round
icon="edit"
@ -1119,7 +1121,8 @@ onMounted(async () => {
<div class="row q-col-gutter-sm">
<div class="col-6">
<q-input
:class="classInput(true)"
:class="classInput(!idCommandId)"
:readonly="idCommandId"
outlined
dense
lazy-rules
@ -1139,7 +1142,8 @@ onMounted(async () => {
autoApply
year-picker
:enableTimePicker="false"
class="inputgreen"
:class="classInput(!idCommandId)"
:disable="idCommandId"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
@ -1156,6 +1160,8 @@ onMounted(async () => {
: formData.commandYear + 543
"
label="ปี พ.ศ."
:class="classInput(!idCommandId)"
:readonly="idCommandId"
>
<template v-slot:prepend>
<q-icon