7729-devToTest_2430 #554
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
|
@ -9,6 +9,7 @@ import { toLowerCamel } from 'src/filters';
|
||||||
import routes from 'src/router/modules';
|
import routes from 'src/router/modules';
|
||||||
import LeftMenuItem from './LeftMenuItem.vue';
|
import LeftMenuItem from './LeftMenuItem.vue';
|
||||||
import LeftMenuItemGroup from './LeftMenuItemGroup.vue';
|
import LeftMenuItemGroup from './LeftMenuItemGroup.vue';
|
||||||
|
import { useRole } from 'src/composables/useRole';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -58,6 +59,8 @@ function addChildren(module, route, parent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const items = ref([]);
|
const items = ref([]);
|
||||||
|
const role = useRole();
|
||||||
|
|
||||||
function getRoutes() {
|
function getRoutes() {
|
||||||
if (props.source === 'main') {
|
if (props.source === 'main') {
|
||||||
const modules = Object.assign([], navigation.getModules().value);
|
const modules = Object.assign([], navigation.getModules().value);
|
||||||
|
@ -66,9 +69,9 @@ function getRoutes() {
|
||||||
const moduleDef = routes.find(
|
const moduleDef = routes.find(
|
||||||
(route) => toLowerCamel(route.name) === item.module
|
(route) => toLowerCamel(route.name) === item.module
|
||||||
);
|
);
|
||||||
item.children = [];
|
|
||||||
|
|
||||||
if (!moduleDef) continue;
|
if (!moduleDef) continue;
|
||||||
|
// if (!role.isEmployee()) continue;
|
||||||
|
item.children = [];
|
||||||
|
|
||||||
addChildren(item.module, moduleDef, item.children);
|
addChildren(item.module, moduleDef, item.children);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { useQuasar } from 'quasar';
|
||||||
import PinnedModules from './PinnedModules.vue';
|
import PinnedModules from './PinnedModules.vue';
|
||||||
import UserPanel from 'components/UserPanel.vue';
|
import UserPanel from 'components/UserPanel.vue';
|
||||||
import VnBreadcrumbs from './common/VnBreadcrumbs.vue';
|
import VnBreadcrumbs from './common/VnBreadcrumbs.vue';
|
||||||
|
import VnImg from 'src/components/ui/VnImg.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
@ -83,11 +84,12 @@ const pinnedModulesRef = ref();
|
||||||
id="user"
|
id="user"
|
||||||
>
|
>
|
||||||
<QAvatar size="lg">
|
<QAvatar size="lg">
|
||||||
<QImg
|
<VnImg
|
||||||
:src="`/api/Images/user/160x160/${user.id}/download?access_token=${token}`"
|
:id="user.id"
|
||||||
spinner-color="primary"
|
collection="user"
|
||||||
>
|
size="160x160"
|
||||||
</QImg>
|
:zoom-size="null"
|
||||||
|
/>
|
||||||
</QAvatar>
|
</QAvatar>
|
||||||
<QTooltip bottom>
|
<QTooltip bottom>
|
||||||
{{ t('globals.userPanel') }}
|
{{ t('globals.userPanel') }}
|
||||||
|
|
|
@ -12,12 +12,14 @@ import VnRow from 'components/ui/VnRow.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import { useClipboard } from 'src/composables/useClipboard';
|
import { useClipboard } from 'src/composables/useClipboard';
|
||||||
import VnImg from 'src/components/ui/VnImg.vue';
|
import VnImg from 'src/components/ui/VnImg.vue';
|
||||||
|
import { useRole } from 'src/composables/useRole';
|
||||||
|
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const session = useSession();
|
const session = useSession();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t, locale } = useI18n();
|
const { t, locale } = useI18n();
|
||||||
const { copyText } = useClipboard();
|
const { copyText } = useClipboard();
|
||||||
|
|
||||||
const userLocale = computed({
|
const userLocale = computed({
|
||||||
get() {
|
get() {
|
||||||
return locale.value;
|
return locale.value;
|
||||||
|
@ -99,6 +101,7 @@ function saveUserData(param, value) {
|
||||||
axios.post('UserConfigs/setUserConfig', { [param]: value });
|
axios.post('UserConfigs/setUserConfig', { [param]: value });
|
||||||
localUserData();
|
localUserData();
|
||||||
}
|
}
|
||||||
|
const isEmployee = computed(() => useRole().isEmployee());
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -109,12 +112,14 @@ function saveUserData(param, value) {
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
v-if="isEmployee"
|
||||||
url="Companies"
|
url="Companies"
|
||||||
order="name"
|
order="name"
|
||||||
@on-fetch="(data) => (companiesData = data)"
|
@on-fetch="(data) => (companiesData = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
v-if="isEmployee"
|
||||||
url="Accountings"
|
url="Accountings"
|
||||||
order="name"
|
order="name"
|
||||||
@on-fetch="(data) => (accountBankData = data)"
|
@on-fetch="(data) => (accountBankData = data)"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onMounted } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useSession } from 'src/composables/useSession';
|
import { useSession } from 'src/composables/useSession';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
|
@ -28,21 +28,29 @@ const $props = defineProps({
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
const token = useSession().getTokenMultimedia();
|
const token = useSession().getTokenMultimedia();
|
||||||
const timeStamp = ref(`timestamp=${Date.now()}`);
|
const timeStamp = ref(`timestamp=${Date.now()}`);
|
||||||
const url = computed(
|
import noImage from '/public/no-user.png';
|
||||||
() =>
|
import { useRole } from 'src/composables/useRole';
|
||||||
`/api/${$props.storage}/${$props.collection}/${$props.size}/${$props.id}/download?access_token=${token}&${timeStamp.value}`
|
const url = computed(() => {
|
||||||
);
|
const isEmployee = useRole().isEmployee();
|
||||||
|
return isEmployee
|
||||||
|
? `/api/${$props.storage}/${$props.collection}/${$props.size}/${$props.id}/download?access_token=${token}&${timeStamp.value}`
|
||||||
|
: noImage;
|
||||||
|
});
|
||||||
const reload = () => {
|
const reload = () => {
|
||||||
timeStamp.value = `timestamp=${Date.now()}`;
|
timeStamp.value = `timestamp=${Date.now()}`;
|
||||||
};
|
};
|
||||||
defineExpose({
|
defineExpose({
|
||||||
reload,
|
reload,
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {});
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QImg :src="url" v-bind="$attrs" @click="show = !show" spinner-color="primary" />
|
<QImg
|
||||||
|
:class="{ zoomIn: $props.zoomSize }"
|
||||||
|
:src="url"
|
||||||
|
v-bind="$attrs"
|
||||||
|
@click="show = !show"
|
||||||
|
spinner-color="primary"
|
||||||
|
/>
|
||||||
<QDialog v-model="show" v-if="$props.zoomSize">
|
<QDialog v-model="show" v-if="$props.zoomSize">
|
||||||
<QImg
|
<QImg
|
||||||
:src="url"
|
:src="url"
|
||||||
|
@ -56,7 +64,9 @@ onMounted(() => {});
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.q-img {
|
.q-img {
|
||||||
cursor: zoom-in;
|
&.zoomIn {
|
||||||
|
cursor: zoom-in;
|
||||||
|
}
|
||||||
min-width: 50px;
|
min-width: 50px;
|
||||||
}
|
}
|
||||||
.rounded {
|
.rounded {
|
||||||
|
|
|
@ -27,8 +27,12 @@ export function useRole() {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
function isEmployee() {
|
||||||
|
return hasAny(['employee']);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
isEmployee,
|
||||||
fetch,
|
fetch,
|
||||||
hasAny,
|
hasAny,
|
||||||
state,
|
state,
|
||||||
|
|
|
@ -314,6 +314,7 @@ entry:
|
||||||
pageTitles:
|
pageTitles:
|
||||||
entries: Entries
|
entries: Entries
|
||||||
list: List
|
list: List
|
||||||
|
eti: Labeler
|
||||||
summary: Summary
|
summary: Summary
|
||||||
basicData: Basic data
|
basicData: Basic data
|
||||||
buys: Buys
|
buys: Buys
|
||||||
|
|
|
@ -313,6 +313,7 @@ entry:
|
||||||
pageTitles:
|
pageTitles:
|
||||||
entries: Entradas
|
entries: Entradas
|
||||||
list: Listado
|
list: Listado
|
||||||
|
eti: Etiquetar
|
||||||
summary: Resumen
|
summary: Resumen
|
||||||
basicData: Datos básicos
|
basicData: Datos básicos
|
||||||
buys: Compras
|
buys: Compras
|
||||||
|
|
|
@ -0,0 +1,156 @@
|
||||||
|
<script setup>
|
||||||
|
import { ref, computed, onMounted, onBeforeMount } from 'vue';
|
||||||
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { QBtn } from 'quasar';
|
||||||
|
|
||||||
|
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';
|
||||||
|
const { openReport } = usePrintService();
|
||||||
|
|
||||||
|
const quasar = useQuasar();
|
||||||
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
const { t } = useI18n();
|
||||||
|
const { notify } = useNotify();
|
||||||
|
const $props = defineProps({
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const rowsSelected = ref([]);
|
||||||
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
|
|
||||||
|
const entriesTableColumns = computed(() => [
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'itemFk',
|
||||||
|
field: 'itemFk',
|
||||||
|
label: t('globals.id'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'item',
|
||||||
|
label: t('entry.summary.item'),
|
||||||
|
field: (row) => row.item.name,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'packagingFk',
|
||||||
|
label: t('entry.summary.package'),
|
||||||
|
field: 'packagingFk',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'stickers',
|
||||||
|
label: t('entry.summary.stickers'),
|
||||||
|
field: 'stickers',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'packing',
|
||||||
|
label: t('entry.summary.packing'),
|
||||||
|
field: 'packing',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'grouping',
|
||||||
|
label: t('entry.summary.grouping'),
|
||||||
|
field: 'grouping',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<QDialog ref="dialogRef">
|
||||||
|
<QCard style="min-width: 800px">
|
||||||
|
<QCardSection class="row items-center q-pb-none">
|
||||||
|
<QAvatar
|
||||||
|
:icon="icon"
|
||||||
|
color="primary"
|
||||||
|
text-color="white"
|
||||||
|
size="xl"
|
||||||
|
v-if="icon"
|
||||||
|
/>
|
||||||
|
<span class="text-h6 text-grey">{{ title }}</span>
|
||||||
|
<QSpace />
|
||||||
|
<QBtn icon="close" :disable="isLoading" flat round dense v-close-popup />
|
||||||
|
</QCardSection>
|
||||||
|
<QCardActions align="right">
|
||||||
|
<QBtn
|
||||||
|
:label="t('Print buys')"
|
||||||
|
color="primary"
|
||||||
|
icon="print"
|
||||||
|
:loading="isLoading"
|
||||||
|
@click="openReport(`Entries/${entityId}/buy-label`)"
|
||||||
|
unelevated
|
||||||
|
autofocus
|
||||||
|
/>
|
||||||
|
</QCardActions>
|
||||||
|
<QCardSection class="row items-center">
|
||||||
|
<VnPaginate
|
||||||
|
ref="entryBuysPaginateRef"
|
||||||
|
data-key="EntryBuys"
|
||||||
|
:url="`Entries/${entityId}/getBuys`"
|
||||||
|
auto-load
|
||||||
|
>
|
||||||
|
<template #body="{ rows }">
|
||||||
|
<QTable
|
||||||
|
:rows="rows"
|
||||||
|
:columns="entriesTableColumns"
|
||||||
|
selection="multiple"
|
||||||
|
row-key="id"
|
||||||
|
class="full-width q-mt-md"
|
||||||
|
:grid="$q.screen.lt.md"
|
||||||
|
v-model:selected="rowsSelected"
|
||||||
|
:no-data-label="t('globals.noResults')"
|
||||||
|
>
|
||||||
|
<template #body="props">
|
||||||
|
<QTr>
|
||||||
|
<QTd>
|
||||||
|
<QCheckbox v-model="props.selected" />
|
||||||
|
</QTd>
|
||||||
|
<QTd v-for="col in props.cols" :key="col.name">
|
||||||
|
{{ col.value }}
|
||||||
|
<FetchedTags
|
||||||
|
v-if="col.name === 'item'"
|
||||||
|
:item="props.row['item']"
|
||||||
|
></FetchedTags>
|
||||||
|
</QTd>
|
||||||
|
</QTr>
|
||||||
|
</template>
|
||||||
|
</QTable> </template
|
||||||
|
></VnPaginate> </QCardSection
|
||||||
|
></QCard>
|
||||||
|
</QDialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.q-table--horizontal-separator tbody tr:nth-child(odd) > td {
|
||||||
|
border-bottom-width: 0px;
|
||||||
|
border-top-width: 2px;
|
||||||
|
border-color: var(--vn-text-color);
|
||||||
|
}
|
||||||
|
.infoRow > td {
|
||||||
|
color: var(--vn-label-color);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Print buys: Imprimir compras
|
||||||
|
</i18n>
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
@ -9,6 +9,7 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
|
import { useRole } from 'src/composables/useRole';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -23,6 +24,7 @@ const companiesOptions = ref([]);
|
||||||
const suppliersOptions = ref([]);
|
const suppliersOptions = ref([]);
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
const isEmployee = computed(() => useRole().isEmployee());
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
stateStore.rightDrawer = true;
|
stateStore.rightDrawer = true;
|
||||||
});
|
});
|
||||||
|
@ -30,6 +32,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
v-if="isEmployee"
|
||||||
ref="companiesRef"
|
ref="companiesRef"
|
||||||
url="Companies"
|
url="Companies"
|
||||||
:filter="{ fields: ['id', 'code'] }"
|
:filter="{ fields: ['id', 'code'] }"
|
||||||
|
@ -46,6 +49,7 @@ onMounted(async () => {
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
v-if="isEmployee"
|
||||||
url="Suppliers"
|
url="Suppliers"
|
||||||
:filter="{ fields: ['id', 'nickname', 'name'] }"
|
:filter="{ fields: ['id', 'nickname', 'name'] }"
|
||||||
order="nickname"
|
order="nickname"
|
||||||
|
@ -97,7 +101,7 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem v-if="isEmployee">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('params.companyFk')"
|
:label="t('params.companyFk')"
|
||||||
|
@ -129,7 +133,7 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem v-if="isEmployee">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('params.supplierFk')"
|
:label="t('params.supplierFk')"
|
||||||
|
@ -217,7 +221,7 @@ onMounted(async () => {
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
params:
|
params:
|
||||||
|
|
||||||
invoiceNumber: Invoice number
|
invoiceNumber: Invoice number
|
||||||
travelFk: Travel
|
travelFk: Travel
|
||||||
companyFk: Company
|
companyFk: Company
|
||||||
|
@ -231,7 +235,7 @@ en:
|
||||||
isOrdered: Ordered
|
isOrdered: Ordered
|
||||||
es:
|
es:
|
||||||
params:
|
params:
|
||||||
|
|
||||||
invoiceNumber: Núm. factura
|
invoiceNumber: Núm. factura
|
||||||
travelFk: Envío
|
travelFk: Envío
|
||||||
companyFk: Empresa
|
companyFk: Empresa
|
||||||
|
|
|
@ -123,6 +123,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
|
Print buys: Imprimir compras
|
||||||
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
|
||||||
|
|
|
@ -0,0 +1,149 @@
|
||||||
|
<script setup>
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
import CardList from 'src/components/ui/CardList.vue';
|
||||||
|
import EntrySummary from './Card/EntrySummary.vue';
|
||||||
|
import EntryFilter from './EntryFilter.vue';
|
||||||
|
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||||
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
import { toDate } from 'src/filters/index';
|
||||||
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
import EntryBuysTableDialog from './EntryBuysTableDialog.vue';
|
||||||
|
|
||||||
|
const stateStore = useStateStore();
|
||||||
|
const router = useRouter();
|
||||||
|
const { t } = useI18n();
|
||||||
|
const { viewSummary } = useSummaryDialog();
|
||||||
|
const quasar = useQuasar();
|
||||||
|
|
||||||
|
function navigate(id) {
|
||||||
|
router.push({ path: `/entry/${id}` });
|
||||||
|
}
|
||||||
|
|
||||||
|
const redirectToCreateView = () => {
|
||||||
|
router.push({ name: 'EntryCreate' });
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
stateStore.rightDrawer = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
const printBuys = (rowId) => {
|
||||||
|
quasar.dialog({
|
||||||
|
component: EntryBuysTableDialog,
|
||||||
|
componentProps: {
|
||||||
|
id: rowId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<VnSearchbar
|
||||||
|
data-key="EntryList"
|
||||||
|
url="Entries/filter"
|
||||||
|
:label="t('Search entries')"
|
||||||
|
:info="t('You can search by entry reference')"
|
||||||
|
/>
|
||||||
|
<RightMenu>
|
||||||
|
<template #right-panel>
|
||||||
|
<EntryFilter data-key="EntryList" />
|
||||||
|
</template>
|
||||||
|
</RightMenu>
|
||||||
|
<QPage class="column items-center q-pa-md">
|
||||||
|
<div class="vn-card-list">
|
||||||
|
<VnPaginate
|
||||||
|
data-key="EntryList"
|
||||||
|
url="Entries/filter"
|
||||||
|
:order="['landed DESC', 'id DESC']"
|
||||||
|
auto-load
|
||||||
|
>
|
||||||
|
<template #body="{ rows }">
|
||||||
|
<CardList
|
||||||
|
v-for="row of rows"
|
||||||
|
:key="row.id"
|
||||||
|
:title="row.reference"
|
||||||
|
@click="navigate(row.id)"
|
||||||
|
:id="row.id"
|
||||||
|
:has-info-icons="!!row.isExcludedFromAvailable || !!row.isRaid"
|
||||||
|
>
|
||||||
|
<template #info-icons>
|
||||||
|
<QIcon
|
||||||
|
v-if="row.isExcludedFromAvailable"
|
||||||
|
name="vn:inventory"
|
||||||
|
color="primary"
|
||||||
|
size="xs"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('Inventory entry') }}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
<QIcon
|
||||||
|
v-if="row.isRaid"
|
||||||
|
name="vn:net"
|
||||||
|
color="primary"
|
||||||
|
size="xs"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('Virtual entry') }}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
</template>
|
||||||
|
<template #list-items>
|
||||||
|
<VnLv :label="t('landed')" :value="toDate(row.landed)" />
|
||||||
|
<VnLv
|
||||||
|
:label="t('entry.list.booked')"
|
||||||
|
:value="!!row.isBooked"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('entry.list.invoiceNumber')"
|
||||||
|
:value="row.invoiceNumber"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('entry.list.confirmed')"
|
||||||
|
:value="!!row.isConfirmed"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('entry.list.supplier')"
|
||||||
|
:value="row.supplierName"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('entry.list.ordered')"
|
||||||
|
:value="!!row.isOrdered"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template #actions>
|
||||||
|
<QBtn
|
||||||
|
:label="t('components.smartCard.openSummary')"
|
||||||
|
@click.stop="viewSummary(row.id, EntrySummary)"
|
||||||
|
color="primary"
|
||||||
|
type="submit"
|
||||||
|
/>
|
||||||
|
<QBtn
|
||||||
|
:label="t('Print buys')"
|
||||||
|
@click.stop="printBuys(row.id)"
|
||||||
|
color="primary"
|
||||||
|
type="submit"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</CardList>
|
||||||
|
</template>
|
||||||
|
</VnPaginate>
|
||||||
|
</div>
|
||||||
|
</QPage>
|
||||||
|
<QPageSticky :offset="[20, 20]">
|
||||||
|
<QBtn fab icon="add" color="primary" @click="redirectToCreateView()" />
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('entry.list.newEntry') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QPageSticky>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Print buys: Imprimir compras
|
||||||
|
Inventory entry: Es inventario
|
||||||
|
Virtual entry: Es una redada
|
||||||
|
Search entries: Buscar entradas
|
||||||
|
You can search by entry reference: Puedes buscar por referencia de la entrada
|
||||||
|
</i18n>
|
|
@ -1,4 +1,5 @@
|
||||||
entryList:
|
entryList:
|
||||||
|
eti: eti
|
||||||
list:
|
list:
|
||||||
inventoryEntry: Inventory entry
|
inventoryEntry: Inventory entry
|
||||||
virtualEntry: Virtual entry
|
virtualEntry: Virtual entry
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
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
|
||||||
list:
|
list:
|
||||||
inventoryEntry: Es inventario
|
inventoryEntry: Es inventario
|
||||||
virtualEntry: Es una redada
|
virtualEntry: Es una redada
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default {
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'EntryMain' },
|
redirect: { name: 'EntryMain' },
|
||||||
menus: {
|
menus: {
|
||||||
main: ['EntryList', 'EntryLatestBuys'],
|
main: ['EntryList', 'MyEntries', 'EntryLatestBuys'],
|
||||||
card: ['EntryBasicData', 'EntryBuys', 'EntryNotes', 'EntryDms', 'EntryLog'],
|
card: ['EntryBasicData', 'EntryBuys', 'EntryNotes', 'EntryDms', 'EntryLog'],
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
@ -30,6 +30,15 @@ export default {
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Entry/EntryList.vue'),
|
component: () => import('src/pages/Entry/EntryList.vue'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'list',
|
||||||
|
name: 'MyEntries',
|
||||||
|
meta: {
|
||||||
|
title: 'eti',
|
||||||
|
icon: 'sell',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Entry/MyEntries.vue'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'create',
|
path: 'create',
|
||||||
name: 'EntryCreate',
|
name: 'EntryCreate',
|
||||||
|
|
|
@ -80,7 +80,7 @@ export const useNavigationStore = defineStore('navigationStore', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchPinned() {
|
async function fetchPinned() {
|
||||||
if (pinnedModules.value.length) return;
|
if (pinnedModules.value.length || !role.isEmployee()) return;
|
||||||
|
|
||||||
const response = await axios.get('StarredModules/getStarredModules');
|
const response = await axios.get('StarredModules/getStarredModules');
|
||||||
pinnedModules.value = response.data.map((row) => row.moduleFk);
|
pinnedModules.value = response.data.map((row) => row.moduleFk);
|
||||||
|
|
Loading…
Reference in New Issue