mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
fix ownertype and category type
This commit is contained in:
@@ -157,7 +157,7 @@ export class AgendaDataRepositoryService {
|
||||
}
|
||||
|
||||
createEvent(eventData: Event, documents, calendar: TableSharedCalendar) {
|
||||
console.log('create repository 1',eventData)
|
||||
console.log('create repository 1',eventData, calendar)
|
||||
|
||||
let eventInput = {
|
||||
userId: calendar.wxUserId,
|
||||
@@ -211,6 +211,8 @@ export class AgendaDataRepositoryService {
|
||||
}
|
||||
}
|
||||
|
||||
console.log({eventData})
|
||||
|
||||
return this.agendaDataService.updateEvent(eventId, eventInput)
|
||||
}
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@ export class Utils {
|
||||
}
|
||||
}
|
||||
|
||||
selectedCalendarOwner(CalendarName) {
|
||||
let selectedCalendar = this.findRoleIdByUserId(this.eventService.calendarNamesAry, CalendarName);
|
||||
console.log('selected', selectedCalendar )
|
||||
if (selectedCalendar) {
|
||||
if (selectedCalendar == "Presidente da República") {
|
||||
selectedCalendarOwner(roleDescription) {
|
||||
|
||||
console.log('roleDescription', roleDescription)
|
||||
if (roleDescription) {
|
||||
if (roleDescription == "Presidente da República") {
|
||||
return 1;
|
||||
} else if (selectedCalendar == "Ministro e Director do Gabinete do PR") {
|
||||
} else if (roleDescription == "Ministro e Director do Gabinete do PR") {
|
||||
return 2
|
||||
} else {
|
||||
return 3
|
||||
@@ -50,7 +50,7 @@ export class Utils {
|
||||
return 'other';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,11 @@ export class Utils {
|
||||
'Oficial': 1,
|
||||
'Pessoal': 2
|
||||
}
|
||||
|
||||
if(calendarName != 'Pessoal' && calendarName != 'Oficial') {
|
||||
throw('bad logic')
|
||||
}
|
||||
|
||||
return selectedCalendar[calendarName];
|
||||
}
|
||||
|
||||
@@ -180,11 +185,11 @@ export class Utils {
|
||||
|
||||
addOneHourToIsoString(isoDateString) {
|
||||
let date = new Date(isoDateString);
|
||||
|
||||
|
||||
const tzOffset = -date.getTimezoneOffset(); // in minutes
|
||||
const diff = tzOffset >= 0 ? '+' : '-';
|
||||
const pad = (n: number) => (n < 10 ? '0' : '') + n;
|
||||
|
||||
|
||||
return date.getFullYear() +
|
||||
'-' + pad(date.getMonth() + 1) +
|
||||
'-' + pad(date.getDate()) +
|
||||
|
||||
Reference in New Issue
Block a user