forked from verdnatura/salix-front
Merge pull request '6905-fixUserPanel2' (!375) from 6905-fixUserPanel2 into dev
Reviewed-on: verdnatura/salix-front#375 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
4a4550351d
|
@ -178,6 +178,8 @@ function copyUserToken() {
|
|||
:options="warehousesData"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
input-debounce="0"
|
||||
hide-selected
|
||||
/>
|
||||
<VnSelect
|
||||
:label="t('components.userPanel.localBank')"
|
||||
|
@ -185,6 +187,8 @@ function copyUserToken() {
|
|||
:options="accountBankData"
|
||||
option-label="bank"
|
||||
option-value="id"
|
||||
input-debounce="0"
|
||||
hide-selected
|
||||
>
|
||||
<template #option="{ itemProps, opt }">
|
||||
<QItem v-bind="itemProps">
|
||||
|
@ -201,10 +205,11 @@ function copyUserToken() {
|
|||
<VnSelect
|
||||
:label="t('components.userPanel.localCompany')"
|
||||
hide-selected
|
||||
v-model="user.companyFk"
|
||||
v-model="user.localCompanyFk"
|
||||
:options="companiesData"
|
||||
option-label="code"
|
||||
option-value="id"
|
||||
input-debounce="0"
|
||||
/>
|
||||
<VnSelect
|
||||
:label="t('components.userPanel.userWarehouse')"
|
||||
|
@ -213,6 +218,7 @@ function copyUserToken() {
|
|||
:options="warehousesData"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
input-debounce="0"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
|
@ -224,6 +230,8 @@ function copyUserToken() {
|
|||
option-label="code"
|
||||
option-value="id"
|
||||
style="flex: 0"
|
||||
dense
|
||||
input-debounce="0"
|
||||
/>
|
||||
</VnRow>
|
||||
</div>
|
||||
|
|
|
@ -20,28 +20,12 @@ const headerMounted = ref(false);
|
|||
export function useState() {
|
||||
function getUser() {
|
||||
return computed(() => {
|
||||
return {
|
||||
id: user.value.id,
|
||||
name: user.value.name,
|
||||
nickname: user.value.nickname,
|
||||
lang: user.value.lang,
|
||||
darkMode: user.value.darkMode,
|
||||
companyFk: user.value.companyFk,
|
||||
warehouseFk: user.value.warehouseFk,
|
||||
};
|
||||
return user.value;
|
||||
});
|
||||
}
|
||||
|
||||
function setUser(data) {
|
||||
user.value = {
|
||||
id: data.id,
|
||||
name: data.name,
|
||||
nickname: data.nickname,
|
||||
lang: data.lang,
|
||||
darkMode: data.darkMode,
|
||||
companyFk: data.companyFk,
|
||||
warehouseFk: data.warehouseFk,
|
||||
};
|
||||
user.value = data;
|
||||
}
|
||||
|
||||
function getRoles() {
|
||||
|
|
Loading…
Reference in New Issue