mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
"acept"
This commit is contained in:
@@ -8,6 +8,8 @@ import * as _rollupMoment from 'moment';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
const moment = _rollupMoment || _moment;
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
||||
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
@@ -35,7 +37,9 @@ export class AppComponent {
|
||||
constructor(
|
||||
private platform: Platform,
|
||||
/* private splashScreen: SplashScreen, */
|
||||
private statusBar: StatusBar
|
||||
private statusBar: StatusBar,
|
||||
private screenOrientation: ScreenOrientation,
|
||||
private sqliteservice: SqliteService
|
||||
) {
|
||||
this.initializeApp();
|
||||
}
|
||||
@@ -44,6 +48,24 @@ export class AppComponent {
|
||||
this.platform.ready().then(() => {
|
||||
this.statusBar.styleDefault();
|
||||
/* this.splashScreen.hide(); */
|
||||
|
||||
if (this.platform.is("tablet")) {
|
||||
this.screenOrientation.unlock();
|
||||
} else if( this.platform.is("mobile")) {
|
||||
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT_PRIMARY);
|
||||
console.log('Orientation locked')
|
||||
}
|
||||
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
|
||||
} else {
|
||||
try {
|
||||
this.sqliteservice.databaseConn();
|
||||
} catch (error) {
|
||||
console.log("Error creating local database: ", error)
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+18
-2
@@ -59,6 +59,16 @@ import { PdfViewerModule } from 'ng2-pdf-viewer';
|
||||
import { SQLite } from '@ionic-native/sqlite/ngx';
|
||||
import { CookieService } from 'ngx-cookie-service';
|
||||
|
||||
import { ImagePicker } from '@ionic-native/image-picker/ngx';
|
||||
import { MediaCapture } from '@ionic-native/media-capture/ngx';
|
||||
import { Media } from '@ionic-native/media/ngx';
|
||||
import { StreamingMedia } from '@ionic-native/streaming-media/ngx';
|
||||
import { PhotoViewer } from '@ionic-native/photo-viewer/ngx';
|
||||
|
||||
/* import { FCM } from '@ionic-native/fcm/ngx';
|
||||
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
||||
//import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
entryComponents: [],
|
||||
@@ -105,14 +115,20 @@ import { CookieService } from 'ngx-cookie-service';
|
||||
//File,
|
||||
WebView,
|
||||
FilePath,
|
||||
//FCM,
|
||||
/* FCM,
|
||||
FirebaseX, */
|
||||
WebsocketService,
|
||||
ChatService,
|
||||
ScreenOrientation,
|
||||
Network,
|
||||
File,
|
||||
SQLite,
|
||||
CookieService
|
||||
CookieService,
|
||||
ImagePicker,
|
||||
MediaCapture,
|
||||
Media,
|
||||
StreamingMedia,
|
||||
PhotoViewer
|
||||
],
|
||||
bootstrap: [AppComponent],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
|
||||
+70
-61
@@ -1,11 +1,9 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
///<reference path="../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
|
||||
///<reference path="../../../plugins/cordova-plugin-mfp-push/typings/mfppush.d.ts" />
|
||||
import { Component, OnInit, NgZone } from '@angular/core';
|
||||
import { Event } from '../models/event.model';
|
||||
import { NotificationsService } from '../services/notifications.service';
|
||||
import { WebNotificationsService } from '../services/webnotifications.service';
|
||||
/*import { WebNotificationsService } from '../services/webnotifications.service'; */
|
||||
import { AlertController, Platform } from '@ionic/angular';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { ToDayEventStorage } from '../store/to-day-event-storage.service';
|
||||
@@ -16,7 +14,7 @@ import { InativityService } from '../services/inativity.service';
|
||||
import { SessionStore } from '../store/session.service';
|
||||
import { StorageService } from '../services/storage.service';
|
||||
import { File } from '@ionic-native/file/ngx';
|
||||
import { WebNotificationPopupService } from '../services/notification/web-notification-popup.service';
|
||||
/* import { WebNotificationPopupService } from '../services/notification/web-notification-popup.service'; */
|
||||
import { DocumentCounterService } from '../services/worker/document-counter.service';
|
||||
import { PermissionService } from '../services/worker/permission.service';
|
||||
import { Network } from '@ionic-native/network/ngx';
|
||||
@@ -24,7 +22,9 @@ import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { OfflineManagerService } from 'src/app/services/offline-manager.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
@@ -74,19 +74,22 @@ export class HomePage implements OnInit {
|
||||
private notificationsService: NotificationsService,
|
||||
private platform: Platform,
|
||||
private activeroute: ActivatedRoute,
|
||||
private webnotification: WebNotificationsService,
|
||||
/* private webnotification: WebNotificationsService, */
|
||||
public p: PermissionService,
|
||||
public documentCounterService: DocumentCounterService,
|
||||
private despachoRule: DespachoService,
|
||||
private inativityService: InativityService,
|
||||
private storageService: StorageService,
|
||||
private webNotificationPopupService: WebNotificationPopupService,
|
||||
/* private webNotificationPopupService: WebNotificationPopupService, */
|
||||
private backgroundservice: BackgroundService,
|
||||
private offlinemanager: OfflineManagerService,
|
||||
private storage: Storage,
|
||||
private eventservice: EventsService) {
|
||||
private eventservice: EventsService,
|
||||
private processservice: ProcessesService,
|
||||
private screenOrientation: ScreenOrientation,
|
||||
private sqliteservice: SqliteService) {
|
||||
|
||||
this.webNotificationPopupService.askNotificationPermission()
|
||||
/* this.webNotificationPopupService.askNotificationPermission() */
|
||||
|
||||
this.router.events.subscribe((val) => {
|
||||
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
|
||||
@@ -114,16 +117,15 @@ export class HomePage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.notificationsService.onReciveForeground();
|
||||
this.notificationsService.onReciveBackground();
|
||||
|
||||
window.addEventListener('online', () => {
|
||||
console.log('Became online')
|
||||
this.backgroundservice.online()
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.webnotification.webconnection();
|
||||
this.webnotification.register();
|
||||
} else {
|
||||
this.mobilefirstConnect();
|
||||
this.notificationsService.onReceviNotification();
|
||||
this.offlinemanager.synchnize()
|
||||
this.synchWhenOnline()
|
||||
}
|
||||
});
|
||||
window.addEventListener('offline', () => {
|
||||
@@ -133,62 +135,23 @@ export class HomePage implements OnInit {
|
||||
|
||||
this.updateList()
|
||||
|
||||
var myWorker = new Worker(new URL('./nice.worker.js', import.meta.url));
|
||||
/* var myWorker = new Worker(new URL('./nice.worker.js', import.meta.url));
|
||||
|
||||
myWorker.onmessage = function (oEvent) {
|
||||
console.log('Worker said : ' + oEvent.data);
|
||||
}
|
||||
|
||||
myWorker.postMessage('ali');
|
||||
myWorker.postMessage('ali'); */
|
||||
}
|
||||
|
||||
mobilefirstConnect() {
|
||||
|
||||
console.log("Mobileconecct");
|
||||
|
||||
if (window['WLAuthorizationManager']) {
|
||||
if (window['WLAuthorizationManager'].obtainAccessToken) {
|
||||
window['WLAuthorizationManager'].obtainAccessToken("").then((token) => {
|
||||
|
||||
console.log('MobileFirst Server connect: Success ' + token);
|
||||
|
||||
var resourceRequest = new WLResourceRequest("/adapters/javaAdapter/resource/greet/",
|
||||
WLResourceRequest.GET
|
||||
);
|
||||
|
||||
resourceRequest.setQueryParameter("name", "world");
|
||||
resourceRequest.send().then(
|
||||
(response) => {
|
||||
// Will display "Hello world" in an alert dialog.
|
||||
console.log("Connect with JavaAdapter Success: " + response.responseText);
|
||||
//this.MFPushNotification();
|
||||
},
|
||||
(error) => {
|
||||
console.log("Connect with JavaAdapter Failure: " + JSON.stringify(error));
|
||||
}
|
||||
);
|
||||
}, (error) => {
|
||||
console.log('MobileFirst Server connect: failure ' + error.responseText);
|
||||
console.log(JSON.stringify(error))
|
||||
/* this.zone.run(() => {
|
||||
console.log("Bummer...");
|
||||
console.log("Failed to connect to MobileFirst Server");
|
||||
}); */
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
updateList() {
|
||||
|
||||
this.notificationsService.registerCallback(
|
||||
'despachos',
|
||||
() => {
|
||||
this.despachoRule.getList({ updateStore: true })
|
||||
}
|
||||
)
|
||||
/* this.notificationsService.registerCallback(
|
||||
'despachos',
|
||||
() => {
|
||||
this.despachoRule.getList({ updateStore: true })
|
||||
}
|
||||
) */
|
||||
|
||||
document.addEventListener('pause', function () {
|
||||
// console.log('App going to background');
|
||||
@@ -200,4 +163,50 @@ export class HomePage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async synchWhenOnline() {
|
||||
try {
|
||||
await this.storage.get('eventEdit').then((req) => {
|
||||
JSON.parse(req).forEach(element => {
|
||||
this.eventservice.editEvent(element, 2, 3).subscribe((res) => {
|
||||
this.storage.remove('eventEdit')
|
||||
this.sqliteservice.deleteEventTable();
|
||||
console.log('eventEdit synchnize', res)
|
||||
})
|
||||
});
|
||||
})
|
||||
} catch (error) {
|
||||
console.log('error synch eventedit')
|
||||
}
|
||||
|
||||
try {
|
||||
await this.storage.get('eventDelete').then((req) => {
|
||||
JSON.parse(req).forEach(element => {
|
||||
console.log('DELETE data SYNC', element)
|
||||
this.eventservice.deleteEvent(element.eventid, element.eventDeleteType, element.calendarName).subscribe((res) => {
|
||||
this.storage.remove('eventDelete')
|
||||
this.sqliteservice.deleteEventTable();
|
||||
console.log('eventDelete synchnize', res)
|
||||
})
|
||||
});
|
||||
})
|
||||
} catch (error) {
|
||||
console.log('error delete event synch')
|
||||
}
|
||||
|
||||
try {
|
||||
await this.storage.get('event-listRever').then((req) => {
|
||||
JSON.parse(req).forEach(element => {
|
||||
console.log('REVER data SYNC', element)
|
||||
this.processservice.PostTaskAction(element).subscribe((res) => {
|
||||
this.storage.remove('event-listRever')
|
||||
this.sqliteservice.deleteEventTable();
|
||||
console.log('event-listRever synchnize', res)
|
||||
})
|
||||
});
|
||||
})
|
||||
} catch (error) {
|
||||
console.log('error event-list rever synch')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
postMessage("I\'m working before postMessage(\'ali\').");
|
||||
/* postMessage("I\'m working before postMessage(\'ali\').");
|
||||
|
||||
onmessage = function(oEvent) {
|
||||
postMessage('Hi ' + oEvent.data);
|
||||
};
|
||||
}; */
|
||||
@@ -9,12 +9,13 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="hideThisFeature" class="ion-item-container-no-border">
|
||||
<ion-label class="attach-wrapper d-flex align-center" (click)="getDoc()">
|
||||
<ion-label class="attach-wrapper d-flex align-center cursor-pointer" (click)="getDoc()">
|
||||
<button class="btn-no-color">
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document pl-10">
|
||||
<div class="attach-document pl-10 ">
|
||||
<ion-label>Anexar Documentos</ion-label>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
@@ -60,7 +60,6 @@ float: left;
|
||||
float: right;
|
||||
overflow: auto;
|
||||
font-size: 25px;
|
||||
padding: 10px;
|
||||
}
|
||||
.list-people-title{
|
||||
/* font-size: 13px; */
|
||||
@@ -68,7 +67,7 @@ float: left;
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { AnimationController, ModalController, NavParams } from '@ionic/angular';
|
||||
import { SearchList } from 'src/app/models/search-document';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-add-note',
|
||||
@@ -18,6 +19,7 @@ export class AddNotePage implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private animationController: AnimationController,
|
||||
private navParams: NavParams,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.note = '';
|
||||
this.hideThisFeature = this.navParams.get('showAttachmentBtn');
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<ion-content class="container">
|
||||
<div class="arrow-right">
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" class="arrow-right-icon" src='assets/images/theme/gov/icons-calendar-arrow-right.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
width: 100% !important;
|
||||
}
|
||||
.btn-cancel:hover{
|
||||
background-color: #42b9fe;
|
||||
background-color: var(--button-hover);
|
||||
color: #fff !important;
|
||||
}
|
||||
.mobile-only{
|
||||
|
||||
@@ -9,6 +9,7 @@ import { ChatService } from 'src/app/services/chat.service';
|
||||
import { FileLoaderService } from 'src/app/services/file/file-loader.service';
|
||||
import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-chat-options-features',
|
||||
@@ -32,6 +33,7 @@ export class ChatOptionsFeaturesPage implements OnInit {
|
||||
private fileLoaderService: FileLoaderService,
|
||||
private fileToBase64Service: FileToBase64Service,
|
||||
private chatService: ChatService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
|
||||
this.members = this.navParams.get('members');
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
|
||||
<div class="ion-input-class-no-height cursor-pointer" (click)="addParticipants();" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
@@ -100,8 +100,9 @@
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people" (click)="addParticipants();">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<div class="add-people" >
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -112,7 +113,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height">
|
||||
<div class="ion-input-class-no-height cursor-pointer" (click)="addParticipantsCc();">
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
@@ -121,17 +122,19 @@
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people" (click)="addParticipantsCc();">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<div class="add-people" >
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ion-item-container-no-border" (click)="getDoc()">
|
||||
<div class="ion-item-container-no-border cursor-pointer" (click)="getDoc()">
|
||||
<ion-label class="d-flex align-center">
|
||||
<div class="attach-icon d-flex align-center">
|
||||
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document pl-10">
|
||||
<ion-label>Anexar Documentos</ion-label>
|
||||
|
||||
@@ -68,7 +68,8 @@
|
||||
float: right;
|
||||
overflow: auto;
|
||||
font-size: 25px;
|
||||
padding: 10px;
|
||||
height: 45px;
|
||||
display: flex;
|
||||
}
|
||||
.list-people-title{
|
||||
/* font-size: 13px; */
|
||||
@@ -76,7 +77,7 @@
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
}
|
||||
|
||||
.attach-title-item{
|
||||
|
||||
@@ -20,6 +20,8 @@ import { PermissionService } from 'src/app/services/worker/permission.service';
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service';
|
||||
import { PedidoService } from 'src/app/Rules/pedido.service'
|
||||
import { fullTask } from 'src/app/models/dailyworktask.model';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -97,7 +99,8 @@ export class CreateProcessPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
public p: PermissionService,
|
||||
private despachoService: DespachoService,
|
||||
private pedidoService: PedidoService
|
||||
private pedidoService: PedidoService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.loggeduser = userAuth.ValidatedUser;
|
||||
this.task = this.navParams.get('task');
|
||||
@@ -288,7 +291,7 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
this.modalController.dismiss();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
|
||||
} finally {
|
||||
loader.remove()
|
||||
@@ -316,10 +319,10 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService.successMessage('Pedido de Parecer enviado');
|
||||
this.toastService._successMessage('Pedido de Parecer enviado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -341,10 +344,10 @@ export class CreateProcessPage implements OnInit {
|
||||
await this.pedidoService.taskCompleteDeferimento({serialNumber:this.task.serialNumber}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService.successMessage('Pedido de Deferimento criado');
|
||||
this.toastService._successMessage('Pedido de Deferimento criado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -373,16 +376,16 @@ export class CreateProcessPage implements OnInit {
|
||||
await this.despachoService.CompleteTask({serialNumber: this.task.serialNumber}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService.successMessage('Despacho criado');
|
||||
this.toastService._successMessage('Despacho criado');
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
} finally {
|
||||
//loader.remove();
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.validateField = true;
|
||||
this.toastService.badRequest('Por favor adicione uma descrição');
|
||||
this.toastService._badRequest('Por favor adicione uma descrição');
|
||||
}
|
||||
loader.remove();
|
||||
break;
|
||||
@@ -408,10 +411,10 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService.successMessage('Pedido de Parecer criado');
|
||||
this.toastService._successMessage('Pedido de Parecer criado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -433,10 +436,10 @@ export class CreateProcessPage implements OnInit {
|
||||
await this.pedidoService.taskCompleteDeferimento({serialNumber:this.task.serialNumber}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService.successMessage('Pedido de Deferimento criado');
|
||||
this.toastService._successMessage('Pedido de Deferimento criado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -491,9 +494,9 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService.successMessage(message);
|
||||
this.toastService._successMessage(message);
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -15,9 +15,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ion-item-container-no-border" >
|
||||
<ion-label (click)="getDoc()" class="d-flex align-center">
|
||||
<ion-label (click)="getDoc()" class="d-flex align-center cursor-pointer">
|
||||
<div class="attach-icon d-flex align-center">
|
||||
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document pl-10">
|
||||
<ion-label>Anexar Documentos</ion-label>
|
||||
|
||||
@@ -72,7 +72,8 @@
|
||||
float: right;
|
||||
overflow: auto;
|
||||
font-size: 25px;
|
||||
padding: 10px;
|
||||
height: 45px;
|
||||
display: flex;
|
||||
}
|
||||
.list-people-title{
|
||||
/* font-size: 13px; */
|
||||
@@ -80,7 +81,7 @@
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
|
||||
@@ -4,6 +4,7 @@ import { SearchList } from 'src/app/models/search-document';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-dar-parecer',
|
||||
@@ -22,6 +23,7 @@ export class DarParecerPage implements OnInit {
|
||||
private navParams: NavParams,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.instanceId = this.navParams.get('ProcessInstanceID');
|
||||
@@ -67,9 +69,9 @@ export class DarParecerPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.modalController.dismiss();
|
||||
this.toastService.successMessage('Parecer enviado');
|
||||
this.toastService._successMessage('Parecer enviado');
|
||||
} catch (error) {
|
||||
this.toastService.badRequest("Parecer não solicitado");
|
||||
this.toastService._badRequest("Parecer não solicitado");
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<ion-content>
|
||||
<div class="main-content d-flex height-100">
|
||||
|
||||
<div class="content d-flex flex-column width-100">
|
||||
<div class="header-content pb-20">
|
||||
<div class="header-title">
|
||||
<label>Delegar</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overflow-y-auto">
|
||||
<div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
@@ -24,7 +23,8 @@
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people" (click)="addParticipants()">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -42,9 +42,10 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="hideThisFeature" class="ion-item-container-no-border">
|
||||
<ion-label (click)="getDoc()">
|
||||
<ion-label (click)="getDoc()" class="cursor-pointer">
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document">
|
||||
<ion-label>Anexar Documentos</ion-label>
|
||||
@@ -52,7 +53,7 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="content width-100 overflow-y-auto height-100">
|
||||
<div *ngIf="hideThisFeature" class="content width-100 overflow-y-auto height-100">
|
||||
<div class="list">
|
||||
<ion-list *ngFor="let document of documents; let i = index">
|
||||
<ion-item>
|
||||
|
||||
@@ -69,7 +69,8 @@
|
||||
float: right;
|
||||
overflow: auto;
|
||||
font-size: 25px;
|
||||
padding: 10px;
|
||||
height: 45px;
|
||||
display: flex;
|
||||
}
|
||||
.list-people-title{
|
||||
/* font-size: 13px; */
|
||||
@@ -77,7 +78,7 @@
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
|
||||
@@ -13,6 +13,8 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||
import { SearchList } from 'src/app/models/search-document';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-delegar',
|
||||
@@ -52,6 +54,7 @@ export class DelegarPage implements OnInit {
|
||||
private alertService: AlertService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.task = this.navParams.get('task');
|
||||
this.postData = new Event();
|
||||
@@ -85,16 +88,16 @@ export class DelegarPage implements OnInit {
|
||||
|
||||
async saveTask() {
|
||||
if(this.taskParticipants.length < 1){
|
||||
this.toastService.badRequest("Selecione um destinatário");
|
||||
this.toastService._badRequest("Selecione um destinatário");
|
||||
}
|
||||
else if(this.taskParticipants.length > 1){
|
||||
this.toastService.badRequest("Selecione apenas um destinatário");
|
||||
this.toastService._badRequest("Selecione apenas um destinatário");
|
||||
}
|
||||
else {
|
||||
let body = {
|
||||
"SerialNumber": this.task.SerialNumber,
|
||||
"DispatchDocId": this.task.DocId,
|
||||
"FolderID": this.task.FolderId,
|
||||
"FolderID": this.task.FolderId || this.task.FolderID,
|
||||
"Subject": this.task.Folio,
|
||||
"Comment": this.note,
|
||||
"DelegatedUserEmail": this.taskParticipants[0].EmailAddress,
|
||||
@@ -106,11 +109,11 @@ export class DelegarPage implements OnInit {
|
||||
this.processes.DelegateTask(body).subscribe(res=>{
|
||||
|
||||
console.log(res);
|
||||
this.toastService.successMessage('Processo delegado')
|
||||
this.toastService._successMessage('Processo delegado')
|
||||
this.close();
|
||||
},
|
||||
(error)=>{
|
||||
this.toastService.badRequest("Processo não delegado")
|
||||
this.toastService._badRequest("Processo não delegado")
|
||||
},
|
||||
()=>{
|
||||
loader.remove()
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
<ion-label class="title">{{LoadedDocument.Assunto}}</ion-label>
|
||||
</div>
|
||||
<div class="div-icon" (click)="openOptions()">
|
||||
<ion-icon class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
|
||||
<!-- <ion-icon class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -130,7 +130,7 @@ ion-button{
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
|
||||
@@ -11,6 +11,8 @@ import { PermissionService } from 'src/app/services/worker/permission.service';
|
||||
import { SearchedDocumentOptionsPage } from 'src/app/shared/popover/searched-document-options/searched-document-options.page';
|
||||
import { Location } from '@angular/common';
|
||||
import { ViewDocumentPage } from '../view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-document-detail',
|
||||
@@ -45,6 +47,7 @@ export class DocumentDetailPage implements OnInit {
|
||||
public p: PermissionService,
|
||||
private popoverController: PopoverController,
|
||||
private location: Location,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.docId = this.navParams.get('docId');
|
||||
this.applicationId = this.navParams.get('applicationId');
|
||||
|
||||
@@ -276,7 +276,8 @@
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people" >
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -297,7 +298,8 @@
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people" >
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -316,8 +318,9 @@
|
||||
|
||||
<div class="ion-item-container-no-border cursor-pointer" (click)="getDoc()">
|
||||
<ion-label>
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<div class="attach-icon cursor-pointer">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document">
|
||||
<ion-label>Anexar Documentos</ion-label>
|
||||
|
||||
@@ -66,7 +66,8 @@
|
||||
float: right;
|
||||
overflow: auto;
|
||||
font-size: 25px;
|
||||
padding: 10px;
|
||||
height: 45px;
|
||||
display: flex;
|
||||
}
|
||||
.list-people-title{
|
||||
/* font-size: 13px; */
|
||||
@@ -74,7 +75,7 @@
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
|
||||
@@ -17,6 +17,8 @@ import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-pick
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { EventService } from 'src/app/services/rules/event.service';
|
||||
import { EventPipe } from 'src/app/pipes/event.pipe';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -96,7 +98,8 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
authService: AuthService,
|
||||
private toastService: ToastService,
|
||||
private calendarService: EventsService,
|
||||
private eventService: EventService
|
||||
private eventService: EventService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
this.document = this.navParams.get('document')
|
||||
@@ -221,11 +224,11 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
|
||||
this.eventService.create({ body: postEvent, calendar: this.postData.CalendarName }).subscribe(async (respose) => {
|
||||
laoder.remove()
|
||||
this.toastService.successMessage('Reunião criada')
|
||||
this.toastService._successMessage('Reunião criada')
|
||||
this.modalController.dismiss()
|
||||
}, (error) => {
|
||||
laoder.remove()
|
||||
this.toastService.badRequest('Não foi possível marcar a reunião');
|
||||
this.toastService._badRequest('Não foi possível marcar a reunião');
|
||||
}, ()=>{
|
||||
laoder.remove()
|
||||
});
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
<div class="d-flex px-20 pt-20">
|
||||
<div class="cursor-pointer" (click)="close()">
|
||||
<ion-icon class="font-35" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
</div>
|
||||
|
||||
<div class="font-25">{{ fileName }}</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -19,7 +20,8 @@ export class DocumentViewerPage implements OnInit {
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private processes: ProcessesService) {
|
||||
public processes: ProcessesService,
|
||||
public ThemeService: ThemeService) {
|
||||
|
||||
this.task = this.navParams.get('task') || null;
|
||||
this.DocId = this.navParams.get('DocId');
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height">
|
||||
<div class="ion-input-class-no-height cursor-pointer" (click)="addParticipants()">
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
@@ -23,8 +23,9 @@
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people" (click)="addParticipants()">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<div class="add-people" >
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -41,16 +42,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div hidden class="ion-item-container-no-border">
|
||||
<ion-label>
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document">
|
||||
<ion-label>Anexar Documentos</ion-label>
|
||||
</div>
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="loadedAttachments">
|
||||
<ion-item>
|
||||
|
||||
@@ -69,7 +69,8 @@
|
||||
float: right;
|
||||
overflow: auto;
|
||||
font-size: 25px;
|
||||
padding: 10px;
|
||||
height: 45px;
|
||||
display: flex;
|
||||
}
|
||||
.list-people-title{
|
||||
/* font-size: 13px; */
|
||||
@@ -77,7 +78,7 @@
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
|
||||
@@ -15,6 +15,8 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { SearchList } from 'src/app/models/search-document';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-forward',
|
||||
@@ -53,6 +55,7 @@ export class ForwardPage implements OnInit {
|
||||
private alertService: AlertService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.task = this.navParams.get('task');
|
||||
this.postData = new Event();
|
||||
@@ -121,7 +124,7 @@ export class ForwardPage implements OnInit {
|
||||
}
|
||||
|
||||
if(this.taskParticipants.length < 1){
|
||||
this.toastService.badRequest("Selecione um destinatário");
|
||||
this.toastService._badRequest("Selecione um destinatário");
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -147,11 +150,11 @@ export class ForwardPage implements OnInit {
|
||||
console.log(body);
|
||||
this.processes.CompleteParecerPrTask(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.toastService.successMessage('Processo delegado');
|
||||
this.toastService._successMessage('Processo delegado');
|
||||
this.goBack();
|
||||
},
|
||||
(error)=>{
|
||||
this.toastService.badRequest("Processo não delegado")
|
||||
this.toastService._badRequest("Processo não delegado")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-close d-flex cursor-pointer" (click)="close()">
|
||||
<ion-icon class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-content overflow-y-auto width-100 height-100">
|
||||
@@ -21,9 +23,11 @@
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div >
|
||||
<div>
|
||||
<div class="d-flex align-center">
|
||||
<ion-icon class="profile-pic" src="assets/images/icons-default-profile.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="profile-pic" src="assets/images/icons-default-profile.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="profile-pic" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="profile-pic" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +37,7 @@
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" name="person"></ion-icon>
|
||||
<ion-icon slot="start" name="person" class="ion-icon-class-theme"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-input disabled placeholder="Nome" [(ngModel)]="SessionStore.user.FullName"></ion-input>
|
||||
@@ -44,22 +48,47 @@
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" name="mail"></ion-icon>
|
||||
<ion-icon slot="start" name="mail" class="ion-icon-class-theme"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-input disabled placeholder="Email" [(ngModel)]="SessionStore.user.Email"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="profile-title d-flex justify-space-between align-center width-100">
|
||||
<div class="d-flex align-center">
|
||||
<div>Tema</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="profile-title d-flex justify-space-between align-center width-100">
|
||||
<div class="d-flex align-center">
|
||||
<div class="btn-close d-flex cursor-pointer" (click)="changeTheme('gov')">
|
||||
<img style="width: 40px;" src="assets/images/theme/gov/governoangola_A.png">
|
||||
</div>
|
||||
|
||||
<div class="btn-close d-flex cursor-pointer pr-10" (click)="changeTheme('default')" >
|
||||
<img style="width: 40px;" src="assets/images/logo-removebg-preview.png"/>
|
||||
</div>
|
||||
|
||||
<div hidden class="btn-close d-flex cursor-pointer pr-10" (click)="changeTheme('tribunal')" >
|
||||
<img style="width: 40px;" src="assets/images/theme/tribunal/tribunal-constitucional-logo.png"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="login-preference width-100" *ngIf="!platform.is('desktop') && !platform.is('mobileweb')">
|
||||
<div class="preference">Preferência Login</div>
|
||||
|
||||
<ion-row>
|
||||
<ion-col class="align-center d-flex">
|
||||
<div class="d-flex align-center" (click)="LoginPreferenceMethod('Pin')">
|
||||
<ion-checkbox [checked]="SessionStore.user.LoginPreference=='Pin' " class="checkBox" ></ion-checkbox>
|
||||
<div class="d-flex align-center" (click)="LoginPreferenceMethod('Pin')">
|
||||
<ion-checkbox [checked]="SessionStore.user.LoginPreference=='Pin' " class="checkBox"></ion-checkbox>
|
||||
PIN
|
||||
</div>
|
||||
</ion-col>
|
||||
@@ -77,15 +106,15 @@
|
||||
<div class="d-flex justify-space-between">
|
||||
|
||||
<ion-buttons slot="start" (click)="close()">
|
||||
<button class="btn-cancel" fill="clear" color="#061b52" >
|
||||
<button class="btn-cancel" fill="clear" color="#061b52">
|
||||
<ion-label>Cancelar</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
<ion-buttons slot="end" (click)="close()">
|
||||
<button class="btn-ok" fill="clear" color="#fff" >
|
||||
<ion-label>Gravar</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</ion-buttons>
|
||||
<ion-buttons slot="end" (click)="close()">
|
||||
<button class="btn-ok" fill="clear" color="#fff">
|
||||
<ion-label>Gravar</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</div>
|
||||
|
||||
</ion-footer>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
}
|
||||
.profile-info{
|
||||
margin-top: 20px;
|
||||
color: #fff;
|
||||
color: black;
|
||||
font-family: Roboto;
|
||||
font-size: 13px;
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
padding-right: 10px;
|
||||
float: left;
|
||||
background-color: transparent;
|
||||
color: var(--profile-text-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,6 +96,10 @@
|
||||
border-color: transparent !important;
|
||||
}
|
||||
|
||||
.ion-icon-class-theme {
|
||||
color: var(--profile-text-color) ;
|
||||
}
|
||||
|
||||
.login-preference{
|
||||
margin-top: 15px;
|
||||
float: left;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AnimationController, ModalController } from '@ionic/angular';
|
||||
import { AnimationController, ModalController,Platform } from '@ionic/angular';
|
||||
import { FingerprintPage } from 'src/app/shared/fingerprint/fingerprint.page';
|
||||
import { PinPage } from 'src/app/shared/pin/pin.page';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-profile',
|
||||
@@ -19,6 +20,8 @@ export class EditProfilePage implements OnInit {
|
||||
constructor(private modalController:ModalController,
|
||||
private animationController: AnimationController,
|
||||
public platform: Platform,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService
|
||||
) {}
|
||||
|
||||
ngOnInit() {}
|
||||
@@ -113,5 +116,9 @@ export class EditProfilePage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
changeTheme(name) {
|
||||
this.ThemeService.setTheme(name)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-close d-flex cursor-pointer" (click)="close()">
|
||||
<ion-icon class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
@@ -55,8 +56,8 @@
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<p *ngIf = "item.Service == 'agenda'">{{item.Location}}</p>
|
||||
<h3 id="profile-title">{{item.alert}}</h3>
|
||||
<p *ngIf = "item.Service != 'agenda'">{{item.desc}}</p>
|
||||
<h3 id="profile-title">{{item.title}}</h3>
|
||||
<p id="profile-title" *ngIf = "item.Service != 'agenda'">{{item.body}}</p>
|
||||
</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>
|
||||
|
||||
@@ -1,55 +1,58 @@
|
||||
.profile-header{
|
||||
.profile-header {
|
||||
margin: 0 em(20px);
|
||||
// background-color: #0782c9;
|
||||
padding: 20px 20px;
|
||||
border: 0!important;
|
||||
border: 0 !important;
|
||||
|
||||
.div-logo{
|
||||
.div-logo {
|
||||
background: transparent;
|
||||
width: calc(100% - 40px) !important;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
float: left;
|
||||
|
||||
.logo{
|
||||
.logo {
|
||||
width: 140px;
|
||||
.img{
|
||||
.img {
|
||||
width: 100%;
|
||||
margin: 0px auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn-close{
|
||||
.btn-close {
|
||||
float: right !important;
|
||||
}
|
||||
.profile-content{
|
||||
padding: 20px 20px;
|
||||
.profile-content {
|
||||
padding: 20px 20px;
|
||||
//color: var(--profile-text-color) !important;
|
||||
}
|
||||
|
||||
.icon{
|
||||
font-size: 40px;
|
||||
.icon {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.profile-title{
|
||||
.profile-title {
|
||||
font-weight: 300;
|
||||
font-size: 20px !important;
|
||||
margin-bottom: 40px !important;
|
||||
color: var(--profile-text-color) !important;
|
||||
}
|
||||
|
||||
.line{
|
||||
.line {
|
||||
width: 100% !important;
|
||||
margin-top: 15px;
|
||||
border-top: 1px solid #d8d8d8;
|
||||
color: var(--profile-title-color-RoleDescription) !important;
|
||||
}
|
||||
|
||||
.btn-delete{
|
||||
background:#ffe0e0 !important;
|
||||
.btn-delete {
|
||||
background: #ffe0e0 !important;
|
||||
width: 40% !important;
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
.btn-cancel{
|
||||
.btn-cancel {
|
||||
width: 40% !important;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
@@ -58,14 +61,13 @@
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
ion-list{
|
||||
ion-list {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
|
||||
.notifications-content{
|
||||
.notifications-content {
|
||||
padding: 0px 20px;
|
||||
.item{
|
||||
.item {
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
|
||||
border: solid 1px #e9e9e9;
|
||||
@@ -76,37 +78,38 @@ ion-list{
|
||||
color: #000;
|
||||
overflow: hidden;
|
||||
|
||||
.notification-item{
|
||||
.notification-item {
|
||||
width: fit-content;
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
padding: 0 !important;
|
||||
overflow: auto;
|
||||
|
||||
|
||||
}
|
||||
.notification-icon{
|
||||
.notification-icon {
|
||||
font-size: 35px !important;
|
||||
}
|
||||
.approve-event-time{
|
||||
.approve-event-time {
|
||||
width: fit-content !important;
|
||||
float: left;
|
||||
}
|
||||
.approve-event-detail{
|
||||
.approve-event-detail {
|
||||
width: calc(100% - 115px) !important;
|
||||
float: left;
|
||||
#profile-title{
|
||||
#profile-title {
|
||||
width: 250px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
.notification-label-MD-official{
|
||||
.notification-label-MD-official {
|
||||
float: right;
|
||||
width: 5px;
|
||||
height: 100%;
|
||||
border-radius: 0% 100% 100% 0%;
|
||||
background-color: #ffb703;
|
||||
}
|
||||
.notification-label-MD-pessoal{
|
||||
.notification-label-MD-pessoal {
|
||||
float: right;
|
||||
width: 5px;
|
||||
height: 100%;
|
||||
@@ -114,21 +117,19 @@ ion-list{
|
||||
background-color: #ff0303;
|
||||
}
|
||||
|
||||
.item-conten{
|
||||
.item-conten {
|
||||
border-right: 5px solid var(--notificationtypeagenda);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.notification-label-PR-official{
|
||||
.notification-label-PR-official {
|
||||
float: right;
|
||||
width: 5px;
|
||||
height: 100%;
|
||||
border-radius: 0% 100% 100% 0%;
|
||||
background-color: #03d838;
|
||||
}
|
||||
.notification-label-PR-pessoal{
|
||||
.notification-label-PR-pessoal {
|
||||
float: right;
|
||||
width: 5px;
|
||||
height: 100%;
|
||||
@@ -136,8 +137,7 @@ ion-list{
|
||||
background-color: #8b0ae0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.item-inner{
|
||||
.item-inner {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
///<reference path="../../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
|
||||
///<reference path="../../../../plugins/cordova-plugin-mfp-jsonstore/typings/jsonstore.d.ts" />
|
||||
import { Component, OnInit, NgZone } from '@angular/core';
|
||||
import { Router, NavigationExtras } from '@angular/router';
|
||||
import { AnimationController, ModalController,Platform } from '@ionic/angular';
|
||||
import { AnimationController, ModalController, Platform } from '@ionic/angular';
|
||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { LocalstoreService } from 'src/app/store/localstore.service';
|
||||
import { EditProfilePage } from './edit-profile/edit-profile.page';
|
||||
import { JsonStore } from '../../services/jsonStore.service';
|
||||
import { StorageService } from '../../services/storage.service';
|
||||
import { NotificationsService } from '../../services/notifications.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { EventTrigger } from '../../services/eventTrigger.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-profile',
|
||||
@@ -30,7 +28,7 @@ export class ProfilePage implements OnInit {
|
||||
typeagenda2: "pessoal";
|
||||
pr: "100000014";
|
||||
md: "100000011";
|
||||
date:"60:20";
|
||||
date: "60:20";
|
||||
location: "Gabinete";
|
||||
|
||||
constructor(private modalController: ModalController,
|
||||
@@ -38,13 +36,12 @@ export class ProfilePage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private router: Router,
|
||||
private localstoreService: LocalstoreService,
|
||||
private jsonstore: JsonStore,
|
||||
private storageservice: StorageService,
|
||||
private zone: NgZone,
|
||||
private notificationservice: NotificationsService,
|
||||
private platform: Platform,
|
||||
private notificationsService: NotificationsService,
|
||||
private eventtrigger: EventTrigger
|
||||
private eventtrigger: EventTrigger,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
@@ -61,14 +58,14 @@ export class ProfilePage implements OnInit {
|
||||
this.getNotificationData();
|
||||
}
|
||||
|
||||
this.notificationsService.registerCallback(
|
||||
'any',
|
||||
() => {
|
||||
setTimeout(()=>{
|
||||
this.getNotificationData();
|
||||
}, 100)
|
||||
}
|
||||
)
|
||||
/* this.notificationsService.registerCallback(
|
||||
'any',
|
||||
() => {
|
||||
setTimeout(()=>{
|
||||
this.getNotificationData();
|
||||
}, 100)
|
||||
}
|
||||
) */
|
||||
|
||||
}
|
||||
|
||||
@@ -79,58 +76,49 @@ export class ProfilePage implements OnInit {
|
||||
|
||||
notImplemented() { }
|
||||
|
||||
asyncNotification(){}
|
||||
asyncNotification() { }
|
||||
|
||||
async getNotificationData() {
|
||||
this.storageservice.get("Notifications").then((value) => {
|
||||
console.log("Init get store", value)
|
||||
|
||||
/* var data = JSON.parse(value); */
|
||||
console.log("Init store parse", value)
|
||||
if(typeof(value) == 'string') {
|
||||
value = JSON.parse(value)
|
||||
console.log("CSDfdvdf",value)
|
||||
}
|
||||
|
||||
this.DataArray = []
|
||||
value.forEach((element,i) => {
|
||||
console.log("ARaaAA", element)
|
||||
value.forEach((element, i) => {
|
||||
let notificationObject;
|
||||
if(element.payload){
|
||||
var payload = JSON.parse(element.payload)
|
||||
if (element.data) {
|
||||
console.log("ARaaAA", element)
|
||||
notificationObject = {
|
||||
index: i,
|
||||
alert: element.alert,
|
||||
Service: payload.Service,
|
||||
Object: payload.Object,
|
||||
IdObject: payload.IdObject,
|
||||
FolderId: payload.FolderId,
|
||||
desc: payload.desc,
|
||||
dateInit: this.getFormatedTime(payload.dateInit),
|
||||
dateEnd: this.getFormatedTime(payload.dateEnd),
|
||||
Location: payload.Location,
|
||||
TypeAgenda: payload.TypeAgenda,
|
||||
Role: payload.Role,
|
||||
Status: payload.Status
|
||||
title: element.title,
|
||||
Service: element.data.Service,
|
||||
Object: element.data.Object,
|
||||
IdObject: element.data.IdObject,
|
||||
FolderId: element.data.FolderId,
|
||||
body: element.body,
|
||||
dateInit: this.getFormatedTime(element.data.dateInit),
|
||||
dateEnd: this.getFormatedTime(element.data.dateEnd),
|
||||
Location: element.data.Location,
|
||||
TypeAgenda: element.data.TypeAgenda,
|
||||
Role: element.data.Role,
|
||||
Status: element.data.Status
|
||||
}
|
||||
} else {
|
||||
notificationObject = {
|
||||
index: i,
|
||||
alert: element.alert,
|
||||
Service: element.Service,
|
||||
Object: element.Object,
|
||||
IdObject: element.IdObject,
|
||||
FolderId: element.FolderId,
|
||||
desc: element.desc,
|
||||
dateInit: element.dateInit,
|
||||
dateEnd: element.dateEnd,
|
||||
IdObject: element.IdObject,
|
||||
Location: element.Location,
|
||||
TypeAgenda: element.TypeAgenda,
|
||||
Object: element.Object,
|
||||
Role: element.Role,
|
||||
Status: element.Status
|
||||
Service: element.Service,
|
||||
Status: element.Status,
|
||||
TypeAgenda: element.TypeAgenda,
|
||||
body: element.body,
|
||||
dateEnd: element.dateEnd,
|
||||
dateInit: element.dateInit,
|
||||
index: element.index,
|
||||
title: element.title
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.DataArray.push(notificationObject)
|
||||
});
|
||||
@@ -144,20 +132,20 @@ export class ProfilePage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
getFormatedTime(dateString){
|
||||
getFormatedTime(dateString) {
|
||||
var date = new Date(dateString);
|
||||
var hours = date.getHours() > 12 ? date.getHours() - 12 : date.getHours();
|
||||
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)
|
||||
console.log('Formate', time)
|
||||
return time;
|
||||
}
|
||||
}
|
||||
|
||||
notificatinsRoutes = (index, Service, Object, IdObject, FolderId) => {
|
||||
|
||||
if (Service === "agenda" && IdObject.length > 10) {
|
||||
console.log("Id Lenght",IdObject.length)
|
||||
console.log("Id Lenght", IdObject.length)
|
||||
this.zone.run(() => this.router.navigate(['/home/agenda', IdObject, 'agenda']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "expediente") {
|
||||
@@ -165,8 +153,8 @@ export class ProfilePage implements OnInit {
|
||||
}
|
||||
else if (Service === "agenda" && Object === "event-list") {
|
||||
//this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda']));
|
||||
this.zone.run(() =>this.router.navigate(['/home/agenda/event-list/approve-event',IdObject, 'agenda']));
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', IdObject, 'agenda']));
|
||||
|
||||
} else if (Service === "gabinete-digital" && Object === "despachos") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', IdObject, 'gabinete-digital'], { replaceUrl: true }));
|
||||
@@ -181,7 +169,7 @@ export class ProfilePage implements OnInit {
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "despachos-pr") {
|
||||
|
||||
this.zone.run(() =>this.router.navigate(['/home/gabinete-digital/despachos-pr',IdObject,'gabinete-digital']));
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos-pr', IdObject, 'gabinete-digital']));
|
||||
}
|
||||
else if (Service === "accoes" && Object === "accao") {
|
||||
this.zone.run(() => this.router.navigate(['/home/publications', IdObject]));
|
||||
@@ -193,8 +181,8 @@ export class ProfilePage implements OnInit {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas', IdObject, 'gabinete-digital']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "diplomas-assinar") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar',IdObject,'gabinete-digital']));
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar', IdObject, 'gabinete-digital']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "expedientes-pr") {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', IdObject, 'gabinete-digital']));
|
||||
@@ -210,13 +198,13 @@ export class ProfilePage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
deleteNotification(index){
|
||||
deleteNotification(index) {
|
||||
console.log("Delete notification first stata", this.notificationdata)
|
||||
this.notificationdata = this.notificationdata.filter(item=>item.index !=index );
|
||||
|
||||
this.storageservice.store("Notifications",JSON.stringify(this.notificationdata)).then(() =>{
|
||||
this.storageservice.get("Notifications").then((value) =>{
|
||||
console.log("notfication state", value, )
|
||||
this.notificationdata = this.notificationdata.filter(item => item.index != index);
|
||||
|
||||
this.storageservice.store("Notifications", JSON.stringify(this.notificationdata)).then(() => {
|
||||
this.storageservice.get("Notifications").then((value) => {
|
||||
console.log("notfication state", value,)
|
||||
});
|
||||
});
|
||||
console.log("Delete notification last stata", this.notificationdata)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<ion-toolbar class="d-flex">
|
||||
<div class="d-flex align-items-center px-20 pt-20 font-25">
|
||||
<div class="left cursor-pointer" (click)="close()">
|
||||
<fa-icon icon="chevron-left" class="menu-icon"></fa-icon>
|
||||
<fa-icon icon="chevron-left" class="menu-icon font-awesome-1"></fa-icon>
|
||||
</div>
|
||||
|
||||
<div class="middle add-ellipsis">
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
|
||||
<div class="right cursor-pointer" (click)="openOptions()">
|
||||
<fa-icon icon="ellipsis-v" class="menu-icon"></fa-icon>
|
||||
<fa-icon icon="ellipsis-v" class="menu-icon font-awesome-1"></fa-icon>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export class Token {
|
||||
export class Tokenn {
|
||||
UserId: number;
|
||||
TokenId: string;
|
||||
Status: number;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<!-- Calendar is here -->
|
||||
|
||||
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="loggeduser.Profile =='PR'">
|
||||
<div class="calendar-container" [style.height]="calendarHeight">
|
||||
<div class="calendar-container" [style.height]="calendarHeight ">
|
||||
|
||||
<ion-row class="ion-justify-content-between calendar-tool-tip">
|
||||
<ion-row class="ion-align-items-center">
|
||||
@@ -30,7 +30,9 @@
|
||||
|
||||
<div class="arrow cursor-pointer">
|
||||
<button (click)="back()" class="btn-no-color" >
|
||||
<ion-icon slot="icon-only" src="assets/images/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
@@ -39,8 +41,10 @@
|
||||
<h2 class="capitaliseText d-flex align-center">
|
||||
{{ viewTitle }}
|
||||
|
||||
<div class="cursor-pointer" (click)="dropdownScrollWeal = true; onDropDownScrollWeal()">
|
||||
<ion-icon style="font-size: 19pt;" src="assets/images/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
<div (click)="dropdownScrollWeal = true; onDropDownScrollWeal()" class="cursor-pointer">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " style="font-size: 19pt;" src="assets/images/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
</div>
|
||||
|
||||
</h2>
|
||||
@@ -99,7 +103,9 @@
|
||||
</div> -->
|
||||
<!-- Move forward one screen of the slides -->
|
||||
<div (click)="next()" class="arrow cursor-pointer">
|
||||
<ion-icon slot="icon-only" src="assets/images/icons-calendar-arrow-right.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-right.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-right.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-right.svg"></ion-icon>
|
||||
</div>
|
||||
|
||||
</ion-row>
|
||||
@@ -113,12 +119,16 @@
|
||||
<ion-icon class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<button class="btn-no-color" (click)="viewEventsToApprove()" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<ion-icon class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
|
||||
<button class="btn-no-color cursor-pointer" (click)="viewEventsToApprove()" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="right-icons" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons" src="assets/images/theme/tribunal/icons-received-event.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<button class="btn-no-color cy-add-event" (click)="clearContact();openAddEvent();">
|
||||
<ion-icon class="right-icons" src="assets/images/icons-add-new-event.svg" ></ion-icon>
|
||||
<button class="btn-no-color cy-add-event cursor-pointer" (click)="clearContact();openAddEvent();">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="right-icons" src="assets/images/theme/gov/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons" src="assets/images/theme/tribunal/icons-add.svg" ></ion-icon>
|
||||
</button>
|
||||
|
||||
</ion-row>
|
||||
@@ -180,10 +190,14 @@
|
||||
<ion-row class="timeline-header pb-0 ion-justify-content-between ion-align-items-center currente-date-timelien">
|
||||
<ion-row class="timeline-date align-center">
|
||||
<button class="btn-no-color" *ngIf="showCalendar" (click)="calendarHeight='75px';showCalendar=false">
|
||||
<ion-icon class="collaps btn-no-color" src="assets/images/icons-collaps-up.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps btn-no-color" src="assets/images/icons-collaps-up.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps btn-no-color" src="assets/images/theme/gov/icons-collaps-up.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="collaps btn-no-color" src="assets/images/theme/tribunal/icons-collaps-up.svg" ></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color" *ngIf="!showCalendar" (click)="calendarHeight='320px';showCalendar=true">
|
||||
<ion-icon class="collaps btn-no-color" src="assets/images/icons-collaps-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps btn-no-color" src="assets/images/icons-collaps-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps btn-no-color" src="assets/images/theme/gov/icons-collaps-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="collaps btn-no-color" src="assets/images/theme/tribunal/icons-collaps-down.svg" ></ion-icon>
|
||||
</button >
|
||||
|
||||
|
||||
@@ -195,7 +209,9 @@
|
||||
<div class="filter-name">{{timelineFilterState}}</div>
|
||||
<!-- Icon -->
|
||||
<button (click)="showTimelineFilterState=!showTimelineFilterState" class="arrow-down btn-no-color">
|
||||
<ion-icon src="assets/images/icons-arrow-arrow-down.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " style="font-size: 19pt;" src="assets/images/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
</button>
|
||||
|
||||
<!-- List -->
|
||||
@@ -323,7 +339,7 @@
|
||||
|
||||
<div *ngFor="let event of events.value" class="EventListBox" >
|
||||
|
||||
<div class="d-flex content-pr-{{event.event.CalendarName}} mt-10 cursor-pointer item hover" (click)="eventClicked(event)">
|
||||
<div class="d-flex content-pr-{{event.event.CalendarName}} mt-10 cursor-pointer item-hover" (click)="eventClicked(event)">
|
||||
|
||||
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
|
||||
<div *ngIf="!event.endMany && !event.middle" class="time-start">{{event.event.StartDate | date: 'HH:mm'}}</div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
.monthview-current{
|
||||
/* background-color: red; */
|
||||
border-bottom: 1px solid lightskyblue !important;
|
||||
border-bottom: 1px solid rgb(158, 250, 135) !important;
|
||||
}
|
||||
.monthview-selected {
|
||||
/* background-color: lightskyblue !important; */
|
||||
@@ -255,7 +255,7 @@ td.monthview-primary-with-event {
|
||||
.div-top-header{
|
||||
width: 400px;
|
||||
margin: 0 auto;
|
||||
background-color: #0782c9;
|
||||
background-color: #07c941;
|
||||
padding-top: 15px;
|
||||
border: 0!important;
|
||||
|
||||
@@ -284,8 +284,6 @@ td.monthview-primary-with-event {
|
||||
height: 100%;
|
||||
font-family: Roboto;
|
||||
margin: 0 auto;
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
background-color: #fff;
|
||||
overflow:auto;
|
||||
/* padding: 25px 20px 0 20px; */
|
||||
@@ -395,6 +393,7 @@ td.monthview-primary-with-event {
|
||||
|
||||
|
||||
.currente-date-timelien{
|
||||
cursor: pointer;
|
||||
padding: 10px 20px;
|
||||
.timeline-date{
|
||||
font-size: 15px;
|
||||
@@ -409,10 +408,10 @@ td.monthview-primary-with-event {
|
||||
font-weight: normal;
|
||||
ion-icon{
|
||||
font-size: 35px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
}
|
||||
.filter-name{
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
font-family: Roboto;
|
||||
font-size: 15px;
|
||||
margin-right: 25px;
|
||||
@@ -437,7 +436,12 @@ td.monthview-primary-with-event {
|
||||
font-weight: normal;
|
||||
}
|
||||
li.active{
|
||||
background-color: rgba(66, 185, 254, 0.1);
|
||||
background-color: var(--mat-selected) !important;
|
||||
color: white;
|
||||
}
|
||||
li:hover:not(.active){
|
||||
background-color: var(--mat-selected-hover);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -512,7 +516,7 @@ td.monthview-primary-with-event {
|
||||
font-family: Roboto;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
}
|
||||
|
||||
.description p{
|
||||
@@ -572,12 +576,6 @@ td.monthview-primary-with-event {
|
||||
|
||||
}
|
||||
|
||||
.calendar-timeline{
|
||||
|
||||
height: 100%;
|
||||
background-color: white;
|
||||
border-top-left-radius: 25px;
|
||||
}
|
||||
|
||||
.calendar-border{
|
||||
background: #ebebeb;
|
||||
@@ -602,7 +600,7 @@ td.monthview-primary-with-event {
|
||||
overflow: hidden;
|
||||
|
||||
.calendar-timeline{
|
||||
border-top-right-radius: 24px;
|
||||
border-top-right-radius: 0px;
|
||||
width: calc(100%);
|
||||
overflow: hidden;
|
||||
|
||||
@@ -618,11 +616,6 @@ td.monthview-primary-with-event {
|
||||
}
|
||||
}
|
||||
|
||||
.event-details{
|
||||
width: 40%;
|
||||
background: white;
|
||||
border-top-right-radius: 25px;
|
||||
}
|
||||
|
||||
|
||||
.event-details{
|
||||
@@ -636,6 +629,7 @@ td.monthview-primary-with-event {
|
||||
|
||||
.calendar-timeline{
|
||||
border-top-right-radius: 0px;
|
||||
border-top-left-radius: 25px;
|
||||
width: calc(100% - 40%);
|
||||
border-right: 1px solid #d8d8d8;
|
||||
|
||||
@@ -751,13 +745,13 @@ app-approve-event{
|
||||
}
|
||||
|
||||
li.active {
|
||||
background-color: #42b9fe !important;
|
||||
background-color: var(--mat-selected) !important;
|
||||
color: white;
|
||||
}
|
||||
|
||||
li:hover{
|
||||
cursor: pointer;
|
||||
background-color: #e6f6ff75 ;
|
||||
background-color: var(--mat-selected-hover) ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -769,4 +763,35 @@ app-approve-event{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1225px) {
|
||||
.calendar-timeline{
|
||||
|
||||
height: 100%;
|
||||
background-color: white;
|
||||
border-top-left-radius: 25px;
|
||||
}
|
||||
.event-details{
|
||||
width: 40%;
|
||||
background: white;
|
||||
border-top-right-radius: 0px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 321px) {
|
||||
|
||||
.calendar-timeline{
|
||||
|
||||
height: 100%;
|
||||
background-color: white;
|
||||
border-top-left-radius: 0px;
|
||||
}
|
||||
.event-details{
|
||||
width: 40%;
|
||||
background: white;
|
||||
border-top-right-radius: 25px;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -31,6 +31,7 @@ import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -176,7 +177,8 @@ export class AgendaPage implements OnInit {
|
||||
private changeProfileService: ChangeProfileService,
|
||||
private sqliteservice: SqliteService,
|
||||
private platform: Platform,
|
||||
private backgroundservice: BackgroundService
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
|
||||
this.dateAdapter.setLocale('es');
|
||||
@@ -733,6 +735,7 @@ export class AgendaPage implements OnInit {
|
||||
Profile: profile
|
||||
}
|
||||
this.sqliteservice.addEvent(event)
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -949,7 +952,7 @@ export class AgendaPage implements OnInit {
|
||||
// });
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
// this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
}
|
||||
|
||||
this.cloneAllmobileComponent();
|
||||
@@ -1144,6 +1147,7 @@ export class AgendaPage implements OnInit {
|
||||
async closeComponentEditEventOrAdd() {
|
||||
|
||||
if (this.IsEvent = 'edit') {
|
||||
// this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
this.eventClicked(this.viewingEventObject);
|
||||
} else if (this.IsEvent = 'add') {
|
||||
this.cloneAllmobileComponent();
|
||||
|
||||
@@ -205,7 +205,8 @@
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -226,7 +227,8 @@
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -248,7 +250,8 @@
|
||||
<div class="d-flex container-div width-100 ion-item-container-no-border" >
|
||||
<ion-label (click)="getDoc()" class="cursor-pointer">
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document">
|
||||
<ion-label>Adicionar documentos</ion-label>
|
||||
@@ -272,7 +275,6 @@
|
||||
<span class="app-name span-left" *ngIf="document.ApplicationId == 386"> Acções Presidenciais </span>
|
||||
<span class="app-name span-left" *ngIf="document.ApplicationId == 361 "> Arquivo Despacho Electrónico </span>
|
||||
|
||||
<!-- <span class="span-right" *ngIf="document.CreateDate"> {{document.CreateDate | date: 'dd-MM-yyyy HH:mm'}} </span> -->
|
||||
</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
@@ -83,7 +83,8 @@
|
||||
float: right;
|
||||
overflow: auto;
|
||||
font-size: 25px;
|
||||
padding: 10px;
|
||||
height: 45px;
|
||||
display: flex;
|
||||
}
|
||||
.list-people-title{
|
||||
/* font-size: 13px; */
|
||||
@@ -91,7 +92,7 @@
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);;
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
@@ -104,7 +105,7 @@
|
||||
.attach-title-item{
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
color:#0d89d1;
|
||||
color:var(--title-text-color);
|
||||
|
||||
}
|
||||
/* SPAN */
|
||||
|
||||
@@ -11,6 +11,8 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Event } from '../../../models/event.model';
|
||||
import { AttendeesPageModal } from '../../events/attendees/attendees.page';
|
||||
import { SearchPage } from '../../search/search.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-event',
|
||||
@@ -56,6 +58,7 @@ export class EditEventPage implements OnInit {
|
||||
private attachmentsService: AttachmentsService,
|
||||
private toastService: ToastService,
|
||||
private router: Router,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
|
||||
this.postEvent = new Event();
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<div class="header-content">
|
||||
<div hidden class="header-icon-left">
|
||||
<button class="btn-no-color cursor-pointer" (click)="close()">
|
||||
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
<div class="header-title">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-emend-message-modal',
|
||||
@@ -11,6 +12,7 @@ export class EmendMessageModalPage implements OnInit {
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.emendMessage = '';
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<ion-content class="wrapper">
|
||||
<div class="arrow-right" (click)="closePopover()">
|
||||
<button class="btn-no-color">
|
||||
<ion-icon slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" class="arrow-right-icon" src='assets/images/theme/gov/icons-calendar-arrow-right.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
|
||||
@@ -8,6 +8,7 @@ import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.p
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { EmendMessageModalPage } from '../emend-message-modal/emend-message-modal.page';
|
||||
import { Location } from '@angular/common';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-actions-popover',
|
||||
@@ -26,7 +27,8 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
private popoverController: PopoverController,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private location: Location) {
|
||||
private location: Location,
|
||||
public ThemeService: ThemeService) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.instanceId = this.navParams.get('InstanceId');
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
|
||||
<div class="ion-input-class-no-height cursor-pointer" (click)="addParticipants()" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
@@ -208,8 +208,9 @@
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div (click)="addParticipants()" class="add-people cursor-pointer">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<div class="add-people cursor-pointer">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -220,7 +221,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height">
|
||||
<div class="ion-input-class-no-height cursor-pointer" (click)="addParticipantsCC()">
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
@@ -235,8 +236,9 @@
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div (click)="addParticipantsCC()" class="add-people cursor-pointer">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<div class="add-people cursor-pointer">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -258,7 +260,8 @@
|
||||
<div class="ion-item-container-no-border cursor-pointer" (click)="getDoc()">
|
||||
<ion-label>
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document">
|
||||
<ion-label>Adicionar documentos</ion-label>
|
||||
|
||||
@@ -100,7 +100,8 @@ ion-content{
|
||||
float: right;
|
||||
overflow: auto;
|
||||
font-size: 25px;
|
||||
padding: 10px;
|
||||
height: 45px;
|
||||
display: flex;
|
||||
}
|
||||
.list-people-title{
|
||||
/* font-size: 13px; */
|
||||
@@ -108,7 +109,7 @@ ion-content{
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
@@ -121,7 +122,7 @@ ion-content{
|
||||
.attach-title-item{
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
color:#0d89d1;
|
||||
color:var(--title-text-color);
|
||||
}
|
||||
/* SPAN */
|
||||
.span-left{
|
||||
|
||||
@@ -15,6 +15,7 @@ import { SearchPage } from '../../search/search.page';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { EventRecurrence } from 'src/app/models/agenda/eventrecurrence.model';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -67,6 +68,7 @@ export class NewEventPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
userService: AuthService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.loggeduser = userService.ValidatedUser;
|
||||
this.postEvent = new Event();
|
||||
@@ -279,12 +281,12 @@ export class NewEventPage implements OnInit {
|
||||
});
|
||||
|
||||
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
this.modalController.dismiss(this.postEvent);
|
||||
|
||||
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
<div class="title-content d-flex justify-between width-100">
|
||||
<div class="left">
|
||||
<button class="btn-no-color d-flex align-center" (click)="goBack()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="middle">
|
||||
@@ -23,7 +24,8 @@
|
||||
</div>
|
||||
<div class="menu-options d-flex">
|
||||
<button class="btn-no-color" (click)="editEvent()">
|
||||
<ion-icon class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color" (click)="deleteEvent()">
|
||||
<ion-icon class="delete" name="trash-sharp"></ion-icon>
|
||||
@@ -97,7 +99,8 @@
|
||||
</div>
|
||||
|
||||
<div (click)="docIndex(i);LoadDocumentDetails()" class="cursor-pointer" style="width: 35px; height: 41px;" autoHide="false">
|
||||
<ion-icon src="assets/images/icons-menu.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg" ></ion-icon>
|
||||
</div>
|
||||
|
||||
</ion-label>
|
||||
|
||||
@@ -185,7 +185,7 @@ ion-menu{
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
@@ -198,7 +198,7 @@ ion-menu{
|
||||
.attach-title-item{
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
color:#0d89d1;
|
||||
color:var(--title-text-color);
|
||||
}
|
||||
/* SPAN */
|
||||
.span-left{
|
||||
|
||||
@@ -19,6 +19,8 @@ import { ExpedientTaskModalPage } from '../../gabinete-digital/expediente/expedi
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -68,7 +70,8 @@ export class ViewEventPage implements OnInit {
|
||||
public platform: Platform,
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
private storage: StorageService
|
||||
private storage: StorageService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.isEventEdited = false;
|
||||
this.loadedEvent = new Event();
|
||||
@@ -168,9 +171,9 @@ export class ViewEventPage implements OnInit {
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
|
||||
console.log('errorstatus',error.status)
|
||||
console.log('errorstatus ss',error.status)
|
||||
|
||||
if (error.status == 0) {
|
||||
if (error.status === 0) {
|
||||
this.getFromDb();
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
@@ -202,6 +205,8 @@ export class ViewEventPage implements OnInit {
|
||||
() => {
|
||||
loader.remove();
|
||||
});
|
||||
|
||||
loader.remove();
|
||||
}
|
||||
|
||||
|
||||
@@ -418,8 +423,9 @@ export class ViewEventPage implements OnInit {
|
||||
const loader = this.toastService.loading();
|
||||
this.sqliteservice.getEventById(this.eventId).then((event) => {
|
||||
let arrayevent = [];
|
||||
console.log('EVENT ATTENDEES',event[0].Attendees)
|
||||
let elemet = {
|
||||
Attendees: JSON.parse(event[0].Attendees) || "",
|
||||
Attendees: (typeof JSON.parse(event[0].Attendees) === 'undefined') ? "" : JSON.parse(event[0].Attendees),
|
||||
Body: JSON.parse(event[0].Body) || "",
|
||||
CalendarId: event[0].CalendarId,
|
||||
CalendarName: event[0].CalendarName,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="main-content d-flex height-100">
|
||||
<div class="main-content d-flex height-100 border-t-radius">
|
||||
<!-- Aside left -->
|
||||
<div class="aside-wrapper d-flex flex-column flex-grow-1">
|
||||
<!-- <p class="text-center mt-0 aside-title px-20">Chat</p> -->
|
||||
@@ -18,13 +18,15 @@
|
||||
</div>
|
||||
<div class="div-icon">
|
||||
<button class="btn-no-color" (click)="openContactsPage()">
|
||||
<ion-icon slot="end" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-conversation.svg"></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color" (click)="openNewGroupPage()">
|
||||
<ion-icon slot="end" src="assets/images/icons-chat-new-group.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-group.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-group.svg" ></ion-icon>
|
||||
</button>
|
||||
<button *ngIf="hideRefreshBtn" class="btn-no-color" (click)="refreshing()">
|
||||
<ion-icon class="title-icon" name="reload-circle"></ion-icon>
|
||||
<ion-icon class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,11 +48,13 @@
|
||||
*ngFor="let dm of userDirectMessages"
|
||||
[class.item-active]="dm._id == idSelected">
|
||||
<div class="item-icon">
|
||||
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && dm._id != idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-chat-40.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && dm._id == idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-chat-40-hover.svg"></ion-icon>
|
||||
</div>
|
||||
<div [class.highlight]="dm._id =='cjFv5XfreKz5j3fWW'"
|
||||
(click)="openMessagesPage(dm._id)"
|
||||
class="item-content flex-grow-1"><!-- (click)="openMessages(dm)" -->
|
||||
class="item-content flex-grow-1 cursor-pointer"><!-- (click)="openMessages(dm)" -->
|
||||
<div class="item-title-time">
|
||||
<div class="item-title" [class.item-title-active]="dm._id == idSelected">
|
||||
<ion-label *ngFor="let user of dm.uids">
|
||||
@@ -88,15 +92,22 @@
|
||||
[class.item-active]="group._id ==idSelected"
|
||||
class="item item-hover d-flex">
|
||||
<div class="item-icon">
|
||||
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon>
|
||||
<!-- <ion-icon class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon> -->
|
||||
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && group._id != idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-group-chat-40.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && group._id == idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-group-chat-40-hover.svg"></ion-icon>
|
||||
|
||||
|
||||
</div>
|
||||
<div
|
||||
(click)="openGroupMessagesPage(group._id)" class="item-content flex-grow-1">
|
||||
(click)="openGroupMessagesPage(group._id)" class="item-content flex-grow-1 cursor-pointer">
|
||||
<div class="item-title-time">
|
||||
<div class="item-title" [class.item-title-active]="group._id ==idSelected">
|
||||
<ion-label>{{group.name.split('-').join(' ')}}</ion-label>
|
||||
</div>
|
||||
<div class="item-date" [class.item-date-active]="group._id ==idSelected" *ngIf="group.lastMessage">{{showDateDuration(group._updatedAt)}}</div>
|
||||
<div class="item-date" [class.item-date-active]="group._id ==idSelected" *ngIf="group.lastMessage && !group.customFields.countDownDate">{{showDateDuration(group._updatedAt)}}</div>
|
||||
<div class="item-date" [class.item-date-active]="group._id ==idSelected" *ngIf="group.customFields.countDownDate">{{countDownDate(group.customFields.countDownDate, group._id)}}</div>
|
||||
</div>
|
||||
<div *ngIf="group.lastMessage" class="item-description d-flex align-items-center" [class.item-description-active]="group._id ==idSelected">
|
||||
<div class="item-message">{{group.lastMessage.u.name}}: {{group.lastMessage.msg}} </div>
|
||||
|
||||
@@ -38,8 +38,6 @@ ion-content{
|
||||
font-family: Roboto;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
|
||||
overflow: auto;
|
||||
|
||||
@@ -98,16 +96,16 @@ ion-content{
|
||||
margin-top: 10px;
|
||||
}
|
||||
.item-title{
|
||||
width: calc(100% - 75px);
|
||||
width: calc(100% - 90px);
|
||||
float: left;
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
}
|
||||
.item-title-active{
|
||||
color: #fff;
|
||||
}
|
||||
.item-date{
|
||||
width: 75px;
|
||||
width: 90px;
|
||||
float: right;
|
||||
font-size: 13px;
|
||||
color: #797979;
|
||||
@@ -137,7 +135,7 @@ ion-content{
|
||||
|
||||
.item-active{
|
||||
color: #fff !important;
|
||||
background-color: #42b9fe !important;
|
||||
background-color: var(--gabinete-active-hove-background) !important;
|
||||
}
|
||||
@media only screen and (min-width: 701px) {
|
||||
.main-content{
|
||||
|
||||
@@ -26,8 +26,11 @@ import { NavigationStart, NavigationEnd, Router } from '@angular/router';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
//import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { TimeService } from 'src/app/services/functions/time.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { DataService } from 'src/app/services/data.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-chat',
|
||||
@@ -82,12 +85,6 @@ export class ChatPage implements OnInit {
|
||||
@Output() getRoomInfo;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Websockets variables
|
||||
|
||||
*/
|
||||
|
||||
subject: any;
|
||||
public messages: Subject<any>;
|
||||
|
||||
@@ -119,6 +116,9 @@ export class ChatPage implements OnInit {
|
||||
private resolver: ComponentFactoryResolver,
|
||||
private route: Router,
|
||||
private timeService: TimeService,
|
||||
public ThemeService: ThemeService,
|
||||
private dataService:DataService,
|
||||
private router: Router,
|
||||
){
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.headers = new HttpHeaders();
|
||||
@@ -153,6 +153,21 @@ export class ChatPage implements OnInit {
|
||||
console.log(t);
|
||||
|
||||
this.setStatus('away');
|
||||
if(this.dataService.get("newGroup")){
|
||||
this.openNewGroupPage();
|
||||
}
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
|
||||
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/chat')) {
|
||||
alert('OIII')
|
||||
} else {
|
||||
if(this.dataService.get("newGroup")){
|
||||
this.openNewGroupPage();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy(){
|
||||
@@ -382,7 +397,7 @@ hideRefreshButton(){
|
||||
async getDirectMessages(event?){
|
||||
|
||||
this.chatService.getAllDirectMessages().subscribe(async (res:any)=>{
|
||||
console.log(res.ims);
|
||||
//console.log(res.ims);
|
||||
|
||||
if(res != 200){
|
||||
//console.log(res.ims);
|
||||
@@ -400,7 +415,7 @@ hideRefreshButton(){
|
||||
//console.log('TIMER');
|
||||
//Check if modal is opened
|
||||
if(this.segment == "Contactos" && this.showMessages != true){
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await this.getDirectMessages();
|
||||
//console.log('Timer contactos list running')
|
||||
}
|
||||
@@ -420,6 +435,10 @@ hideRefreshButton(){
|
||||
return this.timeService.showDateDuration(start);
|
||||
}
|
||||
|
||||
countDownDate(date:any, roomId:string){
|
||||
return this.timeService.countDownDate(date, roomId);
|
||||
}
|
||||
|
||||
async getChatMembers(){
|
||||
//return await this.chatService.getMembers(roomId).toPromise();
|
||||
this.chatService.getAllUsers().subscribe(res=> {
|
||||
@@ -432,7 +451,7 @@ hideRefreshButton(){
|
||||
|
||||
async getGroups(event?){
|
||||
this.result = this.chatService.getAllPrivateGroups().subscribe(async (res:any)=>{
|
||||
|
||||
//console.log(res);
|
||||
if(res.groups != 200){
|
||||
|
||||
this.privateGroups = res.groups;
|
||||
@@ -452,7 +471,7 @@ hideRefreshButton(){
|
||||
else {
|
||||
//Check if modal is opened
|
||||
if(this.segment == "Grupos" && this.showGroupMessages != true){
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await this.getGroups();
|
||||
//console.log('Timer groups list running')
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
<div class="title-content width-100">
|
||||
<div class="left">
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="middle">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams, PickerController } from '@ionic/angular';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-group',
|
||||
@@ -21,6 +22,7 @@ export class EditGroupPage implements OnInit {
|
||||
private pickerController: PickerController,
|
||||
private chatService: ChatService,
|
||||
private navParams: NavParams,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
}
|
||||
|
||||
@@ -3,14 +3,15 @@
|
||||
<div class="main-header">
|
||||
<div class="title-content width-100">
|
||||
<div class="back-icon">
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<button class="btn-no-color cursor-pointer" (click)="close()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Contactos</ion-label>
|
||||
</div>
|
||||
<app-btn-seguinte (click)="createGroup()"></app-btn-seguinte>
|
||||
<app-btn-seguinte (click)="updateGroup()"></app-btn-seguinte>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
--border-radius: 5px;
|
||||
--box-shadow: none;
|
||||
overflow: auto;
|
||||
--icon-color:#0d89d1;
|
||||
--icon-color: var(--font-awesome);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -120,14 +120,14 @@
|
||||
}
|
||||
|
||||
.members-checkbox ion-checkbox{
|
||||
--border-color: #0d89d1;
|
||||
--background-checked:#0d89d1;
|
||||
--border-color: var(--title-text-color);
|
||||
--background-checked:var(--title-text-color);
|
||||
float: left;
|
||||
}
|
||||
|
||||
.item-checkbox ion-checkbox{
|
||||
--border-color: #0d89d1;
|
||||
--background-checked:#0d89d1;
|
||||
--border-color: var(--title-text-color);
|
||||
--background-checked:var(--title-text-color);
|
||||
float: left;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
width: 330px;
|
||||
padding-left: 10px;
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
float: left;
|
||||
}
|
||||
.item-checkbox ion-icon, .members-checkbox ion-icon{
|
||||
|
||||
@@ -6,6 +6,7 @@ import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
import { NewGroupPage } from '../../new-group/new-group.page';
|
||||
import { GroupMessagesPage } from '../group-messages.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-group-contacts',
|
||||
@@ -37,6 +38,7 @@ export class GroupContactsPage implements OnInit {
|
||||
private chatService: ChatService,
|
||||
private authService: AuthService,
|
||||
private navParams: NavParams,
|
||||
public ThemeService: ThemeService
|
||||
)
|
||||
{
|
||||
this.loggedUser = authService.ValidatedUserChat['data'];
|
||||
@@ -57,42 +59,6 @@ export class GroupContactsPage implements OnInit {
|
||||
console.log(this.isGroupCreated);
|
||||
}
|
||||
|
||||
deleteMember(data:any){
|
||||
let body = {
|
||||
"roomId": this.room._id,
|
||||
"userId": data._id,
|
||||
}
|
||||
console.log(body);
|
||||
if(this.room.t == "p"){
|
||||
this.chatService.removeGroupMember(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.getMembers();
|
||||
});
|
||||
}
|
||||
else if(this.room.t == "c"){
|
||||
this.chatService.removeChannelMember(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.getMembers();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getMembers(){
|
||||
if(this.room.t == "p"){
|
||||
this.chatService.getGroupMembers(this.room._id).subscribe(res=>{
|
||||
this.members = res['members'];
|
||||
this.loadUsers();
|
||||
});
|
||||
}
|
||||
else if(this.room.t == "c"){
|
||||
this.chatService.getChannelMembers(this.room._id).subscribe(res=>{
|
||||
this.members = res['members'];
|
||||
this.loadUsers();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
loadUsers(){
|
||||
this.options = {
|
||||
headers: this.headers,
|
||||
@@ -119,6 +85,21 @@ export class GroupContactsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
getMembers(){
|
||||
if(this.room.t == "p"){
|
||||
this.chatService.getGroupMembers(this.room._id).subscribe(res=>{
|
||||
this.members = res['members'];
|
||||
this.loadUsers();
|
||||
});
|
||||
}
|
||||
else if(this.room.t == "c"){
|
||||
this.chatService.getChannelMembers(this.room._id).subscribe(res=>{
|
||||
this.members = res['members'];
|
||||
this.loadUsers();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
separateLetter(record, recordIndex, records){
|
||||
if(recordIndex == 0){
|
||||
return record.name[0];
|
||||
@@ -133,6 +114,27 @@ export class GroupContactsPage implements OnInit {
|
||||
return null;
|
||||
}
|
||||
|
||||
deleteMember(data:any){
|
||||
let body = {
|
||||
"roomId": this.room._id,
|
||||
"userId": data._id,
|
||||
}
|
||||
console.log(body);
|
||||
if(this.room.t == "p"){
|
||||
this.chatService.removeGroupMember(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.getMembers();
|
||||
});
|
||||
}
|
||||
else if(this.room.t == "c"){
|
||||
this.chatService.removeChannelMember(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.getMembers();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
doRefresh(ev){
|
||||
this.loadUsers();
|
||||
this.getMembers();
|
||||
@@ -141,26 +143,8 @@ export class GroupContactsPage implements OnInit {
|
||||
|
||||
async close(){
|
||||
this.modalController.dismiss();
|
||||
if(this.isGroupCreated){
|
||||
console.log('go to conversa');
|
||||
}
|
||||
else{
|
||||
this.modalController.dismiss();
|
||||
console.log('go to new group page');
|
||||
const modal = await this.modalController.create({
|
||||
component: NewGroupPage,
|
||||
componentProps: {
|
||||
name:this.groupName,
|
||||
duration:'',
|
||||
},
|
||||
cssClass: 'new-group',
|
||||
backdropDismiss: false,
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onChange(event){
|
||||
this.textSearch = event.detail.value;
|
||||
}
|
||||
@@ -192,50 +176,21 @@ export class GroupContactsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
createGroup(){
|
||||
if(!this.isGroupCreated){
|
||||
/* this.close(); */
|
||||
let body = { "name":this.groupName, }
|
||||
this.chatService.addGroup(body).subscribe(res=>{
|
||||
console.log('group created');
|
||||
console.log(res['group']);
|
||||
this.addContacts(res['group']);
|
||||
this.openGroupMessages(res['group']);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
else{
|
||||
updateGroup(){
|
||||
this.chatService.getRoomInfo(this.room._id).subscribe(room=>{
|
||||
this.room = room['room'];
|
||||
this.addContacts(this.room);
|
||||
this.close();
|
||||
/* this.openGroupMessages(this.room); */
|
||||
/* this.chatService.getGroupInfo(this.room._id).subscribe(res=>{
|
||||
console.log(res);
|
||||
|
||||
this.addContacts(res['group']);
|
||||
this.openGroupMessages(res['group']);
|
||||
}) */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
async newGroup(){
|
||||
this.close();
|
||||
const modal = await this.modalController.create({
|
||||
component: NewGroupPage,
|
||||
cssClass: 'new-group',
|
||||
backdropDismiss: false,
|
||||
this.openGroupMessages(room['room']._id);
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async openGroupMessages(room:any){
|
||||
async openGroupMessages(roomId:any){
|
||||
this.close();
|
||||
console.log(roomId);
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupMessagesPage,
|
||||
componentProps: {
|
||||
room: room,
|
||||
roomId: roomId,
|
||||
},
|
||||
cssClass: 'group-messages',
|
||||
backdropDismiss: false
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="left">
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<!-- <ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> -->
|
||||
<fa-icon icon="chevron-left" class="header-top-btn"></fa-icon>
|
||||
<fa-icon icon="chevron-left" class="header-top-btn font-awesome-1"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="middle-container" *ngIf="!showMessageOptions">
|
||||
@@ -20,13 +20,14 @@
|
||||
<div class="right">
|
||||
<button class="btn-no-color" (click)="openOptions()">
|
||||
<!-- <ion-icon src="assets/images/icons-menu.svg"></ion-icon> -->
|
||||
<fa-icon icon="ellipsis-v" class="header-top-btn"></fa-icon>
|
||||
<fa-icon icon="ellipsis-v" class="header-top-btn font-awesome-1"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div (click)="addContacts()" class="header-bottom">
|
||||
<div class="header-bottom-icon">
|
||||
<ion-icon src="assets/icon/icons-user.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/icon/icons-user.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/icon/theme/gov/icons-user.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="header-bottom-contacts">
|
||||
<ion-label class="contacts-list" *ngFor="let member of members" >
|
||||
@@ -34,6 +35,10 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="roomCountDownDate" class="d-flex align-items-center yellow-orange pl-10">
|
||||
<i class="far fa-clock font-15"></i>
|
||||
<ion-label class="font-15 pl-10" color="warning">{{roomCountDownDate}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
@@ -124,7 +129,8 @@
|
||||
<div class="container width-100 d-flex">
|
||||
<div>
|
||||
<button class="btn-no-color" (click)="openChatOptions()">
|
||||
<ion-icon class="chat-icon-options" src="assets/images/icons-add-new-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-options" src="assets/images/icons-add.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-options" src="assets/images/theme/gov/icons-add.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="message-box width-80">
|
||||
@@ -137,10 +143,12 @@
|
||||
</div>
|
||||
<div>
|
||||
<button *ngIf="message" class="btn-no-color" (click)="sendMessage()">
|
||||
<ion-icon class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
||||
</button>
|
||||
<button *ngIf="!message" class="btn-no-color">
|
||||
<ion-icon class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
display: flex;
|
||||
width: fit-content;
|
||||
height: auto;
|
||||
background: #fef4c5;
|
||||
background: var(--chat-alert-msg-color);
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
color: #262420;
|
||||
@@ -202,11 +202,11 @@
|
||||
}
|
||||
.incoming-false{
|
||||
margin: 10px 20px 10px 75px;
|
||||
background: #e4f4fe;
|
||||
background: var(--chat-incoming-msg-color);
|
||||
float: right;
|
||||
}
|
||||
.title{
|
||||
color: #0782c9;
|
||||
color: var(--title-text-color);
|
||||
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
|
||||
@@ -19,6 +19,7 @@ import { environment } from 'src/environments/environment';
|
||||
import { NewEventPage } from '../../agenda/new-event/new-event.page';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-group-messages',
|
||||
@@ -55,6 +56,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
longPressActive = false;
|
||||
showMessageOptions = false;
|
||||
selectedMsgId:string;
|
||||
roomCountDownDate:any;
|
||||
|
||||
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
|
||||
|
||||
@@ -73,6 +75,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
private fileToBase64Service: FileToBase64Service,
|
||||
private fileService: FileService,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.isGroupCreated = true;
|
||||
@@ -123,6 +126,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
ngAfterViewInit() {
|
||||
this.scrollChangeCallback = () => this.onContentScrolled(event);
|
||||
window.addEventListener('scroll', this.scrollChangeCallback, true);
|
||||
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
|
||||
}
|
||||
|
||||
handlePress(id?:string){
|
||||
@@ -180,6 +184,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
this.room = room['room'];
|
||||
this.roomName = this.room.name.split('-').join(' ');
|
||||
if(this.room.customFields.countDownDate){
|
||||
this.roomCountDownDate = this.timeService.countDownDateTimer(this.room.customFields.countDownDate, this.room._id);
|
||||
}
|
||||
this.getGroupContacts(this.room);
|
||||
this.loadGroupMessages(this.room);
|
||||
this.showLoader = false;
|
||||
@@ -252,33 +259,10 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
showDateDuration(start:any){
|
||||
return this.timeService.showDateDuration(start);
|
||||
/* let end;
|
||||
end = new Date();
|
||||
start = new Date(start);
|
||||
let customizedDate;
|
||||
|
||||
const totalSeconds = Math.floor((end - (start))/1000);;
|
||||
const totalMinutes = Math.floor(totalSeconds/60);
|
||||
const totalHours = Math.floor(totalMinutes/60);
|
||||
const totalDays = Math.floor(totalHours/24);
|
||||
|
||||
const hours = totalHours - ( totalDays * 24 );
|
||||
const minutes = totalMinutes - ( totalDays * 24 * 60 ) - ( hours * 60 );
|
||||
const seconds = totalSeconds - ( totalDays * 24 * 60 * 60 ) - ( hours * 60 * 60 ) - ( minutes * 60 );
|
||||
|
||||
if(totalDays == 0){
|
||||
if(start.getDate() == new Date().getDate()){
|
||||
let time = start.getHours() + ":" + this.addZero(start.getUTCMinutes());
|
||||
return time;
|
||||
}
|
||||
else{
|
||||
return 'Ontem';
|
||||
}
|
||||
}
|
||||
else{
|
||||
let date = start.getDate() + "/" + (start.getMonth()+1) + "/" + start.getFullYear();
|
||||
return date;
|
||||
} */
|
||||
}
|
||||
countDownDate(date:any, roomId:string){
|
||||
this.roomCountDownDate = this.timeService.countDownDate(date, roomId);
|
||||
return this.timeService.countDownDateTimer(date, roomId);
|
||||
}
|
||||
|
||||
addZero(i) {
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<div class="main-header">
|
||||
<div class="title-content width-100">
|
||||
<div class="back-icon">
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<div class="back-icon ">
|
||||
<button class="btn-no-color cursor-pointer" (click)="close()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="div-title">
|
||||
@@ -34,7 +35,7 @@
|
||||
<ion-label>{{header}}</ion-label>
|
||||
</div>
|
||||
|
||||
<div (click)="createRoom(user.username)" *virtualItem="let user" class="item-user">
|
||||
<div (click)="createRoom(user.username)" *virtualItem="let user" class="item-user cursor-pointer">
|
||||
<p>{{user.name}}</p>
|
||||
<span class="icon">
|
||||
<ion-icon class="{{user.status}}" slot="end" name="ellipse"></ion-icon>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
--border-radius: 5px;
|
||||
--box-shadow: none;
|
||||
overflow: hidden;
|
||||
--icon-color:#0d89d1;
|
||||
--icon-color: var( --font-awesome);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -107,7 +107,7 @@
|
||||
margin: 0 !important;
|
||||
width: 90%;
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
float: left;
|
||||
}
|
||||
.item-user .icon{
|
||||
|
||||
@@ -5,6 +5,7 @@ import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
import { GroupMessagesPage } from '../../group-messages/group-messages.page';
|
||||
import { MessagesPage } from '../messages.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-contacts',
|
||||
@@ -28,6 +29,7 @@ export class ContactsPage implements OnInit {
|
||||
private http: HttpClient,
|
||||
private chatService: ChatService,
|
||||
private authService: AuthService,
|
||||
public ThemeService: ThemeService
|
||||
)
|
||||
{
|
||||
this.loggedUser = authService.ValidatedUserChat['data'];
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="left">
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<!-- <ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> -->
|
||||
<fa-icon icon="chevron-left" class="header-top-btn"></fa-icon>
|
||||
<fa-icon icon="chevron-left" class="header-top-btn font-awesome-1"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="middle-container" *ngIf="!showMessageOptions">
|
||||
@@ -23,13 +23,15 @@
|
||||
</div>
|
||||
<div hidden class="right">
|
||||
<button class="btn-no-color" (click)="openMessagesOptions()">
|
||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div hidden class="header-bottom" (click)="addContacts()">
|
||||
<div class="header-bottom-icon">
|
||||
<ion-icon src="assets/icon/icons-user.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/icon/icons-user.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/icon/theme/gov/icons-user.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="header-bottom-contacts">
|
||||
<ion-label class="text-color-blue">Adicionar contacto</ion-label>
|
||||
@@ -46,7 +48,6 @@
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher> -->
|
||||
|
||||
<div (click)="handleClick()" class="messages" #scrollMe>
|
||||
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of chatMessageStore.message[roomId]; let last = last"
|
||||
[class.messages-list-item-wrapper-active]="msg._id == selectedMsgId">
|
||||
@@ -122,26 +123,43 @@
|
||||
</ion-footer> -->
|
||||
|
||||
<ion-footer>
|
||||
<ion-list hidden>
|
||||
<ion-item (click)="playFile(storedFileNames)">
|
||||
{{storedFileNames}}
|
||||
</ion-item>
|
||||
<ion-item (click)="playFile(storedFileNames)">
|
||||
{{storedFileNames}}
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
<audio hidden controls>
|
||||
<source src="https://www.tabularium.pt/file-upload/5g6DkyMC4MHcuaDyp/Audio%20record.mp3" type="audio/mpeg">
|
||||
</audio>
|
||||
<!-- <button (click)="startRecording()">Start Recording</button>
|
||||
<button (click)="stopRecording()">Stop Recording</button> -->
|
||||
<div class="container width-100 d-flex">
|
||||
<div>
|
||||
<button class="btn-no-color" (click)="openChatOptions()">
|
||||
<ion-icon class="chat-icon-options" src="assets/images/icons-add-new-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-options" src="assets/images/icons-add.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-options" src="assets/images/theme/gov/icons-add.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="width-70">
|
||||
<ion-item class="ion-no-padding ion-no-margin type-message" lines="none">
|
||||
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<button hidden class="btn-no-color" (click)="notImplemented()">
|
||||
<!-- <ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon> -->
|
||||
<ion-textarea *ngIf="!recording" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<ion-textarea *ngIf="recording" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="durationDisplay"></ion-textarea>
|
||||
<button hidden #recordbtn class="btn-no-color" (click)="notImplemented()">
|
||||
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
|
||||
</button>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div>
|
||||
<button *ngIf="message" class="btn-no-color" (click)="sendMessage()">
|
||||
<ion-icon class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
||||
</button>
|
||||
<button *ngIf="!message" class="btn-no-color">
|
||||
<ion-icon class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -173,12 +173,12 @@
|
||||
}
|
||||
.incoming-false{
|
||||
margin: 10px 20px 10px 75px;
|
||||
background: #e4f4fe;
|
||||
background: var(--chat-incoming-msg-color);
|
||||
float: right;
|
||||
}
|
||||
.title{
|
||||
display: inline;
|
||||
color: #0782c9;
|
||||
color: var(--title-text-color);
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
|
||||
|
||||
@@ -19,7 +19,10 @@ import { MessagesOptionsPage } from 'src/app/shared/popover/messages-options/mes
|
||||
import { ChatMessageStore } from 'src/app/store/chat/chat-message.service';
|
||||
import { ChatUserStorage } from 'src/app/store/chat/chat-user.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { Filesystem, Directory, Encoding } from '@capacitor/filesystem';
|
||||
import { VoiceRecorder, VoiceRecorderPlugin, RecordingData, GenericResponse, CurrentRecordingStatus } from 'capacitor-voice-recorder';
|
||||
import { Haptics, ImpactStyle } from '@capacitor/haptics';
|
||||
|
||||
@Component({
|
||||
selector: 'app-messages',
|
||||
@@ -44,8 +47,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
members:any;
|
||||
scrollingOnce:boolean = true;
|
||||
|
||||
chatMessageStore = ChatMessageStore
|
||||
chatUserStorage = ChatUserStorage
|
||||
chatMessageStore = ChatMessageStore;
|
||||
chatUserStorage = ChatUserStorage;
|
||||
|
||||
private scrollChangeCallback: () => void;
|
||||
currentPosition: any;
|
||||
@@ -60,6 +63,13 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
task: ExpedientTaskModalPageNavParamsTask;
|
||||
LoadedDocument:any = null;
|
||||
|
||||
recording = false;
|
||||
storedFileNames = [];
|
||||
durationDisplay = '';
|
||||
duration = 0;
|
||||
@ViewChild('recordbtn', { read: ElementRef }) recordBtn: ElementRef;
|
||||
myAudio: any;
|
||||
|
||||
constructor(
|
||||
public popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
@@ -73,12 +83,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
private fileService: FileService,
|
||||
private gestureController: GestureController,
|
||||
private processes: ProcessesService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
/* this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
this.roomId = params["params"].roomId;
|
||||
}
|
||||
}); */
|
||||
this.loggedUser = authService.ValidatedUserChat['data'];
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
|
||||
@@ -90,57 +96,110 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
/* setInterval(()=>{ */
|
||||
this.load();
|
||||
/* }, 9000); */
|
||||
/* this.el = document.getElementById("scrollToBottom");
|
||||
this.el.scrollTop = this.el.scrollHeight - this.el.scrollTop; */
|
||||
|
||||
this.load();
|
||||
this.setStatus('online');
|
||||
//this.onPressingMessage();
|
||||
|
||||
/* setInterval(()=>{
|
||||
const gesture = this.gestureController.create({
|
||||
el: this.rectangle.nativeElement,
|
||||
gestureName:'my-gesture',
|
||||
onMove: (detail) => { this.onMove(detail); }
|
||||
})
|
||||
|
||||
gesture.enable();
|
||||
}, 9000); */
|
||||
|
||||
|
||||
this.loadFiles();
|
||||
VoiceRecorder.requestAudioRecordingPermission();
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.scrollChangeCallback = () => this.onContentScrolled(event);
|
||||
window.addEventListener('scroll', this.scrollChangeCallback, true);
|
||||
|
||||
// const gesture = this.gestureController.create({
|
||||
// el: this.rectangle.nativeElement,
|
||||
// gestureName:'long-press',
|
||||
// onStart: () => { alert('OP') },
|
||||
// /* onMove () => {
|
||||
// console.log('Move');
|
||||
// }, */
|
||||
// onEnd: () => {
|
||||
// console.log('ENNNNNDS');
|
||||
// },
|
||||
// })
|
||||
const longpress = this.gestureController.create({
|
||||
el: this.recordBtn.nativeElement,
|
||||
threshold: 0,
|
||||
gestureName: 'long-press',
|
||||
onStart: ev => {
|
||||
Haptics.impact({ style: ImpactStyle.Light })
|
||||
this.startRecording();
|
||||
this.calculateDuration();
|
||||
},
|
||||
onEnd: ev =>{
|
||||
Haptics.impact({ style: ImpactStyle.Light })
|
||||
this.stopRecording();
|
||||
}
|
||||
}, true);
|
||||
longpress.enable();
|
||||
}
|
||||
|
||||
calculateDuration(){
|
||||
if(!this.recording){
|
||||
this.duration = 0;
|
||||
this.durationDisplay = '';
|
||||
return;
|
||||
}
|
||||
this.duration += 1;
|
||||
const minutes = Math.floor(this.duration / 60);
|
||||
const seconds = (this.duration % 60).toString().padStart(2,'0');
|
||||
this.durationDisplay = `${minutes}:${seconds}`;
|
||||
|
||||
setTimeout(()=>{
|
||||
this.calculateDuration();
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
async loadFiles(){
|
||||
Filesystem.readdir({
|
||||
path: '',
|
||||
directory: Directory.Data
|
||||
}).then(result =>{
|
||||
console.log(result);
|
||||
const temp:any[] = result.files.reverse();
|
||||
this.storedFileNames = temp[0];
|
||||
console.log(this.storedFileNames);
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
startRecording(){
|
||||
if(this.recording){
|
||||
return;
|
||||
}
|
||||
this.recording = true;
|
||||
VoiceRecorder.startRecording();
|
||||
}
|
||||
|
||||
stopRecording(){
|
||||
if(!this.recording){
|
||||
return;
|
||||
}
|
||||
this.recording = false;
|
||||
VoiceRecorder.stopRecording().then(async (result: RecordingData) =>{
|
||||
this.recording = false;
|
||||
if(result.value && result.value.recordDataBase64){
|
||||
const recordData = result.value.recordDataBase64;
|
||||
console.log(recordData);
|
||||
this.myAudio = recordData;
|
||||
const fileName = new Date().getTime() + ".wav";
|
||||
await Filesystem.writeFile({
|
||||
path: fileName,
|
||||
directory: Directory.Data,
|
||||
data: recordData,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
async playFile(fileName?:any){
|
||||
const audioFile = await Filesystem.readFile({
|
||||
path: fileName,
|
||||
directory: Directory.Data
|
||||
})
|
||||
console.log(audioFile);
|
||||
const base64sound = audioFile.data;
|
||||
|
||||
const audioRef = new Audio(`data:audio/aac;base64,${base64sound}`)
|
||||
audioRef.oncanplaythrough = () => audioRef.play();
|
||||
audioRef.load();
|
||||
|
||||
// gesture.enable();
|
||||
}
|
||||
|
||||
handlePress(id?:string){
|
||||
this.selectedMsgId = id;
|
||||
this.showMessageOptions = true;
|
||||
/* if(!this.showMessageOptions){
|
||||
this.showMessageOptions = true;
|
||||
}
|
||||
else{
|
||||
this.showMessageOptions = false;
|
||||
} */
|
||||
}
|
||||
|
||||
handleClick(){
|
||||
@@ -148,22 +207,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.selectedMsgId = "";
|
||||
}
|
||||
|
||||
/* onPressingMessage(){
|
||||
const gesture = this.gestureController.create({
|
||||
el: this.messageContainer.nativeElement,
|
||||
gestureName: 'long-press',
|
||||
onStart: ev =>{
|
||||
this.longPressActive = true;
|
||||
console.log('Pressing');
|
||||
},
|
||||
onEnd: ev => {
|
||||
this.longPressActive = false;
|
||||
console.log('Stop pressing');
|
||||
}
|
||||
});
|
||||
gesture.enable(true);
|
||||
} */
|
||||
|
||||
deleteMessage(msgId:string){
|
||||
let body = {
|
||||
"roomId": this.roomId,
|
||||
@@ -272,7 +315,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
const roomId = this.roomId;
|
||||
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(res => {
|
||||
/* console.log(res); */
|
||||
console.log(res);
|
||||
this.messages = res['messages'].reverse();
|
||||
this.chatMessageStore.add(roomId, this.messages)
|
||||
console.log(this.messages);
|
||||
@@ -518,7 +561,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.messages = res['messages'].reverse();
|
||||
this.chatMessageStore.add(roomId, this.messages)
|
||||
|
||||
console.log(this.messages);
|
||||
//console.log(this.messages);
|
||||
// Reconnect in one second
|
||||
if(this.route.url != "/home/chat"){
|
||||
console.log("Timer message stop")
|
||||
@@ -527,7 +570,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
if(document.querySelector('.isMessagesChatOpened')){
|
||||
await new Promise(resolve => setTimeout(resolve, 5000));
|
||||
await this.serverLongPull();
|
||||
console.log('Timer message running')
|
||||
//console.log('Timer message running')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,14 +3,15 @@
|
||||
<div class="main-header">
|
||||
<div class="title-content width-100">
|
||||
<div class="back-icon">
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<button class="btn-no-color cursor-pointer" (click)="close()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Contactos</ion-label>
|
||||
</div>
|
||||
<app-btn-seguinte (click)="groupMessages()"></app-btn-seguinte>
|
||||
<app-btn-seguinte (click)="groupMessages()" class="cursor-pointer"></app-btn-seguinte>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
--border-radius: 5px;
|
||||
--box-shadow: none;
|
||||
overflow: auto;
|
||||
--icon-color:#0d89d1;
|
||||
--icon-color:var(--title-text-color);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -102,8 +102,8 @@ ion-content{
|
||||
}
|
||||
|
||||
.item-checkbox ion-checkbox{
|
||||
--border-color: #0d89d1;
|
||||
--background-checked:#0d89d1;
|
||||
--border-color: var(--title-text-color);
|
||||
--background-checked:var(--title-text-color);
|
||||
float: left;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ ion-content{
|
||||
width: 330px;
|
||||
padding-left: 10px;
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
float: left;
|
||||
}
|
||||
.item-checkbox ion-icon{
|
||||
|
||||
@@ -2,6 +2,7 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { GroupMessagesPage } from '../../group-messages/group-messages.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-contacts',
|
||||
@@ -53,6 +54,7 @@ export class ContactsPage implements OnInit {
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private http: HttpClient,
|
||||
public ThemeService: ThemeService
|
||||
)
|
||||
{
|
||||
this.headers = new HttpHeaders();
|
||||
|
||||
@@ -4,13 +4,18 @@
|
||||
<div class="title-content width-100">
|
||||
<div class="left">
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="middle">
|
||||
<ion-label class="title">Novo Grupo</ion-label>
|
||||
</div>
|
||||
<app-btn-seguinte *ngIf="groupName" (click)="addContacts()"></app-btn-seguinte>
|
||||
<div *ngIf="groupName">
|
||||
<button class="btn-no-color btn-criar" (click)="createGroup()">
|
||||
<ion-label>Criar grupo</ion-label>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
@@ -21,13 +26,13 @@
|
||||
<div class="item-container">
|
||||
<ion-input [(ngModel)]="groupName" placeholder="Título"></ion-input>
|
||||
</div>
|
||||
<div *ngIf="false" class="item-container-no-border">
|
||||
<div class="item-container-no-border">
|
||||
<ion-checkbox (ionChange)="_ionChange($event)" color="primary"></ion-checkbox>
|
||||
<ion-label>Grupo Ultra-secreto</ion-label>
|
||||
</div>
|
||||
|
||||
<div *ngIf="showDuration" class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-item-class-2 width-100">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-duration.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -36,6 +41,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -32,7 +32,7 @@ ion-content{
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.main-header{
|
||||
width: 100%; /* 400px */
|
||||
@@ -45,7 +45,7 @@ ion-content{
|
||||
padding: 30px 20px 0px 20px;
|
||||
color:#000;
|
||||
transform: translate3d(0, 1px, 0);
|
||||
|
||||
|
||||
.title-content{
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
@@ -61,9 +61,16 @@ ion-content{
|
||||
.middle{
|
||||
padding: 0!important;
|
||||
float: left;
|
||||
width: 221px;
|
||||
width:fit-content;
|
||||
margin: 2.5px 0 0 5px;
|
||||
}
|
||||
.btn-criar{
|
||||
padding: 0!important;
|
||||
float: right;
|
||||
font-size: 15px;
|
||||
color: var(--font-awesome);
|
||||
margin: 8px 5px 0 5px;
|
||||
}
|
||||
.right{
|
||||
padding: 0!important;
|
||||
float: right;
|
||||
@@ -87,8 +94,8 @@ ion-content{
|
||||
float: right;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
.main-content{
|
||||
width: 100%; /* 400px */
|
||||
@@ -108,7 +115,6 @@ ion-content{
|
||||
|
||||
.item-container-no-border{
|
||||
display: flex;
|
||||
width: 360px;
|
||||
margin: 25px auto;
|
||||
border-radius: 5px;
|
||||
align-items: center;
|
||||
@@ -126,8 +132,8 @@ ion-content{
|
||||
overflow: auto;
|
||||
|
||||
.ion-item-class-2{
|
||||
width: 360px;
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
|
||||
.ion-icon-class{
|
||||
width: 45px;
|
||||
@@ -138,7 +144,7 @@ ion-content{
|
||||
}
|
||||
}
|
||||
.ion-input-class{
|
||||
width: 315px;
|
||||
width: calc(100% - 45px) !important;
|
||||
height: 45px;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 5px;
|
||||
|
||||
@@ -3,6 +3,8 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams, PickerController, PopoverController } from '@ionic/angular';
|
||||
import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-duration.page';
|
||||
import { GroupContactsPage } from '../group-messages/group-contacts/group-contacts.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-new-group',
|
||||
@@ -15,6 +17,7 @@ export class NewGroupPage implements OnInit {
|
||||
displayDuration: any;
|
||||
showDuration: boolean;
|
||||
selectedDuration = ['','',''];
|
||||
thedate:any;
|
||||
groupName:string;
|
||||
|
||||
constructor(
|
||||
@@ -22,8 +25,10 @@ export class NewGroupPage implements OnInit {
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
)
|
||||
{
|
||||
public ThemeService: ThemeService,
|
||||
private chatService: ChatService,
|
||||
)
|
||||
{
|
||||
this.isGroupCreated = false;
|
||||
this.groupName = this.navParams.get('name');
|
||||
}
|
||||
@@ -33,24 +38,55 @@ export class NewGroupPage implements OnInit {
|
||||
}
|
||||
_ionChange(event){
|
||||
this.showDuration = event.detail.checked;
|
||||
|
||||
if(event.detail.checked){
|
||||
this.thedate = new Date();
|
||||
}
|
||||
else{
|
||||
this.thedate = '';
|
||||
}
|
||||
}
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
async addContacts(){
|
||||
createGroup(){
|
||||
let name = this.groupName.split(' ').join('-');
|
||||
name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
||||
let body = { "name":name, }
|
||||
this.chatService.addGroup(body).subscribe(res=>{
|
||||
console.log('group created');
|
||||
console.log(res['group']);
|
||||
|
||||
//this.addGroupMessage.emit(res['group']._id);
|
||||
|
||||
if(this.thedate){
|
||||
let countDownBody = {
|
||||
"roomId": res['group']._id,
|
||||
"customFields":{"countDownDate":this.thedate}
|
||||
}
|
||||
this.chatService.setGroupCustomFields(countDownBody).subscribe(res=>{
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
this.isGroupCreated = true;
|
||||
this.addContacts(res['group']);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async addContacts(room){
|
||||
this.close();
|
||||
|
||||
let name = this.groupName.split(' ').join('-');
|
||||
console.log(name);
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupContactsPage,
|
||||
componentProps: {
|
||||
isCreated:this.isGroupCreated,
|
||||
name: name,
|
||||
duration:'',
|
||||
},
|
||||
room: room,
|
||||
},
|
||||
cssClass: 'contacts',
|
||||
backdropDismiss: false
|
||||
});
|
||||
@@ -58,7 +94,7 @@ export class NewGroupPage implements OnInit {
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
|
||||
async setDuration(ev: any) {
|
||||
const popover = await this.popoverController.create({
|
||||
component: GroupDurationPage,
|
||||
@@ -73,14 +109,17 @@ export class NewGroupPage implements OnInit {
|
||||
const picker = await this.pickerController.create({
|
||||
cssClass: '',
|
||||
buttons: [
|
||||
{
|
||||
{
|
||||
text: 'Cancelar', role: 'cancel', cssClass: 'btn-cancel'
|
||||
},
|
||||
{
|
||||
text: 'Ok',
|
||||
{
|
||||
text: 'Ok',
|
||||
cssClass: 'btn-cancel',
|
||||
handler:(value:any)=>{
|
||||
console.log('button done pressed');
|
||||
let now = new Date();
|
||||
this.thedate = new Date(now.getFullYear(), now.getMonth(), now.getDate() + value.days.value, now.getHours() + value.hours.value, now.getMinutes() + value.minutes.value, now.getSeconds(), now.getMilliseconds());
|
||||
|
||||
this.selectedDuration = [
|
||||
value.days.value,
|
||||
value.hours.value,
|
||||
@@ -91,24 +130,24 @@ export class NewGroupPage implements OnInit {
|
||||
if(value.days.value > 0){
|
||||
if(value.days.value == 1){
|
||||
if(value.hours.value == 1){
|
||||
this.displayDuration = value.days.value + " day " +
|
||||
this.displayDuration = value.days.value + " day " +
|
||||
value.hours.value + " hora " +
|
||||
value.minutes.value + " minutos";
|
||||
}
|
||||
else{
|
||||
this.displayDuration = value.days.value + " days " +
|
||||
this.displayDuration = value.days.value + " days " +
|
||||
value.hours.value + " horas " +
|
||||
value.minutes.value + " minutos";
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(value.hours.value == 1){
|
||||
this.displayDuration = value.days.value + " days " +
|
||||
this.displayDuration = value.days.value + " days " +
|
||||
value.hours.value + " hora " +
|
||||
value.minutes.value + " minutos";
|
||||
}
|
||||
else{
|
||||
this.displayDuration = value.days.value + " days " +
|
||||
this.displayDuration = value.days.value + " days " +
|
||||
value.hours.value + " horas " +
|
||||
value.minutes.value + " minutos";
|
||||
}
|
||||
@@ -124,7 +163,7 @@ export class NewGroupPage implements OnInit {
|
||||
value.minutes.value + " minutos";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -178,7 +217,7 @@ export class NewGroupPage implements OnInit {
|
||||
await picker.present();
|
||||
picker.onDidDismiss().then(async data =>{
|
||||
let day = await picker.getColumn('days');
|
||||
let hour = await picker.getColumn('hours');
|
||||
let hour = await picker.getColumn('hours');
|
||||
let minutes = await picker.getColumn('minutes');
|
||||
});
|
||||
|
||||
|
||||
@@ -14,14 +14,18 @@
|
||||
<div *ngFor="let attendee of contacts;">
|
||||
<ion-item (click)="selectContact(attendee)" class="cursor-pointer" lines="none" *ngIf="filterSearchList(attendee)" >
|
||||
<div class="pr-10">
|
||||
<ion-icon class="font-35" src="assets/images/icons-userprofile.svg"></ion-icon>
|
||||
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
|
||||
|
||||
</div>
|
||||
<ion-label>
|
||||
<h3>{{ attendee.Name }}</h3>
|
||||
<p>{{ attendee.EmailAddress }}</p>
|
||||
</ion-label>
|
||||
<div>
|
||||
<ion-icon class="font-35" src="assets/images/icons-add-25.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-add-25.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-add-25.svg" ></ion-icon>
|
||||
</div>
|
||||
</ion-item>
|
||||
</div>
|
||||
@@ -35,7 +39,8 @@
|
||||
<ion-item-sliding class="px-20">
|
||||
<ion-item lines="none" *ngFor="let attendee of taskParticipants;" class="d-flex">
|
||||
<div class="pr-10">
|
||||
<ion-icon class="font-35" src="assets/images/icons-userprofile.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
|
||||
</div>
|
||||
<ion-label>
|
||||
<h3>{{ attendee.Name }}</h3>
|
||||
@@ -53,7 +58,10 @@
|
||||
<ion-item-sliding class="px-20">
|
||||
<ion-item lines="none" *ngFor="let attendee of taskParticipantsCc;" class="d-flex">
|
||||
<div class="pr-10">
|
||||
<ion-icon class="font-35" src="assets/images/icons-userprofile.svg"></ion-icon>
|
||||
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
|
||||
|
||||
</div>
|
||||
<ion-label>
|
||||
<h3>{{ attendee.Name }}</h3>
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ContactsService } from 'src/app/services/contacts.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-attendees',
|
||||
@@ -25,7 +26,8 @@ export class AttendeesPageModal implements OnInit {
|
||||
private modalCtrl: ModalController,
|
||||
private contactsService: ContactsService,
|
||||
private navParams: NavParams,
|
||||
private modalController: ModalController) {
|
||||
private modalController: ModalController,
|
||||
public ThemeService: ThemeService) {
|
||||
|
||||
this.adding = this.navParams.get('adding');
|
||||
this.taskParticipants = this.navParams.get('taskParticipants');
|
||||
|
||||
@@ -83,7 +83,8 @@
|
||||
float: right;
|
||||
overflow: auto;
|
||||
font-size: 25px;
|
||||
padding: 10px;
|
||||
height: 45px;
|
||||
display: flex;
|
||||
}
|
||||
.list-people-title{
|
||||
/* font-size: 13px; */
|
||||
@@ -91,7 +92,7 @@
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
|
||||
@@ -34,10 +34,26 @@
|
||||
</div>
|
||||
<button class="btn-no-color" [routerLink]="['/home/agenda']">
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'default' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'gov' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/theme/gov/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'tribunal' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/theme/tribunal/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
<div class="content overflow-y-auto flex-grow-1 height-100">
|
||||
@@ -85,7 +101,26 @@
|
||||
<div class="text">Correspondência por ler</div>
|
||||
</div>
|
||||
<button (click)="viewExpedientListPage()" class="btn-no-color cursor-pointer">
|
||||
<ion-icon class="icon-next" slot="end" src="assets/images/icons-arrow-circle-arrow-right.svg"></ion-icon>
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'default' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'gov' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/theme/gov/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'tribunal' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/theme/tribunal/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="content overflow-y-auto flex-grow-1 height-100">
|
||||
@@ -108,4 +143,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <iframe id="home-iframe" style="width: 100%;" src="/assets/www/pdfjs/web/viewer.html?file=/assets/www/pdfjs/web/compressed.tracemonkey-pldi-09.pdf.pdf"></iframe> -->
|
||||
</ion-content>
|
||||
|
||||
@@ -85,7 +85,7 @@ ion-toolbar{
|
||||
.p-small{
|
||||
font-size: 13pt;
|
||||
margin-top: 13px;
|
||||
color:#000;
|
||||
color: var(--header-tab-text-white);
|
||||
margin-right: 25px !important;
|
||||
text-align: right;
|
||||
/* color: #ffffff; */
|
||||
@@ -182,7 +182,7 @@ ion-toolbar{
|
||||
.ion-icon-location{
|
||||
text-align: center;
|
||||
display: block;
|
||||
color: #000;
|
||||
color: var(--subtitle-text-color);
|
||||
font-size: 16px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
@@ -278,10 +278,9 @@ ion-toolbar{
|
||||
}
|
||||
|
||||
.event-number{
|
||||
color: white;
|
||||
color: var(--header-tab-text-white);
|
||||
font-family: Roboto;
|
||||
font-size: 15px;
|
||||
color: var(--white);
|
||||
|
||||
bold{
|
||||
font-family: Roboto;
|
||||
@@ -294,7 +293,7 @@ ion-toolbar{
|
||||
font-family: Roboto;
|
||||
font-size: 30px;
|
||||
text-align: center;
|
||||
color: var(--white);
|
||||
color: var(--header-tab-text-white);
|
||||
line-height: unset;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@@ -309,7 +308,7 @@ ion-toolbar{
|
||||
font-size: em(25px);
|
||||
font-family: Roboto;
|
||||
font-weight: 300;
|
||||
color: var(--white);
|
||||
color: var(--header-tab-text-white);
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
@@ -317,7 +316,7 @@ ion-toolbar{
|
||||
margin-top: 2px;
|
||||
font-family: Roboto;
|
||||
font-size: 15px;
|
||||
color: var(--white);
|
||||
color: var(--header-tab-text-white);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,9 +329,12 @@ ion-toolbar{
|
||||
.schedule {
|
||||
max-width: 400px;
|
||||
font-family: Roboto;
|
||||
background-color: white;
|
||||
box-shadow: 0 0 10px 0 rgb(0 0 0 / 7%);
|
||||
border: solid 1px #e9e9e9;
|
||||
//background-color: white;
|
||||
background-color: var(--box-container-color);
|
||||
//box-shadow: 0 0 10px 0 rgb(0 0 0 / 7%);
|
||||
box-shadow: 0 0 10px 0 var(--box-border-color-shadow);
|
||||
//border: solid 1px #e9e9e9;
|
||||
border: solid 1px var(--box-border-color);
|
||||
margin-bottom: 20px;
|
||||
border-radius: 25px;
|
||||
display: flex;
|
||||
@@ -381,10 +383,12 @@ ion-toolbar{
|
||||
//padding-bottom: 5px;
|
||||
padding: 5px 20px 5px 20px;
|
||||
background-color: transparent !important;
|
||||
|
||||
}
|
||||
ion-list{
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
background-color: transparent !important;
|
||||
.d-flex{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@@ -398,8 +402,8 @@ ion-toolbar{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: transparent !important;
|
||||
--background: transparent !important;
|
||||
|
||||
.schedule-time{
|
||||
margin-right: 10px;
|
||||
.time-start{
|
||||
@@ -436,7 +440,8 @@ ion-toolbar{
|
||||
font-family: Roboto;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: #0d89d1;
|
||||
//color: #0d89d1;
|
||||
color: var(--title-text-color)
|
||||
}
|
||||
.description p{
|
||||
white-space: nowrap;
|
||||
|
||||
@@ -20,7 +20,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { NetworkConnectionService } from 'src/app/services/network-connection.service'
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { momentG } from 'src/plugin/momentG';
|
||||
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
@Component({
|
||||
selector: 'app-events',
|
||||
templateUrl: './events.page.html',
|
||||
@@ -78,7 +78,7 @@ export class EventsPage implements OnInit {
|
||||
|
||||
loggeduser: LoginUserRespose;
|
||||
|
||||
existingScreenOrientation: string;
|
||||
/* existingScreenOrientation: string; */
|
||||
|
||||
constructor(
|
||||
private eventService: EventsService,
|
||||
@@ -95,9 +95,10 @@ export class EventsPage implements OnInit {
|
||||
private sqliteservice: SqliteService,
|
||||
private networkconnection: NetworkConnectionService,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.existingScreenOrientation = this.screenOrientation.type;
|
||||
console.log(this.existingScreenOrientation);
|
||||
/* this.existingScreenOrientation = this.screenOrientation.type;
|
||||
console.log(this.existingScreenOrientation); */
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
@@ -108,11 +109,14 @@ export class EventsPage implements OnInit {
|
||||
// console.log('Resize event detected');
|
||||
|
||||
});
|
||||
try {
|
||||
this.sqliteservice.databaseConn();
|
||||
} catch (error) {
|
||||
console.log("Error creating local database: ", error)
|
||||
|
||||
window['zipPhoneCallback'] = function (zipphone) {
|
||||
var frame = document.getElementById('home-iframe');
|
||||
if(frame) {
|
||||
frame['contentWindow']['postMessage']({call:'cookies', value: { cookies: {} }});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -162,22 +166,22 @@ export class EventsPage implements OnInit {
|
||||
}
|
||||
|
||||
// Lock to portrait
|
||||
lockToPortrait() {
|
||||
/* lockToPortrait() {
|
||||
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT);
|
||||
console.log('set');
|
||||
}
|
||||
} */
|
||||
|
||||
// Lock to landscape
|
||||
lockToLandscape() {
|
||||
/* lockToLandscape() {
|
||||
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);
|
||||
}
|
||||
} */
|
||||
|
||||
// Unlock screen orientation
|
||||
unlockScreenOrientation() {
|
||||
/* unlockScreenOrientation() {
|
||||
this.screenOrientation.unlock();
|
||||
}
|
||||
} */
|
||||
|
||||
checkScreenOrientation() {
|
||||
/* checkScreenOrientation() {
|
||||
if (window.innerWidth < 701) {
|
||||
this.lockToPortrait();
|
||||
console.log('was here');
|
||||
@@ -186,7 +190,7 @@ export class EventsPage implements OnInit {
|
||||
else {
|
||||
this.unlockScreenOrientation();
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
async RefreshEvents() {
|
||||
this.currentEvent = "";
|
||||
@@ -314,6 +318,48 @@ export class EventsPage implements OnInit {
|
||||
if (list.length > 0) {
|
||||
list.forEach(element => {
|
||||
this.sqliteservice.addEvent(element)
|
||||
|
||||
this.sqliteservice.getAllEvents().then((event: any[]) => {
|
||||
let todayEvents = new Array()
|
||||
event.forEach((element) => {
|
||||
let eventObject = {
|
||||
AppointmentState: element.AppointmentState,
|
||||
Attachments: element.Attachments,
|
||||
Attendees: element.Attendees,
|
||||
CalendarId: element.CalendarId,
|
||||
CalendarName: element.CalendarName,
|
||||
Category: element.Category,
|
||||
EndDate: element.EndDate,
|
||||
EventId: element.EventId,
|
||||
EventRecurrence: element.EventRecurrence,
|
||||
EventType: element.EventType,
|
||||
HasAttachments: element.HasAttachments,
|
||||
HumanDate: element.HumanDate,
|
||||
IsAllDayEvent: element.IsAllDayEvent,
|
||||
IsMeeting: element.IsMeeting,
|
||||
IsRecurring: element.IsRecurring,
|
||||
Location: element.Location,
|
||||
Organizer: element.Organizer,
|
||||
Profile: element.Profile,
|
||||
StartDate: element.StartDate,
|
||||
Subject: element.Subject
|
||||
}
|
||||
todayEvents.push(eventObject);
|
||||
})
|
||||
console.log('JIFJSOSDJSDONS',todayEvents)
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addProcessToDb(list) {
|
||||
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
} else {
|
||||
if (list.length > 0) {
|
||||
list.forEach(element => {
|
||||
this.sqliteservice.addProcess(element)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -453,14 +499,7 @@ export class EventsPage implements OnInit {
|
||||
LoadList() {
|
||||
this.processes.GetTaskListExpediente(false).subscribe(result => {
|
||||
console.log("Expediente", result);
|
||||
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
|
||||
} else {
|
||||
result.forEach((element) => {
|
||||
this.sqliteservice.addProcess(element)
|
||||
})
|
||||
}
|
||||
this.addProcessToDb(result);
|
||||
|
||||
const ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
|
||||
|
||||
@@ -484,12 +523,13 @@ export class EventsPage implements OnInit {
|
||||
}
|
||||
|
||||
goToExpediente(SerialNumber: any) {
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
|
||||
/* if (this.loggeduser.Profile == 'MDGPR') {
|
||||
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
|
||||
}
|
||||
else if (this.loggeduser.Profile == 'PR') {
|
||||
this.router.navigate(['/home/events/expedientes-pr', SerialNumber, 'events']);
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
viewExpedientListPage() {
|
||||
|
||||
@@ -7,13 +7,15 @@
|
||||
<div class="main-header" >
|
||||
<div class="title-content width-100 d-flex justify-space-between align-center">
|
||||
<div class="font-30 cursor-pointer align-center d-flex" (click)="goBack()" defaultHref="#">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="middle d-flex align-center flex-grow-1">
|
||||
<div class="title">{{ task.Folio}}</div>
|
||||
</div>
|
||||
<div class="div-icon" (click)="openOptions()">
|
||||
<ion-icon class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -132,7 +132,7 @@ ion-button{
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
|
||||
@@ -22,6 +22,7 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-despacho-pr',
|
||||
@@ -59,6 +60,7 @@ export class DespachoPrPage implements OnInit {
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
private platform: Platform,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if (params["params"].SerialNumber) {
|
||||
@@ -155,7 +157,7 @@ export class DespachoPrPage implements OnInit {
|
||||
} catch (e) {
|
||||
window.history.back();
|
||||
}
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
|
||||
}
|
||||
});
|
||||
@@ -270,9 +272,9 @@ export class DespachoPrPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -295,10 +297,10 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage('Processo arquivado')
|
||||
this.toastService._successMessage('Processo arquivado')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não arquivado')
|
||||
this.toastService._badRequest('Processo não arquivado')
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -318,10 +320,10 @@ export class DespachoPrPage implements OnInit {
|
||||
documents
|
||||
}).toPromise()
|
||||
|
||||
this.toastService.successMessage('Processo criado')
|
||||
this.toastService._successMessage('Processo criado')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não criado')
|
||||
this.toastService._badRequest('Processo não criado')
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -344,10 +346,10 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage('')
|
||||
this.toastService._successMessage('')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -371,10 +373,10 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -389,11 +391,11 @@ export class DespachoPrPage implements OnInit {
|
||||
sendExpedienteToPending() {
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res => {
|
||||
this.popoverController.dismiss('close')
|
||||
this.toastService.successMessage('Processo enviado para pendentes')
|
||||
this.toastService._successMessage('Processo enviado para pendentes')
|
||||
this.goBack()
|
||||
}, () => {
|
||||
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="theicon btn-refresh">
|
||||
<button class="btn-no-color" (click)="doRefresh()">
|
||||
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
|
||||
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,7 +45,8 @@
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -152,7 +152,7 @@ ion-item{
|
||||
font-family: Roboto;
|
||||
font-size: 12pt;
|
||||
font-weight: 700;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
padding-left: 3px;
|
||||
|
||||
.subject{
|
||||
|
||||
@@ -20,6 +20,7 @@ import { DespachosprStore } from 'src/app/store/despachospr-store.service';
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos-pr',
|
||||
@@ -63,6 +64,7 @@ export class DespachosPrPage implements OnInit {
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
private sortService: SortService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
@@ -8,13 +8,15 @@
|
||||
<div class="main-header">
|
||||
<div class="title-content width-100 d-flex justify-space-between align-center">
|
||||
<div class=" btn-dismiss font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="middle d-flex align-center flex-grow-1">
|
||||
<ion-label class="title">{{ task.Folio}}</ion-label>
|
||||
</div>
|
||||
<div class="div-icon" (click)="openOptions()">
|
||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -91,7 +91,7 @@ ion-button{
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
|
||||
@@ -22,6 +22,8 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-despacho',
|
||||
@@ -59,7 +61,8 @@ export class DespachoPage implements OnInit {
|
||||
public p: PermissionService,
|
||||
private sqliteservice: SqliteService,
|
||||
private platform: Platform,
|
||||
private backgroundservice: BackgroundService
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService
|
||||
|
||||
|
||||
) {
|
||||
@@ -183,6 +186,7 @@ export class DespachoPage implements OnInit {
|
||||
this.sqliteservice.updateProcess(res);
|
||||
}
|
||||
}
|
||||
|
||||
updateProcessInterveners(users) {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
} else {
|
||||
@@ -353,6 +357,32 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async generateDiploma(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Reencaminhar",
|
||||
"ActionTypeId": 99999839,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
toDateString(e) {
|
||||
return new Date(e).toDateString()
|
||||
}
|
||||
@@ -414,6 +444,9 @@ export class DespachoPage implements OnInit {
|
||||
else if (actionName == 'Reexecução') {
|
||||
await this.reexecute(res.data.note, docs);
|
||||
this.goBack();
|
||||
} else if(actionName == 'Gerar Diploma') {
|
||||
await this.generateDiploma(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -485,7 +518,13 @@ export class DespachoPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res => {
|
||||
this.goBack();
|
||||
if(res){
|
||||
const data = res.data;
|
||||
if(data == 'close') {
|
||||
this.goBack();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -530,4 +569,5 @@ export class DespachoPage implements OnInit {
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="title"><ion-label >Despachos</ion-label></div>
|
||||
<div class="theicon btn-refresh">
|
||||
<button class="btn-no-color" (click)="doRefresh($event)">
|
||||
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
|
||||
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -24,7 +24,7 @@
|
||||
pullingText="deslize para actualizar"
|
||||
refreshingSpinner="circles"
|
||||
refreshingText="A actualizar...">
|
||||
</ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div >
|
||||
@@ -43,7 +43,8 @@
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -133,7 +133,7 @@ ion-item{
|
||||
font-family: Roboto;
|
||||
font-size: 12pt;
|
||||
font-weight: 700;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
padding-left: 3px;
|
||||
|
||||
.subject{
|
||||
|
||||
@@ -7,6 +7,8 @@ import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { isThisHour } from 'date-fns';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos',
|
||||
@@ -24,7 +26,8 @@ export class DespachosPage implements OnInit {
|
||||
private despachoRule: DespachoService,
|
||||
private sqliteservice: SqliteService,
|
||||
private platform: Platform,
|
||||
private backgroundservice: BackgroundService
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
+2
-1
@@ -8,7 +8,8 @@
|
||||
<div class="main-header">
|
||||
<div class="title-content width-100 d-flex justify-space-between">
|
||||
<div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="middle d-flex align-center flex-grow-1 ">
|
||||
<ion-label class="title">{{ task.Folio}}</ion-label>
|
||||
|
||||
+1
-1
@@ -151,7 +151,7 @@ ion-button{
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
|
||||
+8
-11
@@ -1,19 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AnimationController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
import { momentG } from 'src/plugin/momentG';
|
||||
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { DeplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common'
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-diploma-assinar',
|
||||
@@ -44,6 +40,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
@@ -120,15 +117,15 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
|
||||
}, (error)=>{
|
||||
try {
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
this.goBack()
|
||||
} catch (e) {
|
||||
window.history.back();
|
||||
} finally {
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('Não é possível visualizar este processo no modo offline')
|
||||
this.toastService._badRequest('Não é possível visualizar este processo no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -182,11 +179,11 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
|
||||
this.toastService.successMessage(false, ()=>{
|
||||
this.toastService._successMessage(false, ()=>{
|
||||
this.goBack();
|
||||
})
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="thetitle"><ion-label >Diplomas</ion-label></div>
|
||||
<div class="theicon btn-refresh">
|
||||
<button class="btn-no-color" (click)="doRefresh($event)">
|
||||
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
|
||||
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="bottom-title d-flex"><h3 class="bottom-text">Diplomas por Assinar</h3></div>
|
||||
@@ -48,7 +48,8 @@
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -142,7 +142,7 @@ ion-item{
|
||||
font-family: Roboto;
|
||||
font-size: 12pt;
|
||||
font-weight: 700;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
padding-left: 3px;
|
||||
|
||||
.subject{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user