From 46a994864331318bcdf71b81179ef7ea4c980fa6 Mon Sep 17 00:00:00 2001 From: Sockenklaus Date: Wed, 13 Oct 2021 17:06:01 +0200 Subject: [PATCH] worked on #9, #8, #7 --- src/components/Schedule.vue | 99 ++++++++++++++++++++----------------- src/types/coordinates.ts | 33 +++++++++++++ 2 files changed, 86 insertions(+), 46 deletions(-) create mode 100644 src/types/coordinates.ts diff --git a/src/components/Schedule.vue b/src/components/Schedule.vue index bdc311c..2dad95c 100644 --- a/src/components/Schedule.vue +++ b/src/components/Schedule.vue @@ -32,8 +32,10 @@ AddEmployeeModal( td( v-for="(date, dIndex) in row.dates" :key="dIndex" - :class="{'bg-secondary bg-opacity-10' : row.dates[dIndex] === null, 'selected' : isSelected(new Coordinates(mIndex, rIndex, eIndex, dIndex))}" - @click="select(new Coordinates(mIndex, rIndex, eIndex, dIndex), $event)" + :class="{'bg-secondary bg-opacity-10' : row.dates[dIndex] === null, 'selected' : isSelected(mIndex, rIndex, eIndex, dIndex)}" + @click.exact="select(mIndex, rIndex, eIndex, dIndex)" + @click.ctrl.exact="ctrlSelect(mIndex, rIndex, eIndex, dIndex)" + @click.shift.exact="shiftSelect(mIndex, rIndex, eIndex, dIndex)" ) tr() td.text-end @@ -51,11 +53,11 @@ AddEmployeeModal(