Skip to content

Commit 03a73a3

Browse files
fix css
1 parent 83777eb commit 03a73a3

File tree

5 files changed

+47
-34
lines changed

5 files changed

+47
-34
lines changed

projects/saas-ui/src/app/on-boarding/commands/get-all-tenant-command.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class GetAllTenantKeysCommand<T> extends GetAPICommand<T> {
1515
super(
1616
apiService,
1717
adapter,
18-
`${appConfig.baseApiUrl}${appConfig.tenantmgmtServiceUrl}/tenant-keys`,
18+
`${appConfig.baseApiUrl}${appConfig.tenantmgmtServiceUrl}/tenant/keys`,
1919
);
2020
}
2121
}

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

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<nb-card class="h-100 card-row glassmorphism">
1+
<nb-card class="h-100 card-row">
22
<nb-card-body class="m-0">
33
<div class="main-wrapper add-lead-wrapper">
44
<div>
@@ -178,26 +178,20 @@ <h2 class="title">Marketplace Registration</h2>
178178
status="info"
179179
formControlName="zip"
180180
nbInput
181+
maxlength="6"
181182
/>
182183
<nb-icon
183184
icon="info-outline"
184185
class="info-icon"
185186
nbTooltip="Please enter zip code."
186187
></nb-icon>
187188
</div>
189+
188190
<div
189191
class="error-msg"
190-
*ngIf="
191-
marketSubsForm.get('zip').invalid &&
192-
marketSubsForm.get('zip').touched
193-
"
192+
*ngIf="marketSubsForm.get('zip').hasError('pattern')"
194193
>
195-
<div
196-
class="error-msg"
197-
*ngIf="marketSubsForm.get('zip').hasError('pattern')"
198-
>
199-
Zip Code must be numeric only.
200-
</div>
194+
Zip Code must be numeric only.
201195
</div>
202196
</div>
203197
</div>
@@ -206,21 +200,20 @@ <h2 class="title">Marketplace Registration</h2>
206200
<div class="input-title">
207201
<span>Country <span class="required">*</span></span>
208202
</div>
209-
<div class="input">
210-
<div class="input-container">
211-
<input
212-
type="text"
213-
placeholder="Enter your Country"
214-
status="info"
215-
formControlName="country"
216-
nbInput
217-
/>
218-
<nb-icon
219-
icon="globe-outline"
220-
class="info-icon"
221-
nbTooltip="Please enter your country."
222-
></nb-icon>
223-
</div>
203+
<div class="select">
204+
<nb-select
205+
class="dropdown-wrapper"
206+
placeholder="Select Your Country"
207+
size="large"
208+
formControlName="country"
209+
>
210+
<nb-option
211+
*ngFor="let option of countryOptions"
212+
[value]="option.value"
213+
>
214+
{{ option.label }}
215+
</nb-option>
216+
</nb-select>
224217
</div>
225218
</div>
226219

@@ -246,9 +239,26 @@ <h2 class="title">Marketplace Registration</h2>
246239
></nb-icon>
247240
</div>
248241
<div>
249-
<div *ngIf="keyVerificationMessage" class="message">
242+
<div
243+
*ngIf="
244+
marketSubsForm.get('subdomain').valid &&
245+
keyVerificationMessage &&
246+
marketSubsForm.get('subdomain').touched
247+
"
248+
class="message"
249+
>
250250
{{ keyVerificationMessage }}
251251
</div>
252+
<div
253+
*ngIf="
254+
marketSubsForm.get('subdomain').hasError('pattern') &&
255+
marketSubsForm.get('subdomain').touched
256+
"
257+
class="error-msg"
258+
>
259+
Subdomain must start with a letter and can include numbers
260+
and hyphens and has maximum length 20.
261+
</div>
252262
</div>
253263
</div>
254264
</div>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
.dropdown-wrapper {
5353
min-width: 100%;
5454
margin-top: 5px;
55-
border: 1px solid #dcdcdc;
55+
background-color: #ffffff;
5656
border-radius: 3px;
5757
}
5858
}
@@ -344,7 +344,7 @@ input[nbInput] {
344344
}
345345
}
346346
.message {
347-
color: rgb(22, 19, 19);
347+
color: rgb(170, 24, 24);
348348
font-size: 12px;
349349
margin-top: 5px;
350350
display: flex;

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {Location} from '@angular/common';
77
import {keyValidator} from '@project-lib/core/validators';
88
import {Subscriber} from '../../../shared/models';
99
import {debounceTime, distinctUntilChanged} from 'rxjs';
10+
import {COUNTRIES} from '../../../shared/constants/countries.constant';
1011
@Component({
1112
selector: 'app-add-subscriber',
1213
templateUrl: './add-subscriber.component.html',
@@ -17,7 +18,7 @@ export class AddSubscriberComponent {
1718
[x: string]: any;
1819

1920
leadId = '';
20-
21+
countryOptions = COUNTRIES;
2122
constructor(
2223
private route: ActivatedRoute,
2324
private readonly onBoardingService: OnBoardingService,
@@ -66,7 +67,8 @@ export class AddSubscriberComponent {
6667
.get('subdomain')
6768
?.valueChanges.pipe(debounceTime(1500), distinctUntilChanged())
6869
.subscribe(subdomain => {
69-
if (subdomain) {
70+
const subdomainControl = this.marketSubsForm.get('subdomain');
71+
if (subdomainControl && subdomainControl.valid) {
7072
this.verifyKey(subdomain);
7173
} else {
7274
this.keyVerificationMessage = '';
@@ -114,8 +116,8 @@ export class AddSubscriberComponent {
114116
subdomain: userData.subdomain,
115117
regToken: this.regToken,
116118
};
117-
118119
console.log(user);
120+
this.keyVerificationMessage = '';
119121
this.onBoardingService.addSubscriber(user).subscribe(
120122
() => {
121123
this.toastrService.show('Subscriber Added successfully');

projects/saas-ui/src/app/shared/services/on-boarding-service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ export class OnBoardingService {
121121
const headers = new HttpHeaders({
122122
'Content-Type': 'application/json',
123123
'x-api-key': this.appConfig.apiKey,
124-
});
124+
}).set(AuthTokenSkipHeader, '-');
125+
125126
const command: AddSubscriberCommand<Subscriber> = new AddSubscriberCommand(
126127
this.apiService,
127128
this.anyAdapter,

0 commit comments

Comments
 (0)