From be03b9c0d375e6097dd6cefa1edc944f1253bf80 Mon Sep 17 00:00:00 2001 From: Tiago Kayaya Date: Tue, 15 Dec 2020 19:37:42 +0100 Subject: [PATCH] multiples improvements --- src/app/animations/animations.ts | 3 + src/app/home/home.page.html | 12 +- src/app/pages/agenda/agenda.page.html | 14 ++- src/app/pages/agenda/agenda.page.scss | 57 ++++++---- src/app/pages/events/events.page.html | 6 +- src/app/pages/events/events.page.scss | 43 +++---- .../gabinete-digital.page.html | 30 ++--- .../gabinete-digital.page.scss | 98 ++++++++++------ .../new-publication/new-publication.page.html | 10 +- .../new-publication/new-publication.page.ts | 106 +++++++----------- .../pages/publications/publications.page.html | 35 +++--- .../pages/publications/publications.page.scss | 61 ++++++---- .../pages/publications/publications.page.ts | 41 ++++++- .../publication-detail.page.scss | 11 +- .../publication-detail.page.ts | 25 ++--- .../view-publications.page.html | 26 +++-- .../view-publications.page.scss | 61 +++++++--- .../view-publications.page.ts | 20 +++- src/app/services/loading.service.ts | 11 +- src/app/services/publications.service.ts | 4 +- .../images/icons-nav-gabinete-inactive.svg | 23 ++++ 21 files changed, 434 insertions(+), 263 deletions(-) create mode 100644 src/app/animations/animations.ts create mode 100644 src/assets/images/icons-nav-gabinete-inactive.svg diff --git a/src/app/animations/animations.ts b/src/app/animations/animations.ts new file mode 100644 index 000000000..ce536f126 --- /dev/null +++ b/src/app/animations/animations.ts @@ -0,0 +1,3 @@ +import { Animation, AnimationController } from '@ionic/angular'; + +/* export const enterAnimation = (base) */ \ No newline at end of file diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index c098b7a80..b24215954 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -1,20 +1,20 @@ - - + + {{totalEvent}} Início - - + + Agenda - - + + {{totalExpediente}} Gabinete Digital diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index 094f3d9b8..39b78f4a1 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -1,6 +1,5 @@ - - - + +
-
+
+
+ +
+
@@ -38,6 +41,9 @@ Pessoal + + +
diff --git a/src/app/pages/agenda/agenda.page.scss b/src/app/pages/agenda/agenda.page.scss index 33f6194f9..5d120cae6 100644 --- a/src/app/pages/agenda/agenda.page.scss +++ b/src/app/pages/agenda/agenda.page.scss @@ -214,34 +214,49 @@ label{ font-size: 25px; margin: 0 5px 0 25px; padding: 0; - color:#ffffff; + /* color:#ffffff; */ + color:#000; float: left; } .div-top-header{ width: 400px; - height: 50px; - margin: 6px auto; + margin: 0 auto; background-color: #0782c9; overflow: auto; + padding-top: 15px; + border: 0!important; + + .div-search{ + font-size: 45px; + float: left; + margin: 0 0 0 10px + } + .div-logo{ + background: transparent; + width: 140px; + margin: 5px 0 0px 71px; + float: left; + } + .div-logo img{ + width: 100%; + } + .div-profile{ + font-size: 45px; + float: right; + margin-right: 10px; + } } -.div-search{ - font-size: 45px; - float: left; - margin: 0 0 0 10px -} -.div-logo{ - background: transparent; - width: 150px; - margin: 2.5px 0 2.5px 71px; - float: left; -} -.div-logo img{ - width: 100%; -} -.div-profile{ - font-size: 45px; - float: right; - margin-right: 10px; +.main-content{ + width: 100%; /* 400px */ + height: 100%; + font-family: Roboto; + margin: 0 auto; + border-top-left-radius: 25px; + border-top-right-radius: 25px; + background-color: #fff; + overflow:auto; + /* padding: 25px 20px 0 20px; */ + color: #000 !important; } diff --git a/src/app/pages/events/events.page.html b/src/app/pages/events/events.page.html index 1da806677..4592c1116 100644 --- a/src/app/pages/events/events.page.html +++ b/src/app/pages/events/events.page.html @@ -1,5 +1,5 @@ - - + +
+
+
diff --git a/src/app/pages/events/events.page.scss b/src/app/pages/events/events.page.scss index e9b12be86..cae4ec29a 100644 --- a/src/app/pages/events/events.page.scss +++ b/src/app/pages/events/events.page.scss @@ -21,28 +21,31 @@ ion-toolbar{ } .div-top-header{ width: 400px; - margin: 6px auto; + margin: 0 auto; background-color: #0782c9; overflow: auto; - } - .div-search{ - font-size: 45px; - float: left; - margin: 0 0 0 10px - } - .div-logo{ - background: transparent; - width: 150px; - margin: 2.5px 0 2.5px 71px; - float: left; - } - .div-logo img{ - width: 100%; - } - .div-profile{ - font-size: 45px; - float: right; - margin-right: 10px; + padding-top: 15px; + border: 0!important; + + .div-search{ + font-size: 45px; + float: left; + margin: 0 0 0 10px + } + .div-logo{ + background: transparent; + width: 140px; + margin: 5px 0 0px 71px; + float: left; + } + .div-logo img{ + width: 100%; + } + .div-profile{ + font-size: 45px; + float: right; + margin-right: 10px; + } } .ion-text-header-top p{ --background: transparent; diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.html b/src/app/pages/gabinete-digital/gabinete-digital.page.html index 4270bb3c6..e9bd9cc21 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.html +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.html @@ -1,5 +1,5 @@ - - + +
-
- - Gabinete Digital - +
- - - - - - -
+
+
+
+ Gabinete Digital +
+
+ +
+ + + + + +
diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.scss b/src/app/pages/gabinete-digital/gabinete-digital.page.scss index babb917b2..f5c0b77b4 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.scss +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.scss @@ -1,11 +1,13 @@ ion-content{ - --padding-top:15px; - --padding-end:15px; - --padding-start:15px; - --padding-bottom:15px; - --background:#ecf8ff; + /* --padding-top:15px; */ +/* --padding-end:15px; + --padding-start:15px; */ + /* --padding-bottom:15px; */ + /* --background:#ecf8ff; */ + --background: transparent; } :host{ + background: #0782c9; ion-card-title{ text-align: center; } @@ -34,10 +36,66 @@ ion-label{ margin-bottom: 10px; border-radius: 5px; } +.div-top-header{ + width: 400px; + margin: 0 auto; + background-color: #0782c9; + overflow: auto; + padding-top: 15px; + border: 0!important; + + .div-search{ + font-size: 45px; + float: left; + margin: 0 0 0 10px + } + .div-logo{ + background: transparent; + width: 140px; + margin: 5px 0 0px 71px; + float: left; + } + .div-logo img{ + width: 100%; + } + .div-profile{ + font-size: 45px; + float: right; + margin-right: 10px; + } +} /* NEW CSS */ -.expedient-content{ - width: 100%; +.main-content{ + width: 100%; /* 400px */ + height: 100%; + font-family: Roboto; + margin: 0 auto; + border-top-left-radius: 25px; + border-top-right-radius: 25px; + background:#ecf8ff;; + overflow:auto; + padding: 25px 15px 15px 15px; +} +.title-content{ + width: 360px; + height: auto; + margin: 0 auto; + overflow: hidden; + padding: 0 !important; + background: transparent; +} +.div-title{ + padding: 0!important; + float: left; +} +.title{ + font-size: 25px; +} +.div-icon{ + width: 40px; + float: right; + font-size: 35px; overflow: auto; } .exp-card{ @@ -97,29 +155,3 @@ ion-label{ } -.div-top-header{ - width: 400px; - height: 50px; - margin: 6px auto; - background-color: #0782c9; - overflow: auto; -} -.div-search{ - font-size: 45px; - float: left; - margin: 0 0 0 10px -} -.div-logo{ - background: transparent; - width: 150px; - margin: 2.5px 0 2.5px 71px; - float: left; -} -.div-logo img{ - width: 100%; -} -.div-profile{ - font-size: 45px; - float: right; - margin-right: 10px; -} diff --git a/src/app/pages/publications/new-publication/new-publication.page.html b/src/app/pages/publications/new-publication/new-publication.page.html index 3d64e264a..5df45dc6c 100644 --- a/src/app/pages/publications/new-publication/new-publication.page.html +++ b/src/app/pages/publications/new-publication/new-publication.page.html @@ -40,7 +40,7 @@ Fotografia Anexada - +
{ this.publicationFolderList = res; console.log(res); @@ -76,6 +84,7 @@ export class PublicationsPage implements OnInit { this.publicationsTravelFolderList.push(folder); } }); + this.showLoader = false; }); } @@ -89,13 +98,43 @@ export class PublicationsPage implements OnInit { backdropDismiss: false }); await modal.present(); - modal.onDidDismiss(); + modal.onDidDismiss().then(()=>{ + this.doRefresh(event); + }); } async viewPublications(folder: PublicationFolder) { + + /* const enterAnimation = (baseEl: any) => { + const backdropAnimation = this.animationController.create() + .addElement(baseEl.querySelector('ion-backdrop')!) + .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); + + const wrapperAnimation = this.animationController.create() + .addElement(baseEl.querySelector('.modal-wrapper')!) + .keyframes([ + { offset: 0, opacity: '0', transform: 'scale(0)' }, + { offset: 1, opacity: '0.99', transform: 'scale(1)' } + ]); + + return this.animationController.create() + .addElement(baseEl) + .easing('ease-out') + .duration(500) + .addAnimation([backdropAnimation, wrapperAnimation]); + } + + const leaveAnimation = (baseEl: any) => { + return enterAnimation(baseEl).direction('reverse'); + } + */ + + /* let item = this.publicationFolderList; */ const modal = await this.modalController.create({ component: ViewPublicationsPage, + /* enterAnimation, + leaveAnimation, */ componentProps:{ item:folder, }, diff --git a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.scss b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.scss index 9b4c6f5ee..8de88c1b0 100644 --- a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.scss +++ b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.scss @@ -56,7 +56,7 @@ background: #ffffff; height: 100%; box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.6); - padding: 25px 20px 0 20px; + padding: 25px 0px 0 0px; overflow: auto; } .title-content{ @@ -81,8 +81,8 @@ font-size: 25px; } .post-img{ - width: 360px; - height: 200px; + width: 100%; + height: 400px; margin: 0 auto; border-radius: 0px!important; overflow: hidden; @@ -91,4 +91,9 @@ width: 100%; height: 100%; object-fit: cover; +} +.post-description{ + width: 360px; + margin: 0 auto; + margin-bottom: 35px; } \ No newline at end of file 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 d8f4c0b15..73b65a259 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 @@ -37,25 +37,21 @@ export class PublicationDetailPage implements OnInit { } ngOnInit() { - console.log(this.publication.FileBase64); - + /* console.log(this.publication.FileBase64); */ this.getPublicationDetail(); } getPublicationDetail(){ + console.log(this.publicationId); + console.log(this.folderId); this.publications.GetPublicationById(this.folderId,this.publicationId).subscribe(res=>{ - let itemImage = { - title: 'Title', - url: "data:image/jpg;base64," + res.FileBase64, - format: 'png' - } + console.log(res); this.publication = { DocumentId: res.DocumentId, ProcessId:res.ProcessId, Title:res.Title, Message: res.Message, DatePublication: res.DatePublication, - /* image: itemImage, */ FileBase64: "data:image/jpg;base64," + res.FileBase64, OriginalFileName: '', FileExtension: '', @@ -68,11 +64,10 @@ export class PublicationDetailPage implements OnInit { } deletePost(){ - console.log(this.folderId); - console.log(this.publicationId); - - - this.publications.DeletePublication(this.folderId, this.publicationId); + this.publications.DeletePublication(this.folderId, this.publicationId).then(res =>{ + console.log(res); + + }); this.close(); } @@ -89,7 +84,9 @@ export class PublicationDetailPage implements OnInit { backdropDismiss: false }); await modal.present(); - modal.onDidDismiss(); + modal.onDidDismiss().then(()=>{ + this.getPublicationDetail(); + }); } openPreview(imageUrl:string){ 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 edb69c580..4833056c1 100644 --- a/src/app/pages/publications/view-publications/view-publications.page.html +++ b/src/app/pages/publications/view-publications/view-publications.page.html @@ -1,5 +1,5 @@ - +
-
- - - - - - + +
-
+
@@ -33,10 +28,21 @@
- +
+
+ + + + + + + + + +
{ - event.target.complete(); + /* event.target.complete(); */ }, 2000); } close(){ this.modalController.dismiss(); } getPublications(){ - /* console.log(this.item.ProcessId); */ + this.showLoader = true; this.publications.GetPublications(this.item.ProcessId).subscribe(res=>{ this.publicationList = new Array(); @@ -65,7 +67,9 @@ export class ViewPublicationsPage implements OnInit { this.publicationList.push(item); }); console.log(this.publicationList); + this.showLoader = false; }); + } async AddPublication(publicationType:any, folderId:string) { @@ -79,7 +83,9 @@ export class ViewPublicationsPage implements OnInit { backdropDismiss: false }); await modal.present(); - modal.onDidDismiss(); + modal.onDidDismiss().then(()=>{ + this.doRefresh(event); + }); } async viewPublicationDetail(processId:string, publicationId:string) { @@ -93,7 +99,9 @@ export class ViewPublicationsPage implements OnInit { backdropDismiss: false }); await modal.present(); - modal.onDidDismiss(); + modal.onDidDismiss().then(()=>{ + this.doRefresh(event); + }); } } diff --git a/src/app/services/loading.service.ts b/src/app/services/loading.service.ts index 6b884d4e6..9e25442c0 100644 --- a/src/app/services/loading.service.ts +++ b/src/app/services/loading.service.ts @@ -5,18 +5,17 @@ import { LoadingController } from '@ionic/angular'; providedIn: 'root' }) export class LoadingService { + loading:any; constructor(public loadingController: LoadingController) { } - async simpleLoading(message:string) { - const loading = await this.loadingController.create({ + async simpleLoading() { + this.loading = await this.loadingController.create({ cssClass: 'my-custom-class', - message:message, + message:'A carregar!...', duration: 2000 }); - await loading.present(); - - const { role, data } = await loading.onDidDismiss(); + await this.loading.present(); } async customizedLoading() { diff --git a/src/app/services/publications.service.ts b/src/app/services/publications.service.ts index dd34bd26d..653b0f7b9 100644 --- a/src/app/services/publications.service.ts +++ b/src/app/services/publications.service.ts @@ -139,9 +139,7 @@ export class PublicationsService { headers: this.headers, /* params: params */ }; - return this.http.delete(`${geturl}`, options).toPromise().then(res =>{ - console.log(res); - }); + return this.http.delete(`${geturl}`, options).toPromise(); } diff --git a/src/assets/images/icons-nav-gabinete-inactive.svg b/src/assets/images/icons-nav-gabinete-inactive.svg new file mode 100644 index 000000000..a58bacaab --- /dev/null +++ b/src/assets/images/icons-nav-gabinete-inactive.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + +