Improve local storage and fix expediente task strature

This commit is contained in:
Peter Maquiran
2021-08-26 13:48:29 +01:00
parent f8991b785b
commit f4de729e2f
41 changed files with 373 additions and 507 deletions
@@ -0,0 +1,8 @@
import { ExpedienteTaskPipe } from './expediente-task.pipe';
describe('ExpedienteTaskPipe', () => {
it('create an instance', () => {
const pipe = new ExpedienteTaskPipe();
expect(pipe).toBeTruthy();
});
});
+28
View File
@@ -0,0 +1,28 @@
import { Pipe, PipeTransform } from '@angular/core';
import { ExpedienteTask } from '../models/dailyworktask.model';
import { ExpedienteFullTask } from '../models/Expediente';
@Pipe({
name: 'expedienteTask'
})
export class ExpedienteTaskPipe implements PipeTransform {
transform(fullTask: ExpedienteFullTask): ExpedienteTask {
let date = new Date(fullTask.taskStartDate);
date.setMonth(date.getMonth() + 1);
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
return {
"SerialNumber": fullTask.serialNumber,
"taskStartDate": fullTask.taskStartDate,
"Subject": fullTask.workflowInstanceDataFields.Subject,
"Senders": fullTask.workflowInstanceDataFields.Sender,
"CreateDate": taskDate,
"DocumentsQty": fullTask.totalDocuments,
"WorkflowName": fullTask.workflowDisplayName,
"activityInstanceName": fullTask.activityInstanceName,
"Status": fullTask.workflowInstanceDataFields.Status,
}
}
}
+2 -1
View File
@@ -4,10 +4,11 @@ import { SearchDocumentPipe } from './search-document.pipe';
import { CustomTaskPipe } from './custom-task.pipe';
import { EventPipe } from './event.pipe';
import { PublicationPipe } from './publication.pipe';
import { ExpedienteTaskPipe } from './expediente-task.pipe';
@NgModule({
declarations: [FilterPipe, SearchDocumentPipe, CustomTaskPipe, EventPipe, PublicationPipe],
declarations: [FilterPipe, SearchDocumentPipe, CustomTaskPipe, EventPipe, PublicationPipe, ExpedienteTaskPipe],
exports: [FilterPipe],
imports: []
})