@@ -157,14 +157,15 @@ export class TipComponent implements OnInit {
157
157
openGrantTipAccessModal ( ) : void {
158
158
this . utils . runUserOperation ( "get_users_names" , { } , false ) . subscribe ( {
159
159
next : response => {
160
+ const names = response as Record < string , string > ;
160
161
const selectableRecipients : Receiver [ ] = [ ] ;
161
162
this . appDataService . public . receivers . forEach ( async ( receiver : Receiver ) => {
162
163
if ( receiver . id !== this . authenticationService . session . user_id && ! this . tip . receivers_by_id [ receiver . id ] ) {
164
+ receiver . name = names [ receiver . id ] ;
163
165
selectableRecipients . push ( receiver ) ;
164
166
}
165
167
} ) ;
166
168
const modalRef = this . modalService . open ( GrantAccessComponent , { backdrop : 'static' , keyboard : false } ) ;
167
- modalRef . componentInstance . usersNames = response ;
168
169
modalRef . componentInstance . selectableRecipients = selectableRecipients ;
169
170
modalRef . componentInstance . confirmFun = ( receiver_id : Receiver ) => {
170
171
const req = {
@@ -187,14 +188,15 @@ export class TipComponent implements OnInit {
187
188
this . utils . runUserOperation ( "get_users_names" , { } , false ) . subscribe (
188
189
{
189
190
next : response => {
191
+ const names = response as Record < string , string > ;
190
192
const selectableRecipients : Receiver [ ] = [ ] ;
191
193
this . appDataService . public . receivers . forEach ( async ( receiver : Receiver ) => {
192
194
if ( receiver . id !== this . authenticationService . session . user_id && this . tip . receivers_by_id [ receiver . id ] ) {
195
+ receiver . name = names [ receiver . id ] ;
193
196
selectableRecipients . push ( receiver ) ;
194
197
}
195
198
} ) ;
196
199
const modalRef = this . modalService . open ( RevokeAccessComponent , { backdrop : 'static' , keyboard : false } ) ;
197
- modalRef . componentInstance . usersNames = response ;
198
200
modalRef . componentInstance . selectableRecipients = selectableRecipients ;
199
201
modalRef . componentInstance . confirmFun = ( receiver_id : Receiver ) => {
200
202
const req = {
@@ -218,14 +220,15 @@ export class TipComponent implements OnInit {
218
220
this . utils . runUserOperation ( "get_users_names" , { } , false ) . subscribe (
219
221
{
220
222
next : response => {
223
+ const names = response as Record < string , string > ;
221
224
const selectableRecipients : Receiver [ ] = [ ] ;
222
225
this . appDataService . public . receivers . forEach ( async ( receiver : Receiver ) => {
223
226
if ( receiver . id !== this . authenticationService . session . user_id && ! this . tip . receivers_by_id [ receiver . id ] ) {
227
+ receiver . name = names [ receiver . id ] ;
224
228
selectableRecipients . push ( receiver ) ;
225
229
}
226
230
} ) ;
227
231
const modalRef = this . modalService . open ( TransferAccessComponent , { backdrop : 'static' , keyboard : false } ) ;
228
- modalRef . componentInstance . usersNames = response ;
229
232
modalRef . componentInstance . selectableRecipients = selectableRecipients ;
230
233
modalRef . result . then (
231
234
( receiverId ) => {
0 commit comments