Skip to content

Commit 21e739c

Browse files
committed
fix(arc-saas): review changes
review changes GH-91
1 parent b305f63 commit 21e739c

File tree

1 file changed

+16
-22
lines changed

1 file changed

+16
-22
lines changed

projects/saas-ui/src/app/main/components/add-plan/add-plan.component.ts

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -251,28 +251,22 @@ export class AddPlanComponent implements OnInit {
251251

252252
const featuresGroup = this.addPlanForm.get('features') as FormGroup;
253253
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+
)
276270
: {};
277271
const generalDetailsData = {
278272
name: domainData.name,

0 commit comments

Comments
 (0)