refactor: downlod add start date and end date
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 8s

This commit is contained in:
Thanaphon Frappet 2025-03-12 15:36:02 +07:00
parent 3dbbc4f98c
commit 47395b0847
2 changed files with 91 additions and 13 deletions

View file

@ -305,7 +305,12 @@ watch([() => pastYears.value], async () => {
style="margin-left: auto"
:icon="'material-symbols:download'"
:label="$t('general.download')"
@click.stop="reportStore.downloadReportQuotation()"
@click.stop="
reportStore.downloadReportQuotation({
startDate: state.date[0],
endDate: state.date[1],
})
"
/>
</div>
</template>
@ -346,7 +351,12 @@ watch([() => pastYears.value], async () => {
style="margin-left: auto"
:icon="'material-symbols:download'"
:label="$t('general.download')"
@click.stop="reportStore.downloadReportInvoice()"
@click.stop="
reportStore.downloadReportInvoice({
startDate: state.date[0],
endDate: state.date[1],
})
"
/>
</div>
</template>
@ -386,7 +396,12 @@ watch([() => pastYears.value], async () => {
style="margin-left: auto"
:icon="'material-symbols:download'"
:label="$t('general.download')"
@click.stop="reportStore.downloadReportReceipt()"
@click.stop="
reportStore.downloadReportReceipt({
startDate: state.date[0],
endDate: state.date[1],
})
"
/>
</div>
</template>
@ -428,7 +443,12 @@ watch([() => pastYears.value], async () => {
style="margin-left: auto"
:icon="'material-symbols:download'"
:label="$t('general.download')"
@click.stop="reportStore.downloadReportInvoice()"
@click.stop="
reportStore.downloadReportInvoice({
startDate: state.date[0],
endDate: state.date[1],
})
"
/>
</div>
</template>
@ -469,7 +489,12 @@ watch([() => pastYears.value], async () => {
style="margin-left: auto"
:icon="'material-symbols:download'"
:label="$t('general.download')"
@click.stop="reportStore.downloadReportInvoice()"
@click.stop="
reportStore.downloadReportInvoice({
startDate: state.date[0],
endDate: state.date[1],
})
"
/>
</div>
</template>
@ -492,7 +517,10 @@ watch([() => pastYears.value], async () => {
:icon="'material-symbols:download'"
:label="$t('general.download')"
@click.stop="
reportStore.downloadReportSale('by-customer')
reportStore.downloadReportSale('by-customer', {
startDate: state.date[0],
endDate: state.date[1],
})
"
/>
</div>
@ -533,7 +561,10 @@ watch([() => pastYears.value], async () => {
:icon="'material-symbols:download'"
:label="$t('general.download')"
@click.stop="
reportStore.downloadReportSale('by-product-group')
reportStore.downloadReportSale('by-product-group', {
startDate: state.date[0],
endDate: state.date[1],
})
"
/>
</div>
@ -565,7 +596,12 @@ watch([() => pastYears.value], async () => {
style="margin-left: auto"
:icon="'material-symbols:download'"
:label="$t('general.download')"
@click.stop="reportStore.downloadReportSale('by-sale')"
@click.stop="
reportStore.downloadReportSale('by-sale', {
startDate: state.date[0],
endDate: state.date[1],
})
"
/>
</div>
</template>