diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-08-28 03:50:44 -0400 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-08-28 03:50:44 -0400 |
commit | f320fd9c5b387339fe9893b0c2d91b4396fc4552 (patch) | |
tree | b2fdd20f1e5e7d98a275c2701edac42d2bbcd411 /src/client/views/nodes/DataVizBox/DataVizBox.tsx | |
parent | 971459577b1e11efb5eb1e91dbb4ac5d75735cf6 (diff) |
algorithm for matching templates working
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DataVizBox.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/DataVizBox.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.tsx b/src/client/views/nodes/DataVizBox/DataVizBox.tsx index cef7f62b1..8e9680e38 100644 --- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx +++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx @@ -33,7 +33,7 @@ import { LineChart } from './components/LineChart'; import { PieChart } from './components/PieChart'; import { TableBox } from './components/TableBox'; import { LinkManager } from '../../../util/LinkManager'; -import { DataVizTemplateInfo, DataVizTemplateLayout, DocCreatorMenu, LayoutType } from './DocCreatorMenu'; +import { DataVizTemplateInfo, DataVizTemplateLayout, DocCreatorMenu, LayoutType, TemplateFieldType } from './DocCreatorMenu'; import { CollectionFreeFormView, MarqueeView } from '../../collections/collectionFreeForm'; import { PrefetchProxy } from '../../../../fields/Proxy'; import { AclAdmin, AclAugment, AclEdit } from '../../../../fields/DocSymbols'; @@ -65,7 +65,7 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { @observable _specialHighlightedRow: number | undefined = undefined; @observable GPTSummary: ObservableMap<string, string> | undefined = undefined; @observable colDescriptions: ObservableMap<string, string> = new ObservableMap(); - @observable fieldTypes: ObservableMap<string, string> = new ObservableMap(); + @observable fieldTypes: ObservableMap<string, TemplateFieldType> = new ObservableMap(); @observable _GPTLoading: boolean = false; constructor(props: FieldViewProps) { @@ -147,7 +147,7 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { this._specialHighlightedRow = row; } - @action setFieldType = (field: string, type: string) => { + @action setFieldType = (field: string, type: TemplateFieldType) => { this.fieldTypes?.set(field, type); } @@ -159,8 +159,8 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { } } - getFieldType = (field: string): string => { - return this.fieldTypes?.get(field) ?? ''; + getFieldType = (field: string): TemplateFieldType => { + return this.fieldTypes?.get(field) ?? TemplateFieldType.UNSET; } getFieldDescription = (field: string): string => { |