0
0
Fork 0

feat: refs #7323 add my account" btn & fix models log selectable

This commit is contained in:
Jorge Penadés 2024-08-13 10:05:07 +02:00
parent ecfe933039
commit e428da4a29
2 changed files with 18 additions and 2 deletions

View File

@ -159,6 +159,14 @@ const isEmployee = computed(() => useRole().isEmployee());
size="xxl" size="xxl"
color="transparent" color="transparent"
/> />
<QBtn
v-if="isEmployee"
class="q-mt-sm q-px-md"
:to="`/worker/${user.id}`"
color="primary"
:label="t('My account')"
dense
/>
<div class="text-subtitle1 q-mt-md"> <div class="text-subtitle1 q-mt-md">
<strong>{{ user.nickname }}</strong> <strong>{{ user.nickname }}</strong>
</div> </div>
@ -262,3 +270,7 @@ const isEmployee = computed(() => useRole().isEmployee());
} }
} }
</style> </style>
<i18n>
es:
My account: Mi cuenta
</i18n>

View File

@ -14,6 +14,7 @@ import VnJsonValue from '../common/VnJsonValue.vue';
import FetchData from '../FetchData.vue'; import FetchData from '../FetchData.vue';
import VnSelect from './VnSelect.vue'; import VnSelect from './VnSelect.vue';
import VnUserLink from '../ui/VnUserLink.vue'; import VnUserLink from '../ui/VnUserLink.vue';
import item from 'src/router/modules/item';
const stateStore = useStateStore(); const stateStore = useStateStore();
const validationsStore = useValidator(); const validationsStore = useValidator();
@ -407,9 +408,12 @@ watch(
@on-fetch=" @on-fetch="
(data) => (data) =>
(actions = data.map((item) => { (actions = data.map((item) => {
const changedModel = item.changedModel;
return { return {
locale: useCapitalize(validations[item.changedModel].locale.name), locale: useCapitalize(
value: item.changedModel, validations[changedModel]?.locale?.name ?? changedModel
),
value: changedModel,
}; };
})) }))
" "