forked from verdnatura/salix-front
Add redirection to summary and open summary action
This commit is contained in:
parent
09582ab6a8
commit
f12ec3c0c9
|
@ -1167,6 +1167,7 @@ export default {
|
|||
list: {
|
||||
id: 'Identifier',
|
||||
grouping: 'Grouping',
|
||||
packing: 'Packing',
|
||||
description: 'Description',
|
||||
stems: 'Stems',
|
||||
category: 'Category',
|
||||
|
|
|
@ -1167,6 +1167,7 @@ export default {
|
|||
list: {
|
||||
id: 'Identificador',
|
||||
grouping: 'Grouping',
|
||||
packing: 'Packing',
|
||||
description: 'Descripción',
|
||||
stems: 'Tallos',
|
||||
category: 'Reino',
|
||||
|
|
|
@ -10,18 +10,21 @@ import VnInput from 'src/components/common/VnInput.vue';
|
|||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||
import ItemDescriptorProxy from '../Item/Card/ItemDescriptorProxy.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import ItemSummary from '../Item/Card/ItemSummary.vue';
|
||||
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { toDate, toCurrency } from 'src/filters';
|
||||
import { useSession } from 'composables/useSession';
|
||||
import { dashIfEmpty } from 'src/filters';
|
||||
import { useArrayData } from 'composables/useArrayData';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
|
||||
const router = useRouter();
|
||||
const session = useSession();
|
||||
const token = session.getToken();
|
||||
const stateStore = useStateStore();
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
|
||||
const itemTypesOptions = ref([]);
|
||||
const originsOptions = ref([]);
|
||||
|
@ -373,8 +376,8 @@ const redirectToItemCreate = () => {
|
|||
// router.push({ name: 'EntryBuys', params: { id: entryFk } });
|
||||
};
|
||||
|
||||
const redirectToItemSummary = () => {
|
||||
// router.push({ name: 'EntryBuys', params: { id: entryFk } });
|
||||
const redirectToItemSummary = (id) => {
|
||||
router.push({ name: 'ItemSummary', params: { id } });
|
||||
};
|
||||
|
||||
// const applyColumnFilter = async (col) => {
|
||||
|
@ -386,6 +389,10 @@ const redirectToItemSummary = () => {
|
|||
// }
|
||||
// };
|
||||
|
||||
const cloneRow = () => {
|
||||
console.log('cloneRow');
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
const filteredColumns = columns.value.filter((col) => col.name !== 'picture');
|
||||
|
@ -507,10 +514,10 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
|||
<QCheckbox :model-value="!!row.isActive" disable />
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-actions="{}">
|
||||
<template #body-cell-actions="{ row }">
|
||||
<QTd>
|
||||
<QIcon
|
||||
@click.stop="viewSummary($props.id, CustomerSummary)"
|
||||
@click.stop="cloneRow()"
|
||||
class="q-ml-sm"
|
||||
color="primary"
|
||||
name="vn:clone"
|
||||
|
@ -521,7 +528,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
|||
</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
@click.stop="viewSummary($props.id, CustomerSummary)"
|
||||
@click.stop="viewSummary(row.id, ItemSummary)"
|
||||
class="q-ml-md"
|
||||
color="primary"
|
||||
name="preview"
|
||||
|
|
Loading…
Reference in New Issue