+
- 07 de Janeiro
- Decreto de Cadastro Social Único
+ {{evento.DateBegin}}
+ {{evento.Description}}
diff --git a/src/app/pages/publications/publications.page.scss b/src/app/pages/publications/publications.page.scss
index 0d1dc5403..a93051499 100644
--- a/src/app/pages/publications/publications.page.scss
+++ b/src/app/pages/publications/publications.page.scss
@@ -5,8 +5,11 @@ ion-content{
--background: transparent;
}
ion-toolbar{
- background: transparent;
border-width: 0 !important;
+ --padding-top: 0px !important;
+ --padding-start: 0px !important;
+ --padding-right: 0px !important;
+ --padding-end: 0px !important;
}
.div-top-header{
width: 400px;
@@ -15,65 +18,84 @@ ion-toolbar{
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: 140px;
- margin: 5px 0 0px 71px;
- float: left;
- }
- .div-logo img{
- width: 100%;
- }
- .div-profile{
- font-size: 45px;
- float: right;
- margin-right: 10px;
- }
+
ion-content{
--background:#0782c9;
--border: none;
}
+ .main-header{
+ width: 100%; /* 400px */
+ height: 100%;
+ font-family: Roboto;
+ border-top-left-radius: 25px;
+ border-top-right-radius: 25px;
+ background-color: #fff;
+ overflow:hidden;
+ padding: 30px 20px 0px 20px;
+ color:#000;
+ transform: translate3d(0, 1px, 0);
+
+ .title-content{
+ width: 360px;
+ margin: 0px auto;
+ overflow: auto;
+ padding: 0 !important;
+ background: #fff;
+ }
+ .div-title{
+ padding: 0!important;
+ float: left;
+ }
+ .title{
+ font-size: 25px;
+ }
+ .div-icon{
+ width: 40px;
+ float: right;
+ font-size: 35px;
+ overflow: auto;
+ padding: 1px;
+ }
+ .div-icon ion-icon{
+ float: right;
+ padding-left: 20px;
+ }
+ }
.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;
- }
- .title-content{
- width: 360px;
- margin: 0px auto;
- overflow: auto;
- padding: 0 !important;
- }
- .div-title{
- padding: 0!important;
- float: left;
- }
- .title{
- font-size: 25px;
- }
- .div-icon{
- width: 40px;
- float: right;
- font-size: 35px;
- overflow: auto;
+ padding: 15px 20px 0 20px;
}
.item{
width: 360px;
padding: 0 0px 0 0px;
overflow: auto;
- margin: 0 auto;
+ margin: 0px auto;
}
.item-icon{
margin-top: 28px;
diff --git a/src/app/pages/publications/publications.page.ts b/src/app/pages/publications/publications.page.ts
index 64909f66e..2881b7fe4 100644
--- a/src/app/pages/publications/publications.page.ts
+++ b/src/app/pages/publications/publications.page.ts
@@ -1,6 +1,16 @@
import { Component, OnInit } from '@angular/core';
+import { Router, NavigationEnd } from '@angular/router';
import { ModalController } from '@ionic/angular';
+import { PublicationFolder } from 'src/app/models/publicationfolder';
+import { ProcessesService } from 'src/app/services/processes.service';
+import { PublicationsService } from 'src/app/services/publications.service';
import { NewActionPage } from './new-action/new-action.page';
+import { ViewPublicationsPage } from './view-publications/view-publications.page';
+
+import { Animation, AnimationController } from '@ionic/angular';
+import { LoadingController } from '@ionic/angular';
+import { LoadingService } from 'src/app/services/loading.service';
+
@Component({
selector: 'app-publications',
@@ -8,10 +18,74 @@ import { NewActionPage } from './new-action/new-action.page';
styleUrls: ['./publications.page.scss'],
})
export class PublicationsPage implements OnInit {
+ showLoader: boolean;
+ publicationFolder: PublicationFolder;
- constructor(private modalController: ModalController,) { }
+ publicationFolderList: PublicationFolder[];
+ publicationsEventFolderList: PublicationFolder[];
+ publicationsTravelFolderList: PublicationFolder[];
+
+ theDate:any;
+ theEndDate:any;
+ customDate:any;
+ months: string[];
+ days:string[];
+
+
+
+ constructor(
+ private router: Router,
+ private modalController: ModalController,
+ private animationController: AnimationController,
+ private loading: LoadingService,
+ private publications: PublicationsService,
+ ) {
+ this.months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
+ this.days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
+ }
ngOnInit() {
+ this.router.events.forEach((event) => {
+ if(event instanceof NavigationEnd && event.url == this.router.url) {
+ this.getActions();
+ }
+ });
+ }
+ doRefresh(event) {
+ this.getActions();
+
+ setTimeout(() => {
+ event.target.complete();
+ }, 2000);
+ }
+
+ getActions(){
+ this.showLoader = true;
+ this.publications.GetPublicationFolderList().subscribe(res=>{
+ this.publicationFolderList = res;
+ console.log(res);
+ this.publicationsEventFolderList = new Array();
+ this.publicationsTravelFolderList = new Array();
+ res.forEach(data => {
+ this.theDate = new Date(data.DateBegin);
+ this.theEndDate = new Date(data.DateEnd);
+ let folder: PublicationFolder = {
+ ProcessId: data.ProcessId,
+ Description: data.Description,
+ Detail: data.Detail,
+ DateBegin: this.theDate.getDate() +" de " + ( this.months[this.theDate.getMonth()])+" de " +this.theDate.getFullYear(),
+ DateEnd: this.theEndDate.getDate() +" de " + ( this.months[this.theEndDate.getMonth()])+" de " +this.theEndDate.getFullYear(),
+ ActionType: data.ActionType,
+ }
+ if(data.ActionType == "Evento"){
+ this.publicationsEventFolderList.push(folder);
+ }
+ else{
+ this.publicationsTravelFolderList.push(folder);
+ }
+ });
+
+ });
}
async AddPublicationFolder(item:any) {
@@ -24,6 +98,50 @@ export class PublicationsPage implements OnInit {
backdropDismiss: false
});
await modal.present();
+ 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,
+ },
+ cssClass: 'new-action',
+ backdropDismiss: false
+ });
+ await modal.present();
modal.onDidDismiss();
}
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 a2790fa5d..0d08d53cd 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,24 +17,55 @@
+
-
+
-
Aterragem em Maputo
-
Há 1h atrás
+
{{publication.Title}}
+
{{publication.DatePublication | date: 'dd-MM-yy | h:mm'}}
+
+
+
+
+
-
-

+
30" class="post-img">
+

+
+
+
-
Presidente João Lourenço chega a Maputo para investidura de Filipe Nyusi como presidente de Moçambique
+
{{publication.Message}}
-
+
+
+
+
+
+

+
+
+
+
+
+