2.2 KiB
2.2 KiB
#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.tsxeditSubject.tsxviewDetailsSubject.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)
- globally (
#Assignments
Created full CRUD flow:
createAssignment.tsxeditAssignment.tsxviewDetailsAssignment.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)
- linked to a subject (
- Assignments are displayed:
- globally (
assignments.tsx) - or within a subject (
viewDetailsSubject.tsx) - or standalone (
viewDetailsAssignment.tsx)
- globally (
#Tasks
Created full CRUD flow:
createTask.tsxeditTask.tsxviewDetailsTask.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)
- globally (
#RoutingStructure
#TopLevelScreens
subjects.tsx→ list of all subjectsassignments.tsx→ list of all assignmentstasks.tsx→ list of all tasksindex.tsx→ pre-existing home screen
#DataModel
#Subject
sIdtitledescriptionisActivelastChangeduId
#Assignment
aIdtitledescriptiondeadlineisCompletedlastChangeduIdsId
#Task
tIdtitledescriptionisCompletedlastChangeduIdaId