File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
builder-frontend/src/components
homeScreen/eligibilityCheckList/eligibilityCheckDetail/checkTesting
project/manageBenefits/configureBenefit Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -88,11 +88,12 @@ const EligibilityCheckTest = (
8888
8989 < div class = "flex-1" >
9090 < SelectedEligibilityCheck
91- check = { eligibilityCheck ( ) }
91+ checkId = { ( ) => checkConfig ( ) . checkId }
9292 checkConfig = { checkConfig }
9393 updateCheckConfigParams = { ( newCheckData : ParameterValues ) => {
9494 setCheckConfig ( { ...checkConfig ( ) , parameters : newCheckData } ) ;
9595 } }
96+ onRemove = { null }
9697 />
9798 </ div >
9899 </ div >
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ const SelectedEligibilityCheck = (
2222 {
2323 checkId : Accessor < string > ;
2424 checkConfig : Accessor < CheckConfig > ;
25- onRemove : ( ) => void ;
2625 updateCheckConfigParams : ( newCheckData : ParameterValues ) => void
26+ onRemove : ( ) => void | null ;
2727 }
2828) => {
2929 const [ check ] = createResource ( ( ) => checkId ( ) , fetchCustomCheck ) ;
@@ -50,12 +50,14 @@ const SelectedEligibilityCheck = (
5050 mb-4 p-4 cursor-pointer select-none relative
5151 border-2 border-gray-200 rounded-lg hover:bg-gray-200"
5252 >
53- < div
54- class = "absolute px-2 top-2 right-2 hover:bg-gray-300 rounded-xl font-bold"
55- onClick = { ( e ) => { e . stopPropagation ( ) ; onRemove ( ) ; } }
56- >
57- X
58- </ div >
53+ < Show when = { onRemove !== null } >
54+ < div
55+ class = "absolute px-2 top-2 right-2 hover:bg-gray-300 rounded-xl font-bold"
56+ onClick = { ( e ) => { e . stopPropagation ( ) ; onRemove ( ) ; } }
57+ >
58+ X
59+ </ div >
60+ </ Show >
5961 < div class = "text-xl font-bold mb-2" > { titleCase ( check ( ) . name ) } - v{ check ( ) . version } </ div >
6062 < div class = "pl-2 [&:has(+div)]:mb-2" > { check ( ) . description } </ div >
6163
You can’t perform that action at this time.
0 commit comments