สิทธิ tab
This commit is contained in:
parent
067a32f436
commit
aeab8ae15a
15 changed files with 122 additions and 24 deletions
|
|
@ -6,6 +6,7 @@ const finish = `${env.API_PROBATION_URI}/assign`;
|
||||||
const evaluate = `${env.API_PROBATION_URI}`;
|
const evaluate = `${env.API_PROBATION_URI}`;
|
||||||
const appointMain = `${env.API_PROBATION_URI}/appoint`;
|
const appointMain = `${env.API_PROBATION_URI}/appoint`;
|
||||||
const orgProfile = `${env.API_URI}/org`;
|
const orgProfile = `${env.API_URI}/org`;
|
||||||
|
const probation = `${env.API_URI}/probation`;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
competencyOptions: (personalId: string) =>
|
competencyOptions: (personalId: string) =>
|
||||||
|
|
@ -88,5 +89,7 @@ export default {
|
||||||
appointMain,
|
appointMain,
|
||||||
appointMainList:(id:string)=>`${appointMain}/list/${id}`,
|
appointMainList:(id:string)=>`${appointMain}/list/${id}`,
|
||||||
|
|
||||||
orgProfileDirector:`${orgProfile}/profile/commander-director`
|
orgProfileDirector:`${orgProfile}/profile/commander-director`,
|
||||||
|
|
||||||
|
permissionsCheck:(id:string)=>`${probation}/permissions/${id}`
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,25 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { ref, computed, watch, onMounted } from "vue";
|
import { ref, computed, watch, onMounted } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { useProbationDataStore } from "@/modules/05_placement/storeProbation";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import genReport from "@/plugins/genreport";
|
|
||||||
import type {
|
import type {
|
||||||
AppointTopic,
|
AppointTopic,
|
||||||
AppointTopicMain,
|
AppointTopicMain,
|
||||||
} from "@/modules/05_placement/interface/index/Main";
|
} from "@/modules/05_placement/interface/index/Main";
|
||||||
|
|
||||||
|
import genReport from "@/plugins/genreport";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const isEdit = ref<boolean>(false);
|
const isEdit = ref<boolean>(false);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const probationStore = useProbationDataStore();
|
||||||
const checkRoutePermisson = ref<boolean>(route.name == "probationFormDetail");
|
const checkRoutePermisson = ref<boolean>(route.name == "probationFormDetail");
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
|
|
@ -1116,7 +1120,10 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div v-if="!isEdit">
|
<div v-if="!isEdit">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!checkRoutePermisson"
|
v-if="
|
||||||
|
!checkRoutePermisson &&
|
||||||
|
probationStore.dataPermissions?.tab1.isEdit
|
||||||
|
"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -1185,7 +1192,8 @@ onMounted(async () => {
|
||||||
<q-select
|
<q-select
|
||||||
:readonly="
|
:readonly="
|
||||||
!isEdit &&
|
!isEdit &&
|
||||||
appointTopic?.id !== ''
|
appointTopic?.id !== '' &&
|
||||||
|
routeName !== 'probationWorkAdd'
|
||||||
"
|
"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
|
|
@ -300,7 +300,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div v-if="status == false">
|
<div v-if="status == false">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!checkRoutePermisson"
|
v-if="!checkRoutePermisson && probationStore.dataPermissions?.tab4.isEdit"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,7 @@ onMounted(async () => {
|
||||||
<div>แบบประเมินผล (คณะกรรมการ)</div>
|
<div>แบบประเมินผล (คณะกรรมการ)</div>
|
||||||
<div v-if="status == false">
|
<div v-if="status == false">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!checkRoutePermisson"
|
v-if="!checkRoutePermisson && probationStore.dataPermissions?.tab5.isEdit"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
|
||||||
|
|
@ -336,7 +336,7 @@ onMounted(() => {
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
borderless
|
borderless
|
||||||
:readonly="!status || checkRoutePermisson"
|
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
>
|
>
|
||||||
|
|
@ -350,7 +350,7 @@ onMounted(() => {
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
:readonly="!status || checkRoutePermisson"
|
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||||
class="full-width datepicker"
|
class="full-width datepicker"
|
||||||
:model-value="
|
:model-value="
|
||||||
date_start != null ? date2Thai(date_start) : null
|
date_start != null ? date2Thai(date_start) : null
|
||||||
|
|
@ -377,7 +377,7 @@ onMounted(() => {
|
||||||
v-model="date_finish"
|
v-model="date_finish"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
:readonly="!status || checkRoutePermisson"
|
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
|
|
@ -429,7 +429,7 @@ onMounted(() => {
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6"
|
||||||
dense
|
dense
|
||||||
borderless
|
borderless
|
||||||
:readonly="!status || checkRoutePermisson"
|
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
option-label="label"
|
option-label="label"
|
||||||
|
|
@ -458,7 +458,7 @@ onMounted(() => {
|
||||||
]"
|
]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:options="optionsResult"
|
:options="optionsResult"
|
||||||
:readonly="!status || checkRoutePermisson"
|
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||||
dense
|
dense
|
||||||
borderless
|
borderless
|
||||||
emit-value
|
emit-value
|
||||||
|
|
@ -501,7 +501,7 @@ onMounted(() => {
|
||||||
dense
|
dense
|
||||||
borderless
|
borderless
|
||||||
outlined
|
outlined
|
||||||
:readonly="!status || checkRoutePermisson"
|
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||||
class="bg-white"
|
class="bg-white"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
v-model="reson"
|
v-model="reson"
|
||||||
|
|
@ -554,7 +554,7 @@ onMounted(() => {
|
||||||
menu-class-name="modalfix"
|
menu-class-name="modalfix"
|
||||||
v-model="chairman_dated"
|
v-model="chairman_dated"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
:readonly="!status || checkRoutePermisson"
|
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||||
autoApply
|
autoApply
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
|
|
@ -616,7 +616,7 @@ onMounted(() => {
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
borderless
|
borderless
|
||||||
:readonly="!status || checkRoutePermisson"
|
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
>
|
>
|
||||||
|
|
@ -679,7 +679,7 @@ onMounted(() => {
|
||||||
v-model="director2_dated"
|
v-model="director2_dated"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
:readonly="!status || checkRoutePermisson"
|
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
|
|
@ -723,7 +723,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<q-toolbar
|
<q-toolbar
|
||||||
class="text-primary"
|
class="text-primary"
|
||||||
v-if="action == 'add' && !checkRoutePermisson"
|
v-if="action == 'add' && !checkRoutePermisson && probationStore.dataPermissions?.tab6.isEdit"
|
||||||
>
|
>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn label="บันทึก" color="secondary" @click="savaForm" />
|
<q-btn label="บันทึก" color="secondary" @click="savaForm" />
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,7 @@ onMounted(async () => {
|
||||||
<div>แบบบันทึกผล (ผู้ดูเเล)</div>
|
<div>แบบบันทึกผล (ผู้ดูเเล)</div>
|
||||||
<div v-if="status == false">
|
<div v-if="status == false">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!checkRoutePermisson"
|
v-if="!checkRoutePermisson && probationStore.dataPermissions?.tab2.isEdit"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
|
||||||
|
|
@ -378,7 +378,7 @@ onMounted(async () => {
|
||||||
<div>แบบบันทึกผล (ผู้บังคับบัญชา)</div>
|
<div>แบบบันทึกผล (ผู้บังคับบัญชา)</div>
|
||||||
<div v-if="status == false">
|
<div v-if="status == false">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!checkRoutePermisson"
|
v-if="!checkRoutePermisson && probationStore.dataPermissions?.tab3.isEdit"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import { useRoute } from "vue-router";
|
||||||
const tabHead = ref<string>("save1");
|
const tabHead = ref<string>("save1");
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const checkRoutePermisson = ref<boolean>(route.name == "probationFormDetail");
|
const checkRoutePermisson = ref<boolean>(route.name == "probationFormDetail");
|
||||||
|
|
||||||
/** รับค่ามาจากหน้าหลัก */
|
/** รับค่ามาจากหน้าหลัก */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
FileDownload: {
|
FileDownload: {
|
||||||
|
|
@ -28,6 +29,12 @@ const props = defineProps({
|
||||||
return "Default function";
|
return "Default function";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
checkPermission: {
|
||||||
|
type: Boolean,
|
||||||
|
default() {
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
/** เรียกใช้ฟังชั่นจากหน้าหลัก */
|
/** เรียกใช้ฟังชั่นจากหน้าหลัก */
|
||||||
|
|
@ -102,7 +109,7 @@ function nextPage() {
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!checkRoutePermisson"
|
v-if="!checkRoutePermisson && props.checkPermission"
|
||||||
color="blue"
|
color="blue"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,7 @@ onMounted(async () => {
|
||||||
:add-data="addData"
|
:add-data="addData"
|
||||||
:loop="probationStore.tabs.length"
|
:loop="probationStore.tabs.length"
|
||||||
:FileDownload="FileDownload"
|
:FileDownload="FileDownload"
|
||||||
|
:checkPermission="probationStore?.dataPermissions?.tab2?.isEdit as boolean"
|
||||||
/>
|
/>
|
||||||
<q-tab-panels
|
<q-tab-panels
|
||||||
v-model="tab"
|
v-model="tab"
|
||||||
|
|
@ -162,6 +163,7 @@ onMounted(async () => {
|
||||||
color="primary"
|
color="primary"
|
||||||
label="สร้างแบบบันทึกผล"
|
label="สร้างแบบบันทึกผล"
|
||||||
@click="addData"
|
@click="addData"
|
||||||
|
:disable="probationStore.dataPermissions?.tab2.isEdit == false"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,7 @@ onMounted(async () => {
|
||||||
:add-data="addData"
|
:add-data="addData"
|
||||||
:loop="probationStore.tabs.length"
|
:loop="probationStore.tabs.length"
|
||||||
:FileDownload="FileDownload"
|
:FileDownload="FileDownload"
|
||||||
|
:checkPermission="probationStore?.dataPermissions?.tab3?.isEdit as boolean"
|
||||||
/>
|
/>
|
||||||
<q-tab-panels
|
<q-tab-panels
|
||||||
v-model="tab"
|
v-model="tab"
|
||||||
|
|
@ -178,6 +179,7 @@ onMounted(async () => {
|
||||||
color="primary"
|
color="primary"
|
||||||
label="สร้างแบบบันทึกผล"
|
label="สร้างแบบบันทึกผล"
|
||||||
@click="addData"
|
@click="addData"
|
||||||
|
:disable="probationStore.dataPermissions?.tab3.isEdit == false"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,7 @@ onMounted(() => {
|
||||||
:loop="tabs.length"
|
:loop="tabs.length"
|
||||||
:add-data="addData"
|
:add-data="addData"
|
||||||
:FileDownload="FileDownload"
|
:FileDownload="FileDownload"
|
||||||
|
:checkPermission="probationStore?.dataPermissions?.tab4?.isEdit as boolean"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-tab-panels
|
<q-tab-panels
|
||||||
|
|
@ -157,7 +158,8 @@ onMounted(() => {
|
||||||
color="primary"
|
color="primary"
|
||||||
label="สร้างแบบประเมิน"
|
label="สร้างแบบประเมิน"
|
||||||
@click="addData"
|
@click="addData"
|
||||||
/>
|
:disable="probationStore.dataPermissions?.tab4.isEdit == false"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ const changeTab = (tabVal: string) => {
|
||||||
:loop="tabs.length"
|
:loop="tabs.length"
|
||||||
:add-data="addData"
|
:add-data="addData"
|
||||||
:FileDownload="FileDownload"
|
:FileDownload="FileDownload"
|
||||||
|
:checkPermission="probationStore?.dataPermissions?.tab5?.isEdit as boolean"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-tab-panels
|
<q-tab-panels
|
||||||
|
|
@ -134,6 +135,7 @@ const changeTab = (tabVal: string) => {
|
||||||
color="primary"
|
color="primary"
|
||||||
label="สร้างแบบประเมิน"
|
label="สร้างแบบประเมิน"
|
||||||
@click="addData"
|
@click="addData"
|
||||||
|
:disable="probationStore.dataPermissions?.tab5.isEdit == false"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { ref, defineAsyncComponent, onMounted } from "vue";
|
import { ref, defineAsyncComponent, onMounted, reactive } from "vue";
|
||||||
import { useProbationDataStore } from "@/modules/05_placement/storeProbation";
|
import { useProbationDataStore } from "@/modules/05_placement/storeProbation";
|
||||||
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const DataStore = useProbationDataStore();
|
const DataStore = useProbationDataStore();
|
||||||
|
|
||||||
const ProbationFormAssign = defineAsyncComponent(
|
const ProbationFormAssign = defineAsyncComponent(
|
||||||
|
|
@ -42,9 +49,24 @@ const SummaryScore = defineAsyncComponent(
|
||||||
() => import("@/modules/05_placement/components/probation/SummaryScore.vue")
|
() => import("@/modules/05_placement/components/probation/SummaryScore.vue")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
|
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const {
|
||||||
|
date2Thai,
|
||||||
|
dateToISO,
|
||||||
|
success,
|
||||||
|
messageError,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
dialogConfirm,
|
||||||
|
} = mixin;
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const checkRoutePermisson = ref<boolean>(route.name == "probationFormDetail");
|
const checkRoutePermisson = ref<boolean>(route.name == "probationFormDetail");
|
||||||
|
|
||||||
|
const assignId = ref<string>(route.params.form as string);
|
||||||
const drawer = ref<boolean>(true);
|
const drawer = ref<boolean>(true);
|
||||||
const activeTab = ref<string>("");
|
const activeTab = ref<string>("");
|
||||||
const personalId = ref<string>(route.params.personalId.toString());
|
const personalId = ref<string>(route.params.personalId.toString());
|
||||||
|
|
@ -66,8 +88,22 @@ function clickBack() {
|
||||||
DataStore.mainTab = "tab1";
|
DataStore.mainTab = "tab1";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getPermissions() {
|
||||||
|
await http
|
||||||
|
.get(config.API.permissionsCheck(assignId.value))
|
||||||
|
.then(async (res) => {
|
||||||
|
const data = await res.data.data;
|
||||||
|
DataStore.dataPermissions = data;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
/** เมื่อเริ่มโหลดหน้า ให้ tab เป็น tab1 */
|
/** เมื่อเริ่มโหลดหน้า ให้ tab เป็น tab1 */
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
|
await getPermissions();
|
||||||
if (DataStore.mainTab) {
|
if (DataStore.mainTab) {
|
||||||
activeTab.value = DataStore.mainTab;
|
activeTab.value = DataStore.mainTab;
|
||||||
} else activeTab.value = "tab1";
|
} else activeTab.value = "tab1";
|
||||||
|
|
@ -120,6 +156,7 @@ onMounted(() => {
|
||||||
v-ripple
|
v-ripple
|
||||||
:active="activeTab == 'tab1'"
|
:active="activeTab == 'tab1'"
|
||||||
@click="changeTab('tab1')"
|
@click="changeTab('tab1')"
|
||||||
|
:disable="DataStore.dataPermissions?.tab1.isView == false"
|
||||||
>
|
>
|
||||||
<q-item-section>แบบมอบหมายงาน ฯ</q-item-section>
|
<q-item-section>แบบมอบหมายงาน ฯ</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
@ -132,6 +169,7 @@ onMounted(() => {
|
||||||
v-ripple
|
v-ripple
|
||||||
:active="activeTab == 'tab2'"
|
:active="activeTab == 'tab2'"
|
||||||
@click="changeTab('tab2')"
|
@click="changeTab('tab2')"
|
||||||
|
:disable="DataStore.dataPermissions?.tab2.isView == false"
|
||||||
>
|
>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
แบบบันทึกผล
|
แบบบันทึกผล
|
||||||
|
|
@ -139,6 +177,7 @@ onMounted(() => {
|
||||||
<div class="text-caption text-grey-7">(ผู้ดูแล)</div>
|
<div class="text-caption text-grey-7">(ผู้ดูแล)</div>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
dense
|
dense
|
||||||
class="q-py-sm"
|
class="q-py-sm"
|
||||||
|
|
@ -147,6 +186,7 @@ onMounted(() => {
|
||||||
v-ripple
|
v-ripple
|
||||||
:active="activeTab == 'tab8'"
|
:active="activeTab == 'tab8'"
|
||||||
@click="changeTab('tab8')"
|
@click="changeTab('tab8')"
|
||||||
|
:disable="DataStore.dataPermissions?.tab3.isView == false"
|
||||||
>
|
>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
แบบบันทึกผล
|
แบบบันทึกผล
|
||||||
|
|
@ -163,6 +203,7 @@ onMounted(() => {
|
||||||
v-ripple
|
v-ripple
|
||||||
:active="activeTab == 'tab3'"
|
:active="activeTab == 'tab3'"
|
||||||
@click="changeTab('tab3')"
|
@click="changeTab('tab3')"
|
||||||
|
:disable="DataStore.dataPermissions?.tab4.isView == false"
|
||||||
>
|
>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
แบบประเมินผล<br />
|
แบบประเมินผล<br />
|
||||||
|
|
@ -178,6 +219,7 @@ onMounted(() => {
|
||||||
v-ripple
|
v-ripple
|
||||||
:active="activeTab == 'tab4'"
|
:active="activeTab == 'tab4'"
|
||||||
@click="changeTab('tab4')"
|
@click="changeTab('tab4')"
|
||||||
|
:disable="DataStore.dataPermissions?.tab5.isView == false"
|
||||||
>
|
>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
แบบประเมินผล<br />
|
แบบประเมินผล<br />
|
||||||
|
|
@ -193,6 +235,7 @@ onMounted(() => {
|
||||||
v-ripple
|
v-ripple
|
||||||
:active="activeTab == 'tab5'"
|
:active="activeTab == 'tab5'"
|
||||||
@click="changeTab('tab5')"
|
@click="changeTab('tab5')"
|
||||||
|
:disable="DataStore.dataPermissions?.tab6.isView == false"
|
||||||
>
|
>
|
||||||
<q-item-section> แบบรายงาน<br />การประเมินฯ </q-item-section>
|
<q-item-section> แบบรายงาน<br />การประเมินฯ </q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
@ -205,6 +248,7 @@ onMounted(() => {
|
||||||
v-ripple
|
v-ripple
|
||||||
:active="activeTab == 'tab6'"
|
:active="activeTab == 'tab6'"
|
||||||
@click="changeTab('tab6')"
|
@click="changeTab('tab6')"
|
||||||
|
:disable="DataStore.dataPermissions?.tab7.isView == false"
|
||||||
>
|
>
|
||||||
<q-item-section> ผลการประเมินการ ฯ </q-item-section>
|
<q-item-section> ผลการประเมินการ ฯ </q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
|
||||||
|
|
@ -360,6 +360,24 @@ interface AppointTopicMain {
|
||||||
status: string;
|
status: string;
|
||||||
directors: AppointTopic[];
|
directors: AppointTopic[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface TabPermissions {
|
||||||
|
isEdit: boolean;
|
||||||
|
isView: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DataPermissions {
|
||||||
|
tab1: TabPermissions;
|
||||||
|
tab2: TabPermissions;
|
||||||
|
tab3: TabPermissions;
|
||||||
|
tab4: TabPermissions;
|
||||||
|
tab5: TabPermissions;
|
||||||
|
tab6: TabPermissions;
|
||||||
|
tab7: TabPermissions;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
DataOption,
|
DataOption,
|
||||||
DataOptionInsignia,
|
DataOptionInsignia,
|
||||||
|
|
@ -387,7 +405,9 @@ export type {
|
||||||
DataEducation,
|
DataEducation,
|
||||||
PersonData,
|
PersonData,
|
||||||
AppointTopic,
|
AppointTopic,
|
||||||
AppointTopicMain
|
AppointTopicMain,
|
||||||
|
DataPermissions,
|
||||||
|
TabPermissions
|
||||||
};
|
};
|
||||||
|
|
||||||
export { AddressDataDefualt, FamilyDataDefualt };
|
export { AddressDataDefualt, FamilyDataDefualt };
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { reactive, ref } from "vue";
|
import { reactive, ref } from "vue";
|
||||||
|
|
||||||
|
import type {
|
||||||
|
DataPermissions,
|
||||||
|
TabPermissions,
|
||||||
|
} from "@/modules/05_placement/interface/index/Main";
|
||||||
|
|
||||||
export const useProbationDataStore = defineStore("probationStore", () => {
|
export const useProbationDataStore = defineStore("probationStore", () => {
|
||||||
|
const dataPermissions = ref<DataPermissions>();
|
||||||
|
|
||||||
const assign = ref<any>([]);
|
const assign = ref<any>([]);
|
||||||
const evaluate = ref<any>([]);
|
const evaluate = ref<any>([]);
|
||||||
const tabs = ref<any>([]);
|
const tabs = ref<any>([]);
|
||||||
|
|
@ -104,5 +111,6 @@ export const useProbationDataStore = defineStore("probationStore", () => {
|
||||||
behavior_no1,
|
behavior_no1,
|
||||||
behavior_no2,
|
behavior_no2,
|
||||||
behavior_no3,
|
behavior_no3,
|
||||||
|
dataPermissions
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue