mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
bug solve
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
import { EventOutputDTO } from "../model/eventDTOOutput"
|
||||
|
||||
function getTextInsideParentheses(inputString) {
|
||||
var startIndex = inputString.indexOf('(');
|
||||
var endIndex = inputString.indexOf(')');
|
||||
if (startIndex !== -1 && endIndex !== -1) {
|
||||
return inputString.substring(startIndex + 1, endIndex);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export class EventMapper {
|
||||
|
||||
constructor() {}
|
||||
@@ -36,7 +46,7 @@ export class EventMapper {
|
||||
"IsRecurring": dto.isRecurring,
|
||||
"IsAllDayEvent": dto.isAllDayEvent,
|
||||
"AppointmentState": 1,
|
||||
"TimeZone": "UTC",
|
||||
"TimeZone": getTextInsideParentheses(new Date(dto.startDate)+ ''),
|
||||
"Organizer": {
|
||||
"Id": dto.organizer.wxUserId,
|
||||
"EmailAddress": dto.organizer.wxeMail,
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
import { EventToApproveDetails } from "src/app/models/entiry/agenda/eventToApproveDetails"
|
||||
import { EventOutputDTO } from "../model/eventDTOOutput"
|
||||
|
||||
function getTextInsideParentheses(inputString) {
|
||||
var startIndex = inputString.indexOf('(');
|
||||
var endIndex = inputString.indexOf(')');
|
||||
if (startIndex !== -1 && endIndex !== -1) {
|
||||
return inputString.substring(startIndex + 1, endIndex);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export class EventToApproveDetailsMapper {
|
||||
|
||||
constructor() {}
|
||||
@@ -63,7 +74,7 @@ export class EventToApproveDetailsMapper {
|
||||
// "MDEmail": "evilarinho@gabinetedigital.local",
|
||||
// "OriginatorComments": "",
|
||||
"Status": "Active",
|
||||
//"TimeZone": "",
|
||||
"TimeZone": getTextInsideParentheses(new Date(dto.startDate)+ ''),
|
||||
"Agenda": category ,
|
||||
"EventType": "Reunião",
|
||||
//"EventID": "",
|
||||
|
||||
@@ -47,7 +47,7 @@ export class EventListToApproveMapper {
|
||||
Agenda: dto.category,
|
||||
EndDate: dto.endDate,
|
||||
StartDate: dto.startDate,
|
||||
Subject: dto.body,
|
||||
Subject: dto.subject,
|
||||
Location: dto.location,
|
||||
Status: dto.status,
|
||||
IsAllDayEvent: dto.isAllDayEvent,
|
||||
|
||||
@@ -18,7 +18,7 @@ const CommentSchema = z.object({
|
||||
const AttendeeSchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
attendeeType: EAttendeeTypeDTO,
|
||||
attendeeType: z.enum(["Required", "Acknowledgment", "Optional"]),
|
||||
emailAddress: z.string(),
|
||||
wxUserId: z.number(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user