123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237 |
- import { UserService } from './../../shared/user.service';
- import { Router } from '@angular/router';
- import { AuthServiceService } from './../../shared/auth-service.service';
- import { Component, OnInit } from '@angular/core';
- import { InternalPageService } from '../../shared/internal-page.service';
- import { NgxSpinnerService } from 'ngx-spinner';
- @Component({
- selector: 'app-internal-page-content',
- templateUrl: './internal-page-content.component.html',
- styleUrls: ['./internal-page-content.component.css']
- })
- export class InternalPageContentComponent implements OnInit {
- constructor(private authSer: AuthServiceService,
- private router:Router,
- private userservice: UserService,
- private internalService: InternalPageService,
- private spinner: NgxSpinnerService,) { }
- joinUs = [];
- reportsData = [];
- externalServices = [];
- congratulations = [];
- condolences = [];
- internalServices = [];
- tabsData = [];
- achievements = [];
- checkShowData: boolean;
- tabtype:number = 0;
- expandedIndex:number;
- live_event = [];
- next_lecture = [];
- myInnerHeight = window.innerHeight;
- flag: boolean = false;
- catchEvent(event) {
- this.flag = true
- console.log(event)
- }
- hide(event) {
- this.flag = false;
- }
- ngOnInit() {
- this.authSer.arabicTemplate = true;
- this.authSer.arabicLanguage = true;
- this.authSer.englishLanguage = false;
- this.spinner.show();
-
- this.authSer.showDashboardHeader = false;
-
-
- this.userservice.getUserDataProfile();
- this.spinner.hide();
-
-
-
-
-
-
-
-
-
-
- this.internalService.getSliderData().subscribe(
- (responce) => {
- console.log('responxce', responce);
- this.reportsData = responce['reports'];
- },
- (error) => {
- console.log(error);
- }
- );
-
- this.internalService.getExternalServicesList().subscribe(
- (responce) => {
- console.log('external_list' , responce);
- this.externalServices = responce['external_services'];
- },
- (error) => {
- console.log(error);
- }
- );
-
- this.internalService.getJoinUsData().subscribe(
- (responce) => {
- console.log('joooin us', responce);
- this.joinUs = responce['user'];
- },
- (error) => {
- console.log(error);
- }
- );
- this.internalService.getCongatoration().subscribe(
- (responce) => {
- console.log('condddddd' ,responce['event']);
- this.congratulations = responce['event'];
- },
- (error) => {
- console.log(error);
- }
- );
- this.internalService.getCondolences().subscribe(
- (responce) => {
- console.log('condddddd',responce['event']);
- this.condolences = responce['event'];
- },
- (error) => {
- console.log(error);
- }
- );
- this.internalService.getInternalServicesList().subscribe(
- (responce) => {
- console.log('internal serviceees',responce);
- this.internalServices = responce['internal_services'];
- },
- (error) => {
- console.log(error);
- }
- );
- this.internalService.getTabData(this.tabtype).subscribe(
- (responce) => {
- this.tabsData = responce['tabs'];
- if(this.tabsData.length > 0) {
- this.checkShowData = false;
- } else {
- this.checkShowData = true;
- }
- },
- (error) => {
- console.log(error);
- }
- );
- this.internalService.getForthAchievementsList().subscribe(
- (responce) => {
- console.log('weeeeeeeeeeeeeeeeeeee', responce);
- this.achievements = responce['achievements'];
- this.spinner.hide();
- },
- (error) => {
- console.log(error);
- }
- );
- this.internalService.getEventNow().subscribe(
- (responce) => {
- console.log( 'liiiiiiiiive', responce);
- this.live_event = responce['live_lecture'];
- this.next_lecture = responce['next_lecture'];
- },
- (error) => {
- console.log(error);
- }
- )
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- onGetData(numberTab) {
- this.spinner.show();
- this.tabsData = [];
- this.tabtype = numberTab;
- this.internalService.getTabData(this.tabtype).subscribe(
- (responce) => {
- this.tabsData = responce['tabs'];
- if(this.tabsData.length > 0) {
- this.checkShowData = false;
- } else {
- this.checkShowData = true;
- }
- this.spinner.hide();
- },
- (error) => {
- console.log(error);
- }
- )
- }
- open(data,i) {
- console.log(data);
- this.expandedIndex = i;
- }
- closeCollapse(i) {
- this.expandedIndex = -1;
- }
- goToHome() {
- this.router.navigate(['InternalPage']);
- }
- }
|