Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m21s

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-03-05 13:17:39 +07:00
commit 07dfc5a144

View file

@ -59,6 +59,8 @@ const formData = reactive({
const isReadOnly = ref<boolean>(false); // const isReadOnly = ref<boolean>(false); //
const workflowRef = ref<any>(null); const workflowRef = ref<any>(null);
const isDeputy = ref<boolean>(false); //
// //
const statusOptionMain = ref<DataOption[]>( const statusOptionMain = ref<DataOption[]>(
store.optionStatus.filter((e) => e.id !== "") store.optionStatus.filter((e) => e.id !== "")
@ -86,6 +88,7 @@ async function fetchDataRequest() {
formData.status = data.status; formData.status = data.status;
formData.remark = data.remark; formData.remark = data.remark;
isDeputy.value = data.isDeputy;
if (data.status !== "PENDING") { if (data.status !== "PENDING") {
isReadOnly.value = true; isReadOnly.value = true;
@ -312,6 +315,7 @@ onMounted(async () => {
!isReadOnly) || !isReadOnly) ||
(typeEmp === 'employee' && (typeEmp === 'employee' &&
isStaff && isStaff &&
isDeputy &&
topicConvert(dataRequest.topic) !== '' && topicConvert(dataRequest.topic) !== '' &&
!isReadOnly) !isReadOnly)
" "
@ -470,14 +474,14 @@ onMounted(async () => {
:class=" :class="
classInput( classInput(
isReadOnly || isReadOnly ||
(typeEmp === 'employee' && !isStaff) || (typeEmp === 'employee' && !isStaff && !isDeputy) ||
(typeEmp !== 'employee' && (typeEmp !== 'employee' &&
!workflowRef?.permission.isUpdate) !workflowRef?.permission.isUpdate)
) )
" "
:readonly=" :readonly="
isReadOnly || isReadOnly ||
(typeEmp === 'employee' && !isStaff) || (typeEmp === 'employee' && !isStaff && !isDeputy) ||
(typeEmp !== 'employee' && (typeEmp !== 'employee' &&
!workflowRef?.permission.isUpdate) !workflowRef?.permission.isUpdate)
" "
@ -515,14 +519,14 @@ onMounted(async () => {
:class=" :class="
classInput( classInput(
isReadOnly || isReadOnly ||
(typeEmp === 'employee' && !isStaff) || (typeEmp === 'employee' && !isStaff && !isDeputy) ||
(typeEmp !== 'employee' && (typeEmp !== 'employee' &&
!workflowRef?.permission.isUpdate) !workflowRef?.permission.isUpdate)
) )
" "
:readonly=" :readonly="
isReadOnly || isReadOnly ||
(typeEmp === 'employee' && !isStaff) || (typeEmp === 'employee' && !isStaff && !isDeputy) ||
(typeEmp !== 'employee' && (typeEmp !== 'employee' &&
!workflowRef?.permission.isUpdate) !workflowRef?.permission.isUpdate)
" "
@ -539,7 +543,10 @@ onMounted(async () => {
class="row col-12 justify-end" class="row col-12 justify-end"
v-if=" v-if="
(!isReadOnly && workflowRef?.permission.isUpdate) || (!isReadOnly && workflowRef?.permission.isUpdate) ||
(typeEmp === 'employee' && isStaff && !isReadOnly) (typeEmp === 'employee' &&
isStaff &&
!isReadOnly &&
isDeputy)
" "
> >
<q-btn label="บันทึก" color="secondary" type="submit" <q-btn label="บันทึก" color="secondary" type="submit"