feat: store data for preview

This commit is contained in:
Methapon Metanipat 2024-10-18 09:27:56 +07:00
parent 096ac44087
commit 7ed51c26d2

View file

@ -612,6 +612,13 @@ async function searchEmployee(text: string) {
);
if (retEmp) workerList.value = retEmp.data.result;
}
function storeDataLocal() {
localStorage.setItem(
'quotation-preview',
JSON.stringify(quotationFormData.value),
);
}
</script>
<template>
@ -874,7 +881,14 @@ async function searchEmployee(text: string) {
<footer class="surface-1 q-pa-md full-width">
<div class="row full-width justify-between">
<q-btn dense outline color="primary" class="rounded" padding="2px 8px">
<q-btn
dense
outline
color="primary"
class="rounded"
padding="2px 8px"
@click="storeDataLocal"
>
<q-icon name="mdi-play-box-outline" size="xs" class="q-mr-xs" />
{{ $t('general.view', { msg: $t('general.example') }) }}
</q-btn>