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_LIST: string = 'LIST';
|
||||||
public static LAYOUT_GRID: string = 'GRID';
|
public static LAYOUT_GRID: string = 'GRID';
|
||||||
|
public static DEFAULT_TASKS_APP: string = 'tasks';
|
||||||
|
public static DEFAULT_TASKS_APP_NAME: string = 'Task App';
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
layoutType: string = ActivitiApps.LAYOUT_GRID;
|
layoutType: string = ActivitiApps.LAYOUT_GRID;
|
||||||
@@ -80,8 +82,12 @@ export class ActivitiApps implements OnInit {
|
|||||||
public load(name?: string) {
|
public load(name?: string) {
|
||||||
this.activitiTaskList.getDeployedApplications(name).subscribe(
|
this.activitiTaskList.getDeployedApplications(name).subscribe(
|
||||||
(res) => {
|
(res) => {
|
||||||
res.forEach((app) => {
|
res.forEach((app: AppDefinitionRepresentationModel) => {
|
||||||
if (app.deploymentId) {
|
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);
|
this.appsObserver.next(app);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export class ActivitiFilters implements OnInit, OnChanges {
|
|||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
let appId = changes['appId'];
|
let appId = changes['appId'];
|
||||||
if (appId && appId.currentValue) {
|
if (appId) {
|
||||||
this.load();
|
this.load();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user