Updated the task view and backend to handle more like a routine
This commit is contained in:
@@ -5,14 +5,24 @@
|
||||
#include "types.hpp"
|
||||
#include "user.hpp"
|
||||
|
||||
enum task_period_t : uint8
|
||||
{
|
||||
PERIOD_MORNING = 0x01, // bit 0
|
||||
PERIOD_AFTERNOON = 0x02, // bit 1
|
||||
PERIOD_EVENING = 0x04, // bit 2
|
||||
PERIOD_ALL_DAY = 0x07 // all bits
|
||||
};
|
||||
|
||||
struct task_t
|
||||
{
|
||||
uint16 id; // Auto-assigned (1–65535, 0 = empty slot)
|
||||
uint8 user_id; // Owner (matches user_t.id)
|
||||
char title[64]; // Task description
|
||||
int64 due_date; // Unix timestamp (seconds)
|
||||
bool completed; // Done flag
|
||||
bool active; // Slot in use
|
||||
char title[64]; // Task description
|
||||
int64 due_date; // Unix timestamp (seconds) - used when recurrence is 0
|
||||
uint16 id; // Auto-assigned (1–65535, 0 = empty slot)
|
||||
uint8 user_id; // Owner (matches user_t.id)
|
||||
uint8 recurrence; // Bitmask: bit0=Mon, bit1=Tue, ..., bit6=Sun. 0=none
|
||||
uint8 period : 3; // Bitmask: bit0=Morning, bit1=Afternoon, bit2=Evening
|
||||
bool completed : 1; // Done flag
|
||||
bool active : 1; // Slot in use
|
||||
};
|
||||
|
||||
constexpr int MAX_TASKS = 32;
|
||||
|
||||
Reference in New Issue
Block a user