Explorar el Código

Actualización notificaciones

Jose Brito hace 2 semanas
padre
commit
d715ae5523

+ 8 - 4
src/app/components/template/template.component.css

@@ -241,12 +241,13 @@ footer {
   flex-direction: row;
   align-items: center;
   box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);
+  border-radius: 8px 0 0 8px;
+  overflow: hidden;
 }
 
 .push-notification-close{
   height: 100%;
   width: 24px;
-  background-color: #3F51B5;
   color: white;
   display: flex;
   align-items: center;
@@ -256,7 +257,7 @@ footer {
 }
 
 .push-notification-close:hover{
-  background-color: rgba(63, 81, 181, 0.9);
+  opacity: 0.9;
 }
 
 .push-notification-content{
@@ -345,7 +346,7 @@ footer {
 }
 
 .no-notifications{
-  width: 384px;
+  width: 360px;
   text-align: center;
 }
 
@@ -353,7 +354,9 @@ footer {
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
-  width: 384px;
+  width: 360px;
+  box-sizing: border-box;
+  overflow: hidden;
   cursor: pointer;
   transition: all 0.25s ease;
 }
@@ -361,6 +364,7 @@ footer {
 .notification-decoration{
   height: 68px;
   width: 16px;
+  border-radius: 4px 0 0 4px;
 }
 
 .notification-content{

+ 2 - 2
src/app/components/template/template.component.html

@@ -75,7 +75,7 @@
     @for (notification of totalNotifications; track $index; let i = $index) {
       <div class="notification-container" (click)="openNotification(notification.ID_NOTIFICACION, true)" 
       [ngClass]="{ notification_separator: i < totalNotifications.length - 1, not_readed: !notification.READED }">
-        <div class="notification-decoration indigo_primary_background"></div>
+        <div class="notification-decoration" [style.backgroundColor]="notification.COLOR"></div>
         <div class="notification-content">
           <p class="notification-item-title">{{ notification.TITULO }}</p>
           <p class="notification-item-module">{{ notification.FECREG_DISP }} &bullet; {{ notification.READED ? 'L' : 'No l' }}eído</p>
@@ -88,7 +88,7 @@
     <div class="push-notifications-list">
       @for (notification of notificationsForPanel; track $index) {
         <div class="push-notification-item push-notification-enter" [id]="'notification-' + notification.ID_NOTIFICACION">
-          <div class="push-notification-close" (click)="closeNotification(notification.ID_NOTIFICACION)">
+          <div class="push-notification-close" [style.backgroundColor]="notification.COLOR" (click)="closeNotification(notification.ID_NOTIFICACION)">
             <mat-icon>chevron_right</mat-icon>
           </div>
           <div class="push-notification-content">

+ 1 - 0
src/app/components/template/template.component.ts

@@ -550,6 +550,7 @@ export class TemplateComponent implements OnInit {
               for(const user of audienceArr as string[]){
                 let userDec = await this._encService.decrypt(user);
                 if(userDec == idUserDec){
+                  console.log(notification.response);
                   let notificationsAux = this.totalNotifications;
                   notificationsAux.reverse();
                   notificationsAux.push(notification.response);

+ 1 - 0
src/app/interfaces/notification.interface.ts

@@ -12,6 +12,7 @@ export interface NotificationsListItem{
   CUERPO_NOTIFICACION: string;
   ID_ORDEN: string;
   TIPO_ORDEN: string;
+  COLOR: string;
   ACCIONES: string;
   ACCIONES_ARR?: NotificationAction[];
   AUDIENCIA: string;