mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
Merge branch 'feature/publications' into developer
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
</ion-tab-button>
|
</ion-tab-button>
|
||||||
<ion-tab-button tab="publications">
|
<ion-tab-button tab="publications">
|
||||||
<ion-icon class="nav-icon" src="assets/images/icons-nav-actions.svg"></ion-icon>
|
<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>
|
||||||
<!-- <ion-tab-button tab="search">
|
<!-- <ion-tab-button tab="search">
|
||||||
<ion-icon name="search"></ion-icon>
|
<ion-icon name="search"></ion-icon>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/* import { Image } from './image'; */
|
/* import { Image } from './image'; */
|
||||||
|
|
||||||
export class Publication{
|
export class Publication{
|
||||||
|
DateIndex: Date;
|
||||||
DocumentId:string;
|
DocumentId:string;
|
||||||
ProcessId:string;
|
ProcessId:string;
|
||||||
Title: string;
|
Title: string;
|
||||||
Message: string;
|
Message: string;
|
||||||
DatePublication: Date;
|
DatePublication: Date;
|
||||||
/* image: Image; */
|
|
||||||
OriginalFileName: string;
|
OriginalFileName: string;
|
||||||
FileBase64:string;
|
FileBase64:string;
|
||||||
FileExtension: string;
|
FileExtension: string;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<ion-menu autoHide="false" side="end" content-id="main-content">
|
<ion-menu autoHide="false" side="end" content-id="main-content">
|
||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar translucent>
|
<ion-toolbar translucent>
|
||||||
<ion-title>Ações</ion-title>
|
<ion-title>Acções</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content>
|
<ion-content>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<div class="content-container">
|
<div class="content-container">
|
||||||
<div class="title-content">
|
<div class="title-content">
|
||||||
<div class="div-title">
|
<div class="div-title">
|
||||||
<ion-label class="title"> Nova Ação</ion-label>
|
<ion-label class="title"> Nova Acção</ion-label>
|
||||||
</div>
|
</div>
|
||||||
<div class="actionType">
|
<div class="actionType">
|
||||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-textarea-class">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
private publications: PublicationsService,
|
private publications: PublicationsService,
|
||||||
private camera: Camera,
|
private camera: Camera,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
this.publicationType = this.navParams.get('publicationType');
|
this.publicationType = this.navParams.get('publicationType');
|
||||||
this.folderId = this.navParams.get('folderId');
|
this.folderId = this.navParams.get('folderId');
|
||||||
this.publicationTitle = 'Nova Publicação';
|
this.publicationTitle = 'Nova Publicação';
|
||||||
@@ -106,8 +107,11 @@ export class NewPublicationPage implements OnInit {
|
|||||||
|
|
||||||
async save(){
|
async save(){
|
||||||
if(this.publicationType == '3'){
|
if(this.publicationType == '3'){
|
||||||
|
console.log(this.navParams.get('publication'));
|
||||||
|
|
||||||
if(this.capturedImage != ''){
|
if(this.capturedImage != ''){
|
||||||
this.publication = {
|
this.publication = {
|
||||||
|
DateIndex: this.publication.DateIndex,
|
||||||
DocumentId:this.publication.DocumentId,
|
DocumentId:this.publication.DocumentId,
|
||||||
ProcessId:this.publication.ProcessId,
|
ProcessId:this.publication.ProcessId,
|
||||||
Title: this.pub.Title,
|
Title: this.pub.Title,
|
||||||
@@ -115,7 +119,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
DatePublication: this.publication.DatePublication,
|
DatePublication: this.publication.DatePublication,
|
||||||
OriginalFileName: this.capturedImageTitle,
|
OriginalFileName: this.capturedImageTitle,
|
||||||
FileBase64: this.capturedImage,
|
FileBase64: this.capturedImage,
|
||||||
FileExtension: 'jpg',
|
FileExtension: 'jpeg',
|
||||||
}
|
}
|
||||||
console.log('Edit change image');
|
console.log('Edit change image');
|
||||||
console.log(this.publication);
|
console.log(this.publication);
|
||||||
@@ -124,14 +128,15 @@ export class NewPublicationPage implements OnInit {
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.publication = {
|
this.publication = {
|
||||||
|
DateIndex: this.publication.DateIndex,
|
||||||
DocumentId:this.publication.DocumentId,
|
DocumentId:this.publication.DocumentId,
|
||||||
ProcessId:this.publication.ProcessId,
|
ProcessId:this.publication.ProcessId,
|
||||||
Title: this.pub.Title,
|
Title: this.pub.Title,
|
||||||
Message: this.pub.Message,
|
Message: this.pub.Message,
|
||||||
DatePublication: this.publication.DatePublication,
|
DatePublication: this.publication.DatePublication,
|
||||||
OriginalFileName: '',
|
OriginalFileName: this.publication.OriginalFileName,
|
||||||
FileBase64: this.publication.FileBase64,
|
FileBase64: this.publication.FileBase64,
|
||||||
FileExtension: 'jpg',
|
FileExtension: 'jpeg',
|
||||||
}
|
}
|
||||||
console.log('Edit - keep image');
|
console.log('Edit - keep image');
|
||||||
console.log(this.publication);
|
console.log(this.publication);
|
||||||
@@ -142,6 +147,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
else{
|
else{
|
||||||
|
|
||||||
this.publication = {
|
this.publication = {
|
||||||
|
DateIndex: new Date(),
|
||||||
DocumentId:null,
|
DocumentId:null,
|
||||||
ProcessId:this.folderId,
|
ProcessId:this.folderId,
|
||||||
Title: this.pub.Title,
|
Title: this.pub.Title,
|
||||||
@@ -149,7 +155,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
DatePublication: new Date(),
|
DatePublication: new Date(),
|
||||||
OriginalFileName: this.capturedImageTitle,
|
OriginalFileName: this.capturedImageTitle,
|
||||||
FileBase64: this.capturedImage,
|
FileBase64: this.capturedImage,
|
||||||
FileExtension: 'jpg',
|
FileExtension: 'jpeg',
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Create');
|
console.log('Create');
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<div class="main-header">
|
<div class="main-header">
|
||||||
<div class="title-content">
|
<div class="title-content">
|
||||||
<div class="div-title">
|
<div class="div-title">
|
||||||
<ion-label class="title">Ações Presidenciais</ion-label>
|
<ion-label class="title">Acções Presidenciais</ion-label>
|
||||||
</div>
|
</div>
|
||||||
<div class="div-icon">
|
<div class="div-icon">
|
||||||
<ion-icon (click)="AddPublicationFolder()" slot="end" src='assets/images/icons-add.svg'></ion-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) {
|
doRefresh(event) {
|
||||||
this.getActions();
|
/* this.getActions(); */
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
this.getActions();
|
||||||
event.target.complete();
|
event.target.complete();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
@@ -83,8 +84,8 @@ export class PublicationsPage implements OnInit {
|
|||||||
else{
|
else{
|
||||||
this.publicationsTravelFolderList.push(folder);
|
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.publicationId = this.navParams.get('publicationId');
|
||||||
this.folderId = this.navParams.get('folderIdId');
|
this.folderId = this.navParams.get('folderIdId');
|
||||||
this.publication = {
|
this.publication = {
|
||||||
|
DateIndex: null,
|
||||||
DocumentId: '',
|
DocumentId: '',
|
||||||
ProcessId:'',
|
ProcessId:'',
|
||||||
Title:'',
|
Title:'',
|
||||||
@@ -40,6 +41,13 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
/* console.log(this.publication.FileBase64); */
|
/* console.log(this.publication.FileBase64); */
|
||||||
this.getPublicationDetail();
|
this.getPublicationDetail();
|
||||||
}
|
}
|
||||||
|
doRefresh(event) {
|
||||||
|
this.getPublicationDetail();
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
event.target.complete();
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
|
||||||
getPublicationDetail(){
|
getPublicationDetail(){
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
@@ -47,15 +55,17 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
console.log(this.folderId);
|
console.log(this.folderId);
|
||||||
this.publications.GetPublicationById(this.folderId,this.publicationId).subscribe(res=>{
|
this.publications.GetPublicationById(this.folderId,this.publicationId).subscribe(res=>{
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
/* this.publication = res; */
|
||||||
this.publication = {
|
this.publication = {
|
||||||
|
DateIndex: res.DateIndex,
|
||||||
DocumentId: res.DocumentId,
|
DocumentId: res.DocumentId,
|
||||||
ProcessId:res.ProcessId,
|
ProcessId:res.ProcessId,
|
||||||
Title:res.Title,
|
Title:res.Title,
|
||||||
Message: res.Message,
|
Message: res.Message,
|
||||||
DatePublication: res.DatePublication,
|
DatePublication: res.DatePublication,
|
||||||
FileBase64: "data:image/jpg;base64," + res.FileBase64,
|
FileBase64: "data:image/jpg;base64," + res.FileBase64,
|
||||||
OriginalFileName: '',
|
OriginalFileName: res.OriginalFileName,
|
||||||
FileExtension: '',
|
FileExtension: 'jpeg',
|
||||||
}
|
}
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
});
|
});
|
||||||
@@ -78,7 +88,6 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
|
|
||||||
async editPost(publicationType:any) {
|
async editPost(publicationType:any) {
|
||||||
console.log(this.publication);
|
console.log(this.publication);
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: NewPublicationPage,
|
component: NewPublicationPage,
|
||||||
componentProps:{
|
componentProps:{
|
||||||
@@ -90,7 +99,9 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then(()=>{
|
modal.onDidDismiss().then(()=>{
|
||||||
|
setTimeout(() => {
|
||||||
this.getPublicationDetail();
|
this.getPublicationDetail();
|
||||||
|
}, 5000);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,8 +35,9 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
this.getPublications();
|
this.getPublications();
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
/* event.target.complete(); */
|
this.getPublications();
|
||||||
}, 2000);
|
event.target.complete();
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
close(){
|
close(){
|
||||||
this.modalController.dismiss();
|
this.modalController.dismiss();
|
||||||
@@ -54,6 +55,7 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
format: 'png'
|
format: 'png'
|
||||||
}
|
}
|
||||||
let item: Publication = {
|
let item: Publication = {
|
||||||
|
"DateIndex": element.DateIndex,
|
||||||
"DocumentId":element.DocumentId,
|
"DocumentId":element.DocumentId,
|
||||||
"ProcessId":element.ProcessId,
|
"ProcessId":element.ProcessId,
|
||||||
"Title":element.Title,
|
"Title":element.Title,
|
||||||
|
|||||||
Reference in New Issue
Block a user