fix: installment force push
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 8s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 8s
This commit is contained in:
parent
e6f2a8df4e
commit
87de5b48ac
6 changed files with 52 additions and 17 deletions
|
|
@ -88,12 +88,16 @@ function triggerView(opts: { quotationId: string }) {
|
|||
window.open(url.toString(), '_blank');
|
||||
}
|
||||
|
||||
function viewDocExample(quotationId: string) {
|
||||
function viewDocExample(quotationId: string, codeInvoice: string) {
|
||||
console.log(codeInvoice);
|
||||
|
||||
localStorage.setItem(
|
||||
'quotation-preview',
|
||||
JSON.stringify({
|
||||
data: {
|
||||
id: quotationId,
|
||||
codeInvoice,
|
||||
fetch: true,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
|
@ -346,7 +350,7 @@ watch(
|
|||
:rows="data"
|
||||
:grid="pageState.gridView"
|
||||
@view="(quotationId) => triggerView({ quotationId })"
|
||||
@preview="(quotationId) => viewDocExample(quotationId)"
|
||||
@preview="(item) => viewDocExample(item.quotation.id, item.code)"
|
||||
>
|
||||
<template #grid="{ item }">
|
||||
<div class="col-md-4 col-sm-6 col-12">
|
||||
|
|
@ -401,9 +405,7 @@ watch(
|
|||
() => triggerView({ quotationId: item.row.quotation.id })
|
||||
"
|
||||
@preview="
|
||||
() => {
|
||||
viewDocExample(item.row.quotation.id);
|
||||
}
|
||||
() => viewDocExample(item.row.quotation.id, item.row.code)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ withDefaults(
|
|||
|
||||
defineEmits<{
|
||||
(e: 'view', id: string): void;
|
||||
(e: 'preview', id: string): void;
|
||||
(e: 'preview', data: Invoice): void;
|
||||
(e: 'edit', data: T, index: number): void;
|
||||
(e: 'delete', data: T, index: number): void;
|
||||
(e: 'download', data: T, index: number): void;
|
||||
|
|
@ -118,7 +118,7 @@ defineEmits<{
|
|||
icon="mdi-play-box-outline"
|
||||
size="12px"
|
||||
:title="$t('preview.doc')"
|
||||
@click.stop="$emit('preview', props.row.quotation.id)"
|
||||
@click.stop="$emit('preview', props.row)"
|
||||
/>
|
||||
|
||||
<q-btn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue