1 import {Designer, IUserProperties} from "app/models";
2 import {CacheService} from "app/services";
3 import {DesignersService} from "../../../../ng2/services/designers.service";
4 import {IWorkspaceViewModelScope} from "../../workspace-view-model";
7 interface IDesignerTabViewModelScope extends IWorkspaceViewModelScope {
13 export class DesignersTabViewModel {
17 'Sdc.Services.CacheService',
21 constructor(private $scope:IDesignerTabViewModelScope,
22 private $stateParams:any,
23 private cacheService:CacheService,
24 private designersService:DesignersService) {
29 private initScope = ():void => {
30 this.$scope.designer = this.designersService.getDesignerByStateUrl(this.$stateParams.path);
32 this.$scope.user = this.cacheService.get('user');
34 this.$scope.queryParams = {
35 userId: this.$scope.user.userId,
36 contextType: this.$scope.component.componentType,
37 uuid: this.$scope.component.uuid,
38 lifecycleState: this.$scope.component.lifecycleState,
39 isOwner: this.$scope.component.lastUpdaterUserId === this.$scope.user.userId