mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
remove calendar id
This commit is contained in:
@@ -53,7 +53,8 @@ export class AgendaDataRepositoryService {
|
||||
|
||||
}
|
||||
|
||||
async EventList({userId = null, startDate = null, endDate = null, status= 2, category= null, type= null, calendarOwnerName = ''}) {
|
||||
async EventList({userId, startDate , endDate , status= 2, category= null, type= null, calendarOwnerName = ''}) {
|
||||
|
||||
try {
|
||||
const result = await this.agendaDataService.getEvents(userId, startDate, endDate, status, category, type).pipe(
|
||||
map((response) => {
|
||||
@@ -177,6 +178,19 @@ export class AgendaDataRepositoryService {
|
||||
if(result.isOk()) {
|
||||
await this.agendaLocalDataSourceService.clearSharedCalendar()
|
||||
if(result.value?.data) {
|
||||
|
||||
const currentUserCalendar = {
|
||||
wxUserId: SessionStore.user.UserId,
|
||||
wxFullName: SessionStore.user.FullName,
|
||||
wxeMail: SessionStore.user.Email,
|
||||
role: SessionStore.user.RoleDescription,
|
||||
roleId: SessionStore.user.RoleID,
|
||||
shareType: 0,
|
||||
date: '',
|
||||
}
|
||||
|
||||
result.value.data.push(currentUserCalendar)
|
||||
|
||||
return await this.agendaLocalDataSourceService.bulkCreate(result.value.data)
|
||||
} else {
|
||||
return result
|
||||
|
||||
@@ -41,7 +41,7 @@ export class AgendaDataService {
|
||||
}
|
||||
|
||||
// Events Endpoints
|
||||
createEvent(eventData: EventInputDTO): Observable<any> {
|
||||
createEvent(eventData: EventInputDTO) {
|
||||
return this.http.post<any>(`${this.baseUrl}/Events`, eventData);
|
||||
}
|
||||
|
||||
@@ -50,6 +50,10 @@ export class AgendaDataService {
|
||||
.set('UserId', userId)
|
||||
.set('Status', status)
|
||||
|
||||
if(userId == null || userId == undefined) {
|
||||
throw('userId '+ userId)
|
||||
}
|
||||
|
||||
if (startDate !== null && startDate !== undefined) {
|
||||
params = params.set('startDate', startDate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user