forked from verdnatura/salix-front
Move default value assignment
This commit is contained in:
parent
196679b9e9
commit
0941d74d52
|
@ -57,7 +57,7 @@ const generateYears = () => {
|
||||||
const now = Date.vnNew();
|
const now = Date.vnNew();
|
||||||
const maxYear = now.getFullYear() + 1;
|
const maxYear = now.getFullYear() + 1;
|
||||||
|
|
||||||
return Array.from({ length: 5 }, (_, i) => String(maxYear - i));
|
return Array.from({ length: 5 }, (_, i) => String(maxYear - i)) || [];
|
||||||
};
|
};
|
||||||
|
|
||||||
const absenceTypeList = ref([]);
|
const absenceTypeList = ref([]);
|
||||||
|
@ -142,7 +142,7 @@ const yearList = ref(generateYears());
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
:label="t('Year')"
|
:label="t('Year')"
|
||||||
v-model="selectedYear"
|
v-model="selectedYear"
|
||||||
:options="yearList || []"
|
:options="yearList"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
|
@ -156,7 +156,7 @@ const yearList = ref(generateYears());
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
:label="t('Contract')"
|
:label="t('Contract')"
|
||||||
v-model="selectedBusinessFk"
|
v-model="selectedBusinessFk"
|
||||||
:options="contractList || []"
|
:options="contractList"
|
||||||
option-value="businessFk"
|
option-value="businessFk"
|
||||||
option-label="businessFk"
|
option-label="businessFk"
|
||||||
dense
|
dense
|
||||||
|
|
Loading…
Reference in New Issue