mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -72,3 +72,4 @@ android/app/src/main/res/**
|
||||
___android/
|
||||
_android/
|
||||
_www/
|
||||
www2020
|
||||
@@ -11,10 +11,12 @@ import { PermissionService } from '../services/permission.service';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { Device } from '@capacitor/device';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { NetworkServiceService, ConnectionStatus } from 'src/app/services/network-service.service';
|
||||
import { NativeNotificationService } from 'src/app/services/native-notification.service';
|
||||
import { UserSession } from '../models/user.model';
|
||||
import { PermissionList } from '../models/permission/permissionList';
|
||||
@@ -85,6 +87,8 @@ export class HomePage implements OnInit {
|
||||
public RouteService: RouteService,
|
||||
private NativeNotificationService: NativeNotificationService,
|
||||
private sqliteservice: SqliteService,
|
||||
private RochetChatConnectorService: RochetChatConnectorService,
|
||||
private NetworkServiceService: NetworkServiceService
|
||||
) {
|
||||
if (SessionStore.exist) {
|
||||
this.user = SessionStore.user;
|
||||
@@ -139,14 +143,26 @@ export class HomePage implements OnInit {
|
||||
this.notificationsService.onReciveBackground();
|
||||
|
||||
window.addEventListener('online', () => {
|
||||
// console.log('Became online')
|
||||
this.backgroundservice.online()
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
} else {
|
||||
this.synchWhenOnline()
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
this.RochetChatConnectorService.registerCallback({
|
||||
type: 'reConnect',
|
||||
funx: async () => {
|
||||
this.backgroundservice.online()
|
||||
}
|
||||
})
|
||||
|
||||
this.NetworkServiceService.onNetworkChange().subscribe((status) => {
|
||||
if(status == ConnectionStatus.Online) {
|
||||
this.backgroundservice.online()
|
||||
}
|
||||
})
|
||||
|
||||
window.addEventListener('offline', () => {
|
||||
// console.log('Became offline')
|
||||
this.backgroundservice.offline()
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
</div>
|
||||
<div class="exp-card-text">
|
||||
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Presidente da República</p>
|
||||
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])">Despachos criados por mim</p>
|
||||
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && !p.userPermission([p.permissionList.Gabinete.md_tasks])">Despachos criados por mim</p>
|
||||
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
<div class="bg-4 d-flex justify-center align-center">
|
||||
<div class="div-logo">
|
||||
|
||||
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/fullLogo-no-g.png' alt='logo'>
|
||||
<!-- <img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/fullLogo-no-g.png' alt='logo'>
|
||||
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
|
||||
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A.png' alt='logo'>
|
||||
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A.png' alt='logo'> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,6 +15,8 @@ export class BackgroundService {
|
||||
funx: Function
|
||||
}[] = []
|
||||
|
||||
status: 'online'| 'offline' = 'online'
|
||||
|
||||
constructor(
|
||||
private themeservice: ThemeService,
|
||||
private storageservice: StorageService,
|
||||
@@ -22,14 +24,18 @@ export class BackgroundService {
|
||||
) { }
|
||||
|
||||
online() {
|
||||
if(this.status == 'online') {
|
||||
return false
|
||||
}
|
||||
this.status = 'online'
|
||||
|
||||
this.paint()
|
||||
|
||||
this.callBacks.forEach((e) => {
|
||||
if (e.type == 'Online') {
|
||||
e.funx()
|
||||
}
|
||||
})
|
||||
this.status = 'offline'
|
||||
}
|
||||
|
||||
paint() {
|
||||
@@ -59,6 +65,10 @@ export class BackgroundService {
|
||||
|
||||
async offline() {
|
||||
|
||||
if(this.status == 'offline') {
|
||||
return false
|
||||
}
|
||||
|
||||
let opts = {
|
||||
headers: {},
|
||||
}
|
||||
@@ -68,6 +78,7 @@ export class BackgroundService {
|
||||
} catch (error) {
|
||||
if(error.status != 400) {
|
||||
|
||||
this.status = 'offline'
|
||||
document.body.style.setProperty(`--color`, "#ffb703");
|
||||
document.body.style.setProperty(`--color2`, "#ffb703");
|
||||
document.body.style.setProperty(`--color3`, "#ffb703");
|
||||
@@ -82,8 +93,6 @@ export class BackgroundService {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
registerBackService(type: 'Offline' | 'Online' | 'Notification', funx: Function, object = '') {
|
||||
@@ -94,5 +103,4 @@ export class BackgroundService {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,10 @@ export class NetworkServiceService {
|
||||
this.status.next(status);
|
||||
});
|
||||
|
||||
this.onNetworkChange().subscribe((status) => {
|
||||
console.log(status)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
public initializeNetworkEvents() {
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
|
||||
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="div-search">
|
||||
<div (click)="openSearch()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-45" src="assets/images/theme/doneIt/icons-search.svg"></ion-icon>
|
||||
<!-- <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-45" src="assets/images/theme/doneIt/icons-search.svg"></ion-icon>
|
||||
<ion-icon *ngIf=" ThemeService.currentTheme == 'default' " class="font-45" src='assets/images/icons-search.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-45" src='assets/images/theme/gov/icons-search.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-45" src='assets/images/theme/gov/icons-search.svg'></ion-icon> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
</div>
|
||||
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
|
||||
<div class="logo-description-content">
|
||||
<p class="logo-description-text tp-5" >Presidente da República</p>
|
||||
<p class="logo-description-text tp-5" ></p>
|
||||
<div class="add-line"></div>
|
||||
<p class="logo-description-text tp-5" >GABINETE DIGITAL</p>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="ThemeService.currentTheme == 'default' " class="logo-description d-flex align-center justify-content-center">
|
||||
<div class="logo-description-content">
|
||||
<p class="logo-description-text tp-5 color-white" >Presidente da República</p>
|
||||
<p class="logo-description-text tp-5 color-white" ></p>
|
||||
<div class="add-line-white"></div>
|
||||
<p class="logo-description-text tp-5 color-white" >GABINETE DIGITAL</p>
|
||||
</div>
|
||||
@@ -45,9 +45,9 @@
|
||||
<div class="d-flex justify-space-between align-center">
|
||||
<div tab="events" class="div-logo height-fit-content">
|
||||
<div class="logo-icon">
|
||||
<img *ngIf="ThemeService.currentTheme == 'default'" src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
<!-- <img *ngIf="ThemeService.currentTheme == 'default'" src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
|
||||
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A1.png' alt='logo'>
|
||||
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A1.png' alt='logo'> -->
|
||||
</div>
|
||||
<div class="logo-description d-flex align-center justify-content-center">
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
<div *ngIf="ThemeService.currentTheme == 'gov' " class="logo-description-content">
|
||||
<p *ngIf="environment.presidencia" class="logo-description-text">Calendário Partilhado</p>
|
||||
<p *ngIf="!environment.presidencia" class="logo-description-text" >Presidente República</p>
|
||||
<p *ngIf="!environment.presidencia" class="logo-description-text" ></p>
|
||||
<div class="add-line"></div>
|
||||
<p *ngIf="!environment.presidencia" class="logo-description-text" >GABINETE DIGITAL</p>
|
||||
</div>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { versionData } from '../../version/git-version'
|
||||
export const environment = {
|
||||
// apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
|
||||
apiURL: 'https://gd-api.oapr.gov.ao/api/',
|
||||
apiURL: 'https://API.DONEIT.CO.AO/api/',
|
||||
//apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
|
||||
// apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
|
||||
// apiChatUrl: 'http://192.168.0.29:3000/api/v1/',
|
||||
// apiWsChatUrl: 'wss://192.168.0.29:3000/websocket',
|
||||
//apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
|
||||
//apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
|
||||
apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',
|
||||
apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',
|
||||
apiChatUrl: 'https://CHAT.DONEIT.CO.AO/api/v1/',
|
||||
apiWsChatUrl: 'wss://CHAT.DONEIT.CO.AO/websocket',
|
||||
// apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
|
||||
// apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
|
||||
production: true,
|
||||
|
||||
@@ -2,14 +2,15 @@ import { versionData } from '../../version/git-version'
|
||||
export const environment = {
|
||||
// apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
|
||||
//apiURL: 'https://gd-api.oapr.gov.ao/api/',
|
||||
apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
|
||||
apiURL: 'https://API.DONEIT.CO.AO/api/',
|
||||
//apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
|
||||
// apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
|
||||
// apiChatUrl: 'http://192.168.0.29:3000/api/v1/',
|
||||
// apiWsChatUrl: 'wss://192.168.0.29:3000/websocket',
|
||||
//apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',
|
||||
//apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',
|
||||
apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
|
||||
apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
|
||||
//apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
|
||||
//apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
|
||||
apiChatUrl: 'https://CHAT.DONEIT.CO.AO/api/v1/',
|
||||
apiWsChatUrl: 'wss://CHAT.DONEIT.CO.AO/websocket',
|
||||
production: true,
|
||||
domain: 'paulo.pinto@gabinetedigital.local',
|
||||
defaultuser: 'paulo.pinto@gabinetedigital.local',//paulo.pinto@gabinetedigital.local
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
export let versionData = {
|
||||
"shortSHA": "6fad1bd68",
|
||||
"SHA": "6fad1bd688cc8a612840124594abba1ea12a4b3d",
|
||||
"shortSHA": "efa7774c1",
|
||||
"SHA": "efa7774c1c45d63325a62d9596c9e8353cb5cb18",
|
||||
"branch": "consoleCle2",
|
||||
"lastCommitAuthor": "'Peter Maquiran'",
|
||||
"lastCommitTime": "'Mon Jan 9 14:42:33 2023 +0100'",
|
||||
"lastCommitMessage": "fix merge",
|
||||
"lastCommitNumber": "4622",
|
||||
"lastCommitTime": "'Mon Jan 9 14:51:00 2023 +0100'",
|
||||
"lastCommitMessage": "improve chat",
|
||||
"lastCommitNumber": "4623",
|
||||
"change": "",
|
||||
"changeStatus": "On branch consoleCle2\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/services/chat/viewed-message.service.ts\n\tmodified: version/git-version.ts",
|
||||
"changeStatus": "On branch consoleCle2\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: .gitignore\n\tmodified: src/app/home/home.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/login/login.page.html\n\tmodified: src/app/services/background.service.ts\n\tmodified: src/app/services/network-service.service.ts\n\tmodified: src/app/shared/header/header.page.html\n\tmodified: src/environments/environment.prod.ts\n\tmodified: src/environments/environment.ts",
|
||||
"changeAuthor": "peter.maquiran"
|
||||
}
|
||||
Reference in New Issue
Block a user