Skip to content

Commit 38f3bdc

Browse files
[DSC-1872] Replaced 'ui-switch' in ReviewAccountInfoComponent
1 parent e8b972e commit 38f3bdc

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

src/app/external-login-review-account-info-page/review-account-info/review-account-info.component.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,12 @@ <h2> {{'external-login-validation.review-account-info.header' | translate}}</h2>
4040
</span>
4141
</td>
4242
<td>
43-
<ui-switch
43+
<ds-switch
4444
*ngIf="(data.receivedValue !== data.currentValue) && data.currentValue"
45-
[checkedLabel]="'on-label' | translate"
46-
[uncheckedLabel]="'off-label' | translate"
47-
[checked]="data.overrideValue"
48-
(change)="onOverrideChange($event, data.identifier)"
49-
></ui-switch>
45+
[options]="switchOptions"
46+
[selectedValue]="data.overrideValue"
47+
(selectedValueChange)="onOverrideChange($event, data.identifier)">
48+
</ds-switch>
5049
</td>
5150
</tr>
5251
</tbody>

src/app/external-login-review-account-info-page/review-account-info/review-account-info.component.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { HardRedirectService } from '../../core/services/hard-redirect.service';
1515
import { AuthRegistrationType } from '../../core/auth/models/auth.registration-type';
1616
import { ExternalLoginService } from '../../external-log-in/services/external-login.service';
1717
import { NativeWindowRef, NativeWindowService } from '../../core/services/window.service';
18+
import { SwitchColor, SwitchOption } from '../../shared/switch/switch.component';
1819

1920
export interface ReviewAccountInfoData {
2021
label: string;
@@ -53,6 +54,14 @@ export class ReviewAccountInfoComponent implements OnInit, OnDestroy {
5354
*/
5455
subs: Subscription[] = [];
5556

57+
/**
58+
* The custom options for the 'ds-switch' component
59+
*/
60+
switchOptions: SwitchOption[] = [
61+
{ value: true, labelColor: SwitchColor.Success, backgroundColor: SwitchColor.Success ,label: 'on-label' },
62+
{ value: false, label: 'off-label' },
63+
];
64+
5665
constructor(
5766
@Inject(NativeWindowService) protected _window: NativeWindowRef,
5867
private ePersonService: EPersonDataService,

0 commit comments

Comments
 (0)