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