mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
* [ADF-3775] Created breadcrumb component for layout demo * [ADF-3775] Created filter demo component * [ADF-3775] Created apps demo component * [ADF-3775] Created tasks list cloud demo component * [ADF-3775] Created tasks process cloud demo component * [ADF-3775] Created new cloud layout component * [ADF-3775] Improved translation * [ADF-3775] Fixed translation * [ADF-3775] Improved layout * Use the EditTaskFilters TaskFilterCloud should have a stream of filter Fix integration issues * Remove useless route Enable start task cloud button * Remove useless pages and handle start task error event * Fix wrong unit test * Use the Process Cloud menu name
58 lines
1.9 KiB
TypeScript
58 lines
1.9 KiB
TypeScript
/*!
|
|
* @license
|
|
* Copyright 2016 Alfresco Software, Ltd.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
|
|
@Component({
|
|
selector: 'app-cloud-layout',
|
|
templateUrl: './cloud-layout.component.html',
|
|
styleUrls: ['./cloud-layout.component.scss'],
|
|
encapsulation: ViewEncapsulation.None
|
|
})
|
|
export class CloudLayoutComponent implements OnInit {
|
|
displayMenu = true;
|
|
applicationName: string;
|
|
|
|
constructor(private router: Router, private route: ActivatedRoute) {
|
|
}
|
|
|
|
ngOnInit() {
|
|
this.route.params.subscribe((params) => {
|
|
this.applicationName = params.applicationName;
|
|
});
|
|
}
|
|
|
|
onTaskFilterSelected(filter) {
|
|
const currentFilter = Object.assign({}, filter);
|
|
this.router.navigate([`/cloud/${this.applicationName}/tasks/`], { queryParams: currentFilter });
|
|
}
|
|
|
|
onStartTask() {
|
|
this.router.navigate([`/cloud/${this.applicationName}/start-task/`]);
|
|
}
|
|
|
|
onProcessFilterSelected(filter) {
|
|
const queryParams = {
|
|
status: filter.query.state,
|
|
filterName: filter.name,
|
|
sort: filter.query.sort,
|
|
order: filter.query.order
|
|
};
|
|
this.router.navigate([`/cloud/${this.applicationName}/processes/`], { queryParams: queryParams });
|
|
}
|
|
}
|