refactor styles and add image not found to worker descriptor
gitea/salix-front/pipeline/head There was a failure building this commit Details

This commit is contained in:
Pau 2022-12-20 11:01:13 +01:00
parent 9ed9e03b42
commit df5eb9f27e
4 changed files with 22 additions and 9 deletions

View File

@ -376,6 +376,7 @@ export default {
role: 'Role',
sipExtension: 'Extension',
},
imageNotFound: 'Image not found',
},
components: {
topbar: {},

View File

@ -375,6 +375,7 @@ export default {
role: 'Rol',
sipExtension: 'Extensión',
},
imageNotFound: 'No se ha encontrado la imagen',
},
components: {
topbar: {},

View File

@ -77,7 +77,20 @@ function getWorkerAvatar() {
<template>
<card-descriptor v-if="worker" module="Worker" :data="worker" :description="worker.user.name">
<template #before>
<q-img :src="getWorkerAvatar()" class="q-mb-md" />
<q-img :src="getWorkerAvatar()" class="q-mb-md">
<template #error>
<div class="absolute-full bg-grey-10 text-center q-pa-md flex flex-center">
<div>
<div class="text-grey-5" style="opacity: 0.4; font-size: 5vh">
<q-icon name="vn:claims" />
</div>
<div class="text-grey-5" style="opacity: 0.4">
{{ t('worker.imageNotFound') }}
</div>
</div>
</div>
</template>
</q-img>
</template>
<template #body>
<q-list>

View File

@ -77,14 +77,12 @@ function viewSummary(id) {
</q-item-section>
<q-separator vertical />
<q-card-actions vertical class="justify-between">
<q-item-section side class="q-pa-md">
<q-btn flat round color="orange" icon="preview" @click="viewSummary(row.id)">
<q-tooltip>{{ t('components.smartCard.openSummary') }}</q-tooltip>
</q-btn>
<q-btn flat round color="grey-7" icon="schedule" @click="navigate(row.id)">
<q-tooltip>{{ t('worker.list.schedule') }}</q-tooltip>
</q-btn>
</q-item-section>
<q-btn flat round color="orange" icon="preview" @click="viewSummary(row.id)">
<q-tooltip>{{ t('components.smartCard.openSummary') }}</q-tooltip>
</q-btn>
<q-btn flat round color="grey-7" icon="schedule" @click="navigate(row.id)">
<q-tooltip>{{ t('worker.list.schedule') }}</q-tooltip>
</q-btn>
</q-card-actions>
</q-item>
</q-card>