Profile notification layout add desc fild

This commit is contained in:
Eudes Inácio
2021-08-20 16:43:17 +01:00
parent 126e62d587
commit 84d24dbbaf
7 changed files with 146 additions and 20 deletions
+11 -6
View File
@@ -40,17 +40,22 @@
<div class="notification-item"> <div class="notification-item">
<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 == '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" > <img class="notification-icon" slot="end" *ngIf = "item.Service == 'gabinete-digital'" src="assets/images/icons-correspondencias.svg" >
<img class="notification-icon" slot="end" *ngIf = "item.Service == 'accoes'" src="assets/images/icons-nav-actions.svg" > <img class="notification-icon" slot="end" *ngIf = "item.Service == 'accoes'" src="assets/images/icons-nav-accoes-active.svg" >
<img class="notification-icon" slot="end" *ngIf = "item.Service == 'chat'" src="assets/images/icons-nav-agenda-active.svg" >
</div> </div>
<div class="approve-event-time"> <div class="approve-event-time">
<p>{{item.dateInit}}</p> <p *ngIf = "item.Service == 'agenda'">{{item.dateInit}}</p>
<p>{{item.dateEnd}}</p> <p *ngIf = "item.Service == 'agenda'">{{item.dateEnd}}</p>
</div> </div>
<div class="approve-event-detail"> <div class="approve-event-detail">
<p>{{item.Location}}</p> <p *ngIf = "item.Service == 'agenda'">{{item.Location}}</p>
<h3>{{item.alert}}</h3> <h3 id="profile-title">{{item.alert}}</h3>
<p *ngIf = "item.Service != 'agenda'">{{item.desc}}</p>
</div> </div>
<div class="notification-label"></div> <div class="notification-label-MD-official" *ngIf = "item.Service == 'agenda' && item.TypeAgenda == 'official' && item.Role == '100000011'" ></div>
<div class="notification-label-MD-pessoal" *ngIf = "item.Service == 'agenda' && item.TypeAgenda == 'pessoal' && item.Role == '100000011'" ></div>
<div class="notification-label-PR-official" *ngIf = "item.Service == 'agenda' && item.TypeAgenda == 'official' && item.Role == '100000014'" ></div>
<div class="notification-label-PR-pessoal" *ngIf = "item.Service == 'agenda' && item.TypeAgenda == 'pessoal' && item.Role == '100000014'" ></div>
</div> </div>
</div> </div>
+26 -1
View File
@@ -96,14 +96,39 @@ ion-list{
.approve-event-detail{ .approve-event-detail{
width: calc(100% - 115px) !important; width: calc(100% - 115px) !important;
float: left; float: left;
#profile-title{
width: 250px;
} }
.notification-label{ }
.notification-label-MD-official{
float: right; float: right;
width: 5px; width: 5px;
height: 100%; height: 100%;
border-radius: 0% 100% 100% 0%; border-radius: 0% 100% 100% 0%;
background-color: #ffb703; background-color: #ffb703;
} }
.notification-label-MD-pessoal{
float: right;
width: 5px;
height: 100%;
border-radius: 0% 100% 100% 0%;
background-color: #ff0303;
}
.notification-label-PR-official{
float: right;
width: 5px;
height: 100%;
border-radius: 0% 100% 100% 0%;
background-color: #03d838;
}
.notification-label-PR-pessoal{
float: right;
width: 5px;
height: 100%;
border-radius: 0% 100% 100% 0%;
background-color: #8b0ae0;
}
} }
} }
+20 -10
View File
@@ -72,10 +72,11 @@ export class ProfilePage implements OnInit {
IdObject: payload.IdObject, IdObject: payload.IdObject,
FolderId: payload.FolderId, FolderId: payload.FolderId,
desc: payload.desc, desc: payload.desc,
dateInit: payload.dateInit, dateInit: this.getFormatedTime(payload.dateInit),
dateEnd: payload.dateEnd, dateEnd: this.getFormatedTime(payload.dateEnd),
Location: payload.Location, Location: payload.Location,
TypeAgenda: payload.TypeAgenda, TypeAgenda: payload.TypeAgenda,
Role: payload.Role,
Status: payload.Status Status: payload.Status
} }
} else { } else {
@@ -87,10 +88,11 @@ export class ProfilePage implements OnInit {
IdObject: element.IdObject, IdObject: element.IdObject,
FolderId: element.FolderId, FolderId: element.FolderId,
desc: element.desc, desc: element.desc,
dateInit: element.dateInit, dateInit: this.getFormatedTime(element.dateInit),
dateEnd: element.dateEnd, dateEnd: this.getFormatedTime(element.dateEnd),
Location: element.Location, Location: element.Location,
TypeAgenda: element.TypeAgenda, TypeAgenda: element.TypeAgenda,
Role: element.Role,
Status: element.Status Status: element.Status
} }
} }
@@ -107,7 +109,18 @@ export class ProfilePage implements OnInit {
console.log('Timer badge count') console.log('Timer badge count')
} }
getFormatedTime(dateString){
var date = new Date(dateString);
var hours = date.getHours() > 12 ? date.getHours() - 12 : date.getHours();
var am_pm = date.getHours() >= 12 ? "pm" : "am";
var minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
let time = hours + ":" + minutes /* + " " + am_pm */;
console.log('Formate',time)
return time;
}
notificatinsRoutes = (index, Service, Object, IdObject, FolderId) => { notificatinsRoutes = (index, Service, Object, IdObject, FolderId) => {
this.deleteNotification(index);
if (Service === "agenda") { if (Service === "agenda") {
this.zone.run(() => this.router.navigate(['/home/agenda', IdObject, 'agenda'])); this.zone.run(() => this.router.navigate(['/home/agenda', IdObject, 'agenda']));
} }
@@ -115,7 +128,8 @@ export class ProfilePage implements OnInit {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', IdObject, 'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', IdObject, 'gabinete-digital']));
} }
else if (Service === "gabinete-digital" && Object === "event-list") { else if (Service === "gabinete-digital" && Object === "event-list") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event', IdObject, 'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'gabinete-digital']));
} else if (Service === "gabinete-digital" && Object === "despachos") { } else if (Service === "gabinete-digital" && Object === "despachos") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', IdObject, 'gabinete-digital'], { replaceUrl: true })); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', IdObject, 'gabinete-digital'], { replaceUrl: true }));
@@ -153,7 +167,7 @@ export class ProfilePage implements OnInit {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', IdObject, 'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', IdObject, 'gabinete-digital']));
} }
this.deleteNotification(index);
} }
@@ -162,10 +176,6 @@ export class ProfilePage implements OnInit {
console.log("Delete notification first stata", this.notificationdata) console.log("Delete notification first stata", this.notificationdata)
this.notificationdata = this.notificationdata.filter(item=>item.index !=index ); this.notificationdata = this.notificationdata.filter(item=>item.index !=index );
if(typeof(this.notificationdata) != 'object' ) {
console.log('=_+_+_+_+_+_+_+_+_+_++_+_+_+_+_+_+_+_+_+_+_+_ not an object')
}
this.storageservice.store("Notifications",JSON.stringify(this.notificationdata)).then(() =>{ this.storageservice.store("Notifications",JSON.stringify(this.notificationdata)).then(() =>{
this.storageservice.get("Notifications").then((value) =>{ this.storageservice.get("Notifications").then((value) =>{
console.log("notfication state", value, ) console.log("notfication state", value, )
+2 -2
View File
@@ -231,8 +231,8 @@ export class NotificationsService {
else if (data.Service === "gabinete-digital" && data.Object === "expediente") { else if (data.Service === "gabinete-digital" && data.Object === "expediente") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente',data.IdObject,'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente',data.IdObject,'gabinete-digital']));
} }
else if (data.Service === "gabinete-digital" && data.Object === "event-list") { else if (data.Service === "agenda" && data.Object === "event-list") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',data.IdObject, 'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event',data.IdObject, 'agenda']));
}else if (data.Service === "gabinete-digital" && data.Object === "despachos") { }else if (data.Service === "gabinete-digital" && data.Object === "despachos") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos',data.IdObject,'gabinete-digital'],{replaceUrl: true})); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos',data.IdObject,'gabinete-digital'],{replaceUrl: true}));
+4
View File
@@ -16,7 +16,11 @@ const { Storage } = Plugins; */
// Get the value // Get the value
async get(key: string) { async get(key: string) {
const ret = await this.storage.get(key).then((val) => { return val; }); const ret = await this.storage.get(key).then((val) => { return val; });
try {
return JSON.parse(unescape(atob(ret))); return JSON.parse(unescape(atob(ret)));
} catch (error) {
return unescape(atob(ret))
}
} }
async remove(key: string){ async remove(key: string){
@@ -0,0 +1,36 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35" height="35" viewBox="0 0 35 35">
<defs>
<linearGradient id="gv1uuzmwcc" x1="50%" x2="50%" y1="0%" y2="100%">
<stop offset=".038%" stop-color="#4C4C4C"/>
<stop offset="100%"/>
</linearGradient>
<linearGradient id="tequ404qjd" x1="0%" x2="100%" y1="50%" y2="50%">
<stop offset="0%" stop-color="#D30A0A"/>
<stop offset="100%" stop-color="#B50202"/>
</linearGradient>
<filter id="u0si8dlg0a" width="120%" height="114.5%" x="-10%" y="-3.6%" filterUnits="objectBoundingBox">
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1"/>
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation=".5"/>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"/>
<feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.187390734 0"/>
</filter>
<path id="7mpmpqfmwb" d="M10 0c3.314 0 6 2.686 6 6 0 2.348-1.348 4.38-3.313 5.366C16.905 12.54 20 16.408 20 21c0 5.523-4.977 6.5-10.5 6.5S0 26.523 0 21c0-4.592 3.095-8.461 7.314-9.635C5.348 10.381 4 8.348 4 6c0-3.314 2.686-6 6-6z"/>
</defs>
<g fill="none" fill-rule="evenodd">
<g>
<g>
<g>
<g>
<g>
<g transform="translate(-30 -648) translate(20 635) translate(10 10) translate(0 3) translate(7 4)">
<use fill="#000" filter="url(#u0si8dlg0a)" xlink:href="#7mpmpqfmwb"/>
<path fill="url(#gv1uuzmwcc)" stroke="#EBEBEB" stroke-linejoin="square" stroke-opacity=".194" d="M10 .5c1.519 0 2.894.616 3.89 1.61.994.996 1.61 2.371 1.61 3.89 0 1.058-.299 2.046-.816 2.885-.536.867-1.306 1.575-2.221 2.034-.742.372-1.556.57-2.378.585.825.005 1.655.118 2.468.344 2.027.563 3.78 1.782 5.019 3.414C18.782 16.856 19.5 18.844 19.5 21c0 2.232-.876 3.662-2.313 4.552C15.281 26.732 12.467 27 9.5 27c-2.889 0-5.351-.249-6.983-1.366C1.219 24.746.5 23.288.5 21c0-2.156.718-4.144 1.928-5.738 1.239-1.632 2.993-2.851 5.02-3.415h0l1.25-.348-1.16-.581c-.916-.459-1.686-1.166-2.221-2.033C4.799 8.046 4.5 7.058 4.5 6c0-1.519.616-2.894 1.61-3.89C7.107 1.117 8.482.5 10 .5z"/>
</g>
<path fill="url(#tequ404qjd)" d="M2.593 26.288L18.5 16c-.066-.31-.233-.644-.5-1s-.6-.69-1-1L.737 24.437c.154.302.426.65.816 1.045.39.394.736.663 1.04.806z" transform="translate(-30 -648) translate(20 635) translate(10 10) translate(0 3) translate(7 4)"/>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

@@ -0,0 +1,46 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35" height="35" viewBox="0 0 35 35">
<defs>
<linearGradient id="3fz9vpdwbc" x1="50%" x2="50%" y1="0%" y2="100%">
<stop offset="0%" stop-color="#80C2FF"/>
<stop offset="99.962%" stop-color="#0085FF"/>
</linearGradient>
<linearGradient id="ytz5rxohcf" x1="50%" x2="50%" y1="0%" y2="100%">
<stop offset="0%" stop-color="#FFEFBB"/>
<stop offset="100%" stop-color="#FFC200"/>
</linearGradient>
<filter id="3idfuqbbja" width="117.4%" height="120%" x="-8.7%" y="-5%" filterUnits="objectBoundingBox">
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1"/>
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation=".5"/>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"/>
<feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.187390734 0"/>
</filter>
<filter id="uv9cnvernd" width="125%" height="128.6%" x="-12.5%" y="-7.1%" filterUnits="objectBoundingBox">
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1"/>
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation=".5"/>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"/>
<feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.187390734 0"/>
</filter>
<path id="a49fg2bilb" d="M14.5 19.1c1.404 0 2.75-.208 3.993-.59.666-.206 4.252 1.758 4.853 1.459.607-.302-1.77-2.867-1.243-3.253C24.493 14.966 26 12.404 26 9.55 26 4.276 20.851 0 14.5 0S3 4.276 3 9.55c0 5.275 5.149 9.55 11.5 9.55z"/>
<path id="6npze5akpe" d="M8 25.37c.977 0 1.913-.146 2.778-.414.463-.143 2.958 1.232 3.376 1.022.422-.21-1.232-2.006-.865-2.277C14.951 22.476 16 20.683 16 18.685c0-1.552-.633-2.98-1.695-4.115C12.841 13.006 10.561 12 8 12c-4.418 0-8 2.993-8 6.685 0 1.037.282 2.018.786 2.894C2.077 23.822 4.822 25.37 8 25.37z"/>
</defs>
<g fill="none" fill-rule="evenodd">
<g>
<g>
<g>
<g>
<g>
<g transform="translate(-30 -508) translate(20 495) translate(10 10) translate(0 3) translate(5 5)">
<use fill="#000" filter="url(#3idfuqbbja)" xlink:href="#a49fg2bilb"/>
<path fill="url(#3fz9vpdwbc)" stroke="#EBEBEB" stroke-linejoin="square" stroke-opacity=".194" d="M14.5.5c3.05 0 5.813 1.022 7.812 2.682C24.275 4.812 25.5 7.06 25.5 9.55c0 2.698-1.437 5.111-3.692 6.763-.066 1.374.22 1.842.51 2.307.17.273.342.545.467.782-.413.145-1.28-.44-1.758-.634-1.178-.478-2.317-.848-2.68-.737-1.199.369-2.495.57-3.847.57-3.05 0-5.813-1.022-7.812-2.682C4.725 14.289 3.5 12.04 3.5 9.55c0-2.49 1.225-4.738 3.188-6.368C8.688 1.522 11.45.5 14.5.5z"/>
</g>
<g transform="translate(-30 -508) translate(20 495) translate(10 10) translate(0 3) translate(5 5) matrix(-1 0 0 1 16 0)">
<use fill="#000" filter="url(#uv9cnvernd)" xlink:href="#6npze5akpe"/>
<path fill="url(#ytz5rxohcf)" stroke="#EBEBEB" stroke-linejoin="square" stroke-opacity=".194" d="M8 12.5c2.41 0 4.56.938 5.94 2.412.974 1.04 1.56 2.349 1.56 3.773 0 1.842-.979 3.487-2.508 4.614-.152 1.023.008 1.308.19 1.608.14.225.26.421.355.587-.296-.022-.819-.446-.939-.495-.868-.355-1.702-.602-1.968-.52-.82.253-1.705.392-2.63.392-1.477 0-2.856-.353-4.02-.965-1.186-.623-2.15-1.515-2.76-2.576-.46-.8-.72-1.697-.72-2.645 0-1.7.834-3.232 2.164-4.343C4.029 13.2 5.917 12.5 8 12.5z"/>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB