mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
use enums insted of numbers
This commit is contained in:
@@ -38,6 +38,7 @@ import { Cy } from 'cypress/enum'
|
||||
import { Observable } from 'rxjs';
|
||||
import { TableSharedCalendar } from 'src/app/services/Repositorys/Agenda/agenda-local-data-source.service';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { EEventFilterStatus } from 'src/app/services/Repositorys/Agenda/model/enums';
|
||||
@Component({
|
||||
selector: 'app-agenda',
|
||||
templateUrl: './agenda.page.html',
|
||||
@@ -705,7 +706,7 @@ export class AgendaPage implements OnInit {
|
||||
calendarOwnerName: selectedCalendar.wxFullName,
|
||||
endDate: endTime.toISOString(),
|
||||
startDate: startTime.toISOString(),
|
||||
status: 3
|
||||
status: EEventFilterStatus.Approved
|
||||
})
|
||||
|
||||
if(response.isOk()) {
|
||||
|
||||
@@ -11,6 +11,7 @@ import { err, ok } from 'neverthrow';
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { EventToApproveDetailsMapper } from './mapper/EventToApproveDetailsMapper';
|
||||
import { AgendaLocalDataSourceService } from './agenda-local-data-source.service';
|
||||
import { EEventFilterStatus } from './model/enums';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -67,7 +68,7 @@ export class AgendaDataRepositoryService {
|
||||
|
||||
}
|
||||
|
||||
async EventList({ userId, startDate, endDate, status = 3, category = null, type = null, calendarOwnerName = '' }) {
|
||||
async EventList({ userId, startDate, endDate, status = EEventFilterStatus.Approved, category = null, type = null, calendarOwnerName = '' }) {
|
||||
|
||||
try {
|
||||
const result = await this.agendaDataService.getEvents(userId, startDate, endDate, status, category, type).pipe(
|
||||
|
||||
Reference in New Issue
Block a user