File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
projects/saas-ui/src/app/main/components/add-plan Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -252,20 +252,21 @@ export class AddPlanComponent implements OnInit {
252
252
const featuresGroup = this . addPlanForm . get ( 'features' ) as FormGroup ;
253
253
const selectedFeatures = featuresGroup
254
254
? Object . keys ( featuresGroup . controls )
255
- . filter (
256
- key =>
257
- featuresGroup . get ( key ) ?. value !== null &&
258
- featuresGroup . get ( key ) ?. value !== '' ,
259
- )
255
+ // .filter(
256
+ // key =>
257
+ // featuresGroup.get(key)?.value !== null &&
258
+ // featuresGroup.get(key)?.value !== '',
259
+ // )
260
260
. reduce (
261
261
( acc , key ) => {
262
262
const feature = this . featureValue . features . find (
263
263
f => ( f as any ) . key === key ,
264
264
) ;
265
265
if ( feature ) {
266
+ const featureVal = featuresGroup . get ( key ) ?. value ;
266
267
acc [ feature . id ] = {
267
268
id : ( feature . value as any ) ?. id ,
268
- value : featuresGroup . get ( key ) ?. value ,
269
+ value : featureVal || feature . defaultValue || '' ,
269
270
} ;
270
271
}
271
272
return acc ;
You can’t perform that action at this time.
0 commit comments