Skip to content

Commit 5990297

Browse files
committed
fix(arc-saas): review changes
Review changes Review changes
1 parent 78337ba commit 5990297

File tree

3 files changed

+3
-24
lines changed

3 files changed

+3
-24
lines changed

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

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -204,27 +204,13 @@ <h3>Plan Configuration</h3>
204204
placeholder="{{ feature.name }}"
205205
/>
206206
<!-- for conditional metadata handling -->
207-
208-
<!-- <select
209-
*ngIf="
210-
feature.metadata && feature.metadata.length > 0
211-
"
212-
[formControlName]="feature.key"
213-
>
214-
<option
215-
*ngFor="let option of feature.metadata"
216-
[value]="option"
217-
>
218-
{{ option }}
219-
</option>
220-
</select> -->
221207
<div class="select">
222208
<nb-select
223209
*ngIf="
224210
feature.metadata && feature.metadata.length > 0
225211
"
226212
class="dropdown-wrapper"
227-
placeholder="Select IDP"
213+
placeholder="Select your Choice"
228214
status="basic"
229215
[formControlName]="feature.key"
230216
>

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ export class AddPlanComponent implements OnInit {
273273
{} as {[key: string]: any},
274274
)
275275
: {};
276-
console.log(this.addPlanForm.value);
277276
const generalDetailsData = {
278277
name: domainData.name,
279278
billingCycleId: domainData.billingCycleId,
@@ -297,7 +296,6 @@ export class AddPlanComponent implements OnInit {
297296
)
298297
.map(key => {
299298
const feature = this.featureValue.features.find(f => f.id === key);
300-
console.log(feature);
301299
return {
302300
id: selectedFeatures[key].id,
303301
featureKey: feature.id,
@@ -308,15 +306,12 @@ export class AddPlanComponent implements OnInit {
308306
};
309307
})
310308
.filter(item => item.id !== null);
311-
console.log(updateFeatureDetails);
312309
this.featureListService
313310
.editFeatures(
314311
updateFeatureDetails,
315312
this.activateRoute.snapshot.params.id,
316313
)
317-
.subscribe(respFeature => {
318-
console.log(respFeature);
319-
});
314+
.subscribe(respFeature => {});
320315
} else {
321316
// Handle form validation errors if necessary
322317
console.error('Form is invalid');
@@ -374,13 +369,11 @@ export class AddPlanComponent implements OnInit {
374369
getFeatures() {
375370
this.featureListService.getFeatures().subscribe(res => {
376371
this.featureOption = res;
377-
// error handling
378372
this.featureOption.forEach(feature => {
379373
if (typeof feature.metadata === 'string') {
380374
feature.metadata = feature.metadata.split(',');
381375
}
382376
});
383-
console.log(this.featureOption);
384377
this.createFeatureControls();
385378
});
386379
}

projects/saas-ui/src/app/shared/models/feature.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class Features {
88
description: string;
99
key: string;
1010
type: 'boolean' | 'number' | 'string' | 'object';
11-
defaultValue: number;
11+
defaultValue: 'boolean' | 'number' | 'string' | 'object';
1212
metadata?: any;
1313
value?: FeatureValues;
1414
constructor(data?: Partial<Features>) {

0 commit comments

Comments
 (0)