small fixes
This commit is contained in:
@@ -96,9 +96,10 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 1rem 0.75rem;
|
||||
padding: 0 0.75rem;
|
||||
border-bottom: 1px solid #3730a3;
|
||||
min-height: 52px;
|
||||
height: 52px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.app-icon {
|
||||
font-size: 1.3rem;
|
||||
@@ -155,7 +156,7 @@
|
||||
}
|
||||
.sidebar-header {
|
||||
justify-content: center;
|
||||
padding: 1rem 0;
|
||||
padding: 0;
|
||||
}
|
||||
.app-name {
|
||||
display: none;
|
||||
|
||||
@@ -64,12 +64,10 @@ async function createRecord(collection: string, data: any): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
// Seed a default season (Holidays) per family so the family-admin season
|
||||
// picker always has at least one option. "Term time" is intentionally NOT
|
||||
// auto-seeded — it's a UK-school-specific term that not every family wants,
|
||||
// and force-seeding it meant a deleted "Term time" kept coming back on every
|
||||
// boot. Families that want it can add it themselves.
|
||||
// Only seeds when a family has zero seasons, so user deletions stick.
|
||||
// Seed two default seasons (Term + Holidays) per family so the family-admin
|
||||
// season picker always has options from day one and they can tick either on/off.
|
||||
// Only seeds when a family has zero seasons, so user deletions stick (a deleted
|
||||
// default never comes back on boot as long as at least one season remains).
|
||||
async function ensureDefaultSeasons(): Promise<void> {
|
||||
const famsCol = await getCollection('fams');
|
||||
if (!famsCol) return;
|
||||
@@ -78,7 +76,10 @@ async function ensureDefaultSeasons(): Promise<void> {
|
||||
headers: { Authorization: `Bearer ${t}` }
|
||||
});
|
||||
const fams = (await famsRes.json()).items || [];
|
||||
const defaults = [{ name: 'Holidays', color: '#f59e0b', active: true }];
|
||||
const defaults = [
|
||||
{ name: 'Term', color: '#6366f1', active: true },
|
||||
{ name: 'Holidays', color: '#f59e0b', active: true }
|
||||
];
|
||||
for (const fam of fams) {
|
||||
const sRes = await fetch(
|
||||
`${PB_ENDPOINT}/api/collections/seasons/records?filter=(famId='${fam.id}')&fields=name&perPage=200`,
|
||||
|
||||
Reference in New Issue
Block a user