Change le style de la question imposition en dehors du toggle au dessus des simulateurs
parent
65fd6bbd15
commit
2e5f7db041
|
@ -13,8 +13,6 @@ entreprise . imposition:
|
|||
- catégorie juridique . EI
|
||||
alors: "'IR'"
|
||||
- sinon: "'IS'"
|
||||
meta:
|
||||
affichage: toggle
|
||||
|
||||
entreprise . imposition . IR:
|
||||
valeur: imposition = 'IR'
|
||||
|
|
|
@ -16,7 +16,12 @@ export function CompanyDetails({
|
|||
}) {
|
||||
return (
|
||||
<StyledCompanyContainer>
|
||||
<Grid container alignItems={'flex-end'} justifyContent={'center'}>
|
||||
<Grid
|
||||
container
|
||||
alignItems={'flex-end'}
|
||||
justifyContent={'center'}
|
||||
spacing={3}
|
||||
>
|
||||
<Grid item xs={12} lg>
|
||||
<H4 data-test-id="currently-selected-company">
|
||||
{' '}
|
||||
|
|
|
@ -40,7 +40,7 @@ type Props<Names extends string = DottedName> = Omit<
|
|||
// cf .https://github.com/betagouv/mon-entreprise/issues/1489#issuecomment-823058710
|
||||
showDefaultDateValue?: boolean
|
||||
onSubmit?: (source: string) => void
|
||||
|
||||
type?: 'radio' | 'card' | 'toggle' | 'select'
|
||||
formatOptions?: Intl.NumberFormatOptions
|
||||
displayedUnit?: string
|
||||
modifiers?: Record<string, string>
|
||||
|
@ -73,6 +73,7 @@ export default function RuleInput<Names extends string = DottedName>({
|
|||
onSubmit = () => null,
|
||||
showDefaultDateValue = false,
|
||||
missing,
|
||||
type,
|
||||
modifiers = {},
|
||||
...props
|
||||
}: Props<Names>) {
|
||||
|
@ -99,9 +100,10 @@ export default function RuleInput<Names extends string = DottedName>({
|
|||
const meta = getMeta<{ affichage?: string }>(rule.rawNode, {})
|
||||
|
||||
if (getVariant(engine.getRule(dottedName))) {
|
||||
const type =
|
||||
meta.affichage &&
|
||||
['radio', 'card', 'toggle', 'select'].includes(meta.affichage)
|
||||
type =
|
||||
type ??
|
||||
(meta.affichage &&
|
||||
['radio', 'card', 'toggle', 'select'].includes(meta.affichage))
|
||||
? (meta.affichage as 'radio' | 'card' | 'toggle' | 'select')
|
||||
: 'radio'
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import { updateSituation } from '@/actions/actions'
|
||||
import ChiffreAffairesActivitéMixte from '@/components/ChiffreAffairesActivitéMixte'
|
||||
import RuleInput from '@/components/conversation/RuleInput'
|
||||
import { Condition } from '@/components/EngineValue'
|
||||
import PeriodSwitch from '@/components/PeriodSwitch'
|
||||
import { SelectSimulationYear } from '@/components/SelectSimulationYear'
|
||||
import SimulateurWarning from '@/components/SimulateurWarning'
|
||||
import Simulation, {
|
||||
SimulationGoal,
|
||||
|
@ -9,8 +11,6 @@ import Simulation, {
|
|||
} from '@/components/Simulation'
|
||||
import IndépendantExplanation from '@/components/simulationExplanation/IndépendantExplanation'
|
||||
import { useDispatch } from 'react-redux'
|
||||
import { SelectSimulationYear } from '@/components/SelectSimulationYear'
|
||||
import RuleInput from '@/components/conversation/RuleInput'
|
||||
|
||||
export function IndépendantPLSimulation() {
|
||||
return (
|
||||
|
@ -55,6 +55,7 @@ export default function IndépendantSimulation() {
|
|||
toggles={
|
||||
<>
|
||||
<RuleInput
|
||||
type="toggle"
|
||||
dottedName="entreprise . imposition"
|
||||
onChange={(imposition) => {
|
||||
dispatch(
|
||||
|
|
|
@ -2,10 +2,8 @@ import { updateSituation } from '@/actions/actions'
|
|||
import RuleInput from '@/components/conversation/RuleInput'
|
||||
import { Condition, WhenAlreadyDefined } from '@/components/EngineValue'
|
||||
import PageHeader from '@/components/PageHeader'
|
||||
import PreviousSimulationBanner from '@/components/PreviousSimulationBanner'
|
||||
import { FromTop } from '@/components/ui/animate'
|
||||
import Warning from '@/components/ui/WarningBlock'
|
||||
import { useEngine } from '@/components/utils/EngineContext'
|
||||
import { SitePathsContext } from '@/components/utils/SitePathsContext'
|
||||
import useSimulationConfig from '@/components/utils/useSimulationConfig'
|
||||
import { Strong } from '@/design-system/typography'
|
||||
|
@ -71,7 +69,6 @@ export default function AideDéclarationIndépendant() {
|
|||
<Li>Votre entreprise est domiciliée dans les DOM</Li>
|
||||
</Ul>
|
||||
</Warning>
|
||||
<PreviousSimulationBanner />
|
||||
|
||||
<H2>Imposition</H2>
|
||||
<Body>
|
||||
|
|
Loading…
Reference in New Issue