rename web/ to admin/, along with the web-named build and cli identifiers
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user