This commit is contained in:
tiago.kayaya
2021-07-15 17:57:21 +01:00
9 changed files with 118 additions and 16 deletions
@@ -109,16 +109,20 @@ export class ViewEventPage implements OnInit {
});
}
loadEvent(){
loadEvent() {
const loader = this.toastService.loading();
this.eventsService.getEvent(this.eventId).subscribe(res => {
this.loadedEvent = res;
console.log(res);
/* this.today = new Date(res.StartDate);
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
loader.remove()
}, ()=>{
loader.remove()
this.toastService.badRequest('Este evento já não existe na sua agenda')
this.modalController.dismiss('Eevent not Foud');
this.router.navigate(['/home/agenda']);
});
}
@@ -14,6 +14,7 @@ import { Camera, CameraOptions } from '@ionic-native/camera/ngx';
import { ToastService } from 'src/app/services/toast.service';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { ThemePalette } from '@angular/material/core';
import { formatDate } from 'src/plugin/momentG.js'
@Component({
selector: 'app-new-publication',
@@ -218,14 +219,16 @@ export class NewPublicationPage implements OnInit {
}
else {
const date = formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss')
alert(date)
this.publication = {
DateIndex: new Date(),
DateIndex: date,
DocumentId:null,
ProcessId:this.folderId,
Title: this.pub.Title,
Message: this.pub.Message,
DatePublication: new Date(),
DatePublication: date,
OriginalFileName: this.capturedImageTitle,
FileBase64: this.capturedImage,
FileExtension: 'jpeg',
@@ -35,7 +35,7 @@
<div class="aside overflow-y-auto d-flex flex-wrap width-100">
<!-- <ion-list class="width-100"> -->
<ion-item-sliding disabled="{{showSlidingOptions}}" class="item width-100"
<ion-item-sliding disabled="{{showSlidingOptions}}" class="item width-100 cursor-pointer"
*ngFor="let viagem of publicationsTravelFolderList">
<ion-item lines="none"
class="width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
@@ -119,6 +119,7 @@ export class PublicationDetailPage implements OnInit {
componentProps:{
publicationType: publicationType,
publication: this.publication,
folderId: this.folderId
},
cssClass: 'new-publication modal modal-desktop',
backdropDismiss: false
@@ -1,6 +1,5 @@
<ion-header class="ion-no-border">
<app-header></app-header>
</ion-header>
<ion-header class="ion-no-border">
@@ -24,13 +23,13 @@
<!-- </ion-toolbar> -->
</ion-header>
<ion-content>
<ion-content class="background-white">
<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>
<div class="main-container">
<div class="main-container background-white">
<ion-list>
<!-- [routerLink]="['/home/publications/view-publications/publication-detail', publication.publicationId]" -->
<div class="post-item"
@@ -36,12 +36,28 @@ export class ViewPublicationsPage implements OnInit {
this.folderId = params["params"].folderId;
console.log(params["params"]);
}
});
}
ngOnInit() {
console.log(this.folderId);
if(typeof(this.folderId) == 'object') {
this.folderId = this.folderId['ProcessId']
}
this.getPublications();
this.getPublicationDetail();
}
ngOnChanges() {
console.log(this.folderId)
if(typeof(this.folderId) == 'object') {
this.folderId = this.folderId['ProcessId']
}
this.getPublications();
this.getPublicationDetail();
}