From f6e587ab143a62e7317f42c3f8d392bf1b01897d Mon Sep 17 00:00:00 2001 From: Teodor Date: Wed, 22 Apr 2026 01:23:19 +0200 Subject: [PATCH] Added notes for crud commit --- notes/work-report-2026-04-21-to-22.md | 116 ++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 notes/work-report-2026-04-21-to-22.md diff --git a/notes/work-report-2026-04-21-to-22.md b/notes/work-report-2026-04-21-to-22.md new file mode 100644 index 0000000..98fa574 --- /dev/null +++ b/notes/work-report-2026-04-21-to-22.md @@ -0,0 +1,116 @@ +## #Overview +Today I implemented a full **CRUD system** for the three core entities in the application: +- **Subjects** +- **Assignments** +- **Tasks** + +This includes creating, editing, viewing details, and deleting records, as well as connecting all screens using Expo Router. + +--- + +## #ImplementedFeatures + +### #Subjects +Created full CRUD flow: +- `createSubject.tsx` +- `editSubject.tsx` +- `viewDetailsSubject.tsx` + +**Functionality:** +- Create new subjects +- Edit existing subjects +- View subject details +- Delete subjects + +**Relationships:** +- Subjects act as the top-level entity +- Assignments can optionally be linked to a subject via `sId` +- Subjects are displayed: + - globally (`subjects.tsx`) + - or standalone (`viewDetailsSubjects.tsx`) + +--- + +### #Assignments +Created full CRUD flow: +- `createAssignment.tsx` +- `editAssignment.tsx` +- `viewDetailsAssignment.tsx` + +**Functionality:** +- Create assignments (with optional `sId`) +- Edit assignments +- View assignment details +- Delete assignments + +**Relationships:** +- Assignments can exist: + - linked to a subject (`sId`) + - or standalone (`sId = null`) +- Assignments are displayed: + - globally (`assignments.tsx`) + - or within a subject (`viewDetailsSubject.tsx`) + - or standalone (`viewDetailsAssignment.tsx`) + +--- + +### #Tasks +Created full CRUD flow: +- `createTask.tsx` +- `editTask.tsx` +- `viewDetailsTask.tsx` + +**Functionality:** +- Create tasks +- Edit tasks +- View task details +- Delete tasks + +**Relationships:** +- Tasks are linked to assignments via `aId` +- Tasks are accessed through assignment detail pages +- Assignments are displayed: + - globally (`tasks.tsx`) + - or within an assignment (`viewDetailsAssignment.tsx`) + - or standalone (`viewDetailsTask.tsx`) + +--- + +## #RoutingStructure + +### #TopLevelScreens +- `subjects.tsx` → list of all subjects +- `assignments.tsx` → list of all assignments +- `tasks.tsx` → list of all tasks +- `index.tsx` → pre-existing home screen + +--- + +## #DataModel + +### #Subject +- `sId` +- `title` +- `description` +- `isActive` +- `lastChanged` +- `uId` + +### #Assignment +- `aId` +- `title` +- `description` +- `deadline` +- `isCompleted` +- `lastChanged` +- `uId` +- `sId` + +### #Task +- `tId` +- `title` +- `description` +- `isCompleted` +- `lastChanged` +- `uId` +- `aId` \ No newline at end of file