rename web/ to admin/, along with the web-named build and cli identifiers

This commit is contained in:
2026-08-16 00:17:58 +02:00
parent 5b3d1cd65c
commit 1e97c80f6b
136 changed files with 196 additions and 196 deletions
+13
View File
@@ -0,0 +1,13 @@
import type { Group } from "@/lib/types";
/** The seeded group every client falls back to; the API forbids renaming or deleting it. */
export const DEFAULT_GROUP_ID = 1;
/**
* The group a form preselects. The list arrives ordered by name
* (groups_repo.zig), so `groups[0]` is the alphabetically first group, not the
* default — it is only the fallback for a list that lost the seeded group.
*/
export function defaultGroupId(groups: readonly Group[]): number {
return groups.find((group) => group.id === DEFAULT_GROUP_ID)?.id ?? groups[0]?.id ?? DEFAULT_GROUP_ID;
}