show rooms

This commit is contained in:
Peter Maquiran
2024-06-05 10:28:38 +01:00
parent 39f89a92a5
commit 2e9492db68
10 changed files with 144 additions and 272 deletions
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { AddMemberToRoomInputDTO } from '../../dto/room/addMemberToRoomInputDto';
import { RoomListOutPutDTO } from '../../dto/room/roomListOutputDTO';
import { RoomListItemOutPutDTO, RoomListOutPutDTO } from '../../dto/room/roomListOutputDTO';
import { Dexie, EntityTable, liveQuery } from 'Dexie';
import { err, ok } from 'neverthrow';
import { Observable } from 'rxjs';
@@ -49,33 +49,13 @@ export class RoomLocalDataSourceService {
}
async getRoomList() {
}
async getRoom(id: string){
}
async updateRoom(id: string, room: any) {
}
async deleteRoom(id: string){
}
async addMemberToRoom(data: AddMemberToRoomInputDTO) {
}
async removeMemberFromRoom(id: string, member: any){
}
getItemsLive(): Observable<RoomListOutPutDTO[]> {
return liveQuery(() => roomDataSource.room.toArray()) as any;
}
getRoomByIdLive(id: any): Observable<RoomListItemOutPutDTO | undefined> {
return liveQuery(() => roomDataSource.room.get(id)) as any;
}
}