forked from verdnatura/salix-front
Merge branch 'dev' into 6971-MoveBtnToSubtoolbar
This commit is contained in:
commit
fc5dbdfbb3
|
@ -7,12 +7,16 @@ import axios from 'axios';
|
|||
import { useState } from 'src/composables/useState';
|
||||
import { useSession } from 'src/composables/useSession';
|
||||
import { localeEquivalence } from 'src/i18n/index';
|
||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
|
||||
const state = useState();
|
||||
const session = useSession();
|
||||
const router = useRouter();
|
||||
const { t, locale } = useI18n();
|
||||
import { useClipboard } from 'src/composables/useClipboard';
|
||||
import { ref } from 'vue';
|
||||
const { copyText } = useClipboard();
|
||||
const userLocale = computed({
|
||||
get() {
|
||||
|
@ -45,6 +49,9 @@ const darkMode = computed({
|
|||
|
||||
const user = state.getUser();
|
||||
const token = session.getTokenMultimedia();
|
||||
const warehousesData = ref();
|
||||
const companiesData = ref();
|
||||
const accountBankData = ref();
|
||||
|
||||
onMounted(async () => {
|
||||
updatePreferences();
|
||||
|
@ -87,10 +94,28 @@ function copyUserToken() {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="Warehouses"
|
||||
order="name"
|
||||
@on-fetch="(data) => (warehousesData = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="Companies"
|
||||
order="name"
|
||||
@on-fetch="(data) => (companiesData = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="Accountings"
|
||||
order="name"
|
||||
@on-fetch="(data) => (accountBankData = data)"
|
||||
auto-load
|
||||
/>
|
||||
<QMenu anchor="bottom left" class="bg-vn-section-color">
|
||||
<div class="row no-wrap q-pa-md">
|
||||
<div class="column panel">
|
||||
<div class="text-h6 q-mb-md">
|
||||
<div class="col column">
|
||||
<div class="text-h6 q-ma-sm q-mb-none">
|
||||
{{ t('components.userPanel.settings') }}
|
||||
</div>
|
||||
<QToggle
|
||||
|
@ -114,7 +139,7 @@ function copyUserToken() {
|
|||
|
||||
<QSeparator vertical inset class="q-mx-lg" />
|
||||
|
||||
<div class="column items-center panel">
|
||||
<div class="col column items-center q-mb-sm">
|
||||
<QAvatar size="80px">
|
||||
<QImg
|
||||
:src="`/api/Images/user/160x160/${user.id}/download?access_token=${token}`"
|
||||
|
@ -131,7 +156,6 @@ function copyUserToken() {
|
|||
>
|
||||
@{{ user.name }}
|
||||
</div>
|
||||
|
||||
<QBtn
|
||||
id="logout"
|
||||
color="orange"
|
||||
|
@ -141,20 +165,81 @@ function copyUserToken() {
|
|||
icon="logout"
|
||||
@click="logout()"
|
||||
v-close-popup
|
||||
dense
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<QSeparator inset class="q-mx-lg" />
|
||||
<div class="col q-gutter-xs q-pa-md">
|
||||
<VnRow>
|
||||
<VnSelectFilter
|
||||
:label="t('localWarehouse')"
|
||||
v-model="user.localWarehouseFk"
|
||||
:options="warehousesData"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
/>
|
||||
<VnSelectFilter
|
||||
:label="t('localBank')"
|
||||
hide-selected
|
||||
v-model="user.localBankFk"
|
||||
:options="accountBankData"
|
||||
option-label="bank"
|
||||
option-value="id"
|
||||
></VnSelectFilter>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelectFilter
|
||||
:label="t('localCompany')"
|
||||
hide-selected
|
||||
v-model="user.companyFk"
|
||||
:options="companiesData"
|
||||
option-label="code"
|
||||
option-value="id"
|
||||
/>
|
||||
<VnSelectFilter
|
||||
:label="t('userWarehouse')"
|
||||
hide-selected
|
||||
v-model="user.warehouseFk"
|
||||
:options="warehousesData"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelectFilter
|
||||
:label="t('userCompany')"
|
||||
hide-selected
|
||||
v-model="user.companyFk"
|
||||
:options="companiesData"
|
||||
option-label="code"
|
||||
option-value="id"
|
||||
style="flex: 0"
|
||||
/>
|
||||
</VnRow>
|
||||
</div>
|
||||
</QMenu>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.panel {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.copyText {
|
||||
&:hover {
|
||||
cursor: alias;
|
||||
}
|
||||
}
|
||||
</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>
|
||||
|
|
|
@ -955,7 +955,7 @@ export default {
|
|||
roadmap: 'Roadmap',
|
||||
summary: 'Summary',
|
||||
basicData: 'Basic Data',
|
||||
stops: 'Stops'
|
||||
stops: 'Stops',
|
||||
},
|
||||
},
|
||||
roadmap: {
|
||||
|
@ -963,7 +963,7 @@ export default {
|
|||
roadmap: 'Roadmap',
|
||||
summary: 'Summary',
|
||||
basicData: 'Basic Data',
|
||||
stops: 'Stops'
|
||||
stops: 'Stops',
|
||||
},
|
||||
},
|
||||
route: {
|
||||
|
|
|
@ -955,7 +955,7 @@ export default {
|
|||
roadmap: 'Troncales',
|
||||
summary: 'Resumen',
|
||||
basicData: 'Datos básicos',
|
||||
stops: 'Paradas'
|
||||
stops: 'Paradas',
|
||||
},
|
||||
},
|
||||
roadmap: {
|
||||
|
@ -963,7 +963,7 @@ export default {
|
|||
roadmap: 'Troncales',
|
||||
summary: 'Resumen',
|
||||
basicData: 'Datos básicos',
|
||||
stops: 'Paradas'
|
||||
stops: 'Paradas',
|
||||
},
|
||||
},
|
||||
route: {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue