mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
add recurence to agenda web
This commit is contained in:
@@ -98,8 +98,8 @@ export class AgendaDataRepositoryService {
|
||||
attendees: this.utils.attendeesAdded(eventData.Attendees),
|
||||
attachments: this.utils.documentAdded(documents),
|
||||
recurrence: {
|
||||
frequency: 0,
|
||||
occurrences: 0,
|
||||
frequency: this.utils.eventRecurence(eventData.EventRecurrence.frequency),
|
||||
until: eventData.EndDate.toISOString(),
|
||||
},
|
||||
organizerId: SessionStore.user.UserId,
|
||||
isAllDayEvent: eventData.IsAllDayEvent,
|
||||
|
||||
@@ -80,7 +80,7 @@ export const EventInputDTOSchema = z.object({
|
||||
attachments: z.array(AttachmentInputDTOSchema).nullable().optional(),
|
||||
recurrence: z.object({
|
||||
frequency: z.number().int(),
|
||||
occurrences: z.number().int(),
|
||||
until: z.string(),
|
||||
}),
|
||||
organizerId: z.number().int(),
|
||||
isAllDayEvent: z.boolean(),
|
||||
|
||||
@@ -3,16 +3,16 @@ import { AgendaDataService } from './agenda-data.service';
|
||||
import { EventsService } from '../../events.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class Utils {
|
||||
constructor(
|
||||
private agendaDataService: AgendaDataService,
|
||||
public eventService: EventsService,
|
||||
) { }
|
||||
constructor(
|
||||
private agendaDataService: AgendaDataService,
|
||||
public eventService: EventsService,
|
||||
) { }
|
||||
|
||||
|
||||
selectedCalendarUserId(CalendarName,postEvent) {
|
||||
selectedCalendarUserId(CalendarName, postEvent) {
|
||||
|
||||
if (this.eventService.calendarNamesType[CalendarName]?.['Oficial'] && postEvent.CalendarName == 'Oficial') {
|
||||
return this.eventService.calendarNamesType[CalendarName]['OwnerId']
|
||||
@@ -60,8 +60,8 @@ export class Utils {
|
||||
return selectedType[calendarName];
|
||||
}
|
||||
|
||||
documentAdded(documents:any[]) {
|
||||
console.log('added doc create event',documents)
|
||||
documentAdded(documents: any[]) {
|
||||
console.log('added doc create event', documents)
|
||||
let listupdate = []
|
||||
documents.forEach(element => {
|
||||
let object = {
|
||||
@@ -70,18 +70,18 @@ export class Utils {
|
||||
description: "",
|
||||
applicationId: element.applicationId
|
||||
}
|
||||
|
||||
|
||||
listupdate.push(object)
|
||||
});
|
||||
return listupdate
|
||||
/* return documents.map((e) => {
|
||||
return {
|
||||
docId: e.docId,
|
||||
sourceName: e.subject || e.sourceNames,
|
||||
description: "",
|
||||
applicationId: e.applicationId
|
||||
};
|
||||
}); */
|
||||
/* return documents.map((e) => {
|
||||
return {
|
||||
docId: e.docId,
|
||||
sourceName: e.subject || e.sourceNames,
|
||||
description: "",
|
||||
applicationId: e.applicationId
|
||||
};
|
||||
}); */
|
||||
|
||||
}
|
||||
|
||||
@@ -102,8 +102,8 @@ export class Utils {
|
||||
atendeesSeletedType(type) {
|
||||
var selectedType = {
|
||||
'true': 0,
|
||||
'false':1,
|
||||
'other':2,
|
||||
'false': 1,
|
||||
'other': 2,
|
||||
}
|
||||
return selectedType[type];
|
||||
}
|
||||
@@ -115,7 +115,7 @@ export class Utils {
|
||||
name: e.Name,
|
||||
emailAddress: e.EmailAddress,
|
||||
attendeeType: this.atendeesSeletedType(JSON.stringify(e.IsRequired)),
|
||||
wxUserId: e.Id,
|
||||
wxUserId: e.Id,
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -123,10 +123,10 @@ export class Utils {
|
||||
statusEventAproval(type) {
|
||||
var selectedType = {
|
||||
'Pending': 0,
|
||||
'Revision':1,
|
||||
'Approved':2,
|
||||
"Declined":3,
|
||||
"Communicated":4
|
||||
'Revision': 1,
|
||||
'Approved': 2,
|
||||
"Declined": 3,
|
||||
"Communicated": 4
|
||||
}
|
||||
return selectedType[type];
|
||||
}
|
||||
@@ -141,4 +141,15 @@ export class Utils {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
eventRecurence(type) {
|
||||
var selectedType = {
|
||||
'never': 0,
|
||||
'daily': 1,
|
||||
'weekly': 2,
|
||||
"monthly": 3,
|
||||
"yearly": 4
|
||||
}
|
||||
return selectedType[type];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user