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}} -
-
-
-
-
Detalhes
- -

-
-
-
-
- -
- -
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}} +
+
+
+
+
Detalhes
+ +

+
+
+
+
+ +
+ +
Documentos Anexados
+ + +

{{ attachment.Assunto }}

+

{{ attachment.DocNumber }}

+

{{attachment.Sender}}{{ attachment.DocDate | date: 'dd/MM/yy' }}

+
+
+
+
+
+
+
@@ -103,6 +114,7 @@
+
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 +
+
+
+
@@ -111,7 +124,6 @@
-
diff --git a/src/app/shared/agenda/event-list/event-list.page.html b/src/app/shared/agenda/event-list/event-list.page.html index fb67da1f3..9d6365ab4 100644 --- a/src/app/shared/agenda/event-list/event-list.page.html +++ b/src/app/shared/agenda/event-list/event-list.page.html @@ -3,7 +3,7 @@
Eventos para Aprovação
-
diff --git a/src/app/shared/agenda/event-list/event-list.page.ts b/src/app/shared/agenda/event-list/event-list.page.ts index c845496d0..d693be7e0 100644 --- a/src/app/shared/agenda/event-list/event-list.page.ts +++ b/src/app/shared/agenda/event-list/event-list.page.ts @@ -70,7 +70,7 @@ export class EventListPage implements OnInit { async LoadToApproveEvents() { this.showLoader = true; console.log(this.segment); - if(this.segment == 'MDGPR'){ + if(this.segment == 'MDGPR') { let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise(); let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise(); @@ -80,7 +80,7 @@ export class EventListPage implements OnInit { } this.showLoader = false; } - else if(this.segment == 'PR'){ + else if(this.segment == 'PR') { let prEventsOficial = await this.processes.GetTasksList('Agenda Oficial PR', false).toPromise(); let prEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal PR', false).toPromise(); let allEvents = prEventsOficial.concat(prEventsPessoal); diff --git a/src/app/shared/chat/group-messages/group-messages.module.ts b/src/app/shared/chat/group-messages/group-messages.module.ts index 990667f98..2865c3427 100644 --- a/src/app/shared/chat/group-messages/group-messages.module.ts +++ b/src/app/shared/chat/group-messages/group-messages.module.ts @@ -14,6 +14,7 @@ import { NewEventPageModule } from '../../agenda/new-event/new-event.module'; import { PdfViewerModule } from 'ng2-pdf-viewer'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; import {MatMenuModule} from '@angular/material/menu'; +import { LettersAvatarModule } from "ngx-letters-avatar"; @NgModule({ imports: [ @@ -24,7 +25,8 @@ import {MatMenuModule} from '@angular/material/menu'; PdfViewerModule, ChatPopoverPageModule, GroupMessagesPageRoutingModule, - MatMenuModule + MatMenuModule, + LettersAvatarModule // ], exports: [GroupMessagesPage], diff --git a/src/app/shared/chat/group-messages/group-messages.page.html b/src/app/shared/chat/group-messages/group-messages.page.html index cc817b8b6..515af253b 100644 --- a/src/app/shared/chat/group-messages/group-messages.page.html +++ b/src/app/shared/chat/group-messages/group-messages.page.html @@ -203,6 +203,18 @@ + + +
+ + {{ wsChatMethodsService.getGroupRoom(roomId).userThatIsTyping }} está a escrever... +
+ +
{{last ? scrollToBottom() : ''}}
@@ -80,11 +80,11 @@
image - +
@@ -109,11 +109,11 @@ {{msg.displayType}} - +
@@ -197,6 +197,16 @@ + +
+ + está a escrever... +
+
+ -
+ +
{{notificationLength}}
@@ -27,11 +43,18 @@
@@ -83,13 +106,13 @@
-
+
- - - + + +
-
- - - + + +
-
+
diff --git a/src/app/shared/header/header.page.scss b/src/app/shared/header/header.page.scss index ff196d2b6..29f30ee38 100644 --- a/src/app/shared/header/header.page.scss +++ b/src/app/shared/header/header.page.scss @@ -12,10 +12,50 @@ width: em(140px); justify-content: center; display: flex; -} -.div-logo img{ - width: 100%; - margin: 0px auto; + color: black; + overflow: auto; + + .logo-icon{ + width: 25.33%; + overflow: auto; + + img{ + width: 100%; + margin: 0px auto; + } + } + + .logo-description{ + width: 74.67%; + margin: 0 auto; + overflow: auto; + font-size: 8.5px; + font-family: Bahnschrift; + + .logo-description-content{ + width: 100%; + + .logo-description-text{ + font-weight: 700; + text-align: center; + width: 100%; + margin: 0 !important; + padding: 0 !important; + } + + .add-line{ + width: 100%; + border-bottom: 1px solid #000; + margin-bottom: 2.5px !important; + padding: 0 !important; + } + } + + .add-botton-border{ + border-bottom: 1px solid #000; + } + + } } .header-btns{ @@ -24,7 +64,6 @@ } .div-profile{ - width: 90px; height: fit-content; font-size: 45px; justify-content: flex-end; @@ -64,7 +103,6 @@ //border: 1px solid red; } - .desktop{ display: none; } diff --git a/src/app/shared/publication/view-publications/view-publications.module.ts b/src/app/shared/publication/view-publications/view-publications.module.ts index 27e09ec09..1b9114b60 100644 --- a/src/app/shared/publication/view-publications/view-publications.module.ts +++ b/src/app/shared/publication/view-publications/view-publications.module.ts @@ -6,15 +6,27 @@ import { IonicModule } from '@ionic/angular'; import { ViewPublicationsPageRoutingModule } from './view-publications-routing.module'; import { ViewPublicationsPage } from './view-publications.page'; +import { Attributes, IntersectionObserverHooks, LazyLoadImageModule, LAZYLOAD_IMAGE_HOOKS } from 'ng-lazyload-image'; + +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: [ CommonModule, FormsModule, IonicModule, - ViewPublicationsPageRoutingModule + ViewPublicationsPageRoutingModule, + LazyLoadImageModule ], exports: [ViewPublicationsPage], - declarations: [ViewPublicationsPage] + declarations: [ViewPublicationsPage], + providers: [{provide: LAZYLOAD_IMAGE_HOOKS, useClass: LazyLoadImageHooks}] }) export class ViewPublicationsPageModule {} diff --git a/src/app/shared/publication/view-publications/view-publications.page.html b/src/app/shared/publication/view-publications/view-publications.page.html index 83acf49c6..81573e3ce 100644 --- a/src/app/shared/publication/view-publications/view-publications.page.html +++ b/src/app/shared/publication/view-publications/view-publications.page.html @@ -39,7 +39,27 @@
- + + + +
+ +
+
+
+
+ {{publication.Title}} +
+
{{publication.DatePublication | date: 'dd-MM-yy | HH:mm'}}
+
+
+

{{publication.Message}}

+
+
+
+
+
+
diff --git a/src/app/shared/publication/view-publications/view-publications.page.ts b/src/app/shared/publication/view-publications/view-publications.page.ts index d92cc069f..8fa8d4e7c 100644 --- a/src/app/shared/publication/view-publications/view-publications.page.ts +++ b/src/app/shared/publication/view-publications/view-publications.page.ts @@ -137,7 +137,7 @@ export class ViewPublicationsPage implements OnInit { getFromDB() { this.storage.get('view_publications').then((viewPublications) => { - this.getpublication = viewPublications; + this.publicationList = viewPublications; }) } diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 6ed05505b..2c9100ef6 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -6,8 +6,8 @@ export const environment = { production: false, apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', // apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', - apiChatUrl: 'https://gpr-dev-01.gabinetedigital.local/api/v1/', - apiWsChatUrl: 'ws://gpr-dev-01.gabinetedigital.local/websocket', + apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/', + apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket', //apiChatUrl: 'https://www.tabularium.pt/api/v1/', /* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */ domain: 'gabinetedigital.local', //gabinetedigital.local diff --git a/src/theme/variables.scss b/src/theme/variables.scss index 1918c97b0..1d93a49b6 100644 --- a/src/theme/variables.scss +++ b/src/theme/variables.scss @@ -116,6 +116,7 @@ $app-theme: mat-light-theme( --ion-color-expediente: #dae3f3; } +// dark-mode @media (prefers-color-scheme: dark) { /* * Dark Colors @@ -662,6 +663,8 @@ body { --PinCircleBackground: url(/auth.svg); --PinBackground: #e1e7eb; --PinTextColor: #44b5ea; + --Event-approve-header-color: #c63527; + --color: #97cae631; --color2: #97cae631; @@ -754,6 +757,7 @@ body { --PinDots: #c63527; --PinTextColor: black; --PinCircleBackground: url(/auth.svg); + --Event-approve-header-color: #ffb81c; --color: #d9d9d9; --color2: #f0f0f0; @@ -833,6 +837,8 @@ body { --PinTextColor: #44b5ea; --PinCircleBackground: url(/assets/background/auth.svg); --PinBackground: white !important; + --Event-approve-header-color: #42b9fe; + --header-container-background: linear-gradient( 270deg,