reorganize module

This commit is contained in:
Timur Gordon
2025-04-04 08:28:07 +02:00
parent 1ea37e2e7f
commit 939b6b4e57
375 changed files with 7580 additions and 191 deletions

View File

@@ -0,0 +1,54 @@
// calendar_model.rhai - Calendar data model
// Create a new calendar object
fn create_calendar(id, name, owner_id, description, color, shared_with, visibility) {
return #{
id: id,
name: name,
owner_id: owner_id,
description: description,
color: color,
shared_with: shared_with,
visibility: visibility
};
}
// Sample calendars data
fn get_sample_calendars() {
let calendars = [];
// Calendar 1: Work Calendar
calendars.push(create_calendar(
"cal1",
"Work Calendar",
"user1",
"Main work calendar for team coordination",
"#4285F4",
["user2", "user3", "user4"],
"team"
));
// Calendar 2: Personal Calendar
calendars.push(create_calendar(
"cal2",
"Personal Calendar",
"user1",
"Personal appointments and reminders",
"#0F9D58",
["user5"],
"private"
));
// Calendar 3: Project Calendar
calendars.push(create_calendar(
"cal3",
"Project Calendar",
"user2",
"Project-specific deadlines and milestones",
"#DB4437",
["user1", "user3", "user4"],
"public"
));
return calendars;
}