Commit cf292a9 1 parent 7041919 commit cf292a9 Copy full SHA for cf292a9
File tree 2 files changed +10
-10
lines changed
packages/app/src/app/(default)/index-egapro/declaration
2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,10 @@ export const RemunerationForm = () => {
158
158
draft [ "remunerations-resultat" ] = undefined ;
159
159
savePageData ( "remunerations-resultat" , undefined ) ;
160
160
}
161
+ if ( data . estCalculable === "oui" && formData [ stepName ] ?. estCalculable === "non" ) {
162
+ draft [ "remunerations-resultat" ] = undefined ;
163
+ savePageData ( "remunerations-resultat" , undefined ) ;
164
+ }
161
165
if ( data . estCalculable !== formData [ stepName ] ?. estCalculable ) {
162
166
draft [ stepName ] = getModifiedFormValues ( dirtyFields , data ) as DeclarationDTO [ typeof stepName ] ;
163
167
} else {
Original file line number Diff line number Diff line change @@ -60,16 +60,12 @@ export const ResultatGlobalForm = () => {
60
60
61
61
const computed = computeDeclarationIndex ( DeclarationComputerInputBuilder . fromDeclarationDTO ( formData ) ) ;
62
62
63
- // We don't compute the index if we only read an existing declaration.
64
- const defaultValues =
65
- formData [ "declaration-existante" ] . status === "consultation"
66
- ? formData [ stepName ]
67
- : {
68
- ...formData [ stepName ] ,
69
- index : computed . index ,
70
- points : computed . points ,
71
- pointsCalculables : computed . computablePoints ,
72
- } ;
63
+ const defaultValues = {
64
+ ...formData [ stepName ] ,
65
+ index : computed . index ,
66
+ points : computed . points ,
67
+ pointsCalculables : computed . computablePoints ,
68
+ } ;
73
69
74
70
const methods = useForm < FormType > ( {
75
71
mode : "onChange" ,
You can’t perform that action at this time.
0 commit comments