push notification added
parent
9ad53b9857
commit
b309efb375
@ -0,0 +1,29 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { NotificationCenterPage } from './notification-center.page';
|
||||
import { DetailComponent } from './notification-detail/detail.component';
|
||||
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: DetailComponent
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
HmgCommonModule,
|
||||
RouterModule.forChild(routes)
|
||||
],
|
||||
declarations: [NotificationCenterPage, DetailComponent]
|
||||
})
|
||||
export class NotificationCenterPageModule { }
|
||||
@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
|
||||
<ion-content>
|
||||
<ion-router-outlet></ion-router-outlet>
|
||||
</ion-content>
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { NotificationCenterPage } from './notification-center.page';
|
||||
|
||||
describe('NotificationCenterPage', () => {
|
||||
let component: NotificationCenterPage;
|
||||
let fixture: ComponentFixture<NotificationCenterPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ NotificationCenterPage ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(NotificationCenterPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-notification-center',
|
||||
templateUrl: './notification-center.page.html',
|
||||
styleUrls: ['./notification-center.page.scss'],
|
||||
})
|
||||
export class NotificationCenterPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<nav-buttons backLink="/authentication/login"></nav-buttons>
|
||||
<ion-title >{{ 'worklistMain,notfDetails' | translate }} </ion-title>
|
||||
|
||||
<!-- <ion-title *ngIf="notification.NotificationType != 11"> {{ 'notifications,details' | translate }}</ion-title>
|
||||
|
||||
<ion-title *ngIf="notification.NotificationType == 11"> {{ 'family,instrucion' | translate }}</ion-title>
|
||||
-->
|
||||
</ion-toolbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
<ion-content class="item-background" padding>
|
||||
|
||||
<ion-grid>
|
||||
<ion-row class="ion-justify-content-center">
|
||||
<ion-col [size]="11">
|
||||
<p>{{data.image_Text}}</p>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="ion-justify-content-center">
|
||||
<ion-col [size]="11">
|
||||
<img [src]="data.image_URL" class="full-width">
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
<page-trailer></page-trailer>
|
||||
</ion-content>
|
||||
@ -0,0 +1,61 @@
|
||||
.vertical_space {
|
||||
height: 0.5cm;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 0.38cm;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.info-icon ion-icon {
|
||||
font-size: 90px;
|
||||
margin: 10px auto;
|
||||
display: block;
|
||||
margin-bottom: 0;
|
||||
color: var(--ion-color-danger);
|
||||
}
|
||||
.info-icon h1 {
|
||||
margin: auto;
|
||||
font-size: 22px;
|
||||
text-align: center;
|
||||
margin-top: 10%;
|
||||
}
|
||||
.info-icon {
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
margin: 20px;
|
||||
margin-top: 15%;
|
||||
border-radius: 15px;
|
||||
}
|
||||
.info-icon .line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: #ccddcc;
|
||||
margin: 15px auto;
|
||||
}
|
||||
.info-icon .instruction p {
|
||||
display: block;
|
||||
margin: 0px;
|
||||
margin-top: 7%;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
}
|
||||
.info-icon b {
|
||||
bottom: 11px;
|
||||
margin: 18px;
|
||||
color: var(--ion-color-danger);
|
||||
}
|
||||
.instruction b {
|
||||
color: var(--ion-color-danger);
|
||||
font-weight: bolder;
|
||||
}
|
||||
.stop-icon {
|
||||
display: flex;
|
||||
margin: 10px auto;
|
||||
width: 45%;
|
||||
margin-top: 40px;
|
||||
}
|
||||
p.otherwise {
|
||||
font-size: 20px !important;
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { DetailComponent } from './detail.component';
|
||||
|
||||
describe('DetailComponent', () => {
|
||||
let component: DetailComponent;
|
||||
let fixture: ComponentFixture<DetailComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DetailComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,78 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { NotificationModel } from 'src/app/hmg-common/services/push/models/notification.model';
|
||||
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||
import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
// import { NotificationsCenterService } from '../service/notifications-center.service';
|
||||
import { Route, Router, ActivatedRoute, ActivationEnd } from '@angular/router';
|
||||
import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
|
||||
|
||||
@Component({
|
||||
selector: 'app-detail',
|
||||
templateUrl: './detail.component.html',
|
||||
styleUrls: ['./detail.component.scss']
|
||||
})
|
||||
export class DetailComponent implements OnInit {
|
||||
|
||||
public notification: NotificationModel;
|
||||
public video_link: string;
|
||||
public trustedVideoUrl: SafeResourceUrl;
|
||||
public direction: any;
|
||||
public data: any;
|
||||
constructor(
|
||||
public cs: CommonService,
|
||||
public ts: TranslatorService,
|
||||
public sharedData: SharedDataService,
|
||||
// public notifyService: NotificationsCenterService,
|
||||
public router: Router,
|
||||
private domSanitizer: DomSanitizer,
|
||||
public route: ActivatedRoute
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.direction = TranslatorService.getCurrentDirection();
|
||||
|
||||
this.data = this.sharedData.getSharedData(NotificationModel.SHARED_DATA, true);
|
||||
}
|
||||
// this.initialize();
|
||||
// if (this.notification.MessageType == "image") {
|
||||
|
||||
// }
|
||||
// if (this.notification.MessageType == "video") {
|
||||
// var url = this.notification.MessageTypeData;
|
||||
// var v_id = url.substr(url.lastIndexOf("?v=") + 3, url.length);
|
||||
// this.trustedVideoUrl = this.domSanitizer.bypassSecurityTrustResourceUrl("https://www.youtube.com/embed/" + v_id);
|
||||
// }
|
||||
// else {
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// private initialize() {
|
||||
// // this.notifyService.decreaseBadgeCount();
|
||||
// this.notification = this.sharedData.getSharedData(NotificationModel.SHARED_DATA, true);
|
||||
// if (!this.notification) {
|
||||
// this.cs.back();
|
||||
// }
|
||||
// if (this.notification.MessageType == "image") {
|
||||
// }
|
||||
// if (this.notification.MessageType == "video") {
|
||||
// var url = this.notification.MessageTypeData;
|
||||
// var v_id = url.substr(url.lastIndexOf("?v=") + 3, url.length);
|
||||
// this.trustedVideoUrl = this.domSanitizer.bypassSecurityTrustResourceUrl("https://www.youtube.com/embed/" + v_id);
|
||||
// } else {
|
||||
// }
|
||||
// }
|
||||
|
||||
// public isHtml5VideoSupported(): boolean {
|
||||
// return this.cs.isHtml5VideoSupported();
|
||||
// }
|
||||
|
||||
// public playNativeVideo() {
|
||||
// this.cs.openBrowser(this.notification.MessageTypeData);
|
||||
// }
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue