@@ -6,43 +6,63 @@ import { HBox, VBox } from "@/ui/shared-components/LayoutBoxes";
66import { useSelectedBenefitsStore , useSelectedTopicsStore } from "@/ui/storage/zustand" ;
77import useTranslation from "@/ui/language/useTranslation" ;
88import theme from "@/theme" ;
9+ import EligibilityOverviewBanner from "../../eligibilty-overview/components/EligibilityOverviewBanner" ;
910
10- const BenefitPageHeader = ( { id, benefit, validatedStatus, categoryTitles } ) => {
11+ const BenefitPageHeader = ( {
12+ id,
13+ benefit,
14+ validatedStatus,
15+ validationResult,
16+ categoryTitles
17+ } ) => {
1118 const { t } = useTranslation ( ) ;
1219 const [ leiKaInfo , setLeiKaInfo ] = useState ( false ) ;
1320
1421 const setSelectedBenefits = useSelectedBenefitsStore ( ( state ) => state . setSelectedBenefits ) ;
1522 const clearSelectedTopics = useSelectedTopicsStore ( ( state ) => state . clear ) ;
1623
1724 return (
18- < HBox sx = { { justifyContent : 'space-between' , gap : 4 , flexWrap : 'wrap' } } >
19- < VBox sx = { { gap : 2 } } >
25+ < HBox sx = { { justifyContent : 'space-between' , gap : { xs : 2 , md : 4 } , flexWrap : 'wrap' } } >
26+ < VBox sx = { { gap : { xs : 2 , md : 4 } } } >
2027 < Typography variant = "h1" sx = { { wordBreak : 'break-word' } } >
2128 { benefit ?. title }
2229 </ Typography >
2330 < VBox sx = { { gap : 2 } } >
2431 < VBox sx = { { gap : 1 } } >
32+ {
33+ validatedStatus && (
34+ < HBox >
35+ < EligibilityOverviewBanner t = { t } eligible = { validationResult } />
36+ </ HBox >
37+ )
38+ }
2539 < HBox sx = { { gap : 1 , alignItems : 'center' } } >
26- < Typography variant = "body2" sx = { { color : 'black.light' } } >
27- LeiKa-Id: { benefit ?. leikaId }
28- </ Typography >
29- < IconButton
30- sx = { {
31- width : 24 ,
32- height : 24 ,
33- borderRadius : theme . shape . circle ,
34- display : 'flex' ,
35- alignItems : 'center' ,
36- justifyContent : 'center' ,
37- backgroundColor : 'white' ,
38- '&:hover' : {
39- backgroundColor : 'black.light' ,
40- } ,
41- } }
42- onClick = { ( ) => setLeiKaInfo ( ! leiKaInfo ) }
43- >
44- < InfoOutlinedIcon sx = { { fontSize : 16 , color : 'black.light' } } />
45- </ IconButton >
40+ {
41+ benefit ?. leikaId && (
42+ < >
43+ < Typography variant = "body2" sx = { { color : 'black.light' } } >
44+ LeiKa-Id: { benefit ?. leikaId }
45+ </ Typography >
46+ < IconButton
47+ sx = { {
48+ width : 24 ,
49+ height : 24 ,
50+ borderRadius : theme . shape . circle ,
51+ display : 'flex' ,
52+ alignItems : 'center' ,
53+ justifyContent : 'center' ,
54+ backgroundColor : 'white' ,
55+ '&:hover' : {
56+ backgroundColor : 'black.light' ,
57+ } ,
58+ } }
59+ onClick = { ( ) => setLeiKaInfo ( ! leiKaInfo ) }
60+ >
61+ < InfoOutlinedIcon sx = { { fontSize : 16 , color : 'black.light' } } />
62+ </ IconButton >
63+ </ >
64+ )
65+ }
4666 </ HBox >
4767 { leiKaInfo && (
4868 < Typography variant = "body2" sx = { { color : 'black.light' } } >
0 commit comments