0
0
Fork 0

Merge branch 'dev' into 6988-SummaryRefactor

This commit is contained in:
Alex Moreno 2024-03-26 06:41:39 +00:00
commit a4a96a106f
10 changed files with 62 additions and 46 deletions

View File

@ -60,3 +60,6 @@ async function fetch(fetchFilter = {}) {
}
}
</script>
<template>
<template></template>
</template>

View File

@ -173,14 +173,14 @@ function copyUserToken() {
<div class="col q-gutter-xs q-pa-md">
<VnRow>
<VnSelectFilter
:label="t('localWarehouse')"
:label="t('components.userPanel.localWarehouse')"
v-model="user.localWarehouseFk"
:options="warehousesData"
option-label="name"
option-value="id"
/>
<VnSelectFilter
:label="t('localBank')"
:label="t('components.userPanel.localBank')"
hide-selected
v-model="user.localBankFk"
:options="accountBankData"
@ -190,7 +190,7 @@ function copyUserToken() {
</VnRow>
<VnRow>
<VnSelectFilter
:label="t('localCompany')"
:label="t('components.userPanel.localCompany')"
hide-selected
v-model="user.companyFk"
:options="companiesData"
@ -198,7 +198,7 @@ function copyUserToken() {
option-value="id"
/>
<VnSelectFilter
:label="t('userWarehouse')"
:label="t('components.userPanel.userWarehouse')"
hide-selected
v-model="user.warehouseFk"
:options="warehousesData"
@ -208,7 +208,7 @@ function copyUserToken() {
</VnRow>
<VnRow>
<VnSelectFilter
:label="t('userCompany')"
:label="t('components.userPanel.userCompany')"
hide-selected
v-model="user.companyFk"
:options="companiesData"
@ -228,18 +228,3 @@ function copyUserToken() {
}
}
</style>
<i18n>
en:
localWarehouse: Local warehouse
localBank: Local bank
localCompany: Local company
userWarehouse: User warehouse
userCompany: User company
es:
localWarehouse: Almacén local
localBank: Banco local
localCompany: Empresa local
userWarehouse: Almacén del usuario
userCompany: Empresa del usuario
</i18n>

View File

@ -51,8 +51,8 @@ const $props = defineProps({
default: null,
},
limit: {
type: Number,
default: 30,
type: [Number, String],
default: '30',
},
});
@ -151,7 +151,7 @@ watch(modelValue, (newValue) => {
@on-fetch="(data) => setOptions(data)"
:where="where || { [optionValue]: value }"
:limit="limit"
:order-by="orderBy"
:sort-by="sortBy"
:fields="fields"
/>
<QSelect

View File

@ -838,6 +838,7 @@ export default {
workerCreate: 'New worker',
department: 'Department',
pda: 'PDA',
log: 'Log',
},
list: {
name: 'Name',
@ -1204,6 +1205,11 @@ export default {
copyToken: 'Token copied to clipboard',
settings: 'Settings',
logOut: 'Log Out',
localWarehouse: 'Local warehouse',
localBank: 'Local bank',
localCompany: 'Local company',
userWarehouse: 'User warehouse',
userCompany: 'User company',
},
smartCard: {
downloadFile: 'Download file',

View File

@ -838,6 +838,7 @@ export default {
workerCreate: 'Nuevo trabajador',
department: 'Departamentos',
pda: 'PDA',
log: 'Historial',
},
list: {
name: 'Nombre',
@ -1204,6 +1205,11 @@ export default {
copyToken: 'Token copiado al portapapeles',
settings: 'Configuración',
logOut: 'Cerrar sesión',
localWarehouse: 'Almacén local',
localBank: 'Banco local',
localCompany: 'Empresa local',
userWarehouse: 'Almacén del usuario',
userCompany: 'Empresa del usuario',
},
smartCard: {
downloadFile: 'Descargar archivo',

View File

@ -204,7 +204,7 @@ function navigateToRouteSummary(event, row) {
<QPage class="column items-center">
<div class="route-list">
<div class="q-pa-md">
<QCard class="vn-one q-py-sm q-px-lg">
<QCard class="vn-one q-py-sm q-px-lg flex justify-between">
<VnLv class="flex">
<template #label>
<span class="text-h6">{{ t('Total') }}</span>
@ -213,6 +213,16 @@ function navigateToRouteSummary(event, row) {
<span class="text-h6 q-ml-md">{{ toCurrency(total) }}</span>
</template>
</VnLv>
<QBtn
icon="vn:invoice-in-create"
color="primary"
:disable="!selectedRows?.length"
@click="openDmsUploadDialog"
>
<QTooltip>
{{ t('Create invoiceIn') }}
</QTooltip>
</QBtn>
</QCard>
</div>
<VnPaginate
@ -289,18 +299,6 @@ function navigateToRouteSummary(event, row) {
</template>
</VnPaginate>
</div>
<QPageSticky :offset="[20, 20]" v-if="selectedRows?.length">
<QBtn
fab
icon="vn:invoice-in-create"
color="primary"
@click="openDmsUploadDialog"
>
<QTooltip>
{{ t('Create invoiceIn') }}
</QTooltip>
</QBtn>
</QPageSticky>
</QPage>
<QDialog v-model="dmsDialog.show">
<VnDms

View File

@ -60,15 +60,6 @@ const decrement = (paramsObj, key) => {
</div>
</template>
<template #body="{ params, searchFn }">
<QItem>
<QItemSection>
<VnInput
v-model="params.search"
:label="t('params.search')"
is-outlined
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnSelectFilter

View File

@ -8,6 +8,7 @@ import VnLv from 'src/components/ui/VnLv.vue';
import TravelSummary from './Card/TravelSummary.vue';
import TravelFilter from './TravelFilter.vue';
import FetchData from 'components/FetchData.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import { useStateStore } from 'stores/useStateStore';
import { toDate } from 'src/filters/index';
@ -59,6 +60,15 @@ onMounted(async () => {
</script>
<template>
<template v-if="stateStore.isHeaderMounted()">
<Teleport to="#searchbar">
<VnSearchbar
data-key="TravelList"
:limit="20"
:label="t('searchByIdOrReference')"
/>
</Teleport>
</template>
<FetchData
url="Warehouses"
:filter="{ fields: ['id', 'name'] }"
@ -172,7 +182,9 @@ onMounted(async () => {
<i18n>
en:
addEntry: Add entry
searchByIdOrReference: Search by ID or reference
es:
addEntry: Añadir entrada
searchByIdOrReference: Buscar por ID o por referencia
</i18n>

View File

@ -0,0 +1,6 @@
<script setup>
import VnLog from 'src/components/common/VnLog.vue';
</script>
<template>
<VnLog model="Worker" url="/WorkerLogs" />
</template>

View File

@ -12,7 +12,7 @@ export default {
redirect: { name: 'WorkerMain' },
menus: {
main: ['WorkerList', 'WorkerDepartment'],
card: ['WorkerNotificationsManager', 'WorkerPda'],
card: ['WorkerNotificationsManager', 'WorkerPda', 'WorkerLog'],
departmentCard: ['BasicData'],
},
children: [
@ -85,6 +85,15 @@ export default {
},
component: () => import('src/pages/Worker/Card/WorkerPda.vue'),
},
{
name: 'WorkerLog',
path: 'log',
meta: {
title: 'log',
icon: 'vn:History',
},
component: () => import('src/pages/Worker/Card/WorkerLog.vue'),
},
],
},
],