feat: client actions (assign/unassign staff) (#1067)

Fixes: #1066
This commit is contained in:
Karan Takalkar
2020-07-13 11:18:10 +05:30
committed by GitHub
parent ac529dbae8
commit af32d481bf
29 changed files with 378 additions and 13 deletions
@@ -0,0 +1,33 @@
/** Angular Imports */
import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
/**
* Client actions component.
*/
@Component({
selector: 'mifosx-client-actions',
templateUrl: './client-actions.component.html',
styleUrls: ['./client-actions.component.scss']
})
export class ClientActionsComponent {
/** Flag object to store possible actions and render appropriate UI to the user */
actions: {
'Assign Staff': boolean
} = {
'Assign Staff': false,
};
/**
* @param {ActivatedRoute} route Activated Route
* @param {Router} router Router
*/
constructor(private route: ActivatedRoute,
private router: Router) {
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
const name = this.route.snapshot.params['name'];
this.actions[name] = true;
}
}