feat: stages module, mobility frontend, theme toggle, employeeOnly access control
- Add stages module with full CRUD API and admin overview island - Add mobility overview island (Liste, Kanban, Detail CRUD views) - Add contract PDF upload/download endpoints for mobilites - Add light/dark theme toggle in header - Add employeeOnly flag to hide entire modules from students (admin, students, stages) - Add read-only GET endpoints for modules/ues/ue-modules in notes module - Add [slug].tsx catch-all routes for direct URL navigation - Replace old mobility table with mobilites + stages schema (migration 0004) - Allow students to create mobilites and upload contracts - Redirect authenticated users from / to /apps catalog
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
DROP TABLE IF EXISTS "mobility";
|
||||
--> statement-breakpoint
|
||||
CREATE TYPE "mobility_status" AS ENUM ('contracts_received', 'under_revision', 'done', 'validated', 'canceled');
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "stages" (
|
||||
"idStage" serial PRIMARY KEY NOT NULL,
|
||||
"numEtud" integer NOT NULL,
|
||||
"duree" integer NOT NULL,
|
||||
"nomEntreprise" text NOT NULL,
|
||||
"mission" text
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "mobilites" (
|
||||
"idMob" serial PRIMARY KEY NOT NULL,
|
||||
"numEtud" integer NOT NULL,
|
||||
"duree" integer NOT NULL,
|
||||
"contratMob" text,
|
||||
"ecole" text,
|
||||
"pays" text,
|
||||
"status" "mobility_status" NOT NULL DEFAULT 'contracts_received',
|
||||
"idStage" integer
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "stages" ADD CONSTRAINT "stages_numEtud_students_numEtud_fk" FOREIGN KEY ("numEtud") REFERENCES "public"."students"("numEtud") ON DELETE no action ON UPDATE no action;
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "mobilites" ADD CONSTRAINT "mobilites_numEtud_students_numEtud_fk" FOREIGN KEY ("numEtud") REFERENCES "public"."students"("numEtud") ON DELETE no action ON UPDATE no action;
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "mobilites" ADD CONSTRAINT "mobilites_idStage_stages_idStage_fk" FOREIGN KEY ("idStage") REFERENCES "public"."stages"("idStage") ON DELETE no action ON UPDATE no action;
|
||||
@@ -29,6 +29,13 @@
|
||||
"when": 1777155028711,
|
||||
"tag": "0003_add_session2_and_malus",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 4,
|
||||
"version": "7",
|
||||
"when": 1777155028712,
|
||||
"tag": "0004_add_stages_and_mobilites",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user