File

src/app/components/popups/sb-course-completion-popup/sb-course-completion-popup.component.ts

Metadata

Index

Properties
Methods

Constructor

constructor(popOverCtrl: PopoverController, navParams: NavParams, commonUtilService: CommonUtilService)
Parameters :
Name Type Optional
popOverCtrl PopoverController No
navParams NavParams No
commonUtilService CommonUtilService No

Methods

close
close()
Returns : void
ionViewWillEnter
ionViewWillEnter()
Returns : void

Properties

certificateDescription
Type : string
Default value : ''
course
isCertified
Default value : false
isOnline
Default value : true
import { Component } from '@angular/core';
import { NavParams, PopoverController } from '@ionic/angular';
import { CommonUtilService } from '@app/services';

@Component({
  selector: 'app-my-groups-popover',
  templateUrl: './sb-course-completion-popup.component.html'
})
export class CourseCompletionPopoverComponent {

  isCertified = false;
  isOnline = true;
  certificateDescription = '';
  course;

  constructor(
    private popOverCtrl: PopoverController,
    private navParams: NavParams,
    private commonUtilService: CommonUtilService
  ) { }

  ionViewWillEnter() {
    this.isCertified = this.navParams.get('isCertified');
    this.certificateDescription = this.navParams.get('certificateDescription');
    this.isOnline = this.commonUtilService.networkInfo.isNetworkAvailable;
    this.course = this.navParams.get('course');
  }

  close() {
    this.popOverCtrl.dismiss();
  }

}
<ion-content>
    <div class="course-completion-popup-container">
        <div class="cc-popup-close clearfix">
            <ion-icon class="pull-right" name="close" (click)="close()"></ion-icon>
        </div>
        <div class="ion-text-center">
            <div>
                <img src="assets/imgs/Badge green.svg" alt="">
            </div>
            <div class="course-completion-title">{{'CONGRATULATIONS' | translate}}</div>
            <div class="course-completion-info">{{'FRMELEMNTS_MSG_TRAINING_COMPLETED_SUCCESSFULLY' | categoryKeyTranslate : course }}</div>
            <div class="course-completion-cert" *ngIf="isCertified">
                <p *ngIf="certificateDescription; else defaultDescription">{{certificateDescription}}</p>
                <ng-template #defaultDescription>{{'FRMELEMNTS_MSG_COURSE_COMPLETION_POPUP_DESC' | categoryKeyTranslate : course }}</ng-template>
            </div>
            <div class="course-completion-cert" *ngIf="isOnline && !isCertified">
                {{'FRMELEMNTS_MSG_COURSE_COMPLETION_POPUP_NO_CERTIFICATE' | categoryKeyTranslate : course }}
            </div>
        </div>
    </div>
</ion-content>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""