This commit is contained in:
Peter Maquiran
2021-11-07 20:56:34 +01:00
parent c1bdeddb00
commit 585e0989d8
8 changed files with 421 additions and 15 deletions
+335
View File
@@ -52,3 +52,338 @@ src/app/store/notification.service.ts
src/assets/www/pdfjs/web/compressed.tracemonkey-pldi-09.pdf.pdf src/assets/www/pdfjs/web/compressed.tracemonkey-pldi-09.pdf.pdf
node_modules_ node_modules_
node_modules__ 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
+2 -1
View File
@@ -951,7 +951,7 @@ export class AgendaPage implements OnInit {
// }); // });
this.myCal.update(); this.myCal.update();
this.myCal.loadEvents(); this.myCal.loadEvents();
// this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
} }
this.cloneAllmobileComponent(); this.cloneAllmobileComponent();
@@ -1146,6 +1146,7 @@ export class AgendaPage implements OnInit {
async closeComponentEditEventOrAdd() { async closeComponentEditEventOrAdd() {
if (this.IsEvent = 'edit') { if (this.IsEvent = 'edit') {
// this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
this.eventClicked(this.viewingEventObject); this.eventClicked(this.viewingEventObject);
} else if (this.IsEvent = 'add') { } else if (this.IsEvent = 'add') {
this.cloneAllmobileComponent(); this.cloneAllmobileComponent();
@@ -281,12 +281,12 @@ export class NewEventPage implements OnInit {
}); });
this.toastService.successMessage() this.toastService._successMessage()
this.modalController.dismiss(this.postEvent); this.modalController.dismiss(this.postEvent);
} catch (error) { } catch (error) {
this.toastService.badRequest() this.toastService._badRequest()
} finally { } finally {
loader.remove() loader.remove()
} }
+67
View File
@@ -24,6 +24,73 @@ export class ToastService {
toast.present(); toast.present();
} }
async _successMessage(message?: any, callback?) {
let notification = document.createElement('div')
notification.className = 'notification'
notification.innerHTML = `
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center success">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
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 = `
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center faild">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/notification-error.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
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?) { async successMessage(message?: any, callback?) {
let notification = document.createElement('div') let notification = document.createElement('div')
@@ -142,6 +142,10 @@ export class EditEventPage implements OnInit {
} }
ngOnChanges(changes: any): void {
// this.loadedEventAttachments = this.loadedEventAttachments.concat(this.postEvent.Attachments)
}
close() { close() {
this.closeComponent.emit(); this.closeComponent.emit();
this.setIntervenient.emit([]); this.setIntervenient.emit([]);
@@ -282,7 +286,6 @@ export class EditEventPage implements OnInit {
async saveDocument() { async saveDocument() {
console.log(this.loadedEventAttachments)
await this.loadedEventAttachments.forEach( async (e)=>{ await this.loadedEventAttachments.forEach( async (e)=>{
@@ -303,10 +306,10 @@ export class EditEventPage implements OnInit {
}; };
await this.attachmentsService.setEventAttachmentById(DocumentToSave).toPromise(); await this.attachmentsService.setEventAttachmentById(DocumentToSave).toPromise();
this.getAttachments(this.postEvent.EventId); await this.getAttachments(this.postEvent.EventId);
} else if(remove) { } 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'] = {} window['temp.path:/home/agenda/edit-event.component.ts'] = {}
} }
getAttachments(eventId: string){ async getAttachments(eventId: string){
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{ const rest: any = this.attachmentsService.getAttachmentsById(eventId).toPromise()
this.loadedEventAttachments = res; this.loadedEventAttachments = rest;
console.log('res', res);
});
} }
deleteAttachment(attachmentID: string, index) { deleteAttachment(attachmentID: string, index) {
@@ -409,14 +409,14 @@ export class NewEventPage implements OnInit {
this.afterSave(); this.afterSave();
} }
this.toastService.successMessage('Evento criado') this.toastService._successMessage('Evento criado')
}, },
error => { error => {
loader.remove() loader.remove()
this.showLoader = false this.showLoader = false
this.toastService.badRequest('Evento não criado') this.toastService._badRequest('Evento não criado')
}); });
@@ -95,6 +95,7 @@ export class ViewEventPage implements OnInit {
} }
loadEvent() { loadEvent() {
this.eventsService.getEvent(this.eventId).subscribe(res => { this.eventsService.getEvent(this.eventId).subscribe(res => {
console.log(res); console.log(res);
this.loadedEvent = res; this.loadedEvent = res;
+1
View File
@@ -0,0 +1 @@
{}