mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Module Actions stable version.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
</ion-tab-button>
|
||||
<ion-tab-button tab="publications">
|
||||
<ion-icon class="nav-icon" src="assets/images/icons-nav-actions.svg"></ion-icon>
|
||||
<ion-label>Ações</ion-label>
|
||||
<ion-label>Acções</ion-label>
|
||||
</ion-tab-button>
|
||||
<!-- <ion-tab-button tab="search">
|
||||
<ion-icon name="search"></ion-icon>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* import { Image } from './image'; */
|
||||
|
||||
export class Publication{
|
||||
DateIndex: Date;
|
||||
DocumentId:string;
|
||||
ProcessId:string;
|
||||
Title: string;
|
||||
Message: string;
|
||||
DatePublication: Date;
|
||||
/* image: Image; */
|
||||
OriginalFileName: string;
|
||||
FileBase64:string;
|
||||
FileExtension: string;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -84,7 +84,7 @@ export class PublicationsPage implements OnInit {
|
||||
this.publicationsTravelFolderList.push(folder);
|
||||
}
|
||||
});
|
||||
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+14
-3
@@ -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;
|
||||
});
|
||||
@@ -75,7 +85,6 @@ export class PublicationDetailPage implements OnInit {
|
||||
|
||||
async editPost(publicationType:any) {
|
||||
console.log(this.publication);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: NewPublicationPage,
|
||||
componentProps:{
|
||||
@@ -87,7 +96,9 @@ export class PublicationDetailPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(()=>{
|
||||
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