Share toolbox components and fix image and calendar updates
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
This commit is contained in:
parent
865a4ffd97
commit
34524d2961
13 changed files with 117 additions and 93 deletions
|
|
@ -142,12 +142,9 @@ export function useCalendarController({ data, context, toolboxId, moduleId, edit
|
|||
}
|
||||
|
||||
function handleSlotPointerEnter(event, dayIndex, slotIndex) {
|
||||
if (event.buttons !== 1) return;
|
||||
setSelection((current) => {
|
||||
if (!current || current.dayIndex !== dayIndex) return current;
|
||||
applySelection(dayIndex, current.startSlot, slotIndex);
|
||||
return { ...current, endSlot: slotIndex };
|
||||
});
|
||||
if (event.buttons !== 1 || !selection || selection.dayIndex !== dayIndex) return;
|
||||
applySelection(dayIndex, selection.startSlot, slotIndex);
|
||||
setSelection({ ...selection, endSlot: slotIndex });
|
||||
}
|
||||
|
||||
function handleMonthPointerDown(dateKey) {
|
||||
|
|
@ -158,12 +155,9 @@ export function useCalendarController({ data, context, toolboxId, moduleId, edit
|
|||
}
|
||||
|
||||
function handleMonthPointerEnter(event, dateKey) {
|
||||
if (event.buttons !== 1) return;
|
||||
setMonthSelection((current) => {
|
||||
if (!current) return current;
|
||||
applyMonthSelection(current.startDate, dateKey);
|
||||
return { ...current, endDate: dateKey };
|
||||
});
|
||||
if (event.buttons !== 1 || !monthSelection) return;
|
||||
applyMonthSelection(monthSelection.startDate, dateKey);
|
||||
setMonthSelection({ ...monthSelection, endDate: dateKey });
|
||||
}
|
||||
|
||||
function editEvent(event, occurrence = null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue