You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemmionic5/Mohem/src/app/erm-channel/survey/survey.component.ts

49 lines
1.3 KiB
TypeScript

import { Component, OnInit } from '@angular/core';
import { NavController } from '@ionic/angular';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-survey',
templateUrl: './survey.component.html',
styleUrls: ['./survey.component.scss'],
})
export class SurveyComponent implements OnInit {
rate: any;
5 years ago
isSkip: boolean = false;
setTime: number = 5;
satisfied: any = '5';
constructor(public ts: TranslatorService, public cs: CommonService, public nav: NavController, public authService: AuthenticationService) { }
5 years ago
ngOnInit() {
this.setTimer();
}
skip() {
this.nav.pop();
CommonService.SKIP = true;
}
5 years ago
setTimer() {
setTimeout(() => {
this.setTime--;
if (this.setTime == 0) {
this.isSkip = true;
} else {
this.setTimer();
}
}, 1000);
}
saveSruvey() {
var request = {}
this.authService.saveAdsStatus(request, () => { }, this.ts.trPK('general', 'ok')).subscribe((result) => {
})
}
select(rating) {
this.satisfied = rating;
}
}