mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Added if condition for icon on notification profile
This commit is contained in:
@@ -30,16 +30,16 @@
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
<div class="notifications-content">
|
||||
<ion-label>{{notificationdata.length}] novas notificações</ion-label>
|
||||
<ion-label>{{notificationdata.length}} novas notificações</ion-label>
|
||||
<ion-list>
|
||||
<div class="item cursor-pointer ion-no-padding ion-no-margin" lines="none"
|
||||
*ngFor = "let item of notificationdata; let i = index">
|
||||
<div class="item-content width-100">
|
||||
<div class="notification-item">
|
||||
<img class="notification-icon" slot="end" src="assets/images/icons-default-agenda.svg" >
|
||||
<img class="notification-icon" slot="end" *ngIf = "item.Service == 'agenda'" src="assets/images/icons-default-agenda.svg" >
|
||||
<img class="notification-icon" slot="end" *ngIf = "item.Service == 'gabinete-digital'" src="assets/images/icons-correspondencias.svg" >
|
||||
</div>
|
||||
<div class="approve-event-time">
|
||||
<ion-label>{{ item.dateInit }}</ion-label>
|
||||
<p>{{item.dateInit}}</p>
|
||||
<p>{{item.dateEnd}}</p>
|
||||
</div>
|
||||
@@ -50,21 +50,6 @@
|
||||
<div class="notification-label"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item cursor-pointer ion-no-padding ion-no-margin" lines="none">
|
||||
<div class="item-content width-100">
|
||||
<div class="notification-item">
|
||||
<img class="notification-icon" slot="end" src="assets/images/icons-correspondencias.svg" >
|
||||
</div>
|
||||
<div class="approve-event-time">
|
||||
<p>28-07-21</p>
|
||||
<p>09:00</p>
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<h3>Relatório FMI</h3>
|
||||
<p>Luanda | Palácio Presidencial</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-list>
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ export class ProfilePage implements OnInit {
|
||||
|
||||
loggeduser: User;
|
||||
userLoginPreference = ''
|
||||
notificationdata:any[];
|
||||
DataArray: Array<String> = [];
|
||||
notificationdata: any[];
|
||||
DataArray: Array<Object> = [];
|
||||
|
||||
constructor(private modalController: ModalController,
|
||||
private authService: AuthService,
|
||||
@@ -42,9 +42,28 @@ export class ProfilePage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.storageservice.get("Notifications").then((value) => {
|
||||
|
||||
|
||||
var data = JSON.parse(value);
|
||||
this.notificationdata = data
|
||||
data.forEach(element => {
|
||||
console.log("ARaaAA", element)
|
||||
var payload = JSON.parse(element.payload)
|
||||
let notificationObject = {
|
||||
alert: element.alert,
|
||||
Service: payload.Service,
|
||||
Object: payload.Object,
|
||||
IdObject: payload.IdObject,
|
||||
FolderId: payload.FolderId,
|
||||
desc: payload.desc,
|
||||
dateInit: payload.dateInit,
|
||||
dateEnd: payload.dateEnd,
|
||||
Location: payload.Location,
|
||||
TypeAgenda: payload.TypeAgenda,
|
||||
Status: payload.Status
|
||||
}
|
||||
|
||||
this.DataArray.push(notificationObject)
|
||||
});
|
||||
this.notificationdata = this.DataArray
|
||||
console.log("Notificaaa", this.notificationdata)
|
||||
})
|
||||
console.log("Notificaaa", this.notificationdata)
|
||||
|
||||
Reference in New Issue
Block a user