Merge branch 'develop' into devTee

# Conflicts:
#	src/api/13_salary/api.salary.ts
This commit is contained in:
setthawutttty 2024-03-15 16:03:31 +07:00
commit 490fa72f34
34 changed files with 749 additions and 1429 deletions

View file

@ -52,7 +52,7 @@ function getRound() {
showLoader();
http
.get(
config.API.salaryPeriod() +
config.API.salaryPeriodActive() +
`?page=${page.value}&pageSize=${pageSize.value}&keyword=&year=0`
)
.then(async (res) => {

View file

@ -81,7 +81,7 @@ const itemMenu = ref<ItemsMenu[]>([
const formFilter = reactive<FormFilter>({
page: 1,
pageSize: 10,
pageSize: 100,
keyword: "",
});
const maxPage = ref<number>(1);
@ -90,6 +90,17 @@ const pagination = ref({
page: formFilter.page,
rowsPerPage: formFilter.pageSize,
});
const isActive = ref<boolean>(false);
function fetchDataDetail() {
http
.get(config.API.salaryEmployeeChartByid(salaryEmployeeId.value))
.then((res) => {
isActive.value = res.data.result.isActive;
})
.catch((e) => {})
.finally(() => {});
}
function fetchSalalyEmployeeRate() {
showLoader();
@ -179,6 +190,7 @@ watch(
onMounted(() => {
fetchSalalyEmployeeRate();
fetchDataDetail();
});
</script>
<template>
@ -199,7 +211,7 @@ onMounted(() => {
</div>
<q-card flat bordered class="q-pa-md">
<q-toolbar class="text-primary" style="padding: 0px">
<q-btn flat round dense icon="add" @click="onClickAdd">
<q-btn v-if="!isActive" flat round dense icon="add" @click="onClickAdd">
<q-tooltip>เพ </q-tooltip>
</q-btn>
<q-space />
@ -243,13 +255,14 @@ onMounted(() => {
:rows-per-page-options="[10, 20, 50, 100]"
:visible-columns="visibleColumns"
@update:pagination="updatePageSize"
v-model:pagination="pagination"
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
<q-th auto-width v-if="!isActive" />
</q-tr>
<q-separator />
</template>
@ -264,7 +277,7 @@ onMounted(() => {
</div>
<div v-else>{{ col.value ? col.value : "-" }}</div>
</q-td>
<q-td>
<q-td v-if="!isActive">
<q-btn
flat
dense

View file

@ -51,7 +51,7 @@ function getRound() {
showLoader();
http
.get(
config.API.salaryPeriod() +
config.API.salaryPeriodActive() +
`?page=${page.value}&pageSize=${pageSize.value}&keyword=&year=0`
)
.then(async (res) => {