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:
@@ -108,7 +108,6 @@
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="postEvent.StartDate"
|
||||
[min]="minDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
@@ -140,7 +139,6 @@
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="postEvent.EndDate"
|
||||
[min]="endMinDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
||||
@@ -207,8 +205,7 @@
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="occurrrence"
|
||||
placeholder="Choose a date"
|
||||
[formControl]="dateControlOccurrence"
|
||||
[min]="endMinDate"
|
||||
[(ngModel)]="postEvent.EventRecurrence.LastOccurrence"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="last-occurrence" matSuffix [for]="occurrrence"></mat-datepicker-toggle>
|
||||
|
||||
@@ -21,10 +21,9 @@ import { FormControl } from '@angular/forms';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
|
||||
import { NgZone, ViewChild } from '@angular/core';
|
||||
import { ViewChild } from '@angular/core';
|
||||
import { FormGroup, Validators } from '@angular/forms';
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { EliminateEventPage } from 'src/app/modals/eliminate-event/eliminate-event.page';
|
||||
|
||||
const moment = _rollupMoment || _moment;
|
||||
|
||||
@@ -61,8 +60,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;
|
||||
@@ -110,13 +107,9 @@ export class NewEventPage implements OnInit {
|
||||
public stepMinutes = [1, 5, 10, 15, 20, 25];
|
||||
public stepSeconds = [1, 5, 10, 15, 20, 25];
|
||||
|
||||
public dateControlOccurrence = new FormControl(moment("DD MM YYYY hh"));
|
||||
|
||||
showLoader = false
|
||||
|
||||
get dateOccurrence () {
|
||||
return this.dateControlOccurrence.value
|
||||
}
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -131,7 +124,7 @@ export class NewEventPage implements OnInit {
|
||||
this.loggeduser = userService.ValidatedUser;
|
||||
this.postEvent = new Event();
|
||||
|
||||
this.postEvent.StartDate = new Date();
|
||||
this.postEvent.StartDate = new Date()
|
||||
this.postEvent.EndDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
}
|
||||
|
||||
@@ -216,7 +209,6 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
|
||||
this.date = new Date(2021,9,4,5,6,7);
|
||||
this.getDatepickerData()
|
||||
|
||||
this.injectValidation();
|
||||
|
||||
@@ -251,7 +243,7 @@ export class NewEventPage implements OnInit {
|
||||
dateEnd: new FormControl(this.postEvent.EndDate, [
|
||||
Validators.required
|
||||
]),
|
||||
dateOccurrence: new FormControl(this.postEvent.EventRecurrence.Type.toString() == '-1' ? ['ok']: this.dateOccurrence, [
|
||||
dateOccurrence: new FormControl(this.postEvent.EventRecurrence.Type.toString() == '-1' ? ['ok']: this.postEvent.EventRecurrence.LastOccurrence, [
|
||||
Validators.required
|
||||
]),
|
||||
participantes: new FormControl(this.taskParticipants, [
|
||||
@@ -334,17 +326,6 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
getDatepickerData() {
|
||||
if (this.postEvent) {
|
||||
this.postEvent.EventRecurrence.LastOccurrence = this.dateOccurrence
|
||||
}
|
||||
}
|
||||
|
||||
restoreDatepickerData() {
|
||||
if (this.postEvent) {
|
||||
this.dateControlOccurrence = new FormControl(moment(this.postEvent.EventRecurrence.LastOccurrence, "DD MM YYYY HH:mm"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -358,7 +339,6 @@ export class NewEventPage implements OnInit {
|
||||
return false
|
||||
}
|
||||
|
||||
this.getDatepickerData()
|
||||
|
||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
@@ -483,7 +463,6 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
afterSave() {
|
||||
this.getDatepickerData()
|
||||
this.deleteTemporaryData();
|
||||
|
||||
this.onAddEvent.emit(this.postEvent);
|
||||
@@ -521,7 +500,6 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
saveTemporaryData() {
|
||||
this.getDatepickerData()
|
||||
window['temp.path:/home/agenda/new-event.component.ts'] = {
|
||||
postEvent: this.postEvent,
|
||||
eventBody: this.eventBody,
|
||||
@@ -545,7 +523,7 @@ export class NewEventPage implements OnInit {
|
||||
this.segment = restoredData.segment
|
||||
|
||||
// restore dater for date and hours picker
|
||||
this.restoreDatepickerData()
|
||||
|
||||
return true;
|
||||
} else {
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ export class ViewEventPage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
viewDocument(sourceId){
|
||||
viewDocument(sourceId) {
|
||||
this.processes.GetDocumentUrl(sourceId, '8').subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
|
||||
@@ -54,6 +54,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
this.getPublications();
|
||||
this.getPublicationDetail();
|
||||
|
||||
window['app-view-publications-page-doRefresh'] = this.doRefresh
|
||||
}
|
||||
|
||||
ngOnChanges(changes: any): void {
|
||||
@@ -71,7 +73,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
doRefresh =(event) => {
|
||||
this.getPublications();
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user