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