mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
fix adding member
This commit is contained in:
@@ -227,11 +227,11 @@ export class RoomRepositoryService {
|
|||||||
@captureAndReraiseAsync('RoomRepositoryService/addMemberToRoom')
|
@captureAndReraiseAsync('RoomRepositoryService/addMemberToRoom')
|
||||||
async addMemberToRoom(data: AddMemberToRoomInputDTO) {
|
async addMemberToRoom(data: AddMemberToRoomInputDTO) {
|
||||||
|
|
||||||
return this.roomLiveSignalRDataSourceService.addMemberToRoom(data)
|
//return this.roomLiveSignalRDataSourceService.addMemberToRoom(data)
|
||||||
|
|
||||||
// const result = await this.roomRemoteDataSourceService.addMemberToRoom(data)
|
const result = await this.roomRemoteDataSourceService.addMemberToRoom(data)
|
||||||
|
|
||||||
// return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateMemberStatus(data: MemberListUPdateStatusInputDTO) {
|
async updateMemberStatus(data: MemberListUPdateStatusInputDTO) {
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ export class SignalRConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sendData(input: ISignalRInput) {
|
sendData(input: ISignalRInput): Promise<Result<any, any>> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
||||||
if(this.connectionStateSubject.value == true) {
|
if(this.connectionStateSubject.value == true) {
|
||||||
@@ -320,6 +320,22 @@ export class SignalRConnection {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
this.hubConnection.on('GroupAddedMembers', (_message) => {
|
||||||
|
console.log('GroupAddedMembers', _message)
|
||||||
|
this.sendDataSubject.next({
|
||||||
|
method: 'GroupAddedMembers',
|
||||||
|
data: _message
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
this.hubConnection.on('GroupDeletedMembers', (_message) => {
|
||||||
|
console.log('GroupDeletedMembers', _message)
|
||||||
|
this.sendDataSubject.next({
|
||||||
|
method: 'GroupDeletedMembers',
|
||||||
|
data: _message
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
public getMessageUpdateSubject() {
|
public getMessageUpdateSubject() {
|
||||||
|
|||||||
@@ -57,13 +57,16 @@ export class GroupContactsPage implements OnInit {
|
|||||||
id: this.roomId,
|
id: this.roomId,
|
||||||
members: this.selectedUsers
|
members: this.selectedUsers
|
||||||
})
|
})
|
||||||
// if(addMembers.isOk()) {
|
|
||||||
// // this.addContacts(this.roomId);
|
|
||||||
// this.openGroupMessage.emit(this.roomId);
|
if(addMembers.isOk()) {
|
||||||
// this.RoomRepositoryService.getRoomById(this.roomId)
|
console.log('addMembers', addMembers)
|
||||||
// } else if(addMembers.error instanceof HttpRequest) {
|
// this.addContacts(this.roomId);
|
||||||
// this.httpErrorHandle.httpStatusHandle(addMembers.error)
|
this.openGroupMessage.emit(this.roomId);
|
||||||
// }
|
this.RoomRepositoryService.getRoomById(this.roomId);
|
||||||
|
} else if(addMembers.error instanceof HttpRequest) {
|
||||||
|
this.httpErrorHandle.httpStatusHandle(addMembers.error)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.openGroupMessage.emit(this.roomId);
|
this.openGroupMessage.emit(this.roomId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user