From 82ca721a9f894626bcc35c9ee90e9a2317931e48 Mon Sep 17 00:00:00 2001 From: Sockenklaus Date: Thu, 14 Oct 2021 01:13:09 +0200 Subject: [PATCH] thick line after one week, solve #14 --- src/components/Schedule.vue | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/components/Schedule.vue b/src/components/Schedule.vue index 1eaa117..800b63c 100644 --- a/src/components/Schedule.vue +++ b/src/components/Schedule.vue @@ -14,39 +14,45 @@ AddEmployeeModal( thead tr td.fw-bold(style="width: 150px") {{ format(startDates[mIndex], "MMMM", {locale: de}) }} - td(v-for="(day, index) in weekdays" :key="index" :class="{'text-body text-opacity-50 bg-secondary bg-opacity-10' : row.dates[index] === null}") {{ day }} + td(v-for="(day, dIndex) in weekdays" :key="dIndex" :style="dIndex === 6 ? 'border-right : 2px solid' : ''" :class="{'text-body text-opacity-50 bg-secondary bg-opacity-10' : row.dates[dIndex] === null}") {{ day }} tr - td.fw-bold {{ format(startDates[mIndex], "y") }} - td(v-for="(date, dIndex) in row.dates" :key="dIndex" :class="{'bg-secondary bg-opacity-10' : row.dates[dIndex] === null}") + td.fw-bold() {{ format(startDates[mIndex], "y") }} + td(v-for="(date, dIndex) in row.dates" :key="dIndex" :style="dIndex === 6 ? 'border-right : 2px solid' : ''" :class="{'bg-secondary bg-opacity-10' : row.dates[dIndex] === null}") template(v-if="date !== null") {{ format(date, "dd.MM.")}} tbody tr(v-for="(employee, eIndex) in row.employees" :key="eIndex") - td + td() .row.justify-content-between.align-items-center.employee-wrapper .col.text-start.ps-3 {{employee.handle}} .col.text-end - button.btn( + button.btn.btn-sm( @click="removeEmployee(mIndex, rIndex, employee)" ) i.bi-x-lg td( v-for="(date, dIndex) in row.dates" :key="dIndex" + :style="dIndex === 6 ? 'border-right : 2px solid' : ''" :class="{'bg-secondary bg-opacity-10' : row.dates[dIndex] === null, 'selected' : isSelected(mIndex, rIndex, eIndex, dIndex)}" @click.exact="row.dates[dIndex] !== null ? select(mIndex, rIndex, eIndex, dIndex) : null" @click.ctrl.exact="row.dates[dIndex] !== null ? ctrlSelect(mIndex, rIndex, eIndex, dIndex) : null" @click.shift.exact="row.dates[dIndex] !== null ? shiftSelect(mIndex, rIndex, eIndex, dIndex) : null" ) tr() - td.text-end + td().text-end button( - class="btn" + class="btn btn-sm" @click="addEmployeeRow = rIndex; addEmployeeMonth = mIndex" data-bs-toggle="modal" :data-bs-target="'#'+modalId" ) i.bi.bi-plus-lg - td(v-for="(date, dIndex) in row.dates" :key="dIndex" :class="{'bg-secondary bg-opacity-10' : row.dates[dIndex] === null}")   + td( + v-for="(date, dIndex) in row.dates" + :key="dIndex" + :style="dIndex === 6 ? 'border-right : 2px solid' : ''" + :class="{'bg-secondary bg-opacity-10' : row.dates[dIndex] === null}" + )