File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ const defaultFlags = {
33 newCollaborationSection : true ,
44 newLanguageToggle : true ,
55 newActivityLog : true ,
6- showNearestCounselingCentre : false
6+ showNearestCounselingCentre : false ,
7+ showMermaidRuleGraph : false ,
78} ;
89
910const getFeatureFlag = ( flag ) => {
@@ -17,6 +18,7 @@ const featureFlags = {
1718 newLanguageToggle : getFeatureFlag ( 'newLanguageToggle' ) ,
1819 newActivityLog : getFeatureFlag ( 'newActivityLog' ) ,
1920 showNearestCounselingCentre : getFeatureFlag ( 'showNearestCounselingCentre' ) ,
21+ showMermaidRuleGraph : getFeatureFlag ( 'showMermaidRuleGraph' ) ,
2022} ;
2123
2224export const setFeatureFlag = ( flag , value ) => {
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import BenefitPageExampleList from './components/BenefitPageExampleList';
1010import BenefitPageHeader from "./components/BenefitPageHeader" ;
1111import AppScreenWrapperContainer from '@/ui/shared-components/app-screen-wrapper/AppScreenWrapperContainer' ;
1212import RecursiveRulesTable from './components/RecursiveRulesTable' ;
13+ import featureFlags from "@/featureFlags" ;
14+ import MermaidRulesGraph from "@/ui/screens/benefit-page/components/MermaidRulesGraph" ;
1315
1416const BenefitPageScreen = ( {
1517 t,
@@ -78,6 +80,9 @@ const BenefitPageScreen = ({
7880 )
7981 }
8082 < RecursiveRulesTable graphRoot = { matchingGraph ?. root } t = { t } />
83+ { featureFlags . showMermaidRuleGraph &&
84+ < MermaidRulesGraph graphRoot = { matchingGraph ?. root } t = { t } />
85+ }
8186 </ Box >
8287 </ VBox >
8388 </ AppScreenWrapperContainer >
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import theme from '@/theme' ;
3+ import { useMetadataStore } from '@/ui/storage/zustand' ;
4+ import { VBox } from '@/ui/shared-components/LayoutBoxes' ;
5+ import { Typography } from "@mui/material" ;
6+
7+ export default function MermaidRulesGraph ( { graphRoot, t } ) {
8+ const metadata = useMetadataStore ( state => state . metadata ) ;
9+ // if (!graphRoot) return null;
10+
11+ return (
12+ < VBox
13+ sx = { {
14+ gap : 4 ,
15+ backgroundColor : 'white.main' ,
16+ padding : '32px' ,
17+ borderRadius : theme . shape . borderRadius ,
18+ } }
19+ >
20+ < VBox sx = { { gap : 2 } } >
21+ < Typography variant = "h2" sx = { { fontWeight : '400' , wordBreak : "break-word" } } >
22+ Rules Graph
23+ </ Typography >
24+ < Typography variant = "body1" >
25+ TODO
26+ </ Typography >
27+ </ VBox >
28+ </ VBox >
29+ ) ;
30+ }
You can’t perform that action at this time.
0 commit comments