Skip to content

Commit

Permalink
PR comment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DhaaraniCIT committed Nov 13, 2024
1 parent 37f215f commit e29d872
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/core/models/common/helper.model.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FormGroup, Validators } from "@angular/forms";

export type checkBoxEmit = {
export type CheckBoxUpdate = {
id: number;
value: boolean;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h4 class="tw-text-14-px tw-text-text-secondary tw-font-500">{{step.label}}</h4>
[checkedText]="'Done'"
[unCheckedText]="'Mark as done'"
[id]="step.id"
(checkBoxUpdated)="qbdWebConnectorStatus($event)">
(checkBoxUpdated)="updateConnectorStatus($event)">
</app-chechbox-button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { brandingContent, brandingKbArticles } from 'src/app/branding/branding-config';
import { brandingConfig } from 'src/app/branding/c1-contents-config';
import { BrandingConfiguration } from 'src/app/core/models/branding/branding-configuration.model';
import { checkBoxEmit } from 'src/app/core/models/common/helper.model';
import { CheckBoxUpdate } from 'src/app/core/models/common/helper.model';
import { ConfigurationCta, QbdDirectOnboardingState, QBDPreRequisiteState } from 'src/app/core/models/enum/enum.model';
import { OnboardingStepper } from 'src/app/core/models/misc/onboarding-stepper.model';
import { QbdDirectWorkspace } from 'src/app/core/models/qbd-direct/db/qbd-direct-workspaces.model';
Expand Down Expand Up @@ -64,15 +64,16 @@ export class QbdDirectOnboardingPreRequisiteComponent {
private workspaceService: WorkspaceService
) { }

qbdWebConnectorStatus(status: checkBoxEmit): void {
updateConnectorStatus(status: CheckBoxUpdate): void {
this.preRequisitesteps[status.id-1].state = status.value ? QBDPreRequisiteState.COMPLETE : QBDPreRequisiteState.INCOMPLETE;
if (this.preRequisitesteps[0].state === QBDPreRequisiteState.COMPLETE && this.preRequisitesteps[1].state === QBDPreRequisiteState.COMPLETE) {
this.isContinueDisabled = false;
}
}

continueToNextStep(): void{
this.workspaceService.updateWorkspaceOnboardingState({"onboarding_state": QbdDirectOnboardingState.CONNECTION}).subscribe((workspaceResponse: QbdDirectWorkspace) => {
this.saveInProgress = true;
this.workspaceService.updateWorkspaceOnboardingState({onboarding_state: QbdDirectOnboardingState.CONNECTION}).subscribe((workspaceResponse: QbdDirectWorkspace) => {
this.workspaceService.setOnboardingState(workspaceResponse.onboarding_state);
this.saveInProgress = false;
this.router.navigate([`/integrations/qbd_direct/onboarding/connector`]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common';
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { ButtonModule } from 'primeng/button';
import { brandingConfig } from 'src/app/branding/branding-config';
import { checkBoxEmit } from 'src/app/core/models/common/helper.model';
import { CheckBoxUpdate } from 'src/app/core/models/common/helper.model';

@Component({
selector: 'app-chechbox-button',
Expand All @@ -19,7 +19,7 @@ export class ChechboxButtonComponent {

@Input() id: number;

@Output() checkBoxUpdated: EventEmitter<checkBoxEmit> = new EventEmitter();
@Output() checkBoxUpdated: EventEmitter<CheckBoxUpdate> = new EventEmitter();

isCheckboxSelected: boolean = false;

Expand Down

0 comments on commit e29d872

Please sign in to comment.