Calendar: filtering by tag and hiding weekends (also from a shared
link), moving a timed task in the hours view to the time its dragged
card shows, adding a task from a day, loading only the visible period
(and the next one after navigating), and opening a project on its
calendar when that's the default view.
New helpers create tags and set UI settings through the API.
Refs #134
Clicking a day in Month or Week opens a small dialog to add a task due
that day; dragging across days gives it a start and end date. In Hours,
picking time slots gives it a start and end time (saved in UTC). The
task goes in no list, like one added from the main screen, and shows up
on the calendar right away.
Offered only to users who can add tasks and edit task dates. For them,
the empty state now says they can click a day.
Refs #134
A fourth calendar view, Hours, shows the week as a time grid
(FullCalendar's timegrid, MIT, already part of the package). Timed tasks
sit at their time and take the height of their duration; tasks without
a time go in the all-day row.
Dragging or resizing in the time grid reads the dates from where the
event lands, so a task can move to another time, gain a time when
dropped on a slot, or lose it when dropped on the all-day row. Times are
saved in UTC as elsewhere. Month and Week keep moving tasks by whole
days.
Tasks snap to a step set in UI customization → Others (5, 10, 15, 30 or
60 minutes; 5 by default), as asked in #131. The API's settings
validation accepts the new key.
Refs #134
The calendar page gets the same filter button as Kanban: filter by
assignee, tag and status (including tasks without a status), and hide
weekends. Filters apply on the client, since only the visible period is
loaded, and live in the query string next to the view and date, so a
reload or a shared link keeps them. A link that carries filters opens
with the filter bar shown.
The tag and status selects follow TvListFilter/TvUserFilter.
Refs #134
Calendar joins Tasks, Kanban, Graph and Sprints in the default view
setting (UI customization → Others), so projects can open straight on
their calendar. Like Tasks, it needs no permission beyond seeing the
project's tasks. The API's settings validation accepts the new value.
Refs #134
The calendar asks the API for the tasks overlapping the period on
screen, one day wider on each side because a task with a time is stored
in UTC and can fall on a neighbouring local day. It reloads when the
period changes, instead of fetching the whole project once.
The taskview-api client gains the dateFrom/dateTo fetch arguments.
Refs #134
GET /module/tasks accepts optional dateFrom and dateTo (YYYY-MM-DD) and
returns only tasks whose dates overlap that period, inclusive. A task
with a single date spans just that day; tasks without dates are left
out. Without the parameters nothing changes.
Refs #134
Calendar: dragging a task two days ahead and stretching one over three
days, checking the saved dates and the result after a reload; weekend
columns stay full width when tasks can be moved.
Date picker: a task with two dates opens in range mode, existing times
show automatically, the checkbox adds a time, and a new range is saved
once both ends are picked, keeping its times.
Refs #131
A "Select time" checkbox in the task date picker shows start and end
time inputs. They are hidden by default and show automatically when the
task already has a time; turning them on starts at 09:00 (to 10:00 for
a range). Changing the day keeps the time, and a new range is saved only
once both ends are picked, so a half-chosen range no longer drops the
end date and time.
Times are entered in local time and stored in UTC, like the rest of the
app (helpers/taskDateTime.ts).
Refs #131
In the month and week views, drag a task to another day to move it, or
drag its end to change how many days it spans. FullCalendar's day deltas
are applied to the stored dates, so times and mixed ranges are kept and
a timed task stays at the same local time across a DST change. A single
date stretched becomes a range; a date-only range resized to one day
becomes a single date again.
Saving is optimistic and syncs the open task details; if it fails, the
event goes back and an error toast is shown. Moving needs the permission
to edit task dates. Empty weekend columns now collapse only for users
without it, since FullCalendar finds the day under the pointer assuming
equal-width columns.
Resizable cards show a grip on hover, and the dragged copy is lifted.
Refs #131
The label parsed 'YYYY-MM-DD' with new Date(), which reads it as UTC
midnight, so west of UTC a task due on the 22nd showed "21 Oct".
Range mode always started unchecked, so a task with a start and an end
date showed only the end, and picking a day dropped the start date.
Range mode now follows whether the task has a start date.
Refs #131