aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/DocCreatorMenu/DocCreatorMenu.tsx
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-10-30 03:36:01 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-10-30 03:36:01 -0400
commit4b9536c0b4db5922ac33523dc3d4f33d37007982 (patch)
tree205eea416073c897939e11fa3813770c3327de95 /src/client/views/nodes/DataVizBox/DocCreatorMenu/DocCreatorMenu.tsx
parent752137754b2f544ad08106934a1f5c9ce03408a2 (diff)
getAllsubfields works now
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DocCreatorMenu/DocCreatorMenu.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/DocCreatorMenu/DocCreatorMenu.tsx13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu/DocCreatorMenu.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu/DocCreatorMenu.tsx
index ad7aa7cb9..54f109f84 100644
--- a/src/client/views/nodes/DataVizBox/DocCreatorMenu/DocCreatorMenu.tsx
+++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu/DocCreatorMenu.tsx
@@ -411,9 +411,11 @@ export class DocCreatorMenu extends ObservableReactComponent<FieldViewProps> {
testTemplate = async () => {
- console.log(this._suggestedTemplates
- ?.map(doc => ({ icon: ImageCast(doc.icon), doc }))
- .filter(info => info.icon && info.doc));
+ console.log(this.templateManager.templates.map(template => {
+ template.mainField.getAllSubfields;
+ })
+
+ )
this.forceUpdate();
@@ -607,7 +609,8 @@ export class DocCreatorMenu extends ObservableReactComponent<FieldViewProps> {
compileFieldDescriptions = (templates: Template[]): string => {
let descriptions: string = '';
templates.forEach(template => {
- descriptions += `---------- NEW TEMPLATE TO INCLUDE: Description of template ${template.mainField.getTitle()}'s fields: `;
+ console.log('title: ', template.mainField.getTitle());
+ descriptions += `---------- NEW TEMPLATE TO INCLUDE: The title is: ${template.mainField.getTitle()}. Its fields are: `;
template.allFields.forEach(field => {
descriptions += `{Field #${field.getID}: ${field.getDescription}} `;
});
@@ -685,6 +688,8 @@ export class DocCreatorMenu extends ObservableReactComponent<FieldViewProps> {
const cols = this.fieldsInfos;
const templates = this.templateManager.getValidTemplates(cols);
+ console.log('templates: ', templates)
+
const assignments: [Template, { [field: number]: Col }][] = await this.assignColsToFields(templates, cols);
const renderedTemplatePromises: Promise<Template>[] = assignments.map(([template, assignments]) => this.applyGPTContentToTemplate(template, assignments));