แก้ไข

This commit is contained in:
setthawutttty 2024-02-23 11:40:23 +07:00
parent d54a6c1fa9
commit 3f32cd790e
2 changed files with 6 additions and 2 deletions

View file

@ -16,7 +16,7 @@ export const useSalaryDataStore = defineStore("salaryDataStore", () => {
function fetchDataMap(data: RowList[]) {
rows.value = data.map((i: RowList) => ({
id: i.id,
period: i.period !== null ? statusTothai(i.period) : null,
period: i.period !== null ? i.period : null,
isActive: i.isActive !== null ? i.isActive : null,
effectiveDate: i.effectiveDate !== null ? i.effectiveDate : null,
status: i.status !== null ? i.status : null,
@ -44,6 +44,7 @@ export const useSalaryDataStore = defineStore("salaryDataStore", () => {
rows,
visibleColumns,
columns,
fetchDataMap
fetchDataMap,
statusTothai
};
});

View file

@ -314,6 +314,9 @@ onMounted(async () => {
<div v-if="col.name == 'effectiveDate'">
{{ date2Thai(props.row.effectiveDate)}}
</div>
<div v-else-if="col.name == 'period'">
{{ dataStore.statusTothai(props.row.period)}}
</div>
<div v-else-if="col.name === 'isActive'">
<q-icon
v-if="col.value == false"