This commit is contained in:
Peter Maquiran
2023-11-01 14:04:31 +01:00
parent f3efe630c8
commit 95281151d1
4 changed files with 70 additions and 50 deletions
+21
View File
@@ -270,7 +270,15 @@ export class AgendaPage implements OnInit {
this.segment = "Combinado"; this.segment = "Combinado";
} }
if (realoadCounter != 0) { if (realoadCounter != 0) {
if(this.currentMoth.rangeStartDate != null) {
this.loadRangeEvents(this.currentMoth.rangeStartDate, this.currentMoth.rangeEndDate)
} else {
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
}
this.updateEventListBox() this.updateEventListBox()
} }
realoadCounter++; realoadCounter++;
@@ -424,10 +432,23 @@ export class AgendaPage implements OnInit {
this.eventSelectedDate2 = ev.selectedTime; this.eventSelectedDate2 = ev.selectedTime;
} }
currentMoth = {
rangeStartDate: null,
rangeEndDate: null
}
onRangeChanged(ev: { startTime: Date, endTime: Date }) { onRangeChanged(ev: { startTime: Date, endTime: Date }) {
this.rangeStartDate = ev.startTime; this.rangeStartDate = ev.startTime;
this.rangeEndDate = ev.endTime; this.rangeEndDate = ev.endTime;
if(this.currentMoth.rangeEndDate == null) {
this.currentMoth = {
rangeStartDate: ev.startTime,
rangeEndDate: ev.endTime
}
}
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
@@ -40,7 +40,6 @@
<i class="far fa-clock font-15"></i> <i class="far fa-clock font-15"></i>
<ion-label class="font-15 pl-10" color="warning">{{roomCountDownDate}}</ion-label> <ion-label class="font-15 pl-10" color="warning">{{roomCountDownDate}}</ion-label>
</div> </div>
{{ RouteService.history }}
</div> </div>
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header>
@@ -128,26 +128,26 @@ export class ExpedientTaskModalPage implements OnInit {
this.taskType = this.navParams.get('taskAction'); this.taskType = this.navParams.get('taskAction');
try { // try {
if(this.document) { // if(this.document) {
const doc: any = this.document // const doc: any = this.document
this.documents.push({ // this.documents.push({
ApplicationId: (doc.ApplicationType || doc.ApplicationId), // ApplicationId: (doc.ApplicationType || doc.ApplicationId),
ApplicationType: (doc.ApplicationType || doc.ApplicationId), // ApplicationType: (doc.ApplicationType || doc.ApplicationId),
SourceId: (doc.Id || doc.DocId || doc.SourceId), // SourceId: (doc.Id || doc.DocId || doc.SourceId),
Id: (doc.Id || doc.DocId || doc.SourceId), // Id: (doc.Id || doc.DocId || doc.SourceId),
EntidadeOrganicaNome: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome), // EntidadeOrganicaNome: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome),
Sender: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome), // Sender: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome),
Data: (doc.DocDate || doc.Data), // Data: (doc.DocDate || doc.Data),
DocDate: (doc.DocDate || doc.Data), // DocDate: (doc.DocDate || doc.Data),
Assunto: doc.Assunto, // Assunto: doc.Assunto,
} as any) // } as any)
} // }
} catch (error) { // } catch (error) {
console.log(error) // console.log(error)
} // }
console.log('this.document', this.document) // console.log('this.document', this.document)
this.selectedTypes = ['99999850']; this.selectedTypes = ['99999850'];