hezarfen_frontend
Clone
https://git.tahinli.com/Hezarfen/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits
| 1 | import { client } from "../client"; |
| 2 | import type { MaterializeReport } from "../client"; |
| 3 | |
| 4 | /** `from`/`to` are UTC unix-millis naming school days; `apply: false` is a dry run. */ |
| 5 | export type MaterializeBody = { from: number; to: number; apply?: boolean }; |
| 6 | |
| 7 | // Expands the resolved week into dated lessons. Additive and idempotent: |
| 8 | // holiday days and already-scheduled starts are skipped and counted. |
| 9 | export function postInstanceWeeklyPlanMaterialize(id: string, body: MaterializeBody): Promise<MaterializeReport> { |
| 10 | return client<MaterializeReport>(`/instances/${id}/weekly-plan/materialize`, { method: "POST", body }); |
| 11 | } |