@@ -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);
|
||||||
|
|||||||
@@ -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({
|
||||||
|
|||||||
Reference in New Issue
Block a user