mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
improve publicações
This commit is contained in:
@@ -1,17 +1,10 @@
|
|||||||
import { Component, Inject } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { Platform } from '@ionic/angular';
|
import { Platform } from '@ionic/angular';
|
||||||
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
||||||
import * as _moment from 'moment';
|
|
||||||
import * as _rollupMoment from 'moment';
|
|
||||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||||
const moment = _rollupMoment || _moment;
|
|
||||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||||
import { BackgroundService } from 'src/app/services/background.service';
|
|
||||||
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
|
||||||
import { StorageService } from 'src/app/services/storage.service';
|
|
||||||
import { MessageModel } from './models/beast-orm';
|
|
||||||
import { InativityService } from "src/app/services/inativity.service";
|
import { InativityService } from "src/app/services/inativity.service";
|
||||||
import { ThemeService } from 'src/app/services/theme.service';
|
import { ThemeService } from 'src/app/services/theme.service';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
@@ -41,30 +34,16 @@ const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
|||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
constructor(
|
constructor(
|
||||||
private platform: Platform,
|
private platform: Platform,
|
||||||
/* private splashScreen: SplashScreen, */
|
|
||||||
private statusBar: StatusBar,
|
private statusBar: StatusBar,
|
||||||
private screenOrientation: ScreenOrientation,
|
|
||||||
private sqliteservice: SqliteService,
|
private sqliteservice: SqliteService,
|
||||||
private backgroundservice: BackgroundService,
|
|
||||||
private storageservice: StorageService,
|
|
||||||
private InativityService: InativityService,
|
private InativityService: InativityService,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
private storage: Storage,
|
private storage: Storage,
|
||||||
) {
|
) {
|
||||||
// this.createCacheFolder()
|
|
||||||
this.initializeApp();
|
this.initializeApp();
|
||||||
console.log('version: '+ environment.version)
|
|
||||||
|
|
||||||
this.storage.set('version', environment.version).then(() => {})
|
this.storage.set('version', environment.version).then(() => {})
|
||||||
}
|
}
|
||||||
|
|
||||||
// async createCacheFolder(){
|
|
||||||
// await Filesystem.mkdir({
|
|
||||||
// directory: Directory.Cache,
|
|
||||||
// path: `CACHED-IMG`
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
initializeApp() {
|
initializeApp() {
|
||||||
this.platform.ready().then(() => {
|
this.platform.ready().then(() => {
|
||||||
this.statusBar.styleDefault();
|
this.statusBar.styleDefault();
|
||||||
@@ -87,18 +66,6 @@ export class AppComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* this.storageservice.get('networkCheckStore').then((network) => {
|
|
||||||
if(network === 'online') {
|
|
||||||
console.log('Network app componente check', network)
|
|
||||||
this.backgroundservice.online()
|
|
||||||
} else {
|
|
||||||
console.log('Network app componente check', network)
|
|
||||||
this.backgroundservice.offline();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
console.error('storage initialize: ',error)
|
|
||||||
}) */
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
<!-- <ion-icon name="home"></ion-icon> -->
|
<!-- <ion-icon name="home"></ion-icon> -->
|
||||||
<ion-icon *ngIf="pathname != '/home/events'" class="nav-icon" src="assets/images/icons-nav-home.svg"></ion-icon>
|
<ion-icon *ngIf="pathname != '/home/events'" class="nav-icon" src="assets/images/icons-nav-home.svg"></ion-icon>
|
||||||
<ion-icon *ngIf="pathname == '/home/events'" class="nav-icon" src="assets/images/nav-hover/icons-nav-home-active.svg"></ion-icon>
|
<ion-icon *ngIf="pathname == '/home/events'" class="nav-icon" src="assets/images/nav-hover/icons-nav-home-active.svg"></ion-icon>
|
||||||
<!-- <ion-badge color="danger">{{toDayEventStorage.eventsList.length + expedienteGdStore.count}}</ion-badge> -->
|
|
||||||
<ion-label>Início</ion-label>
|
<ion-label>Início</ion-label>
|
||||||
</ion-tab-button>
|
</ion-tab-button>
|
||||||
|
|
||||||
@@ -22,8 +21,6 @@
|
|||||||
<!-- <ion-icon name="file-tray-stacked"></ion-icon> -->
|
<!-- <ion-icon name="file-tray-stacked"></ion-icon> -->
|
||||||
<ion-icon *ngIf="pathname != '/home/gabinete-digital'" class="nav-icon" src="assets/images/icons-nav-gabinete-inactive.svg"></ion-icon>
|
<ion-icon *ngIf="pathname != '/home/gabinete-digital'" class="nav-icon" src="assets/images/icons-nav-gabinete-inactive.svg"></ion-icon>
|
||||||
<ion-icon *ngIf="pathname == '/home/gabinete-digital'" class="nav-icon" src="assets/images/nav-hover/icons-nav-gabinete-active.svg"></ion-icon>
|
<ion-icon *ngIf="pathname == '/home/gabinete-digital'" class="nav-icon" src="assets/images/nav-hover/icons-nav-gabinete-active.svg"></ion-icon>
|
||||||
<!-- <ion-badge color="danger" *ngIf="!p.userRole(['PR'])" >{{ documentCounterService.mdTotalDocument }}</ion-badge>
|
|
||||||
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >{{ documentCounterService.prTotalDocument }}</ion-badge> -->
|
|
||||||
<ion-label>Gabinete</ion-label>
|
<ion-label>Gabinete</ion-label>
|
||||||
</ion-tab-button>
|
</ion-tab-button>
|
||||||
|
|
||||||
|
|||||||
@@ -195,17 +195,12 @@ export class HomePage implements OnInit {
|
|||||||
|
|
||||||
logDeviceInfo = async () => {
|
logDeviceInfo = async () => {
|
||||||
const info = await Device.getInfo();
|
const info = await Device.getInfo();
|
||||||
|
}
|
||||||
};
|
|
||||||
|
|
||||||
get pathname() {
|
get pathname() {
|
||||||
return window.location.pathname
|
return window.location.pathname
|
||||||
}
|
}
|
||||||
|
|
||||||
get color() {
|
|
||||||
return '#797979'
|
|
||||||
}
|
|
||||||
|
|
||||||
updateList() {
|
updateList() {
|
||||||
|
|
||||||
// this.notificationsService.registerCallback(
|
// this.notificationsService.registerCallback(
|
||||||
@@ -267,4 +262,3 @@ export class HomePage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
onconnect = (ev) => {
|
||||||
|
const [port] = ev.ports;
|
||||||
|
port.onmessage = e => {
|
||||||
|
const [first, second] = e.data;
|
||||||
|
let sum = +first + +second;
|
||||||
|
if (isNaN(sum)) {
|
||||||
|
port.postMessage("Both inputs should be numbers");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
const workerResult = `Result: ${sum} `;
|
||||||
|
port.postMessage(workerResult);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -89,6 +89,7 @@ export class PublicationsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.hideRefreshButton();
|
this.hideRefreshButton();
|
||||||
|
this.getFromDB()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +145,6 @@ export class PublicationsPage implements OnInit {
|
|||||||
this.loadList = true
|
this.loadList = true
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
this.skeletonLoader = true;
|
this.skeletonLoader = true;
|
||||||
this.getFromDB()
|
|
||||||
this.publications.GetPublicationFolderList().subscribe(async res => {
|
this.publications.GetPublicationFolderList().subscribe(async res => {
|
||||||
|
|
||||||
const folders: PublicationFolder[] = this.getPublicationFolderMap(res)
|
const folders: PublicationFolder[] = this.getPublicationFolderMap(res)
|
||||||
@@ -155,9 +155,10 @@ export class PublicationsPage implements OnInit {
|
|||||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||||
await this.storage.set('actionsEvents', this.publicationsEventFolderList);
|
await this.storage.set('actionsEvents', this.publicationsEventFolderList);
|
||||||
await this.storage.set('actionsViagens', this.publicationsTravelFolderList);
|
await this.storage.set('actionsViagens', this.publicationsTravelFolderList);
|
||||||
this.getFromDB()
|
|
||||||
} else {
|
} else {
|
||||||
this.getFromDB()
|
folders.forEach((folder)=> {
|
||||||
|
this.addActionToDB(folder);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import { versionData } from '../../version/git-version'
|
import { versionData } from '../../version/git-version'
|
||||||
export const environment = {
|
export const environment = {
|
||||||
// apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
|
// apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
|
||||||
apiURL: 'https://gd-api.oapr.gov.ao/api/',
|
//apiURL: 'https://gd-api.oapr.gov.ao/api/',
|
||||||
//apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
|
apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
|
||||||
// apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
|
// apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
|
||||||
// apiChatUrl: 'http://192.168.0.29:3000/api/v1/',
|
// apiChatUrl: 'http://192.168.0.29:3000/api/v1/',
|
||||||
// apiWsChatUrl: 'wss://192.168.0.29:3000/websocket',
|
// apiWsChatUrl: 'wss://192.168.0.29:3000/websocket',
|
||||||
//apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
|
//apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
|
||||||
//apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
|
//apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
|
||||||
apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',
|
//apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',
|
||||||
apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',
|
//apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',
|
||||||
// apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
|
apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
|
||||||
// apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
|
apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
|
||||||
production: true,
|
production: true,
|
||||||
domain: 'gabinetedigital.local',
|
domain: 'gabinetedigital.local',
|
||||||
defaultuser: 'eqformacao@oapr.gov.ao',//paulo.pinto@gabinetedigital.local
|
defaultuser: 'eqformacao@oapr.gov.ao',//paulo.pinto@gabinetedigital.local
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user