TSK-539 BUG Open information tab when creating a new workbasket
This commit is contained in:
parent
dd0ad1253a
commit
c7ea6f8e63
|
@ -6,24 +6,31 @@
|
|||
<a (click)="backClicked()">
|
||||
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>Back</a>
|
||||
</li>
|
||||
<li role="presentation" class="active" (click)="tabSelected = 'information'">
|
||||
<a href="#work-baskets" aria-controls="work baskets" role="tab" data-toggle="tab" aria-expanded="true">Information</a>
|
||||
<li role="presentation" class="active" (click)="seclectTab('information')" [ngClass]="{'active':tabSelected === 'information'}">
|
||||
<a aria-controls="work baskets" role="tab" aria-expanded="true">
|
||||
Information</a>
|
||||
</li>
|
||||
<li role="presentation" [ngClass]="{'disabled': !workbasket._links?.accessItems}" (click)="tabSelected = 'accessItems'">
|
||||
<a href="#access-items" aria-controls="Acccess" role="tab" data-toggle="tab" aria-expanded="true">Access</a>
|
||||
<li role="presentation" (click)="seclectTab('accessItems')" [ngClass]="{
|
||||
'disabled': action ==='CREATE',
|
||||
'active':tabSelected === 'accessItems'}">
|
||||
<a aria-controls="Acccess" role="tab" aria-expanded="true">
|
||||
Access</a>
|
||||
</li>
|
||||
<li role="presentation" [ngClass]="{'disabled': !workbasket._links?.distributionTargets}" (click)="tabSelected = 'distributionTargets'">
|
||||
<a href="#distribution-targets" aria-controls="distribution targets" role="tab" data-toggle="tab" aria-expanded="true">Distribution targets</a>
|
||||
<li role="presentation" (click)="seclectTab('distributionTargets')" [ngClass]="{
|
||||
'disabled': action ==='CREATE',
|
||||
'active':tabSelected === 'distributionTargets'}">
|
||||
<a aria-controls="distribution targets" role="tab" data-toggle="tab" aria-expanded="true">
|
||||
Distribution targets</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane fade in active" id="work-baskets">
|
||||
<div role="tabpanel" class="tab-pane active" [ngClass]="{'active':tabSelected === 'information'}" id="work-baskets">
|
||||
<taskana-workbasket-information [workbasket]="workbasket" [action]="action"></taskana-workbasket-information>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="access-items">
|
||||
<div role="tabpanel" class="tab-pane" id="access-items" [ngClass]="{'active':tabSelected === 'accessItems'}">
|
||||
<taskana-workbasket-access-items [workbasket]="workbasket" [action]="action" [active]="tabSelected"></taskana-workbasket-access-items>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="distribution-targets">
|
||||
<div role="tabpanel" class="tab-pane" id="distribution-targets" [ngClass]="{'active':tabSelected === 'distributionTargets'}">
|
||||
<taskana-workbaskets-distribution-targets [workbasket]="workbasket" [action]="action" [active]="tabSelected"></taskana-workbaskets-distribution-targets>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -29,6 +29,7 @@ export class WorkbasketDetailsComponent implements OnInit, OnDestroy {
|
|||
showDetail = false;
|
||||
requestInProgress = false;
|
||||
action: string;
|
||||
tabSelected = 'information';
|
||||
|
||||
private workbasketSelectedSubscription: Subscription;
|
||||
private workbasketSubscription: Subscription;
|
||||
|
@ -55,6 +56,7 @@ export class WorkbasketDetailsComponent implements OnInit, OnDestroy {
|
|||
let id = params['id'];
|
||||
this.action = undefined;
|
||||
if (id && id.indexOf('new-workbasket') !== -1) {
|
||||
this.tabSelected = 'information';
|
||||
this.action = ACTION.CREATE;
|
||||
id = undefined;
|
||||
this.getWorkbasketInformation(id);
|
||||
|
@ -85,6 +87,10 @@ export class WorkbasketDetailsComponent implements OnInit, OnDestroy {
|
|||
this.router.navigate(['./'], { relativeTo: this.route.parent });
|
||||
}
|
||||
|
||||
seclectTab(tab) {
|
||||
this.tabSelected = this.action === ACTION.CREATE ? 'information' : tab;
|
||||
}
|
||||
|
||||
private selectWorkbasket(id: string) {
|
||||
this.selectedId = id;
|
||||
this.service.selectWorkBasket(id);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.code{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
width: 100vh;
|
||||
margin-bottom: 0px;
|
||||
text-align: center;
|
||||
z-index: 1050;
|
||||
|
|
|
@ -20,3 +20,4 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<taskana-code></taskana-code>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {MasterAndDetailComponent} from '../shared/master-and-detail/master-and-detail.component';
|
||||
import {WorkplaceComponent} from './workplace.component';
|
||||
import {TaskComponent} from './task/task.component';
|
||||
import {TaskdetailsComponent} from './taskdetails/taskdetails.component';
|
||||
import {TasklistComponent} from './tasklist/tasklist.component';
|
||||
|
@ -30,7 +29,6 @@ const routes: Routes = [
|
|||
},
|
||||
{
|
||||
path: '',
|
||||
component: WorkplaceComponent,
|
||||
redirectTo: 'tasks',
|
||||
pathMatch: 'full'
|
||||
}
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
<router-outlet></router-outlet>
|
||||
<taskana-code></taskana-code>
|
|
@ -1,13 +0,0 @@
|
|||
import { Component, OnInit, HostListener, OnDestroy } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'taskana-workplace',
|
||||
templateUrl: './workplace.component.html'
|
||||
})
|
||||
export class WorkplaceComponent implements OnInit, OnDestroy {
|
||||
constructor() { }
|
||||
ngOnInit(): void {
|
||||
}
|
||||
ngOnDestroy(): void {
|
||||
}
|
||||
}
|
|
@ -7,7 +7,6 @@ import {AngularSvgIconModule} from 'angular-svg-icon';
|
|||
import {WorkplaceRoutingModule} from './workplace-routing.module';
|
||||
import {AlertModule} from 'ngx-bootstrap';
|
||||
|
||||
import { WorkplaceComponent } from './workplace.component';
|
||||
import { SelectorComponent } from './workbasket-selector/workbasket-selector.component';
|
||||
import { TasklistComponent } from './tasklist/tasklist.component';
|
||||
import { TaskdetailsComponent } from './taskdetails/taskdetails.component';
|
||||
|
@ -35,7 +34,6 @@ const MODULES = [
|
|||
];
|
||||
|
||||
const DECLARATIONS = [
|
||||
WorkplaceComponent,
|
||||
SelectorComponent,
|
||||
TasklistComponent,
|
||||
TaskdetailsComponent,
|
||||
|
|
Loading…
Reference in New Issue