diff --git a/angular.json b/angular.json index 191cebb37..107e827f1 100644 --- a/angular.json +++ b/angular.json @@ -34,7 +34,10 @@ "glob": "**/*.svg", "input": "node_modules/ionicons/dist/ionicons/svg", "output": "./svg" - } + }, + "src/manifest.webmanifest", + "src/combined-sw.js", + "src/firebase-messaging-sw.js" ], "styles": [ "./node_modules/@angular/material/prebuilt-themes/pink-bluegrey.css", diff --git a/package.json b/package.json index c471d122c..d5e2701e6 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@angular/cdk": "^11.2.13", "@angular/common": "^12.1.2", "@angular/core": "^12.1.2", - "@angular/fire": "^7.5.0", + "@angular/fire": "6.1.5", "@angular/forms": "~12.1.2", "@angular/localize": "^12.1.2", "@angular/material": "^11.2.13", @@ -135,7 +135,7 @@ "duration": "^0.2.2", "faker": "^5.5.3", "fifo-process-queue": "^1.2.0", - "firebase": "^9.8.4", + "firebase": "^7.0 || ^8.0", "g": "^2.0.1", "global": "^4.4.0", "hammerjs": "^2.0.8", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 82628e070..66216e71d 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -76,6 +76,11 @@ import * as Sentry from '@sentry/capacitor'; import { Integration } from '@sentry/types'; import { BrowserTracing } from '@sentry/tracing'; +// import { ServiceWorkerModule } from '@angular/service-worker'; +// import { AngularFireModule } from '@angular/fire'; +// import { AngularFireMessagingModule } from '@angular/fire/messaging'; +// import { environment } from 'src/environments/environment'; + /* 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'; @@ -108,7 +113,8 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */ provide: DateAdapter, useFactory: adapterFactory }), - + //AngularFireModule.initializeApp(environment.firebase), + //AngularFireMessagingModule, IonicImageLoaderModule, IonicModule.forRoot({animated: false}), IonicStorageModule.forRoot({ diff --git a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.html b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.html index 2d0baf161..f84bff5d9 100644 --- a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.html +++ b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.html @@ -17,7 +17,7 @@
- {{publication.Title}} + {{publication.Title}}

{{publication.DatePublication | date: 'dd-MM-yy | h:mm'}}

@@ -64,7 +64,7 @@ - diff --git a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts index 6582f4112..69ea05b84 100644 --- a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts +++ b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts @@ -33,10 +33,11 @@ export class PublicationDetailPage implements OnInit { ) { this.activatedRoute.paramMap.subscribe(params => { - + console.log(params["params"]) if(params["params"]) { this.folderId = params["params"].folderId; this.publicationId = params["params"].publicationId; + this.isModal = params["params"].isModal; // } }); @@ -66,10 +67,10 @@ export class PublicationDetailPage implements OnInit { }, 2000); } - getPublicationDetail(){ + getPublicationDetail() { this.showLoader = true; - this.publications.GetPublicationById(this.publicationId).subscribe(res=>{ + this.publications.GetPublicationById(this.publicationId).subscribe(res => { /* this.publication = res; */ this.publication = { @@ -92,10 +93,9 @@ export class PublicationDetailPage implements OnInit { } goBack() { - if(this.isModal) { + if(!window.location.href.includes('/home/publications/view-publications')) { this.close() } else { - // alert('go back') this.RouteService.goBack(); } @@ -107,7 +107,7 @@ export class PublicationDetailPage implements OnInit { try { await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise(); - this.toastService.successMessage('Publicação eliminada') + this.toastService._successMessage('Publicação removida') if(window['app-view-publications-page-doRefresh']) { window['app-view-publications-page-doRefresh']() @@ -115,7 +115,7 @@ export class PublicationDetailPage implements OnInit { this.goBack(); } catch (error) { - this.toastService.badRequest('Publicaçao não eliminada') + this.toastService._badRequest('Publicaçao não removida') } finally { loader.remove() } 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 14d36e70a..ec2fafa17 100644 --- a/src/app/pages/publications/view-publications/view-publications.page.ts +++ b/src/app/pages/publications/view-publications/view-publications.page.ts @@ -272,6 +272,7 @@ export class ViewPublicationsPage implements OnInit { componentProps: { publicationId: publicationId, folderId: this.folderId, + isModal: true }, cssClass: 'publication-detail modal modal-desktop', // backdropDismiss: false diff --git a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts index 3c3e2666d..5020fd780 100644 --- a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts +++ b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts @@ -362,10 +362,10 @@ export class EditEventToApprovePage implements OnInit { this.close() - this.toastService.successMessage('Evento editado'); + this.toastService._successMessage('Evento editado'); } catch(e) { - this.toastService.badRequest('Evento não editado'); + this.toastService._badRequest('Evento não editado'); } this.loadedAttachments.forEach((document:any)=>{ diff --git a/src/combined-sw.js b/src/combined-sw.js new file mode 100644 index 000000000..4357b1ab7 --- /dev/null +++ b/src/combined-sw.js @@ -0,0 +1,2 @@ +importScripts('ngsw-worker.js'); +importScripts('firebase-messaging-sw.js'); \ No newline at end of file diff --git a/src/assets/firebase-messaging-sw.js b/src/firebase-messaging-sw.js similarity index 100% rename from src/assets/firebase-messaging-sw.js rename to src/firebase-messaging-sw.js diff --git a/src/manifest.webmanifest b/src/manifest.webmanifest new file mode 100644 index 000000000..58db66608 --- /dev/null +++ b/src/manifest.webmanifest @@ -0,0 +1,3 @@ +{ + "gcm_sender_id": "103953800507" +} \ No newline at end of file diff --git a/version/git-version.ts b/version/git-version.ts index 8d1db189b..9bb75d46f 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -1,12 +1,12 @@ export let versionData = { - "shortSHA": "72bd8ff8c", - "SHA": "72bd8ff8cf78537c976def8a535e32e8cfa76d50", + "shortSHA": "fa13f5280", + "SHA": "fa13f528006c76a2545adc0cd721caf282fa519b", "branch": "no_bug_movemente", "lastCommitAuthor": "'Eudes Inácio'", - "lastCommitTime": "'Mon Feb 6 09:45:44 2023 +0100'", - "lastCommitMessage": "pull made", - "lastCommitNumber": "4725", + "lastCommitTime": "'Mon Feb 6 10:10:32 2023 +0100'", + "lastCommitMessage": "git version", + "lastCommitNumber": "4726", "change": "", - "changeStatus": "On branch no_bug_movemente\nYour branch is behind 'origin/no_bug_movemente' by 3 commits, and can be fast-forwarded.\n (use \"git pull\" to update your local branch)\n\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: version/git-version.ts", + "changeStatus": "On branch no_bug_movemente\nYour branch and 'origin/no_bug_movemente' have diverged,\nand have 1 and 3 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: angular.json\n\tmodified: package.json\n\tmodified: src/app/app.module.ts\n\tmodified: src/app/pages/publications/view-publications/publication-detail/publication-detail.page.html\n\tmodified: src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.ts\n\tmodified: src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts\n\tnew file: src/combined-sw.js\n\trenamed: src/assets/firebase-messaging-sw.js -> src/firebase-messaging-sw.js\n\tnew file: src/manifest.webmanifest", "changeAuthor": "eudes.inacio" } \ No newline at end of file