mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Fix refresh
This commit is contained in:
@@ -123,7 +123,6 @@
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="{{minDate}}"
|
||||
max="2025"
|
||||
>
|
||||
</ion-datetime>
|
||||
@@ -144,7 +143,6 @@
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="{{minDate}}"
|
||||
max="2025"
|
||||
|
||||
>
|
||||
@@ -182,7 +180,6 @@
|
||||
[(ngModel)]="postEvent.EventRecurrence.LastOccurrence"
|
||||
displayFormat="DD MMM YYYY"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="2021"
|
||||
max="2045"
|
||||
>
|
||||
</ion-datetime>
|
||||
|
||||
@@ -31,8 +31,6 @@ export class NewEventPage implements OnInit {
|
||||
public showSeconds = false;
|
||||
public touchUi = false;
|
||||
public enableMeridian = false;
|
||||
public minDate = new Date().toISOString().slice(0,10)
|
||||
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
public stepHour = 1;
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
@@ -81,8 +79,6 @@ export class NewEventPage implements OnInit {
|
||||
this.selectedDate = this.navParams.get('eventSelectedDate');
|
||||
this.taskParticipants = this.navParams.get('attendees');
|
||||
|
||||
console.log(this.taskParticipants);
|
||||
|
||||
this.postEvent.StartDate = new Date()
|
||||
this.postEvent.EndDate = (new Date(new Date().getTime() + 15 * 60000))
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ImageModalPage } from '../gallery/image-modal/image-modal.page';
|
||||
import { NewPublicationPage } from '../new-publication/new-publication.page';
|
||||
import { Location } from '@angular/common';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -23,8 +24,8 @@ export class PublicationDetailPage implements OnInit {
|
||||
private navParams:NavParams,
|
||||
private publications:PublicationsService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService
|
||||
) {
|
||||
private toastService: ToastService,
|
||||
private location: Location ) {
|
||||
|
||||
alert('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
|
||||
|
||||
@@ -56,7 +57,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
getPublicationDetail(){
|
||||
getPublicationDetail() {
|
||||
this.showLoader = true;
|
||||
console.log(this.publicationId);
|
||||
/* console.log(this.folderId); */
|
||||
@@ -78,17 +79,21 @@ export class PublicationDetailPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
close() {
|
||||
this.location.back()
|
||||
|
||||
}
|
||||
|
||||
async deletePost(){
|
||||
async deletePost() {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
||||
this.toastService.successMessage('Publicação eliminado')
|
||||
if(window['app-view-publications-page-doRefresh']) {
|
||||
window['app-view-publications-page-doRefresh']()
|
||||
}
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Publicação não eliminado')
|
||||
|
||||
@@ -47,6 +47,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
console.log(params["params"]);
|
||||
}
|
||||
|
||||
window['app-view-publications-page-doRefresh'] = this.doRefresh
|
||||
});
|
||||
}
|
||||
|
||||
@@ -73,7 +74,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
this.getPublications();
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
doRefresh =(event) => {
|
||||
setTimeout(() => {
|
||||
this.getPublicationDetail();
|
||||
this.getPublications();
|
||||
|
||||
Reference in New Issue
Block a user