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