list event to approve

This commit is contained in:
Peter Maquiran
2024-05-30 10:20:46 +01:00
parent 44b2fa7307
commit 3c4ec1a432
8 changed files with 199 additions and 49 deletions
@@ -0,0 +1,85 @@
import { EventList } from "src/app/models/entiry/agenda/eventList"
import { EventListOutputDTO } from "../model/eventListDTOOutput"
import { EventToApproveListOutputDTO } from "../model/eventToApproveListOutputDTO";
import { EventToApproveList } from "src/app/models/entiry/agenda/eventToApproveList";
function getTextInsideParentheses(inputString): string {
var startIndex = inputString.indexOf('(');
var endIndex = inputString.indexOf(')');
if (startIndex !== -1 && endIndex !== -1) {
return inputString.substring(startIndex + 1, endIndex);
} else {
return null;
}
}
export class EventListToApproveMapper {
static toDomain(dto: EventToApproveListOutputDTO, calendarOwnerName: string, userId: string): EventToApproveList {
return dto.map((e) => ({
serialNumber: e.id,
taskStatus: e.status,
taskStartDate: e.startDate,
taskReceiveDate: e.startDate,
deadline: null,
workflowDisplayName: "",
activityInstanceName: "",
totalDocuments: 0,
workflowInstanceDataFields: {
Agenda: e.category,
EndDate: e.endDate,
StartDate: e.startDate,
Subject: e.body,
Location: e.location,
Status: e.status,
IsAllDayEvent: e.isAllDayEvent,
InstanceId: "",
originator: ""
}
}))
}
static toDTO() {}
}
// "serialNumber": "47315_184",
// "taskStatus": "Open",
// "taskStartDate": "2024-04-24T11:27:12.527",
// "taskReceiveDate": "2024-04-24T11:29:17.76",
// "deadline": null,
// "workflowDisplayName": "Agenda Oficial PR",
// "activityInstanceName": "Comunicar Evento",
// "totalDocuments": 0,
// "workflowInstanceDataFields": {
// "Agenda": "Oficial",
// "EndDate": "2024-04-25 11:30:00",
// "StartDate": "2024-04-24 11:30:00",
// "Subject": "Event 2 After MERGE",
// "Location": "lUANDA",
// "Status": "Active",
// "IsAllDayEvent": false,
// "InstanceId": "AAMkADVhOGY3ZDQzLTg4ZGEtNDYxMC1iMzc5LTJkMDgwNjMxOWFlZQBGAAAAAABEDW9nKs69TKQcVqQURj8YBwBR2HR2eO7pSpNdD9cc70l+AAAAAAFKAABR2HR2eO7pSpNdD9cc70l+AACK2Od9AAA=",
// "originator": "dlima@gabinetedigital.local"
// }
// {
// "id": "5b170417-df57-4b5c-9a5e-3c73726a116d",
// "owner": null,
// "ownerType": "PR",
// "subject": "string",
// "body": "string",
// "location": "string",
// "startDate": "2024-05-29T00:00:00+00:00",
// "endDate": "2024-05-29T23:59:00+00:00",
// "type": "Meeting",
// "category": "Oficial",
// "isRecurring": false,
// "eventRecurrence": null,
// "hasAttachments": false,
// "isPrivate": false,
// "isAllDayEvent": true,
// "status": "Pending"
// }