diff --git a/package-lock.json b/package-lock.json
index 1fb79cf6f..4efb94fea 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16457,11 +16457,11 @@
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
},
"ng-lazyload-image": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/ng-lazyload-image/-/ng-lazyload-image-9.1.0.tgz",
- "integrity": "sha512-ZdfCXMTaehfzxcSRRThpz9YZbEA+8LPA086Od6JiylrGj0yNM7Aq830A1x6NE/M8o2VuVq93emH9m8T6SFBHlA==",
+ "version": "9.1.2",
+ "resolved": "https://registry.npmjs.org/ng-lazyload-image/-/ng-lazyload-image-9.1.2.tgz",
+ "integrity": "sha512-E5oz5HdTRtYW/TH+jceT4VMcRXKdX9Ut82eEwt2K0/bFAXKU14HluCFa8cMidPBgSa08Mlf+gmoKCTvAfUPgag==",
"requires": {
- "tslib": "^2.0.0"
+ "tslib": "^2.3.0"
}
},
"ng2-pdf-viewer": {
@@ -16504,6 +16504,11 @@
"tslib": "^2.0.0"
}
},
+ "ngx-letters-avatar": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/ngx-letters-avatar/-/ngx-letters-avatar-1.0.2.tgz",
+ "integrity": "sha512-mCQtMCAM+r+emSruczu3EKGzZuGxvHU0TRcx3P9RQ9at/BWd6cTz2bkz3uJm0T5TwaXRNwTe/NNySx+/NqD2Mw=="
+ },
"ngx-socket-io": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/ngx-socket-io/-/ngx-socket-io-3.4.0.tgz",
diff --git a/package.json b/package.json
index 8debfbbb0..00ed7e276 100644
--- a/package.json
+++ b/package.json
@@ -132,11 +132,12 @@
"jetifier": "^1.6.8",
"lite-server": "^2.6.1",
"moment": "^2.29.1",
- "ng-lazyload-image": "^9.1.0",
+ "ng-lazyload-image": "^9.1.2",
"ng2-pdf-viewer": "^7.0.1",
"ngx-cookie-service": "^12.0.3",
"ngx-image-compress": "^11.0.3",
"ngx-image-cropper": "^5.0.1",
+ "ngx-letters-avatar": "^1.0.2",
"ngx-socket-io": "^3.2.0",
"pdfjs": "^2.4.6",
"pdfjs-dist": "^2.9.359",
diff --git a/src/app/guards/auth.guard.ts b/src/app/guards/auth.guard.ts
index d147768af..17b45ac9f 100644
--- a/src/app/guards/auth.guard.ts
+++ b/src/app/guards/auth.guard.ts
@@ -29,7 +29,7 @@ export class AuthGuard implements CanActivate {
this.router.navigate(['/']);
return false
} else {
- //this.authService.loginChat();
+ this.authService.loginChat();
return true;
}
}
diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts
index c978800ce..a541aa08c 100644
--- a/src/app/home/home.module.ts
+++ b/src/app/home/home.module.ts
@@ -5,7 +5,7 @@ import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { HomePageRoutingModule } from './home-routing.module';
-
+import { LazyLoadImageModule } from 'ng-lazyload-image';
import { HomePage } from './home.page';
/* import { IonicSelectableModule } from 'ionic-selectable'; */
@@ -15,6 +15,7 @@ import { HomePage } from './home.page';
FormsModule,
IonicModule,
HomePageRoutingModule,
+ LazyLoadImageModule
],
declarations: [HomePage],
})
diff --git a/src/app/modals/dar-parecer/dar-parecer.page.ts b/src/app/modals/dar-parecer/dar-parecer.page.ts
index e31ff5945..5e464bcf9 100644
--- a/src/app/modals/dar-parecer/dar-parecer.page.ts
+++ b/src/app/modals/dar-parecer/dar-parecer.page.ts
@@ -24,7 +24,7 @@ export class DarParecerPage implements OnInit {
private animationController: AnimationController,
private toastService: ToastService,
public ThemeService: ThemeService
- ) {
+ ) {
this.serialNumber = this.navParams.get('serialNumber');
this.instanceId = this.navParams.get('ProcessInstanceID');
}
@@ -32,15 +32,15 @@ export class DarParecerPage implements OnInit {
ngOnInit() {
console.log(this.serialNumber
);
-
+
}
-
+
cancel() {
this.modalController.dismiss();
}
-
+
async save() {
-
+
const DocumentToSave = this.documents.map((e) => {
return {
ApplicationId: e.ApplicationType,
@@ -53,8 +53,8 @@ export class DarParecerPage implements OnInit {
Attachments: DocumentToSave,
}
- let body = {
- "serialNumber": this.serialNumber,
+ let body = {
+ "serialNumber": this.serialNumber,
"action": "Registar",
"ActionTypeId": 104,
"dataFields": {
@@ -68,7 +68,7 @@ export class DarParecerPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise();
- this.modalController.dismiss();
+ this.modalController.dismiss('sucess');
this.toastService._successMessage('Parecer enviado');
} catch (error) {
this.toastService._badRequest("Parecer não solicitado");
@@ -81,7 +81,7 @@ export class DarParecerPage implements OnInit {
removeAttachment(index: number){
this.documents = this.documents.filter( (e, i) => index != i);
}
-
+
async getDoc() {
const modal = await this.modalController.create({
component: SearchPage,
@@ -102,5 +102,5 @@ export class DarParecerPage implements OnInit {
}
-
+
}
diff --git a/src/app/pages/chat/chat.page.html b/src/app/pages/chat/chat.page.html
index 0c26044cf..2bd1434e5 100644
--- a/src/app/pages/chat/chat.page.html
+++ b/src/app/pages/chat/chat.page.html
@@ -69,7 +69,7 @@
{{room.lastMessage.msg}}
- A escrever...
+ está escrever...
@@ -131,7 +131,7 @@
{{group.lastMessage.u.name}}: {{group.lastMessage.msg}}
-
{{group.userThatIsTyping}} A escrever ...
+
{{group.userThatIsTyping}} está escrever ...
diff --git a/src/app/pages/chat/group-messages/group-messages.module.ts b/src/app/pages/chat/group-messages/group-messages.module.ts
index d5c64132d..f6047147e 100644
--- a/src/app/pages/chat/group-messages/group-messages.module.ts
+++ b/src/app/pages/chat/group-messages/group-messages.module.ts
@@ -15,6 +15,7 @@ import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { ImageCropperModule } from 'ngx-image-cropper';
import { AngularCropperjsModule } from 'angular-cropperjs';
+import { LettersAvatarModule } from "ngx-letters-avatar";
@NgModule({
imports: [
@@ -25,6 +26,7 @@ import { AngularCropperjsModule } from 'angular-cropperjs';
GroupMessagesPageRoutingModule,
ChatPopoverPageModule,
BtnModalDismissPageModule,
+ LettersAvatarModule
/* ImageCropperModule,
AngularCropperjsModule */
diff --git a/src/app/pages/chat/group-messages/group-messages.page.html b/src/app/pages/chat/group-messages/group-messages.page.html
index 0554dbe80..98c649aae 100644
--- a/src/app/pages/chat/group-messages/group-messages.page.html
+++ b/src/app/pages/chat/group-messages/group-messages.page.html
@@ -187,6 +187,14 @@
+
+
+ {{ wsChatMethodsService.getGroupRoom(roomId).userThatIsTyping }} está a escrever...
+
-
-
+
-
-
-
-
-
-
-
- {{loadedEvent.workflowInstanceDataFields.Location}}
-
-
- {{loadedEvent.workflowInstanceDataFields.Agenda}}
-
-
- {{loadedEvent.workflowInstanceDataFields.Agenda}}
-
-
-
-
- {{loadedEvent.workflowInstanceDataFields.Agenda}}
-
-
- {{loadedEvent.workflowInstanceDataFields.Agenda}}
-
-
-
-
-
-
- {{customDate}}
- das {{loadedEvent.workflowInstanceDataFields.StartDate | date: 'HH:mm'}} às {{loadedEvent.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}
- {{loadedEvent.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ loadedEvent.workflowInstanceDataFields.StartDate | date: 'dd/M/yy'}}
- (Não se repete)
- Repete
-
-
-
-
-
-
-
-
-
Intervenientes
-
- {{att.Name}}
-
-
-
-
-
-
-
-
- Documentos Anexados
-
-
- {{ attachment.Assunto }}
- {{ attachment.DocNumber }}
- {{attachment.Sender}}{{ attachment.DocDate | date: 'dd/MM/yy' }}
-
-
-
+
+
+
+
+
+
+
+ Evento Pendente de Aprovação
+
+
+
+
+
+
+ {{loadedEvent.workflowInstanceDataFields.Location}}
+
+
+ {{loadedEvent.workflowInstanceDataFields.Agenda}}
+
+
+ {{loadedEvent.workflowInstanceDataFields.Agenda}}
+
+
+
+
+ {{loadedEvent.workflowInstanceDataFields.Agenda}}
+
+
+ {{loadedEvent.workflowInstanceDataFields.Agenda}}
+
+
+
+
+
+
+ {{customDate}}
+ das {{loadedEvent.workflowInstanceDataFields.StartDate | date: 'HH:mm'}} às {{loadedEvent.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}
+ {{loadedEvent.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ loadedEvent.workflowInstanceDataFields.StartDate | date: 'dd/M/yy'}}
+ (Não se repete)
+ Repete
+
+
+
+
+
+
+
+
+
Intervenientes
+
+ {{att.Name}}
+
+
+
+
+
+
+
+
+ Documentos Anexados
+
+
+ {{ attachment.Assunto }}
+ {{ attachment.DocNumber }}
+ {{attachment.Sender}}{{ attachment.DocDate | date: 'dd/MM/yy' }}
+
+
+
+
+
+
+
Editar evento
@@ -103,6 +114,7 @@
Rejeitar
+
diff --git a/src/app/pages/gabinete-digital/event-list/event-list.page.ts b/src/app/pages/gabinete-digital/event-list/event-list.page.ts
index 52ffc12d5..ba560742e 100644
--- a/src/app/pages/gabinete-digital/event-list/event-list.page.ts
+++ b/src/app/pages/gabinete-digital/event-list/event-list.page.ts
@@ -27,8 +27,8 @@ export class EventListPage implements OnInit {
profile: string;
segment: string;
showLoader: boolean;
- eventsPRList: any = []
- eventsMDGPRList: any = []
+ eventsPRList: any = [];
+ eventsMDGPRList: any = [];
eventPerson: EventPerson;
eventBody: EventBody;
categories: string[];
@@ -76,7 +76,7 @@ export class EventListPage implements OnInit {
window.onresize = (event) => {
// if not mobile remove all component
- if (window.innerWidth <= 800) {
+ if (window.innerWidth < 701) {
this.modalController.dismiss();
}
};
@@ -85,13 +85,13 @@ export class EventListPage implements OnInit {
getEventToAproveFromDB() {
-
+
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.storage.get('event-to-aproveMD').then((events) => {
this.eventsMDGPRList = events
})
-
+
this.storage.get('event-to-aprovePR').then((events) => {
this.eventsPRList = events
})
@@ -99,17 +99,17 @@ export class EventListPage implements OnInit {
this.platform.ready().then(() => {
this.sqliteservice.getListOfEventAprove('Agenda Oficial MDGPR', 'Agenda Pessoal MDGPR').then((event: any[]) => {
-
+
this.eventsMDGPRList = this.sortService.sortDate(this.transformaDataDB(event), 'taskStartDate')
//this.eventsMDGPRList = this.eventsMDGPRList.filter(element => element.interveners != null)
console.log('MD event to aprove', this.eventsMDGPRList)
-
+
})
-
+
this.sqliteservice.getListOfEventAprove('Agenda Oficial PR', 'Agenda Pessoal PR').then((event: any[]) => {
this.eventsPRList = this.sortService.sortDate(this.transformaDataDB(event), 'taskStartDate')
console.log('PR event to aprove', this.eventsPRList)
-
+
})
})
diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.html b/src/app/pages/gabinete-digital/gabinete-digital.page.html
index 3d76ebbd8..ef4423096 100644
--- a/src/app/pages/gabinete-digital/gabinete-digital.page.html
+++ b/src/app/pages/gabinete-digital/gabinete-digital.page.html
@@ -17,7 +17,7 @@
Gabinete Digital
-
+
diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts
index 0152cfd80..0874bd07e 100644
--- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts
+++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts
@@ -602,7 +602,7 @@ export class PedidoPage implements OnInit {
console.log(task);
let classs;
- if (window.innerWidth <= 800) {
+ if (window.innerWidth < 701) {
classs = 'book-meeting-modal modal modal-desktop'
} else {
classs = 'add-note-modal-no-height showAsideOptions'
@@ -618,7 +618,9 @@ export class PedidoPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then(res => {
- this.goBack();
+ if(res.data == 'sucess'){
+ this.goBack();
+ }
});
}
diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts
index c96c68dd3..37a27b44f 100644
--- a/src/app/pages/login/login.page.ts
+++ b/src/app/pages/login/login.page.ts
@@ -102,8 +102,8 @@ export class LoginPage implements OnInit {
if (attempt) {
if (attempt.UserId == SessionStore.user.UserId) {
await this.authService.SetSession(attempt, this.userattempt);
- // await this.authService.loginChat();
- // await this.authService.loginToChatWs()
+ await this.authService.loginChat();
+ await this.authService.loginToChatWs()
this.getToken();
SessionStore.setInativity(true);
@@ -117,8 +117,8 @@ export class LoginPage implements OnInit {
await this.authService.SetSession(attempt, this.userattempt);
this.changeProfileService.run()
- // await this.authService.loginChat();
- // await this.authService.loginToChatWs()
+ await this.authService.loginChat();
+ await this.authService.loginToChatWs()
this.getToken();
this.router.navigateByUrl('/pin', { replaceUrl: true });
}
diff --git a/src/app/pages/publications/publications.page.html b/src/app/pages/publications/publications.page.html
index c53244711..3abc2e9ec 100644
--- a/src/app/pages/publications/publications.page.html
+++ b/src/app/pages/publications/publications.page.html
@@ -25,11 +25,11 @@
Acções Presidenciais
-
+
-
+
diff --git a/src/app/pages/publications/view-publications/view-publications.module.ts b/src/app/pages/publications/view-publications/view-publications.module.ts
index 35b432670..c3bb97330 100644
--- a/src/app/pages/publications/view-publications/view-publications.module.ts
+++ b/src/app/pages/publications/view-publications/view-publications.module.ts
@@ -10,8 +10,16 @@ import { ViewPublicationsPage } from './view-publications.page';
import { HeaderPageModule } from 'src/app/shared/header/header.module';
-import { LazyLoadImageModule } from 'ng-lazyload-image'; // <-- import it
+import { Attributes, IntersectionObserverHooks, LazyLoadImageModule, LAZYLOAD_IMAGE_HOOKS } from 'ng-lazyload-image'; // <-- import it
+export class LazyLoadImageHooks extends IntersectionObserverHooks {
+setup(attributes: Attributes) {
+ attributes.offset = 10;
+ attributes.defaultImagePath = "/assets/icon/icon-no-image.svg";
+ attributes.errorImagePath = "/assets/icon/icon-no-image.svg";
+ return super.setup(attributes);
+}
+}
@NgModule({
imports: [
@@ -24,6 +32,7 @@ import { LazyLoadImageModule } from 'ng-lazyload-image'; // <-- import it
LazyLoadImageModule
],
exports: [ViewPublicationsPage],
- declarations: [ViewPublicationsPage]
+ declarations: [ViewPublicationsPage],
+ providers: [{provide: LAZYLOAD_IMAGE_HOOKS, useClass: LazyLoadImageHooks}]
})
export class ViewPublicationsPageModule {}
diff --git a/src/app/pages/publications/view-publications/view-publications.page.html b/src/app/pages/publications/view-publications/view-publications.page.html
index db5984a90..847b460c5 100644
--- a/src/app/pages/publications/view-publications/view-publications.page.html
+++ b/src/app/pages/publications/view-publications/view-publications.page.html
@@ -26,25 +26,44 @@
-
+
+ -->
+
+
+
+
+
+
![]()
+
+
+
+
+ {{publication.Title}}
+
+
{{publication.DatePublication | date: 'dd-MM-yy | HH:mm'}}
+
+
+
{{publication.Message}}
+
+
+
+
+
+
diff --git a/src/app/pages/publications/view-publications/view-publications.page.ts b/src/app/pages/publications/view-publications/view-publications.page.ts
index 58f696aa8..b8c63dfb3 100644
--- a/src/app/pages/publications/view-publications/view-publications.page.ts
+++ b/src/app/pages/publications/view-publications/view-publications.page.ts
@@ -11,6 +11,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service'
import { forkJoin } from 'rxjs';
+import { ToastService } from 'src/app/services/toast.service';
@Component({
selector: 'app-view-publications',
@@ -23,7 +24,7 @@ export class ViewPublicationsPage implements OnInit {
publicationList: Publication[] = new Array();
item: PublicationFolder;
- defaultImage = "https://governo.gov.ao/ao/noticias/presidente-joao-lourenco-ouviu-a-voz-da-igreja/"
+ defaultImage = "/assets/icon/icon-no-image.svg";
folderId: string;
id: string;
error: any;
@@ -40,7 +41,8 @@ export class ViewPublicationsPage implements OnInit {
private router: Router,
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService,
- public ThemeService: ThemeService) {
+ public ThemeService: ThemeService,
+ private toastService: ToastService,) {
this.item = new PublicationFolder();
this.activatedRoute.paramMap.subscribe(params => {
@@ -64,7 +66,7 @@ export class ViewPublicationsPage implements OnInit {
this.getPublicationDetail();
this.getPublicationsIds();
/* setTimeout(() => {
- this.getPublicationsIds();
+ this.getPublications();
}, 1000); */
this.backgroundservice.registerBackService('Online', () => {
@@ -86,7 +88,7 @@ export class ViewPublicationsPage implements OnInit {
// }
//this.testForkJoin()
//this.getPublicationDetail();
- // this.getPublicationsIds();
+ // this.getPublications();
}
doRefresh = (event) => {
@@ -258,7 +260,7 @@ export class ViewPublicationsPage implements OnInit {
});
- this.getpublication = publicationArray;
+ this.publicationList = publicationArray;
})
}
diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts
index b41ccd40c..7ab471218 100644
--- a/src/app/services/auth.service.ts
+++ b/src/app/services/auth.service.ts
@@ -56,9 +56,9 @@ export class AuthService {
}
- /* if (localStorage.getItem("userChat") != null) {
+ if (localStorage.getItem("userChat") != null) {
this.ValidatedUserChat = JSON.parse(localStorage.getItem('userChat'));
- } */
+ }
}
@@ -112,7 +112,7 @@ export class AuthService {
//user: UserForm
async loginChat() {
- /* const expirationMinutes = 30;
+ const expirationMinutes = 30;
let date = new Date().getTime();
let expirationDate = new Date(new Date().getTime() + expirationMinutes*60*1000);
@@ -135,7 +135,7 @@ export class AuthService {
this.presentAlert('Network error');
}
- this.autoLoginChat(expirationDate.getTime() - date); */
+ this.autoLoginChat(expirationDate.getTime() - date);
}
async autoLoginChat(expirationDate:number){
@@ -145,7 +145,7 @@ export class AuthService {
}
loginToChatWs() {
- /* setTimeout(()=>{
+ setTimeout(()=>{
this.WsChatService.connect();
this.WsChatService.login().then((message) => {
@@ -225,7 +225,7 @@ export class AuthService {
return false
}
};
- }, 1) */
+ }, 1)
}
autologout(expirationDate:number) {
diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts
index e5da6103b..d4b8512f0 100644
--- a/src/app/services/chat.service.ts
+++ b/src/app/services/chat.service.ts
@@ -32,13 +32,13 @@ export class ChatService {
private storageService:StorageService,
)
{
- /* this.loggedUserChat = authService.ValidatedUserChat;
+ this.loggedUserChat = authService.ValidatedUserChat;
this.headers = new HttpHeaders();
this.headers = this.headers.set('X-User-Id', this.loggedUserChat['data'].userId);
this.headers = this.headers.set('X-Auth-Token', this.loggedUserChat['data'].authToken);
this.options = {
headers: this.headers,
- }; */
+ };
}
diff --git a/src/app/services/chat/message.service.ts b/src/app/services/chat/message.service.ts
index f181a90a7..fb79dad61 100644
--- a/src/app/services/chat/message.service.ts
+++ b/src/app/services/chat/message.service.ts
@@ -49,7 +49,7 @@ export class MessageService {
private WsChatService: WsChatService) {
}
- setData({customFields, channels, mentions, msg ,rid ,ts, u, t, _id, _updatedAt, file, attachments, temporaryData, localReference}:Message) {
+ setData({customFields = {}, channels, mentions, msg ,rid ,ts, u, t, _id, _updatedAt, file, attachments, temporaryData, localReference}:Message) {
this.customFields = customFields
this.channels = channels || []
this.mentions = mentions || []
@@ -79,6 +79,10 @@ export class MessageService {
}
}
+ // if(typeof(this.file?.type)) {
+ // this.hasFile = true
+ // }
+
if(this.hasFile) {
this.getFileFromDb()
if(this.file.type != 'application/webtrix') {
@@ -120,7 +124,7 @@ export class MessageService {
if (environment.chatOffline) {
- this.redefinedMessage(ChatMessage)
+ // this.redefinedMessage(ChatMessage)
this.offline = false
}
@@ -151,7 +155,7 @@ export class MessageService {
let ChatMessage = message.result
if (environment.chatOffline) {
- this.redefinedMessage(ChatMessage)
+ // this.redefinedMessage(ChatMessage)
this.offline = false
}
@@ -178,6 +182,7 @@ export class MessageService {
}
}
+
}
redefinedMessage(ChatMessage) {
diff --git a/src/app/services/chat/nf.service.ts b/src/app/services/chat/nf.service.ts
index f0441720c..78719b0c2 100644
--- a/src/app/services/chat/nf.service.ts
+++ b/src/app/services/chat/nf.service.ts
@@ -11,9 +11,9 @@ export class NfService {
downloadFileMsg = async (message: MessageService, room?: RoomService): Promise => new Promise ((resolve, reject)=> (resolve(true)));
fix_updatedAt(message) {
- if (message.result) {
+ if (message?.result) {
message.result._updatedAt = message.result._updatedAt['$date']
- } else if(message._updatedAt) {
+ } else if(message?._updatedAt) {
if(message._updatedAt.hasOwnProperty('$date')) {
message._updatedAt = message._updatedAt['$date']
}
diff --git a/src/app/services/chat/room.service.ts b/src/app/services/chat/room.service.ts
index d6a3aba39..b93f3fea6 100644
--- a/src/app/services/chat/room.service.ts
+++ b/src/app/services/chat/room.service.ts
@@ -71,7 +71,7 @@ export class RoomService {
this.NativeNotificationService.askForPermission()
}
- setData({ customFields, id, name, t, lastMessage = new MessageService(this.storage, this.NfService, this.WsChatService), _updatedAt }) {
+ setData({ customFields = {}, id, name, t, lastMessage = new MessageService(this.storage, this.NfService, this.WsChatService), _updatedAt }) {
this.customFields = customFields
this.id = id
this.name = name
@@ -184,7 +184,7 @@ export class RoomService {
let index;
const find = messages.find((message, _index)=> {
if(message.localReference) {
- if(message.localReference == ChatMessage.localReference) {
+ if(message?.localReference == ChatMessage?.localReference) {
index = _index
return true
}
@@ -294,6 +294,7 @@ export class RoomService {
this.lastMessage = previousLastMessage;
this.calDateDuration(previousLastMessage._updatedAt)
+ this.sortRoomList()
}
})
diff --git a/src/app/services/chat/ws-chat-methods.service.ts b/src/app/services/chat/ws-chat-methods.service.ts
index d72196724..8e2768753 100644
--- a/src/app/services/chat/ws-chat-methods.service.ts
+++ b/src/app/services/chat/ws-chat-methods.service.ts
@@ -300,6 +300,7 @@ export class WsChatMethodsService {
}
} else {
+ console.log('have!!!')
// in this case room is already present, therefor it will only be necessary,
// to redefine
@@ -313,7 +314,7 @@ export class WsChatMethodsService {
}
roomExist(roomId) {
- return this.dm[roomId] && this.group[roomId]
+ return this.dm[roomId]?.id || this.group[roomId]?.id
}
getReceptorName(roomData) {
diff --git a/src/app/services/route.service.ts b/src/app/services/route.service.ts
index 16eef1b09..2f0c59440 100644
--- a/src/app/services/route.service.ts
+++ b/src/app/services/route.service.ts
@@ -39,11 +39,13 @@ export class RouteService {
* @param url [string] incase no history to go back */
goBack(url = null) {
if(this.history.length >= 2) {
+ console.log(this.history);
+
this.history.pop();
const url = this.history.pop();
this.goTo(url)
-
+
} else if(url) {
this.goTo(url)
}
@@ -70,9 +72,9 @@ export class RouteService {
queryParams(url) {
-
+
const urlObject = new URL('http://localhost:8100'+url);
-
+
const paramsString = urlObject.search;
let searchParams: any = new URLSearchParams(paramsString);
let params = {}
diff --git a/src/app/shared/agenda/approve-event/approve-event.page.html b/src/app/shared/agenda/approve-event/approve-event.page.html
index aaeec3984..5099c24f8 100644
--- a/src/app/shared/agenda/approve-event/approve-event.page.html
+++ b/src/app/shared/agenda/approve-event/approve-event.page.html
@@ -14,8 +14,21 @@
-
+
+
+
+
+
+
+
+
+
+ Evento Pendente de Aprovação
+
+
+
+