mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Improve local storage and fix expediente task strature
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
<p *ngIf="totalEvent!=1"class="event-number p-small ion-text-center"> <strong>{{totalEvent}}</strong> eventos agendados para hoje</p>
|
||||
</ion-label>
|
||||
<div class="next-meeting">
|
||||
<div class="meeting-time">{{currentHoursMinutes | date: 'HH:mm'}}</div>
|
||||
<div *ngIf="currentEvent" class="meeting-description"> "{{currentEvent}}"</div>
|
||||
<div class="meeting-time" *ngIf="currentHoursMinutes">{{currentHoursMinutes | date: 'HH:mm'}}</div>
|
||||
<div class="meeting-description" *ngIf="currentEvent"> "{{currentEvent}}"</div>
|
||||
</div>
|
||||
|
||||
</ion-header>
|
||||
@@ -94,7 +94,7 @@
|
||||
</div>
|
||||
<div class="content">
|
||||
<ion-list>
|
||||
<ion-item class="cursor-pointer" lines="none" *ngFor = "let task of expedienteStorage.list"
|
||||
<ion-item class="cursor-pointer" lines="none" *ngFor = "let task of expedienteGdStore.list"
|
||||
(click)="goToExpediente(task.serialNumber)">
|
||||
<div class="item-exp d-flex">
|
||||
<div class="schedule-date">
|
||||
@@ -102,8 +102,8 @@
|
||||
<div class="time-start">{{task.taskStartDate | date: 'HH:mm'}}</div>
|
||||
</div>
|
||||
<div class="schedule-details pointer">
|
||||
<div class="description">{{ task.workflowInstanceDataFields.Subject }}</div>
|
||||
<div class="location">{{ task.workflowInstanceDataFields.Sender }}</div>
|
||||
<div class="description">{{ task.Subject }}</div>
|
||||
<div class="location">{{ task.Senders }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
|
||||
@@ -13,8 +13,9 @@ import { ProcessesService } from '../../services/processes.service';
|
||||
import { DailyWorkTask } from '../../models/dailyworktask.model';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
import { ToDayEventStorage } from 'src/app/store/to-day-event-storage.service';
|
||||
import { ExpedienteStorage } from 'src/app/store/expediente-storage-service.service';
|
||||
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
||||
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
||||
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-events',
|
||||
@@ -62,15 +63,16 @@ export class EventsPage implements OnInit {
|
||||
|
||||
// shared data
|
||||
toDayEventStorage = ToDayEventStorage
|
||||
expedienteStorage = ExpedienteStorage
|
||||
expedienteGdStore = ExpedienteGdStore
|
||||
|
||||
expedienteTaskPipe = new ExpedienteTaskPipe()
|
||||
|
||||
@Output() openExpedientListPage:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
loggeduser: User;
|
||||
|
||||
existingScreenOrientation: string;
|
||||
pdfSrc = "https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf";
|
||||
|
||||
|
||||
constructor(
|
||||
private eventService: EventsService,
|
||||
private router: Router,
|
||||
@@ -330,21 +332,13 @@ export class EventsPage implements OnInit {
|
||||
}
|
||||
|
||||
LoadList() {
|
||||
switch (this.loggeduser.Profile) {
|
||||
case 'MDGPR':
|
||||
this.processes.GetTasksList("Expediente", false).subscribe(result => {
|
||||
console.log(result);
|
||||
this.expedienteStorage.reset(result)
|
||||
});
|
||||
break;
|
||||
case 'PR':
|
||||
this.processes.GetTasksList("Expediente", false).subscribe(result => {
|
||||
this.expedienteStorage.reset(result)
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
this.processes.GetTaskListExpediente(false).subscribe(result => {
|
||||
console.log("Expediente", result);
|
||||
|
||||
const ExpedienteTask = result.map( e=> this.expedienteTaskPipe.transform(e))
|
||||
|
||||
this.expedienteGdStore.reset(ExpedienteTask)
|
||||
});
|
||||
}
|
||||
|
||||
sortArrayISODate(myArray: any){
|
||||
|
||||
Reference in New Issue
Block a user