@@ -4,12 +4,15 @@ import { HBox, VBox } from '@/ui/shared-components/LayoutBoxes';
44import theme from '@/theme' ;
55import RegularButton from '@/ui/shared-components/buttons/RegularButton' ;
66import { useSelectedBenefitStore , useSelectedTopicsStore } from "@/ui/storage/zustand" ;
7+ import EligibilityOverTag from './EligibilityOverviewTag' ;
78
89const EligibilityOverviewItem = ( { item, eligible } ) => {
910 const color = eligible === 'indeterminate' ? 'black.light' : 'black.main' ;
1011 const setSelectedBenefit = useSelectedBenefitStore ( ( state ) => state . setSelectedBenefit ) ;
1112 const clearSelectedTopics = useSelectedTopicsStore ( ( state ) => state . clear ) ;
1213
14+ console . log ( 'item' , item ) ;
15+
1316 return (
1417 < VBox
1518 sx = { {
@@ -73,35 +76,30 @@ const EligibilityOverviewItem = ({ item, eligible }) => {
7376 } }
7477 >
7578 < HBox sx = { { justifyContent : 'flex-end' , flexWrap : 'wrap' , gap : 1 } } >
76- < HBox sx = { {
77- border : `1px solid ${ theme . palette . green . main } ` ,
78- padding : '6px 10px' ,
79- borderRadius : theme . shape . borderRadius ,
80- } } >
81- < Typography variant = 'body2' sx = { { } } >
82- Bundesleistung
83- </ Typography >
84- </ HBox >
85- < HBox sx = { {
86- border : `1px solid ${ theme . palette . pink . main } ` ,
87- padding : '6px 10px' ,
88- borderRadius : theme . shape . borderRadius ,
89- } } >
90- < Typography variant = 'body2' sx = { { } } >
91- Agentur für Arbeit
92- </ Typography >
93- </ HBox >
94- < HBox sx = { {
95- border : `1px solid ${ theme . palette . blue . main } ` ,
96- padding : '6px 10px' ,
97- borderRadius : theme . shape . borderRadius ,
98- } } >
99- < Typography variant = 'body2' sx = { { } } >
100- Rehaibilitierung und Teilhabe
101- </ Typography >
102- </ HBox >
79+ {
80+ item . administrativeLevel && (
81+ < EligibilityOverTag tag = { item . administrativeLevel } tagType = { 'administrativeLevel' } />
82+ )
83+ }
84+ {
85+ item . associatedLaw && (
86+ < EligibilityOverTag tag = { item . associatedLaw } tagType = { 'associatedLaw' } />
87+ )
88+ }
89+ {
90+ item . providingAgency && (
91+ < EligibilityOverTag tag = { item . providingAgency } tagType = { 'providingAgency' } />
92+ )
93+ }
94+ {
95+ item . benefitCategories . length > 0 && (
96+ item . benefitCategories . map ( ( category , index ) => (
97+ < EligibilityOverTag key = { index } tag = { category } tagType = { 'benefitCategory' } />
98+ ) )
99+ )
100+ }
103101 </ HBox >
104- < HBox sx = { { gap : 2 , flexWrap : 'wrap' } } >
102+ < HBox sx = { { gap : 2 , flexWrap : 'wrap' , justifyContent : 'flex-end' } } >
105103 < RegularButton
106104 variant = { 'blueHollow' }
107105 text = { 'app.browseAll.learnMoreBtn' }
0 commit comments