@reekon-tools/boldr-utils 1.4.6 → 1.4.8
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.
|
@@ -18,7 +18,7 @@ export const calculateFormula = (formula, formulas, columns, measurements, unit)
|
|
|
18
18
|
// Build valueMap from group.columns and measurementMap
|
|
19
19
|
const valueMap = {};
|
|
20
20
|
// Map column IDs to their actual measurement values
|
|
21
|
-
for (const [columnId, measurementId] of
|
|
21
|
+
for (const [columnId, measurementId] of Object.entries(columns)) {
|
|
22
22
|
const measurement = measurements.find((m) => m.id === measurementId);
|
|
23
23
|
if (measurement?.value !== undefined) {
|
|
24
24
|
valueMap[columnId] = measurement.value;
|
|
@@ -5,9 +5,11 @@ interface Timestamps {
|
|
|
5
5
|
createdAt: Date;
|
|
6
6
|
}
|
|
7
7
|
interface CreatedBy {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
createdBy: {
|
|
9
|
+
firstName: string;
|
|
10
|
+
lastName: string;
|
|
11
|
+
userId: string;
|
|
12
|
+
};
|
|
11
13
|
}
|
|
12
14
|
export interface Organization extends FirestoreDoc, Timestamps {
|
|
13
15
|
name: string;
|
|
@@ -69,7 +71,7 @@ export declare enum TemplateType {
|
|
|
69
71
|
Layout = "layout",
|
|
70
72
|
Annotation = "annotation"
|
|
71
73
|
}
|
|
72
|
-
export interface Template {
|
|
74
|
+
export interface Template extends Timestamps {
|
|
73
75
|
id: string;
|
|
74
76
|
name: string;
|
|
75
77
|
description: string;
|
|
@@ -127,6 +129,7 @@ export interface Folder extends FirestoreDoc, Timestamps {
|
|
|
127
129
|
parentFolderId?: string | null;
|
|
128
130
|
projectId: string | null;
|
|
129
131
|
type: FolderType;
|
|
132
|
+
isPublic?: boolean;
|
|
130
133
|
}
|
|
131
134
|
export declare enum JobType {
|
|
132
135
|
DEFAULT = "default",
|
|
@@ -150,7 +153,7 @@ export interface Job extends FirestoreDoc, Timestamps {
|
|
|
150
153
|
areaMapFileId?: string;
|
|
151
154
|
type?: JobType;
|
|
152
155
|
}
|
|
153
|
-
export interface Section {
|
|
156
|
+
export interface Section extends Timestamps {
|
|
154
157
|
id: string;
|
|
155
158
|
name: string;
|
|
156
159
|
tableConfig: ColumnConfig[];
|
|
@@ -199,7 +202,7 @@ export declare enum ColumnType {
|
|
|
199
202
|
export interface Formula extends FirestoreDoc, Timestamps {
|
|
200
203
|
expression: string;
|
|
201
204
|
name: string;
|
|
202
|
-
|
|
205
|
+
variables: string[];
|
|
203
206
|
variableToColumnMap: Record<string, any>;
|
|
204
207
|
}
|
|
205
208
|
export interface ColumnConfig {
|