#7323 fix worker errors #599

Merged
jorgep merged 8 commits from 7323-fixErrors into dev 2024-08-07 13:32:29 +00:00
8 changed files with 32 additions and 34 deletions

View File

@ -46,7 +46,7 @@ const stateStore = useStateStore();
</div>
</Teleport>
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
<QScrollArea class="fit text-grey-8">
alexm marked this conversation as resolved
Review

sobreescribia los colores del calendario. He mirado en un filtro normal y no ha roto nada.

sobreescribia los colores del calendario. He mirado en un filtro normal y no ha roto nada.
<QScrollArea class="fit">
<div id="right-panel"></div>
<slot v-if="!hasContent" name="right-panel" />
</QScrollArea>

View File

@ -73,8 +73,7 @@ const containerClasses = computed(() => {
.q-calendar-month__head--workweek,
.q-calendar-month__head--weekday,
// .q-calendar-month__workweek.q-past-day,
.q-calendar-month__week :nth-child(6),
:nth-child(7) {
.q-calendar-month__week :nth-child(n+6):nth-child(-n+7) {
alexm marked this conversation as resolved
Review

Rango del hijo 6 al 7

Rango del hijo 6 al 7
color: var(--vn-label-color);
}

View File

@ -139,23 +139,19 @@ const maritalStatus = [
<VnRow>
<VnInput v-model="data.SSN" :label="t('SSN')" clearable />
<VnInput

Hay una sección aposta

Hay una sección aposta
Review

Pero te has cargado este campo no?

Pero te has cargado este campo no?
Review

Ese campo no existe en la tabla worker y en la tarea original, se acordo quitarlo de basic-data

Ese campo no existe en la tabla worker y en la tarea original, se acordo quitarlo de basic-data
v-model="data.locker"
type="number"
:label="t('Locker')"
clearable
/>
</VnRow>
<VnRow>
<VnInputDate :label="t('fiDueDate')" v-model="data.fiDueDate" />
<VnInput v-model="data.sex" :label="t('sex')" clearable />
</VnRow>
<VnRow>
<VnSelect
alexm marked this conversation as resolved
Review

No hay ninguna tabla para sacar los generos, pero ,entiendo que para 2 opciones, no hace falta.

No hay ninguna tabla para sacar los generos, pero ,entiendo que para 2 opciones, no hace falta.
:label="t('sex')"
:options="['M', 'F']"
hide-selected
v-model="data.sex"
/>
<VnInputDate :label="t('seniority')" v-model="data.seniority" />
<VnInput v-model="data.fi" :label="t('fi')" />
</VnRow>
<VnRow>
<VnInput v-model="data.fi" :label="t('fi')" />
<VnInputDate :label="t('birth')" v-model="data.birth" />
</VnRow>
<VnRow>

View File

@ -171,18 +171,16 @@ watch([year, businessFk], () => refreshData());
ref="WorkerFreelanceRef"
auto-load
/>
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
<QScrollArea class="fit text-grey-8">
<WorkerCalendarFilter
ref="workerCalendarFilterRef"
v-model:business-fk="businessFk"
v-model:year="year"
v-model:absence-type="absenceType"
:contract-holidays="contractHolidays"
:year-holidays="yearHolidays"
/>
</QScrollArea>
</QDrawer>
<Teleport to="#right-panel" v-if="stateStore.isHeaderMounted()">
<WorkerCalendarFilter
ref="workerCalendarFilterRef"
v-model:business-fk="businessFk"
v-model:year="year"
v-model:absence-type="absenceType"
:contract-holidays="contractHolidays"
:year-holidays="yearHolidays"
/>
</Teleport>
<QPage class="column items-center">
<QCard v-if="workerIsFreelance">
<QCardSection class="text-center">

View File

@ -5,7 +5,7 @@ import WorkerFilter from '../WorkerFilter.vue';
</script>
<template>
<VnCard
data-key="Workers"
data-key="Worker"
base-url="Workers"
:descriptor="WorkerDescriptor"
:filter-panel="WorkerFilter"

View File

@ -11,6 +11,7 @@ import VnUserLink from 'src/components/ui/VnUserLink.vue';
import VnTitle from 'src/components/common/VnTitle.vue';
import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy.vue';
import VnRow from 'src/components/ui/VnRow.vue';
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
const route = useRoute();
const { t } = useI18n();
@ -84,10 +85,14 @@ const filter = {
:text="t('worker.summary.basicData')"
/>
<VnLv :label="t('worker.card.name')" :value="worker.user?.nickname" />
<VnLv
:label="t('worker.list.department')"
:value="worker.department?.department?.name"
/>
<VnLv :label="t('worker.list.department')">
<template #value>
<span class="link" v-text="worker.department?.department?.name" />
<DepartmentDescriptorProxy
:id="worker.department?.department?.id"
/>
</template>
</VnLv>
<VnLv :label="t('worker.list.email')" :value="worker.user.email" copy />
<VnLv :label="t('worker.summary.boss')" link>
<template #value>

View File

@ -489,7 +489,7 @@ onMounted(async () => {
</QBtnGroup>
</div>
</Teleport>
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="260" class="q-pa-md">
<Teleport to="#right-panel" v-if="stateStore.isHeaderMounted()">
<div class="q-pa-md q-mb-md" style="border: 2px solid #222">
<QCardSection horizontal>
<span class="text-weight-bold text-subtitle1 text-center full-width">
@ -515,7 +515,7 @@ onMounted(async () => {
@click-date="onInputChange"
@on-moved="getMailStates"
/>
</QDrawer>
</Teleport>
<QPage class="column items-center">
<QTable :columns="columns" :rows="['']" hide-bottom class="full-width">
<template #header="props">

View File

@ -2,7 +2,7 @@ describe('WorkerLocker', () => {
const workerId = 1109;
const lockerCode = '2F';
const input = '.q-card input';
const thirdOpt = '[role="listbox"] .q-item:nth-child(3)';
const thirdOpt = '[role="listbox"] .q-item:nth-child(1)';
Review

Revisar

Revisar
Review

Antes se mostraban todas las taquillas debido a que no se estaba cogiendo el sexo desde la store, por culpa de que estaba mal el data-key en WorkerCard. En el test se está poniendo la 2F y solo aparecen las del sexo del trabajador.

Antes se mostraban todas las taquillas debido a que no se estaba cogiendo el sexo desde la store, por culpa de que estaba mal el data-key en WorkerCard. En el test se está poniendo la 2F y solo aparecen las del sexo del trabajador.
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('productionBoss');