notification system fixed

This commit is contained in:
arnaucode
2017-06-23 02:56:57 +02:00
parent 3cf45d915d
commit 1da3b98715
8 changed files with 138 additions and 74 deletions

View File

@@ -47,11 +47,11 @@
<a class="item item-icon-left o_bSidenav" menu-close ng-href="#/app/users">
<i class="icon ion-person-stalker"></i> {{'Users' | translate }}
</a>
<a class="item item-icon-left o_bSidenav" menu-close ng-href="#/app/notifications">
<!--<a class="item item-icon-left o_bSidenav" menu-close ng-href="#/app/notifications">
<i class="icon ion-android-notifications-none"></i>
{{'Notifications' | translate }}
<span class="badge o_purple300">{{storageuser.notifications.length}}</span>
</a>
</a>-->
<a class="item item-icon-left o_bSidenav" menu-close ng-href="#/app/settings">
<i class="icon ion-settings"></i> {{'Settings' | translate }}
</a>

View File

@@ -4,11 +4,11 @@
<i class="icon ion-android-car"></i>
{{'Offer_Car' | translate}}
</a>
<a href="#/app/askCar" class="item item-icon-left o_purple400">
<a href="" class="item item-icon-left o_purple400">
<i class="icon ion-help"></i>
{{'Ask_for_Car' | translate}} (not yet)
</a>
<a href="#/app/askPackage" class="item item-icon-left o_purple300">
<a href="" class="item item-icon-left o_purple300">
<i class="icon ion-ios-box"></i>
{{'Ask_for_Package' | translate}} (not yet)
</a>

View File

@@ -1,12 +1,22 @@
<ion-view view-title="{{'Notifications' | translate}}">
<ion-content class="has-footer">
<ion-refresher
pulling-text="{{'Pull_to_refresh' | translate}}..."
on-refresh="doRefresh()">
</ion-refresher>
<a ng-repeat="notification in notifications | orderBy: '-date'"
class="item item-icon-left" href="#/app/{{notification.link}}">
<i class="icon ion-android-notifications-none"></i>
<ion-refresher pulling-text="{{'Pull_to_refresh' | translate}}..." on-refresh="doRefresh()">
</ion-refresher>
<div ng-show="!notifications[0]" class="item">
No notifications yet
</div>
<a ng-repeat="notification in notifications | orderBy: '-date'" ng-show="notification.state=='pendent'"
class="item item-icon-left c_deepPurple100" href="#/app/{{notification.link}}">
<i ng-show="notification.state=='pendent'" class="icon ion-android-notifications-none o_text_purple600"></i>
<h2>{{notification.message}}</h2>
<div class="item-note text-right">
<div class="o_text_purple600">{{notification.date | date:"dd/MM"}}</div>
<div class="o_text_purple600">{{notification.date | date:"HH:mm:ss"}}</div>
</div>
</a>
<a ng-repeat="notification in notifications | orderBy: '-date'" ng-show="notification.state=='viewed'"
class="item item-icon-left" href="#/app/{{notification.link}}">
<i ng-show="notification.state=='viewed'" class="icon ion-android-notifications-none"></i>
<h2>{{notification.message}}</h2>
<div class="item-note text-right">
<div class="o_text_purple600">{{notification.date | date:"dd/MM"}}</div>