mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
Merge pull request #1079 from Alfresco/dev-valbano-1073
Added more check for file component on demo shell
This commit is contained in:
commit
c6411f2d27
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
||||||
import {
|
import {
|
||||||
DocumentActionsService,
|
DocumentActionsService,
|
||||||
DocumentList,
|
DocumentList,
|
||||||
@ -50,6 +51,7 @@ export class FilesComponent implements OnInit {
|
|||||||
documentList: DocumentList;
|
documentList: DocumentList;
|
||||||
|
|
||||||
constructor(private documentActions: DocumentActionsService,
|
constructor(private documentActions: DocumentActionsService,
|
||||||
|
public auth: AlfrescoAuthenticationService,
|
||||||
private formService: FormService,
|
private formService: FormService,
|
||||||
private router: Router) {
|
private router: Router) {
|
||||||
documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this));
|
documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this));
|
||||||
@ -104,10 +106,14 @@ export class FilesComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
if ( this.auth.isBpmLoggedIn() ) {
|
||||||
this.formService.getProcessDefinitions().subscribe(
|
this.formService.getProcessDefinitions().subscribe(
|
||||||
defs => this.setupBpmActions(defs || []),
|
defs => this.setupBpmActions(defs || []),
|
||||||
err => console.log(err)
|
err => console.log(err)
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
console.log('You are not logged in');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewActivitiForm(event?: any) {
|
viewActivitiForm(event?: any) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user