- progress update

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-02-06 16:09:10 -05:00
parent c0ebe990cc
commit 280da769e9
2 changed files with 4 additions and 2 deletions

View File

@@ -3,7 +3,6 @@ import React, { useEffect, useState } from "react";
import { fetchFilterData } from "../../utils/RenderTemplate"; import { fetchFilterData } from "../../utils/RenderTemplate";
import { DeleteFilled } from "@ant-design/icons"; import { DeleteFilled } from "@ant-design/icons";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import jsonic from 'jsonic';
export default function Test({ form }) { export default function Test({ form }) {
return ( return (
@@ -24,7 +23,7 @@ function RenderFilters({ templateId }) {
const fetch = async () => { const fetch = async () => {
const data = await fetchFilterData({ name: templateId }); const data = await fetchFilterData({ name: templateId });
console.log("🚀 ~ fetch ~ data:", data); console.log("🚀 ~ fetch ~ data:", data);
setState(jsonic(data)); setState(JSON.parse(data));
}; };
console.log("🚀 ~ useEffect ~ templateId:", templateId); console.log("🚀 ~ useEffect ~ templateId:", templateId);

View File

@@ -385,6 +385,9 @@ const fetchContextData = async (templateObject, jsrAuth) => {
templateQueryToExecute = atob(generalTemplate.content); templateQueryToExecute = atob(generalTemplate.content);
} }
// TODO: REPORT UPDATE
//TemplateQueryToExecute needs to get modified based on sorters/filters set by user from modal.
let contextData = {}; let contextData = {};
if (templateQueryToExecute) { if (templateQueryToExecute) {
const { data } = await client.query({ const { data } = await client.query({