mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
add the default Task App
This commit is contained in:
@@ -36,6 +36,8 @@ export class ActivitiApps implements OnInit {
|
||||
|
||||
public static LAYOUT_LIST: string = 'LIST';
|
||||
public static LAYOUT_GRID: string = 'GRID';
|
||||
public static DEFAULT_TASKS_APP: string = 'tasks';
|
||||
public static DEFAULT_TASKS_APP_NAME: string = 'Task App';
|
||||
|
||||
@Input()
|
||||
layoutType: string = ActivitiApps.LAYOUT_GRID;
|
||||
@@ -80,8 +82,12 @@ export class ActivitiApps implements OnInit {
|
||||
public load(name?: string) {
|
||||
this.activitiTaskList.getDeployedApplications(name).subscribe(
|
||||
(res) => {
|
||||
res.forEach((app) => {
|
||||
if (app.deploymentId) {
|
||||
res.forEach((app: AppDefinitionRepresentationModel) => {
|
||||
if (app.defaultAppId === ActivitiApps.DEFAULT_TASKS_APP) {
|
||||
app.name = ActivitiApps.DEFAULT_TASKS_APP_NAME;
|
||||
this.appsObserver.next(app);
|
||||
this.selectApp(app);
|
||||
} else if (app.deploymentId) {
|
||||
this.appsObserver.next(app);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -82,7 +82,7 @@ export class ActivitiFilters implements OnInit, OnChanges {
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
let appId = changes['appId'];
|
||||
if (appId && appId.currentValue) {
|
||||
if (appId) {
|
||||
this.load();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user