mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
generate fix
This commit is contained in:
@@ -105,9 +105,9 @@
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="schedule-details">
|
||||
<div class="location">{{event.Location}}</div>
|
||||
<div class="description">
|
||||
<p>{{event.Subject}}</p>
|
||||
<div class="description">{{event.Subject}}</div>
|
||||
<div class="location">
|
||||
<p>{{event.Location}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -227,9 +227,9 @@
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="schedule-details">
|
||||
<div class="location">{{event.Location}}</div>
|
||||
<div class="location">{{event.Subject}}</div>
|
||||
<div class="description">
|
||||
<p>{{event.Subject}}</p>
|
||||
<p>{{event.Location}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -448,7 +448,8 @@ ion-toolbar{
|
||||
width: 78%;
|
||||
.location{
|
||||
font-family: Roboto;
|
||||
font-size: 13px;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
width: 100%;
|
||||
|
||||
@@ -456,8 +457,7 @@ ion-toolbar{
|
||||
.description{
|
||||
width: 100%;
|
||||
font-family: Roboto;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
//color: #0d89d1;
|
||||
color: var(--title-text-color)
|
||||
}
|
||||
|
||||
@@ -107,6 +107,7 @@ export class EventsPage implements OnInit {
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url == '/home/events') {
|
||||
this.getEventsFromLocalDb()
|
||||
this.RefreshEvents();
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
@@ -122,6 +123,9 @@ export class EventsPage implements OnInit {
|
||||
this.hideSearch();
|
||||
});
|
||||
|
||||
|
||||
// this.getEventsFromLocalDb();
|
||||
|
||||
}
|
||||
|
||||
hideSearch() {
|
||||
@@ -169,71 +173,15 @@ export class EventsPage implements OnInit {
|
||||
this.totalEvent = onwEvent.length;
|
||||
}
|
||||
|
||||
this.storage.set('events', this.listToPresent)
|
||||
|
||||
}
|
||||
|
||||
this.showLoader = false;
|
||||
this.showAgendaLoader = false;
|
||||
}
|
||||
|
||||
addEventToDb(list) {
|
||||
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.storage.set('events', list).then(() => {
|
||||
//
|
||||
})
|
||||
} else {
|
||||
if (list.length > 0) {
|
||||
list.forEach(element => {
|
||||
this.sqliteservice.addEvent(element)
|
||||
|
||||
this.sqliteservice.getAllEvents().then((event: any[] = []) => {
|
||||
let todayEvents = new Array()
|
||||
event.forEach((element) => {
|
||||
let eventObject = {
|
||||
AppointmentState: element.AppointmentState,
|
||||
Attachments: element.Attachments,
|
||||
Attendees: element.Attendees,
|
||||
CalendarId: element.CalendarId,
|
||||
CalendarName: element.CalendarName,
|
||||
Category: element.Category,
|
||||
EndDate: element.EndDate,
|
||||
EventId: element.EventId,
|
||||
EventRecurrence: element.EventRecurrence,
|
||||
EventType: element.EventType,
|
||||
HasAttachments: element.HasAttachments,
|
||||
HumanDate: element.HumanDate,
|
||||
IsAllDayEvent: element.IsAllDayEvent,
|
||||
IsMeeting: element.IsMeeting,
|
||||
IsRecurring: element.IsRecurring,
|
||||
Location: element.Location,
|
||||
Organizer: element.Organizer,
|
||||
Profile: element.Profile,
|
||||
StartDate: element.StartDate,
|
||||
Subject: element.Subject
|
||||
}
|
||||
todayEvents.push(eventObject);
|
||||
})
|
||||
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addProcessToDb(list) {
|
||||
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.storage.set('process', list).then(() => {
|
||||
//
|
||||
})
|
||||
} else {
|
||||
if (list.length > 0) {
|
||||
list.forEach(element => {
|
||||
this.sqliteservice.addProcess(element)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getEventsFromLocalDb() {
|
||||
|
||||
@@ -241,105 +189,28 @@ export class EventsPage implements OnInit {
|
||||
let month = date.getMonth() + 1;
|
||||
//date.setMonth(date.getMonth() + 1);
|
||||
let dateToday = date.getFullYear() + "-" + month + "-" + date.getDate();
|
||||
// ('dateeeeee', dateToday)
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.storage.get('events').then((events: any[] = []) => {
|
||||
//
|
||||
|
||||
if(Array.isArray(events)) {
|
||||
this.listToPresent = events
|
||||
this.totalEvent = this.listToPresent.length
|
||||
this.currentEvent = this.listToPresent[0].Subject
|
||||
this.currentHoursMinutes = this.listToPresent[0].StartDate
|
||||
this.storage.get('events').then((events: any[] = []) => {
|
||||
//
|
||||
|
||||
if(Array.isArray(events)) {
|
||||
this.listToPresent = events
|
||||
this.totalEvent = this.listToPresent.length
|
||||
this.currentEvent = this.listToPresent[0].Subject
|
||||
this.currentHoursMinutes = this.listToPresent[0].StartDate
|
||||
}
|
||||
//
|
||||
})
|
||||
|
||||
this.storage.get('process').then((process: any[] = []) => {
|
||||
//
|
||||
if(Array.isArray(process)) {
|
||||
this.listToPresentexpediente = process;
|
||||
}
|
||||
//
|
||||
})
|
||||
})
|
||||
|
||||
this.storage.get('process').then((process: any[] = []) => {
|
||||
//
|
||||
if(Array.isArray(process)) {
|
||||
const ExpedienteTask = process.map(e => this.expedienteTaskPipe.transform(e))
|
||||
this.listToPresentexpediente = ExpedienteTask;
|
||||
}
|
||||
})
|
||||
this.showLoader = false;
|
||||
|
||||
this.showLoader = false;
|
||||
|
||||
} else {
|
||||
this.sqliteservice.getAllEvents().then((event: any[] = []) => {
|
||||
let todayEvents = new Array()
|
||||
event.forEach((element) => {
|
||||
let eventObject = {
|
||||
AppointmentState: element.AppointmentState,
|
||||
Attachments: element.Attachments,
|
||||
Attendees: element.Attendees,
|
||||
CalendarId: element.CalendarId,
|
||||
CalendarName: element.CalendarName,
|
||||
Category: element.Category,
|
||||
EndDate: element.EndDate,
|
||||
EventId: element.EventId,
|
||||
EventRecurrence: element.EventRecurrence,
|
||||
EventType: element.EventType,
|
||||
HasAttachments: element.HasAttachments,
|
||||
HumanDate: element.HumanDate,
|
||||
IsAllDayEvent: element.IsAllDayEvent,
|
||||
IsMeeting: element.IsMeeting,
|
||||
IsRecurring: element.IsRecurring,
|
||||
Location: element.Location,
|
||||
Organizer: element.Organizer,
|
||||
Profile: element.Profile,
|
||||
StartDate: element.StartDate,
|
||||
Subject: element.Subject
|
||||
}
|
||||
let starteDate = momentG(new Date(element.StartDate), 'yyyy-MM-dd');
|
||||
//
|
||||
if (dateToday == starteDate) {
|
||||
todayEvents.push(eventObject);
|
||||
}
|
||||
})
|
||||
this.listToPresent = todayEvents
|
||||
if(this.listToPresent?.length) {
|
||||
this.totalEvent = this.listToPresent.length
|
||||
this.currentEvent = this.listToPresent[0].Subject
|
||||
this.currentHoursMinutes = this.listToPresent[0].StartDate
|
||||
}
|
||||
//
|
||||
})
|
||||
|
||||
this.sqliteservice.getprocessByworkflow("Expediente").then((process: any[] = []) => {
|
||||
|
||||
//
|
||||
|
||||
if (process.length > 0 || process != undefined) {
|
||||
|
||||
var expedientlist: any = new Array();
|
||||
process.forEach((element) => {
|
||||
if(JSON.parse(element.workflowInstanceDataFields).TaskMessage || JSON.parse(element.workflowInstanceDataFields).Note) {
|
||||
|
||||
let task = {
|
||||
activityInstanceName: element.activityInstanceName,
|
||||
deadline: null,
|
||||
serialNumber: element.serialNumber,
|
||||
taskStartDate: element.taskStartDate,
|
||||
totalDocuments: element.totalDocuments,
|
||||
workflowDisplayName: element.workflowDisplayName,
|
||||
workflowInstanceDataFields: JSON.parse(element.workflowInstanceDataFields)
|
||||
}
|
||||
expedientlist.push(task);
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
//
|
||||
const ExpedienteTask = expedientlist.map(e => this.expedienteTaskPipe.transform(e))
|
||||
this.listToPresentexpediente = ExpedienteTask;
|
||||
|
||||
}
|
||||
|
||||
this.showLoader = false;
|
||||
})
|
||||
}
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
@@ -408,12 +279,13 @@ export class EventsPage implements OnInit {
|
||||
LoadList() {
|
||||
this.showCorrespondenciasLoader = true
|
||||
this.processes.GetTaskListExpediente(false).subscribe(result => {
|
||||
this.addProcessToDb(result);
|
||||
|
||||
let ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
|
||||
|
||||
this.listToPresentexpediente = ExpedienteTask;
|
||||
|
||||
this.storage.set('process', ExpedienteTask)
|
||||
|
||||
this.showCorrespondenciasLoader = false
|
||||
}, ((error) => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user