diff --git a/.gitignore b/.gitignore index 41f6bb494..a2e9e66bd 100644 --- a/.gitignore +++ b/.gitignore @@ -37,7 +37,7 @@ npm-debug.log* /android /package-lock.json - + src/app/architect/ src/environments/environment.e2e.ts .env @@ -51,4 +51,339 @@ src/app/store/notification.service.ts src/assets/www/pdfjs/web/compressed.tracemonkey-pldi-09.pdf.pdf node_modules_ -node_modules__ \ No newline at end of file +node_modules__ +plugins_ + + + +# npm bug fies +_browserslist +acorn +acorn.cmd +acorn.ps1 +ansi-html +ansi-html.cmd +ansi-html.ps1 +atob +atob.cmd +atob.ps1 +autoprefixer +autoprefixer.cmd +autoprefixer.ps1 +blocking-proxy +blocking-proxy.cmd +blocking-proxy.ps1 +browser-sync +browser-sync.cmd +browser-sync.ps1 +browserslist.cmd +browserslist.ps1 +build-optimizer +build-optimizer.cmd +build-optimizer.ps1 +cap +cap.cmd +cap.ps1 +capacitor +capacitor.cmd +capacitor.ps1 +ci +ci.cmd +ci.ps1 +cordova +cordova-browser +cordova-browser.cmd +cordova-browser.ps1 +cordova-res +cordova-res.cmd +cordova-res.ps1 +cordova.cmd +cordova.ps1 +create +create.cmd +create.ps1 +cross-env +cross-env-shell +cross-env-shell.cmd +cross-env-shell.ps1 +cross-env.cmd +cross-env.ps1 +css-blank-pseudo +css-blank-pseudo.cmd +css-blank-pseudo.ps1 +css-has-pseudo +css-has-pseudo.cmd +css-has-pseudo.ps1 +css-prefers-color-scheme +css-prefers-color-scheme.cmd +css-prefers-color-scheme.ps1 +cssesc +cssesc.cmd +cssesc.ps1 +cssmin +cssmin.cmd +cssmin.ps1 +detect-libc +detect-libc.cmd +detect-libc.ps1 +dev-ip +dev-ip.cmd +dev-ip.ps1 +ecstatic +ecstatic.cmd +ecstatic.ps1 +errno +errno.cmd +errno.ps1 +esbuild +esbuild.cmd +esbuild.ps1 +escodegen +escodegen.cmd +escodegen.ps1 +esgenerate +esgenerate.cmd +esgenerate.ps1 +esparse +esparse.cmd +esparse.ps1 +esvalidate +esvalidate.cmd +esvalidate.ps1 +extract-zip +extract-zip.cmd +extract-zip.ps1 +find-process +find-process.cmd +find-process.ps1 +he +he.cmd +he.ps1 +hs +hs.cmd +hs.ps1 +http-server +http-server.cmd +http-server.ps1 +image-size +image-size.cmd +image-size.ps1 +import-local-fixture +import-local-fixture.cmd +import-local-fixture.ps1 +installed-package-contents +installed-package-contents.cmd +installed-package-contents.ps1 +ionic-lab +ionic-lab.cmd +ionic-lab.ps1 +is-ci +is-ci.cmd +is-ci.ps1 +is-docker +is-docker.cmd +is-docker.ps1 +ivy-ngcc +ivy-ngcc.cmd +ivy-ngcc.ps1 +jasmine +jasmine.cmd +jasmine.ps1 +jest +jest.cmd +jest.ps1 +jetifier +jetifier-standalone +jetifier-standalone.cmd +jetifier-standalone.ps1 +jetifier.cmd +jetifier.ps1 +jetify +jetify.cmd +jetify.ps1 +jsesc +jsesc.cmd +jsesc.ps1 +jsmin +jsmin.cmd +jsmin.ps1 +json5 +json5.cmd +json5.ps1 +karma +karma.cmd +karma.ps1 +lessc +lessc.cmd +lessc.ps1 +lite-server +lite-server.cmd +lite-server.ps1 +localize-extract +localize-extract.cmd +localize-extract.ps1 +localize-migrate +localize-migrate.cmd +localize-migrate.ps1 +localize-translate +localize-translate.cmd +localize-translate.ps1 +loose-envify +loose-envify.cmd +loose-envify.ps1 +lt +lt.cmd +lt.ps1 +md5-file +md5-file.cmd +md5-file.ps1 +mime +mime.cmd +mime.ps1 +mkdirp +mkdirp.cmd +mkdirp.ps1 +multicast-dns +multicast-dns.cmd +multicast-dns.ps1 +nanoid +nanoid.cmd +nanoid.ps1 +native-run +native-run.cmd +native-run.ps1 +needle +needle.cmd +needle.ps1 +ng +ng-xi18n +ng-xi18n.cmd +ng-xi18n.ps1 +ng.cmd +ng.ps1 +ngc +ngc.cmd +ngc.ps1 +ngcc +ngcc.cmd +ngcc.ps1 +node-gyp +node-gyp.cmd +node-gyp.ps1 +node-which +node-which.cmd +node-which.ps1 +nopt +nopt.cmd +nopt.ps1 +npm-packlist +npm-packlist.cmd +npm-packlist.ps1 +opener +opener.cmd +opener.ps1 +ot +ot.cmd +ot.ps1 +pacote +pacote.cmd +pacote.ps1 +parser +parser.cmd +parser.ps1 +prebuild-install +prebuild-install.cmd +prebuild-install.ps1 +protractor +protractor.cmd +protractor.ps1 +rc +rc.cmd +rc.ps1 +regjsparser +regjsparser.cmd +regjsparser.ps1 +rimraf +rimraf.cmd +rimraf.ps1 +sane +sane.cmd +sane.ps1 +sass +sass.cmd +sass.ps1 +semver +semver.cmd +semver.ps1 +shjs +shjs.cmd +shjs.ps1 +sshpk-conv +sshpk-conv.cmd +sshpk-conv.ps1 +sshpk-sign +sshpk-sign.cmd +sshpk-sign.ps1 +sshpk-verify +sshpk-verify.cmd +sshpk-verify.ps1 +stencil +stencil.cmd +stencil.ps1 +stylus +stylus.cmd +stylus.ps1 +svgo +svgo.cmd +svgo.ps1 +systeminformation +systeminformation.cmd +systeminformation.ps1 +terser +terser.cmd +terser.ps1 +throttleproxy +throttleproxy.cmd +throttleproxy.ps1 +tree-kill +tree-kill.cmd +tree-kill.ps1 +ts-jest +ts-jest.cmd +ts-jest.ps1 +ts-node +ts-node.cmd +ts-node.ps1 +tsc +tsc.cmd +tsc.ps1 +tslint +tslint.cmd +tslint.ps1 +tsserver +tsserver.cmd +tsserver.ps1 +uglifyjs +uglifyjs.cmd +uglifyjs.ps1 +uuid +uuid.cmd +uuid.ps1 +wait-on +wait-on.cmd +wait-on.ps1 +wait-port +wait-port.cmd +wait-port.ps1 +watch +watch.cmd +watch.ps1 +webdriver-manager +webdriver-manager.cmd +webdriver-manager.ps1 +webpack +webpack-dev-server +webpack-dev-server.cmd +webpack-dev-server.ps1 +webpack.cmd +webpack.ps1 \ No newline at end of file diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index f1d47b0f3..956dd1557 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -951,7 +951,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(); @@ -1146,6 +1146,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(); diff --git a/src/app/pages/agenda/new-event/new-event.page.ts b/src/app/pages/agenda/new-event/new-event.page.ts index 2c9954bcd..2c727befa 100644 --- a/src/app/pages/agenda/new-event/new-event.page.ts +++ b/src/app/pages/agenda/new-event/new-event.page.ts @@ -281,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() } diff --git a/src/app/services/toast.service.ts b/src/app/services/toast.service.ts index db279af79..0539f5085 100644 --- a/src/app/services/toast.service.ts +++ b/src/app/services/toast.service.ts @@ -24,6 +24,73 @@ export class ToastService { toast.present(); } + + async _successMessage(message?: any, callback?) { + + let notification = document.createElement('div') + notification.className = 'notification' + notification.innerHTML = ` + +
+

+ +

{{ message }}

+

+ +
+ ` + + document.body.append(notification) + notification.querySelector('.text').innerHTML = message || 'Processo efetuado' + setTimeout(()=>{ + if (callback) { + callback() + } + + notification.style.right = "-100%" + + setTimeout(()=>{ + notification.remove() + },1000) + + },6000) + + } + + async _badRequest(message?: string, callback?) { + + let notification = document.createElement('div') + notification.className = 'notification' + notification.innerHTML = ` + +
+

+ +

{{ message }}

+

+ +
+ ` + + notification.style.animationName = 'notification-top' + + document.body.append(notification) + notification.querySelector('.text').innerHTML = message || 'Processo não efetuado' + setTimeout(()=>{ + if (callback) { + callback() + } + + notification.style.right = "-100%" + + setTimeout(()=>{ + notification.remove() + },1000) + + },6000) + + } + async successMessage(message?: any, callback?) { let notification = document.createElement('div') diff --git a/src/app/shared/agenda/edit-event/edit-event.page.ts b/src/app/shared/agenda/edit-event/edit-event.page.ts index 4eef38a80..36759d852 100644 --- a/src/app/shared/agenda/edit-event/edit-event.page.ts +++ b/src/app/shared/agenda/edit-event/edit-event.page.ts @@ -142,6 +142,10 @@ export class EditEventPage implements OnInit { } + ngOnChanges(changes: any): void { + // this.loadedEventAttachments = this.loadedEventAttachments.concat(this.postEvent.Attachments) + } + close() { this.closeComponent.emit(); this.setIntervenient.emit([]); @@ -282,7 +286,6 @@ export class EditEventPage implements OnInit { async saveDocument() { - console.log(this.loadedEventAttachments) await this.loadedEventAttachments.forEach( async (e)=>{ @@ -303,10 +306,10 @@ export class EditEventPage implements OnInit { }; await this.attachmentsService.setEventAttachmentById(DocumentToSave).toPromise(); - this.getAttachments(this.postEvent.EventId); + await this.getAttachments(this.postEvent.EventId); } else if(remove) { - this.attachmentsService.deleteEventAttachmentById(e.Id).subscribe( res=> {}) + await this.attachmentsService.deleteEventAttachmentById(e.Id).toPromise() } }) @@ -365,11 +368,9 @@ export class EditEventPage implements OnInit { window['temp.path:/home/agenda/edit-event.component.ts'] = {} } - getAttachments(eventId: string){ - this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{ - this.loadedEventAttachments = res; - console.log('res', res); - }); + async getAttachments(eventId: string){ + const rest: any = this.attachmentsService.getAttachmentsById(eventId).toPromise() + this.loadedEventAttachments = rest; } deleteAttachment(attachmentID: string, index) { diff --git a/src/app/shared/agenda/new-event/new-event.page.ts b/src/app/shared/agenda/new-event/new-event.page.ts index bcf7d5dc4..058c0910f 100644 --- a/src/app/shared/agenda/new-event/new-event.page.ts +++ b/src/app/shared/agenda/new-event/new-event.page.ts @@ -409,14 +409,14 @@ export class NewEventPage implements OnInit { this.afterSave(); } - this.toastService.successMessage('Evento criado') + this.toastService._successMessage('Evento criado') }, error => { loader.remove() this.showLoader = false - this.toastService.badRequest('Evento não criado') + this.toastService._badRequest('Evento não criado') }); diff --git a/src/app/shared/agenda/view-event/view-event.page.ts b/src/app/shared/agenda/view-event/view-event.page.ts index cff1408fe..2de4d89da 100644 --- a/src/app/shared/agenda/view-event/view-event.page.ts +++ b/src/app/shared/agenda/view-event/view-event.page.ts @@ -95,6 +95,7 @@ export class ViewEventPage implements OnInit { } loadEvent() { + this.eventsService.getEvent(this.eventId).subscribe(res => { console.log(res); this.loadedEvent = res; diff --git a/src/proxy.conf.json b/src/proxy.conf.json index e69de29bb..9e26dfeeb 100644 --- a/src/proxy.conf.json +++ b/src/proxy.conf.json @@ -0,0 +1 @@ +{} \ No newline at end of file