Give the calendar room, and put new notifications on the shopfloor board

The calendar was set to height 'auto', which sizes each week row to its own
content, so a month of mostly empty days collapsed into thin strips. It now
takes a viewport-relative height and expandRows shares that evenly across the
weeks, with a floor under each day cell so a short window squeezes the grid back
down rather than the rows vanishing.

New notifications now have "Show on Shopfloor Dashboard" ticked. The board is
where these are meant to be read, and starting unticked meant most were written
and then never appeared on it.

Only the default for a NEW notification. Editing an existing one still loads its
stored value, so nothing that was deliberately turned off gets flipped back on,
and the column default is left alone so an API or import caller that omits the
field keeps the behaviour it has today.
This commit is contained in:
cproudlock
2026-08-05 15:37:46 -04:00
parent 959db2922b
commit 658e5c2224
2 changed files with 409 additions and 385 deletions

View File

@@ -113,7 +113,13 @@ const calendarOptions = ref({
center: 'title',
right: 'dayGridMonth,dayGridWeek'
},
height: 'auto',
// 'auto' sized every row to its own content, so a month of mostly empty days
// collapsed into thin strips and the grid looked squashed. A viewport-relative
// height makes the calendar fill the space it has been given, and expandRows
// shares that height evenly across the weeks rather than leaving a gap under
// the last one.
height: 'calc(100vh - 230px)',
expandRows: true,
dayMaxEvents: 3,
moreLinkClick: () => 'none' // Disable click, we use hover
})
@@ -248,7 +254,20 @@ function formatDate(dateStr) {
<style scoped>
.calendar-container {
min-height: 500px;
min-height: 640px;
}
/* :deep, because these are FullCalendar's own elements and scoped styles do not
reach them. A floor under each day cell keeps the grid readable on a short
window, where the viewport-relative height above would otherwise squeeze the
rows back down. */
:deep(.fc-daygrid-day-frame) {
min-height: 110px;
}
/* The day number was tight against the top edge once the cells grew. */
:deep(.fc-daygrid-day-top) {
padding: 2px 4px;
}
.modal {

View File

@@ -275,7 +275,12 @@ const form = ref({
starttime: '',
endtime: '',
isactive: true,
isshopfloor: false,
// Ticked for a NEW notification: the shopfloor board is where these are
// meant to be seen, and leaving it off by default meant most were written
// and then never appeared there. Editing an EXISTING notification still
// loads its own stored value (see loadNotification), so this never flips a
// setting somebody deliberately turned off.
isshopfloor: true,
employeesso: ''
})