@@ -6,17 +6,19 @@ import { ActivatedRouteSnapshot } from '@angular/router';
66import { Observable } from 'rxjs' ;
77
88/** Custom Services */
9- import { GroupsService } from '../groups.service ' ;
9+ import { GroupsService } from '@fineract/client ' ;
1010
1111/**
1212 * Group Actions data resolver.
1313 */
1414@Injectable ( )
1515export class GroupActionsResolver {
1616 /**
17- * @param {GroupsService } groupsService Groups service.
17+ * @param {GroupsService } groupsService,
1818 */
19- constructor ( private groupsService : GroupsService ) { }
19+ constructor (
20+ private groupsService : GroupsService ,
21+ ) { }
2022
2123 /**
2224 * Returns the group actions data.
@@ -25,22 +27,23 @@ export class GroupActionsResolver {
2527 */
2628 resolve ( route : ActivatedRouteSnapshot ) : Observable < any > {
2729 const actionName = route . paramMap . get ( 'action' ) ;
28- const groupId = route . paramMap . get ( 'groupId' ) || route . parent . parent . paramMap . get ( 'groupId' ) ;
30+ const groupIdStr = route . paramMap . get ( 'groupId' ) || route . parent . parent . paramMap . get ( 'groupId' ) ;
31+ const groupId = groupIdStr ? Number ( groupIdStr ) : undefined ;
2932 switch ( actionName ) {
3033 case 'Attendance' :
3134 case 'Manage Members' :
3235 case 'Transfer Clients' :
33- return this . groupsService . getGroupData ( groupId ) ;
36+ return this . groupsService . retrieveOne15 ( { groupId } ) ;
3437 case 'Assign Staff' :
35- return this . groupsService . getGroupData ( groupId , ' true' ) ;
38+ return this . groupsService . retrieveOne15 ( { groupId, staffInSelectedOfficeOnly : true } ) ;
3639 case 'Close' :
37- return this . groupsService . getGroupCommandTemplate ( 'close' ) ;
40+ return this . groupsService . retrieveTemplate7 ( { command : 'close' } ) ;
3841 case 'Attach Meeting' :
39- return this . groupsService . getGroupCalendarTemplate ( groupId ) ;
42+ return this . groupsService . retrieveOne15 ( { groupId } ) ;
4043 case 'Edit Meeting' :
4144 case 'Edit Meeting Schedule' :
4245 const calendarId = route . queryParamMap . get ( 'calendarId' ) ;
43- return this . groupsService . getGroupCalendarAndTemplate ( groupId , calendarId ) ;
46+ return this . groupsService . retrieveOne15 ( { groupId } ) ;
4447 default :
4548 return undefined ;
4649 }
0 commit comments