Skip to content

Commit aab6838

Browse files
committed
fix(arc-saas): revomed domain n show storge on standard
revomed domain n show storge on standard GH-64
1 parent de775a3 commit aab6838

File tree

7 files changed

+18
-82
lines changed

7 files changed

+18
-82
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,7 @@ <h3>Plan Configuration</h3>
166166
</div>
167167

168168
<!-- Plan Storage Size in select-->
169-
<div
170-
class="input-box-wrapper"
171-
*ngIf="addPlanForm.get('tier')?.value === 'PREMIUM'"
172-
>
169+
<div class="input-box-wrapper" *ngIf="showStorageSize">
173170
<div class="input-title">
174171
<span>Size</span>
175172
</div>
@@ -248,7 +245,7 @@ <h3>Plan Configuration</h3>
248245
>
249246
Cancel
250247
</button>
251-
248+
252249
<button
253250
nbButton
254251
size="medium"

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

Lines changed: 4 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
import {Component, Inject, OnInit} from '@angular/core';
23
import {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';
34
import {ActivatedRoute, Router} from '@angular/router';
@@ -246,72 +247,6 @@ export class AddPlanComponent implements OnInit {
246247
});
247248
}
248249

249-
// editPlan() {
250-
// if (this.addPlanForm.valid) {
251-
// const domainData = this.addPlanForm.value;
252-
// domainData.price = parseFloat(domainData.price);
253-
254-
// const featuresGroup = this.addPlanForm.get('features') as FormGroup;
255-
// const selectedFeatures = featuresGroup
256-
// ? Object.keys(featuresGroup.controls)
257-
// .filter(
258-
// key =>
259-
// featuresGroup.get(key)?.value !== null &&
260-
// featuresGroup.get(key)?.value !== '',
261-
// )
262-
// .reduce(
263-
// (acc, key) => {
264-
// const feature = this.featureOption.find(f => f.key === key);
265-
// if (feature) {
266-
// acc[feature.key] = featuresGroup.get(key)?.value;
267-
// }
268-
// return acc;
269-
// },
270-
// {} as {[key: string]: any},
271-
// )
272-
// : {};
273-
// const generalDetailsData = {
274-
// name: domainData.name,
275-
// billingCycleId: domainData.billingCycleId,
276-
// price: domainData.price,
277-
// currencyId: domainData.currencyId,
278-
// description: domainData.description,
279-
// tier: domainData.tier,
280-
// size: domainData.size,
281-
// };
282-
283-
// domainData.features = selectedFeatures;
284-
285-
// this.billingplanService
286-
// .editPlan(generalDetailsData, this.activateRoute.snapshot.params.id)
287-
// .subscribe(res => {
288-
// this.router.navigate(['/main/plans']);
289-
// });
290-
291-
// const updateFeatureDetails: FeatureValues[] = Object.keys(
292-
// selectedFeatures,
293-
// )
294-
// .map(key => {
295-
// const feature = this.featureOption.find(f => f.key === key);
296-
// return {
297-
// featureKey: feature ? feature.id : null,
298-
// strategyKey: 'plan',
299-
// strategyEntityId: this.activateRoute.snapshot.params.id,
300-
// status: true,
301-
// value: selectedFeatures[key].toString(), // Ensure value is always a string
302-
// };
303-
// })
304-
// .filter(item => item.featureKey !== null);
305-
// this.featureListService
306-
// .editFeatures(updateFeatureDetails)
307-
// .subscribe(respFeature => {
308-
// console.log('skip'); //NOSONAR
309-
// });
310-
// } else {
311-
// console.error('Form is invalid');
312-
// }
313-
// }
314-
315250
cancelEdit() {
316251
this.router.navigate(['/main/plans']);
317252
}
@@ -397,9 +332,9 @@ export class AddPlanComponent implements OnInit {
397332
}
398333
}
399334
onTierChange(selectedTier: string): void {
400-
this.showStorageSize = selectedTier === 'PREMIUM';
335+
this.showStorageSize = selectedTier === 'STANDARD' || selectedTier === 'PREMIUM';
401336
if (!this.showStorageSize) {
402-
this.addPlanForm.get('storage')?.reset();
337+
this.addPlanForm.get('size')?.reset();
403338
}
404339
}
405340

@@ -457,4 +392,4 @@ export class AddPlanComponent implements OnInit {
457392
const completedCount = this.task.subtasks!.filter(t => t.completed).length;
458393
return completedCount > 0 && completedCount < this.task.subtasks!.length;
459394
}
460-
}
395+
}

projects/saas-ui/src/app/main/components/tenant-registration/tenant-registration.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ <h2>Tenant Registration</h2>
250250
</div>
251251
</div>
252252
<!-- domain -->
253-
<div class="input-box">
253+
<!-- <div class="input-box">
254254
<div class="input-title">
255255
<span>Email domain<span class="required">*</span></span>
256256
</div>
@@ -275,7 +275,7 @@ <h2>Tenant Registration</h2>
275275
Email domain does not match the domain part of the email
276276
address.
277277
</div>
278-
</div>
278+
</div> -->
279279

280280
<!--plan design -->
281281
<div class="plan-card-container">

projects/saas-ui/src/app/main/components/tenant-registration/tenant-registration.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class TenantRegistrationComponent {
4646
zip: ['',[Validators.pattern('^[0-9]+$'),Validators.maxLength(9)]],
4747
key: ['', [Validators.required, Validators.maxLength(10),
4848
Validators.pattern('^[a-zA-Z][a-zA-Z0-9]*$')]],
49-
domains: ['', Validators.required],
49+
domains: [''],
5050
planId: [''],
5151
},
5252
{validators: this.emailDomainMatchValidator},

projects/saas-ui/src/app/on-boarding/components/add-tenant/add-tenant.component.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h2>Please Complete Your registration</h2>
1313
<!-- input fields -->
1414
<div class="input-wrapper">
1515
<!-- key -->
16-
<div class="input-box">
16+
<div class="input-box address-input-box">
1717
<div class="input-title">
1818
<span
1919
>Application Sub domain
@@ -65,7 +65,8 @@ <h2>Please Complete Your registration</h2>
6565
</div>
6666
</div>
6767
<!-- domain -->
68-
<div class="input-box">
68+
<!-- <div class="input-box">
69+
6970
<div class="input-title">
7071
<span>Email Domain <span class="required">*</span></span>
7172
</div>
@@ -90,7 +91,7 @@ <h2>Please Complete Your registration</h2>
9091
Email domain does not match the domain part of the email
9192
address.
9293
</div>
93-
</div>
94+
</div> -->
9495
</div>
9596

9697
<!-- Subscription Plans -->

projects/saas-ui/src/app/on-boarding/components/add-tenant/add-tenant.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@
123123
gap: 20px;
124124
}
125125

126+
.address-input-box {
127+
width: 100%;
128+
}
129+
126130
.plan-card-box {
127131
width: 300px;
128132
border-radius: 8px;

projects/saas-ui/src/app/on-boarding/components/add-tenant/add-tenant.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class AddTenantComponent implements OnInit {
3434
this.addTenantForm = this.fb.group({
3535
key: ['', [Validators.required, Validators.maxLength(10),
3636
Validators.pattern('^[a-zA-Z][a-zA-Z0-9]*$')]],
37-
domains: ['', Validators.required],
37+
domains: [''],
3838
planId: [null],
3939
});
4040
}
@@ -56,7 +56,6 @@ export class AddTenantComponent implements OnInit {
5656
onSubmit() {
5757
if (this.addTenantForm.valid) {
5858
const domainData = this.addTenantForm.value;
59-
console.log(domainData);
6059
if (typeof domainData.domains === 'string') {
6160
domainData.domains = [domainData.domains];
6261
}

0 commit comments

Comments
 (0)