refs #6905 add rows #235
|
@ -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>
|
||||
|
||||
carlossa marked this conversation as resolved
Outdated
|
||||
<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: {
|
||||
|
|
Loading…
Reference in New Issue
❗