remove unsude code

This commit is contained in:
Peter Maquiran
2024-10-18 11:34:39 +01:00
parent bb93726fc2
commit 8484b1b600
22 changed files with 310 additions and 777 deletions
@@ -94,7 +94,7 @@ export class AgendaDataRepositoryService {
})
}
async EventList({ userId, startDate, endDate, status = EEventFilterStatus.Approved, category = null, type = null, calendarOwnerName = '' }, tracing?: TracingType) {
async EventList({ userId, startDate, endDate, status = EEventFilterStatus.Approved, category = null, type = null}, tracing?: TracingType) {
const result = await this.agendaDataService.getEvents({userId, startDate, endDate, status, category, type}, tracing)
@@ -113,7 +113,7 @@ export class AgendaDataRepositoryService {
} else {
profile = "pr"
}
const listToPresent = ListEventMapper.toDomain(response, calendarOwnerName, userId)
const listToPresent = ListEventMapper.toDomain(response)
const map : EventListStore[] = listToPresent.map( element => {
return {
@@ -133,14 +133,14 @@ export class AgendaDataRepositoryService {
const events = this.utils.getAllEvents(year)
this.NativeNotificationService.scheduleNotifications(events)
this.memoryStore.pipe(
select(selectEventsInRange(startDate, endDate, userId))
).subscribe((localList)=> {
// console.log({localList})
});
// this.memoryStore.pipe(
// select(selectEventsInRange(startDate, endDate, userId))
// ).subscribe((localList)=> {
// // console.log({localList})
// });
this.memoryStore.dispatch(removeRangeForCalendar({ startDate, endDate, userId }));
this.memoryStore.dispatch(pushEvent({ eventsList:listToPresent as any, userId, profile }));
// this.memoryStore.dispatch(removeRangeForCalendar({ startDate, endDate, userId }));
// this.memoryStore.dispatch(pushEvent({ eventsList:listToPresent as any, userId, profile }));
return listToPresent
})
@@ -1,6 +1,7 @@
import { Injectable } from '@angular/core';
import { GetDraftListByProcessIdService, IGetDraftListByProcessIdSchema } from './usecase/getDraft-list-by-process-id.service';
import { DraftSaveByIdInputSchema, DraftSaveByIdUseCaseService, IDraftSaveByIdInput } from './usecase/draft-save-by-id-use-case.service';
import { EventSetDefaultParticipantsService } from 'src/app/core/agenda/use-case/event-set-default-participants.service';
@Injectable({
providedIn: 'root'
@@ -9,7 +10,8 @@ export class AgendaService {
constructor(
private getDraftListByProcessIdService: GetDraftListByProcessIdService,
private DraftSaveByIdUseCaseService: DraftSaveByIdUseCaseService
private DraftSaveByIdUseCaseService: DraftSaveByIdUseCaseService,
private EventSetDefaultParticipants: EventSetDefaultParticipantsService
) { }
getDraftListByProcessId(input: IGetDraftListByProcessIdSchema) {
@@ -19,4 +21,8 @@ export class AgendaService {
draftSaveById(input: IDraftSaveByIdInput) {
return this.DraftSaveByIdUseCaseService.execute(input)
}
setDefaultParticipants() {
return this.EventSetDefaultParticipants.execute()
}
}
@@ -15,7 +15,7 @@ function getTextInsideParentheses(inputString): string {
export class ListEventMapper {
// @XTracer({name:'ListEventMapper/toDomain', log: false, bugPrint: false})
static toDomain(dto: EventListOutputDTO, calendarOwnerName: string, userId: string): EventList {
static toDomain(dto: EventListOutputDTO): EventList {
return dto.data.map((e) => {