@cyc-seattle/platform 1.32.0 → 1.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/planning/context.d.ts +4 -1
- package/dist/planning/context.js +8 -7
- package/dist/schema/index.d.ts +17 -15
- package/package.json +1 -1
|
@@ -47,7 +47,10 @@ export declare class Context {
|
|
|
47
47
|
costAccount(type: CostType): Id | undefined;
|
|
48
48
|
warn(code: string, message: string, key?: string): void;
|
|
49
49
|
book(entry: EntryInput): void;
|
|
50
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* An entry's function: the line's if set. Otherwise a cost charged to a program is `program`
|
|
52
|
+
* (cyc-seattle/platform#144), and anything else takes its account's default.
|
|
53
|
+
*/
|
|
51
54
|
functionFor(accountId: Id, explicit: AccountFunction | null | undefined, costCenter: CostCenterType): AccountFunction | null;
|
|
52
55
|
accountType(accountId: Id): Account["type"] | undefined;
|
|
53
56
|
/** Whether `accountId` is `ancestorId` or under it. */
|
package/dist/planning/context.js
CHANGED
|
@@ -57,18 +57,19 @@ export class Context {
|
|
|
57
57
|
return;
|
|
58
58
|
this.entries.push({ stage: "direct", mtdc_share: 1, wages: false, ...entry });
|
|
59
59
|
}
|
|
60
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* An entry's function: the line's if set. Otherwise a cost charged to a program is `program`
|
|
62
|
+
* (cyc-seattle/platform#144), and anything else takes its account's default.
|
|
63
|
+
*/
|
|
61
64
|
functionFor(accountId, explicit, costCenter) {
|
|
62
65
|
if (explicit != null)
|
|
63
66
|
return explicit;
|
|
64
67
|
const account = this.accounts.get(accountId);
|
|
65
|
-
if (account?.default_function != null)
|
|
66
|
-
return account.default_function;
|
|
67
68
|
if (account?.type === "revenue")
|
|
68
|
-
return null;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
return account.default_function ?? null;
|
|
70
|
+
if (costCenter === "offering" || costCenter === "product" || costCenter === "program_area")
|
|
71
|
+
return "program";
|
|
72
|
+
return account?.default_function ?? "management";
|
|
72
73
|
}
|
|
73
74
|
accountType(accountId) {
|
|
74
75
|
return this.accounts.get(accountId)?.type;
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export interface Schema {
|
|
|
23
23
|
group_members: GroupMembers[];
|
|
24
24
|
group_policies: GroupPolicies[];
|
|
25
25
|
groups: Groups[];
|
|
26
|
+
households: Households[];
|
|
26
27
|
medical_profiles: MedicalProfiles[];
|
|
27
28
|
offerings: Offerings[];
|
|
28
29
|
organization_cost_accounts: OrganizationCostAccounts[];
|
|
@@ -66,7 +67,6 @@ export interface Schema {
|
|
|
66
67
|
resource_kinds: ResourceKinds[];
|
|
67
68
|
sync_runs: SyncRuns[];
|
|
68
69
|
sync_tasks: SyncTasks[];
|
|
69
|
-
version_set_activations: VersionSetActivations[];
|
|
70
70
|
version_set_members: VersionSetMembers[];
|
|
71
71
|
version_sets: VersionSets[];
|
|
72
72
|
}
|
|
@@ -372,6 +372,15 @@ export interface Groups {
|
|
|
372
372
|
/** The policies this group gives its members. */
|
|
373
373
|
policies: (string | GroupPolicies)[];
|
|
374
374
|
}
|
|
375
|
+
/** A sailor and everyone listed as their parent, together with the parents' other children. Made from the Clubspot sign-ups, so change who's in one by fixing the people and their parents. */
|
|
376
|
+
export interface Households {
|
|
377
|
+
id: string;
|
|
378
|
+
/** Everyone in the household. */
|
|
379
|
+
members: (string | People)[];
|
|
380
|
+
/** Whether the household's adults share their email and phone with the teams they're on. Blank means never answered, which counts as not shared. A child's own email and phone are never shared. */
|
|
381
|
+
share_contact: boolean | null;
|
|
382
|
+
date_created: string | null;
|
|
383
|
+
}
|
|
375
384
|
/** A person's medical information, kept apart from People so only some staff see it. */
|
|
376
385
|
export interface MedicalProfiles {
|
|
377
386
|
id: string;
|
|
@@ -436,10 +445,14 @@ export interface People {
|
|
|
436
445
|
/** Every email and phone known for this person. */
|
|
437
446
|
contact_point_links: (string | ContactPoints)[];
|
|
438
447
|
school: string | null;
|
|
439
|
-
/**
|
|
448
|
+
/** What this adult last answered before households held the answer. Kept for reference only: the household's answer counts now. */
|
|
440
449
|
share_contact: boolean | null;
|
|
441
450
|
/** What this person is signed up for. */
|
|
442
451
|
registrations: (string | Registrations)[];
|
|
452
|
+
/** The name the club's apps show, if the person or their family gave one. Blank shows the first and last name. */
|
|
453
|
+
display_name: string | null;
|
|
454
|
+
/** Set by the Clubspot sync from the person's parents and children, so change those instead. */
|
|
455
|
+
household_id: string | Households | null;
|
|
443
456
|
/** The person's own Directus login, if they have one. Usually empty. */
|
|
444
457
|
directus_user_id: string | null;
|
|
445
458
|
}
|
|
@@ -1030,17 +1043,6 @@ export interface SyncTasks {
|
|
|
1030
1043
|
/** Set once the task has failed too many times. It keeps retrying; this flags it for staff. */
|
|
1031
1044
|
needs_attention: boolean;
|
|
1032
1045
|
}
|
|
1033
|
-
/** Each time a saved Financial Plan was marked active. The newest one for an organization and year is the active one. */
|
|
1034
|
-
export interface VersionSetActivations {
|
|
1035
|
-
id: string;
|
|
1036
|
-
/** A saved Financial Plan. */
|
|
1037
|
-
version_set_id: string | VersionSets;
|
|
1038
|
-
/** Set when it's marked active. */
|
|
1039
|
-
activated_at: string | null;
|
|
1040
|
-
activated_by: string | null;
|
|
1041
|
-
/** Set when it's marked active. The active Financial Plan for a year is the one with the highest. */
|
|
1042
|
-
sequence: number;
|
|
1043
|
-
}
|
|
1044
1046
|
/** One plan in a Financial Plan: the copy of the plan it holds. Add or remove one only while the Financial Plan is a draft. */
|
|
1045
1047
|
export interface VersionSetMembers {
|
|
1046
1048
|
id: string;
|
|
@@ -1061,8 +1063,8 @@ export interface VersionSets {
|
|
|
1061
1063
|
name: string;
|
|
1062
1064
|
/** What it was for, such as "Reviewed with the board". You can change it after it's saved. */
|
|
1063
1065
|
message: string | null;
|
|
1064
|
-
/** Set it to saved to save the Financial Plan and all its plans. A saved Financial Plan never changes, apart from its note. */
|
|
1065
|
-
status: "draft" | "saved";
|
|
1066
|
+
/** Set it to saved to save the Financial Plan and all its plans. A saved Financial Plan never changes, apart from its note. Set a saved one to active to make it the one its organization runs for the year, which sets the one active before it back to saved. */
|
|
1067
|
+
status: "draft" | "saved" | "active";
|
|
1066
1068
|
/** The Financial Plan this one started as a copy of. Pick it when you add this one, and its plans are copied in. */
|
|
1067
1069
|
parent_id: string | VersionSets | null;
|
|
1068
1070
|
/** Set when the Financial Plan is saved. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyc-seattle/platform",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.33.1",
|
|
4
4
|
"description": "Pulumi components for CYC's shared Google Cloud platform: WebService, the platform outputs reader, and the stacks that build the platform",
|
|
5
5
|
"author": "CYC Community Sailing Center",
|
|
6
6
|
"license": "Apache-2.0",
|