Improve local storage and fix expediente task strature

This commit is contained in:
Peter Maquiran
2021-08-26 13:48:29 +01:00
parent f8991b785b
commit f4de729e2f
41 changed files with 373 additions and 507 deletions
+3 -3
View File
@@ -3,14 +3,14 @@
<ion-tab-button tab="events">
<!-- <ion-icon name="home"></ion-icon> -->
<ion-icon class="nav-icon" src="assets/images/icons-nav-home.svg"></ion-icon>
<ion-badge color="danger">{{toDayEventStorage.eventsList.length}}</ion-badge>
<ion-badge color="danger">{{toDayEventStorage.eventsList.length + expedienteGdStore.count}}</ion-badge>
<ion-label>Início</ion-label>
</ion-tab-button>
<ion-tab-button tab="agenda">
<!-- <ion-icon name="calendar"></ion-icon> -->
<ion-icon class="nav-icon" src="assets/images/icons-nav-calendar.svg"></ion-icon>
<ion-label class="overflow-visible">Agenda</ion-label>
<ion-label style="margin-bottom: 2px;" class="overflow-visible">Agenda</ion-label>
</ion-tab-button>
<ion-tab-button tab="gabinete-digital">
<!-- <ion-icon name="file-tray-stacked"></ion-icon> -->
@@ -21,7 +21,7 @@
</ion-tab-button>
<ion-tab-button tab="publications">
<ion-icon class="nav-icon" src="assets/images/icons-nav-actions.svg"></ion-icon>
<ion-label class="overflow-visible">Ações</ion-label>
<ion-label style="margin-bottom: 2px;" class="overflow-visible">Ações</ion-label>
</ion-tab-button>
<ion-tab-button tab="chat">
<ion-icon class="nav-icon" src="assets/images/icons-nav-chat-inactive.svg"></ion-icon>
+17 -10
View File
@@ -12,6 +12,8 @@ import { DocumentCounterService } from 'src/app/OtherService/document-counter.se
import { PermissionService } from '../OtherService/permission.service';
import { TotalDocumentStore } from '../store/total-document.service';
import { connection } from '../services/socket/synchro.service';
import { DespachoService } from '../Rules/despacho.service';
import { ExpedienteGdStore } from '../store/expedientegd-store.service';
// import { NetworkService } from '../services/network.service';
@@ -44,6 +46,7 @@ export class HomePage implements OnInit {
toDayEventStorage = ToDayEventStorage
totalDocumentStore = TotalDocumentStore
expedienteGdStore = ExpedienteGdStore
adding: "intervenient" | "CC" = "intervenient";
mobileComponent = {
@@ -68,7 +71,8 @@ export class HomePage implements OnInit {
connection = connection
constructor(private zone: NgZone,
constructor(
private zone: NgZone,
private router: Router,
public modalCtrl: AlertController,
private notificationsService: NotificationsService,
@@ -76,12 +80,15 @@ export class HomePage implements OnInit {
private activeroute: ActivatedRoute,
// private network: NetworkService,
public p: PermissionService,
public documentCounterService: DocumentCounterService) {
public documentCounterService: DocumentCounterService,
private despachoRule: DespachoService) {
this.router.events.subscribe((val) => {
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
});
this.updateList()
// if (typeof Worker !== 'undefined') {
// // Create a new
@@ -99,14 +106,6 @@ export class HomePage implements OnInit {
//this.folderId = this.navParams.get('folderId');
}
this.notificationsService.registerCallback(
'Create Depacho',
() =>{
this.refreshing()
}
)
}
refreshing() {
@@ -162,8 +161,16 @@ export class HomePage implements OnInit {
});
}
}
}
updateList() {
this.notificationsService.registerCallback(
'despachos',
() => {
this.despachoRule.getList({updateStore: true})
}
)
}