Skip to content

Commit

Permalink
Merge pull request #119 from Sohith-code/self-registration-flow
Browse files Browse the repository at this point in the history
telementry changes and minor ui fix
  • Loading branch information
sureshece16 authored Dec 10, 2024
2 parents a52e6e5 + 31d069f commit 5fb6a71
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
</div>
</div>

<div class="actions-buttons flex gap-4 items-center justify-center mt-4">
<div class="actions-buttons flex gap-4 items-center mt-4">
<button mat-flat-button class="mat-btn-outline"
(click)="copyLinkToClipboard(customRegistrationLinks?.registrationLink)">Copy Link</button>
<button mat-flat-button class="mat-btn-outline"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@
word-wrap: break-word;

@media (max-width: 1380px) {
max-width: 410px;
max-width: 380px;
}
}

.mat-btn-outline {
@media (max-width: 1380px) {
padding: 8px 10px !important;
}
}

.actions-buttons {
justify-content: center;

@media (max-width: 1380px) {
justify-content: space-between;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { LoadingPopupComponent } from '../loading-popup/loading-popup.component'
import { OnboardingService } from '../../../services/onboarding.service'
import { DesignationsService } from '../../designation/services/designations.service'
import _ from 'lodash'
import { EventService } from '@sunbird-cb/utils'

@Component({
selector: 'ws-app-custom-self-registration',
Expand Down Expand Up @@ -38,6 +39,7 @@ export class CustomSelfRegistrationComponent implements OnInit {
private clipboard: Clipboard,
private onboardingService: OnboardingService,
private designationsService: DesignationsService,
private eventService: EventService

) { }

Expand Down Expand Up @@ -94,6 +96,7 @@ export class CustomSelfRegistrationComponent implements OnInit {
}

downloadQRCode(qrLink: string) {
this.raiseInteractTelementry('download-qr')
fetch(qrLink)
.then(response => {
if (!response.ok) {
Expand All @@ -115,6 +118,7 @@ export class CustomSelfRegistrationComponent implements OnInit {
}

sendViaEmail(link: string): void {
this.raiseInteractTelementry('share-on-mail')
if (!link) { return }
const message = `Register for ${this.configSvc.orgReadData.orgName} by clicking the link below:\n\n${link + ' '}`
const subject = encodeURIComponent('Self Registration Link')
Expand All @@ -124,6 +128,7 @@ export class CustomSelfRegistrationComponent implements OnInit {
}

sendViaWhatsApp(link: string): void {
this.raiseInteractTelementry('share-on-whatsapp')
const message = `Register for ${this.configSvc.orgReadData.orgName} by clicking the link below:\n\n${link + ' '}`

const encodedLink = encodeURIComponent(message)
Expand Down Expand Up @@ -245,4 +250,17 @@ export class CustomSelfRegistrationComponent implements OnInit {

})
}

raiseInteractTelementry(subType: string) {
this.eventService.raiseInteractTelemetry(
{
type: 'click',
subType: subType,
id: 'share-custom-registration-link',
pageid: '/app/home/onboarding/self-registration'
},
{},
)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ const routes: Routes = [
path: 'self-registration',
component: CustomSelfRegistrationComponent,
data: {
pageId: 'home/onboarding/self-registration',
module: 'onboarding',
path: 'self-registration',
pageId: 'app/home/onboarding/self-registration',
module: 'Onboarding',
},
},
{
Expand Down

0 comments on commit 5fb6a71

Please sign in to comment.