TSK-1189 restructured workplace component

This commit is contained in:
Chi Nguyen 2020-04-22 09:49:44 +02:00
parent 8442be7903
commit b1c7e2a6e8
47 changed files with 31 additions and 105 deletions

View File

@ -1,5 +0,0 @@
<div [@toggle]="showCode" *ngIf="showCode" >
<div class="code">
<img *ngFor= "let i of images" src='./assets/icons/code/image{{i}}.gif'>
</div>
</div>

View File

@ -1,8 +0,0 @@
.code{
position: absolute;
bottom: 0;
width: 100vh;
margin-bottom: 0px;
text-align: center;
z-index: 1050;
}

View File

@ -1,29 +0,0 @@
import { Component, OnInit, HostListener } from '@angular/core';
import { opacity } from 'app/shared/animations/expand.animation';
@Component({
selector: 'taskana-code',
templateUrl: './code.component.html',
styleUrls: ['./code.component.scss'],
animations: [opacity]
})
export class CodeComponent implements OnInit {
code = 'ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightKeyBKeyA';
bufferKeys = '';
showCode = false;
images = [0, 1, 2, 3, 4];
@HostListener('window:keyup', ['$event'])
keyEvent(event: KeyboardEvent) {
if (this.bufferKeys === '') {
setTimeout(() => { this.bufferKeys = ''; }, 5000);
}
this.bufferKeys += event.code;
if (this.code === this.bufferKeys) {
this.showCode = true;
setTimeout(() => { this.showCode = false; }, 5000);
}
}
ngOnInit() {
}
}

View File

@ -1,4 +1,4 @@
@import './src/assets/_colors';
@import '../../../../assets/colors';
.list-group-item {
padding: 5px 0px 2px 1px;

View File

@ -18,10 +18,10 @@ import { DomainService } from 'app/shared/services/domain/domain.service';
import { RequestInProgressService } from 'app/shared/services/request-in-progress/request-in-progress.service';
import { SelectedRouteService } from 'app/shared/services/selected-route/selected-route';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { WorkplaceService } from '../services/workplace.service';
import { TaskService } from '../services/task.service';
import { CodeComponent } from '../components/code/code.component';
import { TaskListToolbarComponent } from './task-list-toolbar/task-list-toolbar.component';
import { WorkplaceService } from '../../services/workplace.service';
import { TaskService } from '../../services/task.service';
import { CodeComponent } from '../code/code.component';
import { TaskListToolbarComponent } from '../task-list-toolbar/task-list-toolbar.component';
import { TaskMasterComponent } from './task-master.component';
@Component({

View File

@ -12,8 +12,8 @@ import { TaskanaQueryParameters } from 'app/shared/util/query-parameters';
import { OrientationService } from 'app/shared/services/orientation/orientation.service';
import { Orientation } from 'app/shared/models/orientation';
import { Page } from 'app/shared/models/page';
import { ObjectReference } from '../models/object-reference';
import { Search } from './task-list-toolbar/task-list-toolbar.component';
import { ObjectReference } from '../../models/object-reference';
import { Search } from '../task-list-toolbar/task-list-toolbar.component';
@Component({
selector: 'taskana-task-master',

View File

@ -12,7 +12,7 @@ import { RequestInProgressService } from 'app/shared/services/request-in-progres
import { SelectedRouteService } from 'app/shared/services/selected-route/selected-route';
import { GeneralModalService } from 'app/shared/services/general-modal/general-modal.service';
import { ClassificationsService } from 'app/shared/services/classifications/classifications.service';
import { TaskService } from '../services/task.service';
import { TaskService } from '../../services/task.service';
import { TaskComponent } from './task.component';
@Component({

View File

@ -1,4 +1,4 @@
@import './src/assets/_colors';
@import '../../../../assets/colors';
::ng-deep .btn-block {
background-color: whitesmoke;

View File

@ -10,11 +10,11 @@ import { RemoveConfirmationService } from 'app/shared/services/remove-confirmati
import { RequestInProgressService } from 'app/shared/services/request-in-progress/request-in-progress.service';
import { AlertService } from 'app/shared/services/alert/alert.service';
import { GeneralModalService } from 'app/shared/services/general-modal/general-modal.service';
import { WorkplaceService } from '../services/workplace.service';
import { TaskService } from '../services/task.service';
import { TaskdetailsAttributeComponent } from './attribute/attribute.component';
import { TaskdetailsCustomFieldsComponent } from './custom/custom-fields.component';
import { TaskdetailsGeneralFieldsComponent } from './general/general-fields.component';
import { WorkplaceService } from '../../services/workplace.service';
import { TaskService } from '../../services/task.service';
import { TaskdetailsAttributeComponent } from '../taskdetails-attribute/attribute.component';
import { TaskdetailsCustomFieldsComponent } from '../taskdetails-custom-fields/custom-fields.component';
import { TaskdetailsGeneralFieldsComponent } from '../taskdetails-general/general-fields.component';
import { TaskdetailsComponent } from './taskdetails.component';
@Component({

View File

@ -15,8 +15,8 @@ import { ObjectReference } from 'app/workplace/models/object-reference';
import { Workbasket } from 'app/shared/models/workbasket';
import { WorkplaceService } from 'app/workplace/services/workplace.service';
import { MasterAndDetailService } from 'app/shared/services/master-and-detail/master-and-detail.service';
import { ERROR_TYPES } from '../../shared/models/errors';
import { ErrorsService } from '../../shared/services/errors/errors.service';
import { ERROR_TYPES } from '../../../shared/models/errors';
import { ErrorsService } from '../../../shared/services/errors/errors.service';
@Component({
selector: 'taskana-task-details',

View File

@ -5,7 +5,7 @@ import { Observable } from 'rxjs';
import { environment } from 'environments/environment';
@Injectable()
export class CustomHttpClientInterceptor implements HttpInterceptor {
export class TokenInterceptor implements HttpInterceptor {
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
let request = req;
if (!environment.production) {

View File

@ -1,32 +0,0 @@
import { Pipe, PipeTransform } from '@angular/core';
import { Task } from '../models/task';
@Pipe({
name: 'orderTasksBy'
})
export class OrderTasksByPipe implements PipeTransform {
transform(value: Task[], column: string) {
if (value === null) { return null; }
value.sort((a, b) => {
if (typeof a[column] === 'string') {
return compareString(a[column], b[column]);
}
return compareNumber(a[column], b[column]);
});
return value;
function compareString(a: string, b: string): number {
if (a.toLowerCase() < b.toLowerCase()) {
return -1;
} if (a.toLowerCase() > b.toLowerCase()) {
return 1;
}
return 0;
}
function compareNumber(a: number, b: number): number {
return compareString(a.toString(), b.toString());
}
}
}

View File

@ -1,9 +1,9 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { MasterAndDetailComponent } from '../shared/components/master-and-detail/master-and-detail.component';
import { TaskComponent } from './task/task.component';
import { TaskdetailsComponent } from './taskdetails/taskdetails.component';
import { TaskMasterComponent } from './taskmaster/task-master.component';
import { TaskComponent } from './components/task/task.component';
import { TaskdetailsComponent } from './components/taskdetails/taskdetails.component';
import { TaskMasterComponent } from './components/task-master/task-master.component';
const routes: Routes = [
{

View File

@ -10,21 +10,21 @@ import { SharedModule } from 'app/shared/shared.module';
import { ClassificationCategoriesService } from 'app/shared/services/classification-categories/classification-categories.service';
import { WorkplaceRoutingModule } from './workplace-routing.module';
import { TaskListToolbarComponent } from './taskmaster/task-list-toolbar/task-list-toolbar.component';
import { TaskMasterComponent } from './taskmaster/task-master.component';
import { TaskdetailsComponent } from './taskdetails/taskdetails.component';
import { TaskdetailsGeneralFieldsComponent } from './taskdetails/general/general-fields.component';
import { TaskdetailsCustomFieldsComponent } from './taskdetails/custom/custom-fields.component';
import { TaskdetailsAttributeComponent } from './taskdetails/attribute/attribute.component';
import { TaskComponent } from './task/task.component';
import { TaskListToolbarComponent } from './components/task-list-toolbar/task-list-toolbar.component';
import { TaskMasterComponent } from './components/task-master/task-master.component';
import { TaskdetailsComponent } from './components/taskdetails/taskdetails.component';
import { TaskdetailsGeneralFieldsComponent } from './components/taskdetails-general/general-fields.component';
import { TaskdetailsCustomFieldsComponent } from './components/taskdetails-custom-fields/custom-fields.component';
import { TaskdetailsAttributeComponent } from './components/taskdetails-attribute/attribute.component';
import { TaskComponent } from './components/task/task.component';
import { CodeComponent } from './components/code/code.component';
import { GeneralFieldsExtensionComponent } from './taskdetails/general-fields-extension/general-fields-extension.component';
import { TaskListComponent } from './taskmaster/task-list/task-list.component';
import { GeneralFieldsExtensionComponent } from './components/taskdetails-general-fields-extension/general-fields-extension.component';
import { TaskListComponent } from './components/task-list/task-list.component';
import { OrderTasksByPipe } from './util/orderTasksBy.pipe';
import { TaskService } from './services/task.service';
import { CustomHttpClientInterceptor } from './services/custom-http-interceptor/custom-http-interceptor.service';
import { TokenInterceptor } from './services/token-interceptor.service';
import { WorkplaceService } from './services/workplace.service';
const MODULES = [
@ -63,7 +63,7 @@ const DECLARATIONS = [
WorkplaceService,
{
provide: HTTP_INTERCEPTORS,
useClass: CustomHttpClientInterceptor,
useClass: TokenInterceptor,
multi: true
},
]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB