feat: showLabelerDialog
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-07-01 14:20:31 +02:00
parent d2292601de
commit 814056d920
4 changed files with 18 additions and 34 deletions

View File

@ -1,30 +1,15 @@
<script setup> <script setup>
import { ref, computed, onMounted, onBeforeMount } from 'vue'; import { computed } from 'vue';
import { useRoute, useRouter } from 'vue-router'; import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { QBtn } from 'quasar'; import { QBtn } from 'quasar';
import VnPaginate from 'src/components/ui/VnPaginate.vue'; import VnPaginate from 'src/components/ui/VnPaginate.vue';
import FetchData from 'src/components/FetchData.vue';
import VnSelect from 'components/common/VnSelect.vue';
import VnInput from 'src/components/common/VnInput.vue';
import FetchedTags from 'components/ui/FetchedTags.vue';
import VnConfirm from 'components/ui/VnConfirm.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import { useQuasar } from 'quasar';
import { toCurrency } from 'src/filters';
import axios from 'axios';
import useNotify from 'src/composables/useNotify.js';
import { usePrintService } from 'composables/usePrintService'; import { usePrintService } from 'composables/usePrintService';
const { openReport } = usePrintService(); const { openReport } = usePrintService();
const quasar = useQuasar();
const route = useRoute(); const route = useRoute();
const router = useRouter();
const { t } = useI18n(); const { t } = useI18n();
const { notify } = useNotify();
const $props = defineProps({ const $props = defineProps({
id: { id: {
type: String, type: String,
@ -32,7 +17,6 @@ const $props = defineProps({
default: null, default: null,
}, },
}); });
const rowsSelected = ref([]);
const entityId = computed(() => $props.id || route.params.id); const entityId = computed(() => $props.id || route.params.id);
const entriesTableColumns = computed(() => [ const entriesTableColumns = computed(() => [
@ -112,30 +96,28 @@ const entriesTableColumns = computed(() => [
<QTable <QTable
:rows="rows" :rows="rows"
:columns="entriesTableColumns" :columns="entriesTableColumns"
selection="multiple"
row-key="id" row-key="id"
class="full-width q-mt-md" flat
dense
class="q-ml-lg"
:grid="$q.screen.lt.md" :grid="$q.screen.lt.md"
v-model:selected="rowsSelected"
:no-data-label="t('globals.noResults')" :no-data-label="t('globals.noResults')"
> >
<template #body="props"> <template #body="props">
<QTr> <QTr>
<QTd> <!-- <QTd>
<QCheckbox v-model="props.selected" /> <QCheckbox v-model="props.selected" />
</QTd> </QTd> -->
<QTd v-for="col in props.cols" :key="col.name"> <QTd v-for="col in props.cols" :key="col.name">
{{ col.value }} {{ col.value }}
<FetchedTags
v-if="col.name === 'item'"
:item="props.row['item']"
></FetchedTags>
</QTd> </QTd>
</QTr> </QTr>
</template> </template>
</QTable> </template </QTable>
></VnPaginate> </QCardSection </template></VnPaginate
></QCard> >
</QCardSection></QCard
>
</QDialog> </QDialog>
</template> </template>

View File

@ -38,7 +38,7 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('globals.shipped'), label: t('shipped'),
name: 'shipped', name: 'shipped',
isTitle: false, isTitle: false,
create: true, create: true,
@ -47,7 +47,7 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('globals.landed'), label: t('landed'),
name: 'landed', name: 'landed',
isTitle: false, isTitle: false,
create: true, create: true,
@ -69,7 +69,7 @@ const columns = computed(() => [
computed, computed,
actions: [ actions: [
{ {
title: t('Print buys'), title: t('printBuys'),
icon: 'print', icon: 'print',
action: (row) => printBuys(row.id), action: (row) => printBuys(row.id),
}, },
@ -121,7 +121,6 @@ import VnTable from 'components/VnTable/VnTable.vue';
<i18n> <i18n>
es: es:
Print buys: Imprimir etiquetas
Inventory entry: Es inventario Inventory entry: Es inventario
Virtual entry: Es una redada Virtual entry: Es una redada
Search entries: Buscar entradas Search entries: Buscar entradas

View File

@ -9,3 +9,4 @@ entryFilter:
reference: Reference reference: Reference
landed: Landed landed: Landed
shipped: Shipped shipped: Shipped
printBuys: Print buys

View File

@ -1,5 +1,6 @@
Search entries: Buscar entradas Search entries: Buscar entradas
You can search by entry reference: Puedes buscar por referencia de la entrada You can search by entry reference: Puedes buscar por referencia de la entrada
entryList: entryList:
eti: Etiquetas eti: Etiquetas
list: list:
@ -12,3 +13,4 @@ entryFilter:
landed: F. llegada landed: F. llegada
shipped: F. salida shipped: F. salida
printBuys: Imprimir etiquetas