fix(employees): finalize GUI of employee list grid mode

This commit is contained in:
Nicolas Drolet 2025-08-15 10:19:40 -04:00
parent f33ca127fa
commit 7230ef01e6
4 changed files with 28 additions and 24 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -1,35 +1,39 @@
<script setup lang="ts"> <script setup lang="ts">
/* eslint-disable */
import type { EmployeeListTableItem } from '../../types/employee-list-table-interface'; import type { EmployeeListTableItem } from '../../types/employee-list-table-interface';
const props = defineProps<{ const props = defineProps<{
row: EmployeeListTableItem row: EmployeeListTableItem
}>() }>()
const getEmployeeAvatar = (first_name: string, last_name: string) => {
// add logic here to see if user has an avatar image and return that instead of initials
return first_name.charAt(0) + last_name.charAt(0);
};
</script> </script>
<template> <template>
<q-btn align="right" outline color="primary" class="q-py-none bg-white col-xs-12 col-sm-6 col-md-4 col-lg-2"> <q-card class="rounded-15 bg-white col-xs-6 col-sm-4 col-md-3 col-lg-2 column no-wrap" style="max-width: 230px;">
<div class="full-width"> <q-card-section class="text-center col-5">
<div class="text-h6 text-primary text-weight-bold q-pb-none q-pt-sm text-uppercase ellipsis hug-text text-left"> <q-avatar color="primary" size="8em">
<img src="src/assets/targo-default-avatar.png" alt="employee avatar" class="q-pa-xs">
</q-avatar>
</q-card-section>
<q-card-section class="text-center text-h6 text-primary text-weight-medium text-uppercase q-pb-none col-2 content-end" style="line-height: 0.7em;">
<div class="ellipsis">
{{ props.row.first_name }} {{ props.row.last_name }} {{ props.row.first_name }} {{ props.row.last_name }}
<q-separator color="primary" /> <q-separator color="primary" />
</div> </div>
</q-card-section>
<q-card flat square class=" row bg-primary q-my-xs justify-center"> <q-card-section class="text-caption text-grey-8 text-body2 text-uppercase q-pt-none text-center col content-start" style="min-height: 5em;">
<q-card-section class="q-py-xs text-caption text-white"> <div class=" ellipsis-2-lines">
{{ props.row.job_title }} {{ props.row.job_title }}
</q-card-section> </div>
</q-card> </q-card-section>
<q-card-section class="bg-primary text-white text-caption text-center q-py-none col-2 content-center ">
<div class="q-pt-xs q-pb-sm text-overline text-grey-14 text-lowercase hug-text text-right"> <div>
{{ props.row.email }} {{ props.row.email }}
</div> </div>
</q-card-section>
</div> </q-card>
</q-btn>
</template> </template>
<style>
.hug-text {
line-height: 0.7em;
}
</style>

View File

@ -37,8 +37,8 @@ const employeeListColumns = computed((): QTableColumn<EmployeeListTableItem>[] =
:columns="employeeListColumns" :columns="employeeListColumns"
row-key="name" row-key="name"
:rows-per-page-options="[0]" :rows-per-page-options="[0]"
class="q-pa-md rounded-15" class="q-pa-md"
card-container-class="q-gutter-sm justify-center q-pa-sm" card-container-class="justify-center q-gutter-md"
grid grid
> >
<template v-slot:item="props"> <template v-slot:item="props">

View File

@ -5,7 +5,7 @@ import SupervisorCrewTable from '../components/supervisor/supervisor-crew-table.
<template> <template>
<q-page> <q-page>
<div class="text-h4 row justify-center q-pt-md text-uppercase text-weight-bolder text-primary"> <div class="text-h4 row justify-center q-py-sm q-mt-lg text-uppercase text-weight-bolder text-primary">
{{ $t('usersListPage.tableHeader') }} {{ $t('usersListPage.tableHeader') }}
</div> </div>
<SupervisorCrewTable /> <SupervisorCrewTable />