feat: display company name footer

This commit is contained in:
Methapon Metanipat 2024-10-18 12:07:13 +07:00
parent 3952af95dc
commit 7d684f0612

View file

@ -14,7 +14,7 @@ import { baseUrl } from 'stores/utils';
import { commaInput } from 'stores/utils'; import { commaInput } from 'stores/utils';
// NOTE Import Types // NOTE Import Types
import { BankBook } from 'stores/branch/types'; import { BankBook, Branch } from 'stores/branch/types';
import { QuotationPayload } from 'src/stores/quotations/types'; import { QuotationPayload } from 'src/stores/quotations/types';
// NOTE: Import Components // NOTE: Import Components
@ -49,7 +49,7 @@ type SummaryPrice = {
finalPrice: number; finalPrice: number;
}; };
const note = ref<string>(''); const branch = ref<Branch>();
const productList = ref<Product[]>([]); const productList = ref<Product[]>([]);
const bankList = ref<BankBook[]>([]); const bankList = ref<BankBook[]>([]);
@ -121,6 +121,8 @@ onMounted(async () => {
const res = await branchStore.fetchById(data.value?.registeredBranchId); const res = await branchStore.fetchById(data.value?.registeredBranchId);
if (res) { if (res) {
branch.value = res;
bankList.value = res.bank.map((v) => ({ bankList.value = res.bank.map((v) => ({
...v, ...v,
bankUrl: `${baseUrl}/branch/${res.id}/bank-qr/${v.id}?ts=${Date.now()}`, bankUrl: `${baseUrl}/branch/${res.id}/bank-qr/${v.id}?ts=${Date.now()}`,
@ -385,7 +387,16 @@ function print() {
/> />
</article> </article>
<ViewFooter /> <ViewFooter
:data="{
name: '',
company: branch?.name || '',
buyer: '',
buyDate: '',
approveDate: '',
approver: '',
}"
/>
</section> </section>
</div> </div>
</template> </template>