mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'feature/publications1' into feature/chat
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<ion-menu autoHide="false" side="end" content-id="main-content">
|
||||
<ion-header>
|
||||
<ion-toolbar translucent>
|
||||
<ion-title>Ações</ion-title>
|
||||
<ion-title>Acções</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
|
||||
@@ -7,12 +7,14 @@ import { IonicModule } from '@ionic/angular';
|
||||
import { EventsPageRoutingModule } from './events-routing.module';
|
||||
|
||||
import { EventsPage } from './events.page';
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
SharedModule,
|
||||
EventsPageRoutingModule
|
||||
],
|
||||
declarations: [EventsPage],
|
||||
|
||||
@@ -1,234 +1,20 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="ion-no-border" class="bg-blue">
|
||||
<div class="div-top-header">
|
||||
<div class="div-search">
|
||||
<ion-icon src='assets/images/icons-search.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="div-logo">
|
||||
<img src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
</div>
|
||||
<div class="div-profile">
|
||||
<ion-icon src='assets/images/icons-profile.svg'></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-header translucent="true">
|
||||
<ion-toolbar class="bg-blue">
|
||||
<ion-buttons slot="end">
|
||||
<div class="toggleBox">
|
||||
<div (click)="changeProfile()" class="toggle">
|
||||
<input type="checkbox">
|
||||
<label for="" class="onbtn">PR</label>
|
||||
<label for="" class="ofbtn">MDGPR</label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
<ion-toolbar class="bg-blue">
|
||||
<ion-label>
|
||||
<ion-item class="ion-text-right" lines="none">
|
||||
<ion-label class="ion-text-wrap">
|
||||
<h3 class="header-medium"> {{greetting}} Excelência <br />
|
||||
Ministro Director do Gabinete do<!-- <br /> -->
|
||||
Presidente da República
|
||||
</h3>
|
||||
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-label>
|
||||
</ion-toolbar>
|
||||
<!-- TABS -->
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="onSegmentChange()">
|
||||
<ion-segment-button value="Combinada">
|
||||
Combinada
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="Oficial">
|
||||
Oficial
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="Pessoal">
|
||||
Pessoal
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content >
|
||||
<ion-content class="main bg-blue">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
|
||||
<ion-label>
|
||||
<p class="p-small">{{customDate}}</p>
|
||||
<p class="p-small ion-text-center">{{customDate}}</p>
|
||||
</ion-label>
|
||||
<ion-label>
|
||||
<p class="p-small ion-text-center"> <bold>5</bold> eventtos agendados para hoje</p>
|
||||
</ion-label>
|
||||
<app-calendar></app-calendar>
|
||||
<!-- <ion-item lines="none">
|
||||
<ion-icon slot="start" src="assets/images/icons-agenda.svg"></ion-icon>
|
||||
<label>A sua Agenda</label>
|
||||
</ion-item> -->
|
||||
<!-- COMBINADA -->
|
||||
<div [ngSwitch]="segment">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<!-- <ion-list *ngSwitchCase="'Combinada'" >
|
||||
<ion-item-group>
|
||||
<ion-item-sliding>
|
||||
<ion-item lines="none"
|
||||
*ngFor="let event of eventsList"
|
||||
[routerLink]="['/home/events', event.EventId, 'events']">
|
||||
<div class="div-item-{{event.CalendarName}}">
|
||||
<div class="div-up">
|
||||
<div class="div-icon">
|
||||
<ion-icon slot="start" name="reader"></ion-icon>
|
||||
</div>
|
||||
<div class="div-content-{{event.CalendarName}}">
|
||||
<h3 class="capitalizeText">{{event.Subject}}</h3>
|
||||
<p>{{event.StartDate | date: 'hh:mm'}} - {{event.EndDate| date: 'hh:mm'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-botton">
|
||||
<div class="div-botton-left">
|
||||
<ion-icon class="ion-icon-location" slot="start" name="location"></ion-icon>
|
||||
</div>
|
||||
<div class="div-botton-middle">
|
||||
<p class="item-list-small capitalizeText">{{event.Location}}</p>
|
||||
</div>
|
||||
<div *ngIf="event.HasAttachments" class="div-botton-right">
|
||||
<ion-icon class="ion-icon-attach" slot="end" name="attach-outline"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
</ion-item-group>
|
||||
</ion-list> -->
|
||||
<ion-list *ngSwitchCase="'Combinada'">
|
||||
<div *ngIf="eventsList">
|
||||
<ion-item-sliding>
|
||||
<ion-item class="Rectangle" lines="none"
|
||||
*ngFor="let event of eventsList"
|
||||
[routerLink]="['/home/events', event.EventId, 'events']">
|
||||
<div class="content-{{profile}}-{{event.CalendarName}}">
|
||||
<div class="approve-event-time">
|
||||
<p>{{event.StartDate | date: 'hh:mm'}}</p>
|
||||
<p>{{event.EndDate | date: 'hh:mm'}}</p>
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<p>{{event.Location}}</p>
|
||||
<h3>{{event.Subject}}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
</div>
|
||||
</ion-list>
|
||||
<!-- OFICIAL -->
|
||||
<!-- <ion-list *ngSwitchCase="'Oficial'">
|
||||
<ion-item-group>
|
||||
<ion-item-sliding>
|
||||
<ion-item lines="none"
|
||||
*ngFor="let event of officialeventsList"
|
||||
[routerLink]="['/home/events', event.EventId, 'events']">
|
||||
<div class="div-item-{{event.CalendarName}}">
|
||||
<div class="div-up">
|
||||
<div class="div-icon">
|
||||
<ion-icon slot="start" name="reader"></ion-icon>
|
||||
</div>
|
||||
<div class="div-content-{{event.CalendarName}}">
|
||||
<h3 class="capitalizeText">{{event.Subject}}</h3>
|
||||
<p>{{event.StartDate | date: 'hh:mm'}} - {{event.EndDate | date: 'hh:mm'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-botton">
|
||||
<div class="div-botton-left">
|
||||
<ion-icon class="ion-icon-location" slot="start" name="location"></ion-icon>
|
||||
</div>
|
||||
<div class="div-botton-middle">
|
||||
<p class="item-list-small capitalizeText">{{event.Location}}</p>
|
||||
</div>
|
||||
<div class="div-botton-right">
|
||||
<ion-icon class="ion-icon-attach" slot="end" name="attach-outline"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
</ion-item-group>
|
||||
</ion-list> -->
|
||||
<ion-list *ngSwitchCase="'Oficial'">
|
||||
<div *ngIf="officialeventsList">
|
||||
<ion-item-sliding>
|
||||
<ion-item class="Rectangle" lines="none"
|
||||
*ngFor="let event of officialeventsList"
|
||||
[routerLink]="['/home/events', event.EventId, 'events']">
|
||||
<div class="content-{{profile}}-{{event.CalendarName}}">
|
||||
<div class="approve-event-time">
|
||||
<p>{{event.StartDate | date: 'hh:mm'}}</p>
|
||||
<p>{{event.EndDate | date: 'hh:mm'}}</p>
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<p>{{event.Location}}</p>
|
||||
<h3>{{event.Subject}}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
</div>
|
||||
</ion-list>
|
||||
<!-- OFICIAL -->
|
||||
<!-- <ion-list *ngSwitchCase="'Pessoal'">
|
||||
<ion-item-group>
|
||||
<ion-item-sliding>
|
||||
<ion-item lines="none"
|
||||
*ngFor="let event of personaleventsList"
|
||||
[routerLink]="['/home/events', event.EventId, 'events']">
|
||||
<div class="div-item-{{event.CalendarName}}">
|
||||
<div class="div-up">
|
||||
<div class="div-icon">
|
||||
<ion-icon slot="start" name="reader"></ion-icon>
|
||||
</div>
|
||||
<div class="div-content-{{event.CalendarName}}">
|
||||
<h3 class="capitalizeText">{{event.Subject}}</h3>
|
||||
<p>{{event.StartDate | date: 'hh:mm' }} - {{event.EndDate | date: 'hh:mm'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-botton">
|
||||
<div class="div-botton-left">
|
||||
<ion-icon class="ion-icon-location" slot="start" name="location"></ion-icon>
|
||||
</div>
|
||||
<div class="div-botton-middle">
|
||||
<p class="item-list-small capitalizeText">{{event.Location}}</p>
|
||||
</div>
|
||||
<div class="div-botton-right">
|
||||
<ion-icon class="ion-icon-attach" slot="end" name="attach-outline"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
</ion-item-group>
|
||||
</ion-list> -->
|
||||
<ion-list *ngSwitchCase="'Pessoal'">
|
||||
<div *ngIf="personaleventsList">
|
||||
<ion-item-sliding>
|
||||
<ion-item class="Rectangle" lines="none"
|
||||
*ngFor="let event of personaleventsList"
|
||||
[routerLink]="['/home/events', event.EventId, 'events']">
|
||||
<div class="content-{{profile}}-{{event.CalendarName}}">
|
||||
<div class="approve-event-time">
|
||||
<p>{{event.StartDate | date: 'hh:mm'}}</p>
|
||||
<p>{{event.EndDate | date: 'hh:mm'}}</p>
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<p>{{event.Location}}</p>
|
||||
<h3>{{event.Subject}}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
<div class="next-meeting">
|
||||
<div class="meeting-time">08:30</div>
|
||||
<div class="meeting-description">Reunião de Conselho de Ministros no Palácio Presidencial</div>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
@@ -266,4 +266,11 @@ ion-toolbar{
|
||||
bottom: 15px;
|
||||
right: 14px;
|
||||
color: #e16817;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.next-meeting{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 0px auto;
|
||||
}
|
||||
@@ -20,5 +20,4 @@ export class GalleryPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="content-container">
|
||||
<div class="title-content">
|
||||
<div class="div-title">
|
||||
<ion-label class="title"> Nova Ação</ion-label>
|
||||
<ion-label class="title"> Nova Acção</ion-label>
|
||||
</div>
|
||||
<div class="actionType">
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
@@ -82,7 +82,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-textarea-class">
|
||||
<ion-textarea [(ngModel)]="folder.Detail" rows="12" cols="20" placeholder="Descrição da ação..."></ion-textarea>
|
||||
<ion-textarea [(ngModel)]="folder.Detail" rows="12" cols="20" placeholder="Descrição da acção..."></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -52,6 +52,7 @@ export class NewPublicationPage implements OnInit {
|
||||
private publications: PublicationsService,
|
||||
private camera: Camera,
|
||||
) {
|
||||
|
||||
this.publicationType = this.navParams.get('publicationType');
|
||||
this.folderId = this.navParams.get('folderId');
|
||||
this.publicationTitle = 'Nova Publicação';
|
||||
@@ -106,8 +107,11 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
async save(){
|
||||
if(this.publicationType == '3'){
|
||||
console.log(this.navParams.get('publication'));
|
||||
|
||||
if(this.capturedImage != ''){
|
||||
this.publication = {
|
||||
DateIndex: this.publication.DateIndex,
|
||||
DocumentId:this.publication.DocumentId,
|
||||
ProcessId:this.publication.ProcessId,
|
||||
Title: this.pub.Title,
|
||||
@@ -115,7 +119,7 @@ export class NewPublicationPage implements OnInit {
|
||||
DatePublication: this.publication.DatePublication,
|
||||
OriginalFileName: this.capturedImageTitle,
|
||||
FileBase64: this.capturedImage,
|
||||
FileExtension: 'jpg',
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
console.log('Edit change image');
|
||||
console.log(this.publication);
|
||||
@@ -124,14 +128,15 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
else{
|
||||
this.publication = {
|
||||
DateIndex: this.publication.DateIndex,
|
||||
DocumentId:this.publication.DocumentId,
|
||||
ProcessId:this.publication.ProcessId,
|
||||
Title: this.pub.Title,
|
||||
Message: this.pub.Message,
|
||||
DatePublication: this.publication.DatePublication,
|
||||
OriginalFileName: '',
|
||||
OriginalFileName: this.publication.OriginalFileName,
|
||||
FileBase64: this.publication.FileBase64,
|
||||
FileExtension: 'jpg',
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
console.log('Edit - keep image');
|
||||
console.log(this.publication);
|
||||
@@ -142,6 +147,7 @@ export class NewPublicationPage implements OnInit {
|
||||
else{
|
||||
|
||||
this.publication = {
|
||||
DateIndex: new Date(),
|
||||
DocumentId:null,
|
||||
ProcessId:this.folderId,
|
||||
Title: this.pub.Title,
|
||||
@@ -149,7 +155,7 @@ export class NewPublicationPage implements OnInit {
|
||||
DatePublication: new Date(),
|
||||
OriginalFileName: this.capturedImageTitle,
|
||||
FileBase64: this.capturedImage,
|
||||
FileExtension: 'jpg',
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
|
||||
console.log('Create');
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Ações Presidenciais</ion-label>
|
||||
<ion-label class="title">Acções Presidenciais</ion-label>
|
||||
</div>
|
||||
<div class="div-icon">
|
||||
<ion-icon (click)="AddPublicationFolder()" slot="end" src='assets/images/icons-add.svg'></ion-icon>
|
||||
|
||||
@@ -52,9 +52,10 @@ export class PublicationsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
doRefresh(event) {
|
||||
this.getActions();
|
||||
/* this.getActions(); */
|
||||
|
||||
setTimeout(() => {
|
||||
this.getActions();
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
@@ -83,8 +84,8 @@ export class PublicationsPage implements OnInit {
|
||||
else{
|
||||
this.publicationsTravelFolderList.push(folder);
|
||||
}
|
||||
this.showLoader = false;
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+15
-4
@@ -24,6 +24,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
this.publicationId = this.navParams.get('publicationId');
|
||||
this.folderId = this.navParams.get('folderIdId');
|
||||
this.publication = {
|
||||
DateIndex: null,
|
||||
DocumentId: '',
|
||||
ProcessId:'',
|
||||
Title:'',
|
||||
@@ -40,6 +41,13 @@ export class PublicationDetailPage implements OnInit {
|
||||
/* console.log(this.publication.FileBase64); */
|
||||
this.getPublicationDetail();
|
||||
}
|
||||
doRefresh(event) {
|
||||
this.getPublicationDetail();
|
||||
|
||||
setTimeout(() => {
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
getPublicationDetail(){
|
||||
this.showLoader = true;
|
||||
@@ -47,15 +55,17 @@ export class PublicationDetailPage implements OnInit {
|
||||
console.log(this.folderId);
|
||||
this.publications.GetPublicationById(this.folderId,this.publicationId).subscribe(res=>{
|
||||
console.log(res);
|
||||
/* this.publication = res; */
|
||||
this.publication = {
|
||||
DateIndex: res.DateIndex,
|
||||
DocumentId: res.DocumentId,
|
||||
ProcessId:res.ProcessId,
|
||||
Title:res.Title,
|
||||
Message: res.Message,
|
||||
DatePublication: res.DatePublication,
|
||||
FileBase64: "data:image/jpg;base64," + res.FileBase64,
|
||||
OriginalFileName: '',
|
||||
FileExtension: '',
|
||||
OriginalFileName: res.OriginalFileName,
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
this.showLoader = false;
|
||||
});
|
||||
@@ -78,7 +88,6 @@ export class PublicationDetailPage implements OnInit {
|
||||
|
||||
async editPost(publicationType:any) {
|
||||
console.log(this.publication);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: NewPublicationPage,
|
||||
componentProps:{
|
||||
@@ -90,7 +99,9 @@ export class PublicationDetailPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(()=>{
|
||||
this.getPublicationDetail();
|
||||
setTimeout(() => {
|
||||
this.getPublicationDetail();
|
||||
}, 5000);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -35,8 +35,9 @@ export class ViewPublicationsPage implements OnInit {
|
||||
this.getPublications();
|
||||
|
||||
setTimeout(() => {
|
||||
/* event.target.complete(); */
|
||||
}, 2000);
|
||||
this.getPublications();
|
||||
event.target.complete();
|
||||
}, 3000);
|
||||
}
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
@@ -54,6 +55,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
format: 'png'
|
||||
}
|
||||
let item: Publication = {
|
||||
"DateIndex": element.DateIndex,
|
||||
"DocumentId":element.DocumentId,
|
||||
"ProcessId":element.ProcessId,
|
||||
"Title":element.Title,
|
||||
|
||||
Reference in New Issue
Block a user