mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix loader
This commit is contained in:
@@ -6,6 +6,23 @@ export class EventToApproveDetailsMapper {
|
||||
constructor() {}
|
||||
static toDomain(dto: EventOutputDTO): EventToApproveDetails {
|
||||
|
||||
const category = dto.category
|
||||
let color;
|
||||
|
||||
if(dto.ownerType != 'PR') {
|
||||
color = 'MDGPR'
|
||||
} else {
|
||||
color = 'PR'
|
||||
}
|
||||
|
||||
let activityInstanceName;
|
||||
|
||||
if(dto.status == 'Pending') {
|
||||
activityInstanceName = 'Aprovar Evento'
|
||||
} else if (dto.status == 'Revision') {
|
||||
activityInstanceName = 'Editar Evento'
|
||||
}
|
||||
|
||||
return {
|
||||
"serialNumber": dto.id,
|
||||
"taskStatus": dto.status,
|
||||
@@ -23,14 +40,14 @@ export class EventToApproveDetailsMapper {
|
||||
// "Reenviar",
|
||||
// "Descartar"
|
||||
// ],
|
||||
"activityInstanceName": "Editar Evento",
|
||||
"activityInstanceName": activityInstanceName,
|
||||
// "workflowInstanceFolio": "MTk4",
|
||||
// "taskStartDate": "2024-04-10T14:30:39.58",
|
||||
// "deadline": null,
|
||||
// "workflowID": 24744,
|
||||
// "workflowInstanceID": 47026,
|
||||
//"workflowName": "Agenda\\Agenda Oficial MDGPR",
|
||||
"workflowDisplayName": "Agenda Oficial MDGPR",
|
||||
"workflowDisplayName": `Agenda ${category} ${color}`,
|
||||
//"formURL": "http://bpmdev.gabinetedigital.local/Runtime/Runtime/Form/Exchange+Calendar+Meeting+Edition/?SerialNo=47026_169&ProcessInstanceID=&InstanceId=",
|
||||
"workflowInstanceDataFields": {
|
||||
"Body": "safsafas",
|
||||
|
||||
@@ -15,28 +15,46 @@ function getTextInsideParentheses(inputString): string {
|
||||
}
|
||||
|
||||
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 toDomain(dtoList: EventToApproveListOutputDTO, calendarOwnerName: string, userId: string): EventToApproveList {
|
||||
|
||||
|
||||
return dtoList.map((dto) => {
|
||||
const category = dto.category
|
||||
let color;
|
||||
let workflowDisplayName;
|
||||
|
||||
if(dto.ownerType == 'PR') {
|
||||
color = 'PR'
|
||||
workflowDisplayName = `Agenda ${category} ${color}`
|
||||
} else if(dto.ownerType == 'MD') {
|
||||
color = 'MDGPR'
|
||||
workflowDisplayName = `Agenda ${category} ${color}`
|
||||
} else {
|
||||
workflowDisplayName = `Agenda ${category}`
|
||||
}
|
||||
}))
|
||||
|
||||
return {
|
||||
serialNumber: dto.id,
|
||||
taskStatus: dto.status,
|
||||
taskStartDate: dto.startDate,
|
||||
taskReceiveDate: dto.startDate,
|
||||
deadline: null,
|
||||
workflowDisplayName,
|
||||
activityInstanceName: "",
|
||||
totalDocuments: 0,
|
||||
workflowInstanceDataFields: {
|
||||
Agenda: dto.category,
|
||||
EndDate: dto.endDate,
|
||||
StartDate: dto.startDate,
|
||||
Subject: dto.body,
|
||||
Location: dto.location,
|
||||
Status: dto.status,
|
||||
IsAllDayEvent: dto.isAllDayEvent,
|
||||
InstanceId: "",
|
||||
originator: ""
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
static toDTO() {}
|
||||
@@ -65,21 +83,4 @@ export class EventListToApproveMapper {
|
||||
|
||||
|
||||
|
||||
// {
|
||||
// "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"
|
||||
// }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user