Fix TS warnings

pull/4589/head
Oliver Günther 8 years ago
parent 6a91f4b365
commit 6c5904c151
  1. 1
      frontend/app/components/api/api-paths/api-paths.service.test.ts
  2. 4
      frontend/app/components/api/api-v3/hal-link/hal-link.service.ts
  3. 5
      frontend/app/components/api/api-v3/hal-resource-types/hal-resource-types.service.ts
  4. 7
      frontend/app/components/api/api-v3/hal-resources/hal-resource.service.ts
  5. 14
      frontend/app/components/api/api-v3/hal-resources/work-package-resource.service.ts
  6. 2
      frontend/app/components/api/api-work-packages/api-work-packages.service.ts
  7. 1
      frontend/app/components/context-menus/wp-context-menu/wp-context-menu.service.test.ts
  8. 24
      frontend/app/components/work-packages/wp-attachments-formattable-field/wp-attachments-formattable.directive.ts
  9. 10
      frontend/app/components/work-packages/wp-attachments-formattable-field/wp-attachments-formattable.models.ts
  10. 5
      frontend/app/components/work-packages/wp-attachments/wp-attachments.directive.test.ts
  11. 57
      frontend/app/components/work-packages/wp-attachments/wp-attachments.directive.ts
  12. 23
      frontend/app/components/work-packages/wp-attachments/wp-attachments.service.ts
  13. 8
      frontend/app/components/work-packages/wp-single-view/wp-single-view.directive.ts
  14. 5
      frontend/app/components/wp-buttons/wp-inline-create-button/wp-inline-create-button.controller.ts
  15. 3
      frontend/app/components/wp-display/field-types/wp-display-duration-field.module.ts
  16. 3
      frontend/app/components/wp-display/field-types/wp-display-id-field.module.ts
  17. 1
      frontend/tsconfig.json

@ -27,6 +27,7 @@
// ++ // ++
import {ApiPathsService} from "./api-paths.service"; import {ApiPathsService} from "./api-paths.service";
import { expect } from 'chai';
describe('apiPaths', () => { describe('apiPaths', () => {

@ -81,8 +81,8 @@ export class HalLink implements HalLinkInterface {
} }
} }
function halLinkService() { function halLinkService(...args) {
[$q, apiV3] = arguments; [$q, apiV3] = args;
return HalLink; return HalLink;
} }

@ -62,9 +62,8 @@ export class HalResourceTypesService {
}); });
types types
.map(typeConfig => [typeConfig.typeName, typeConfig.attrTypes]) .forEach(typeConfig => {
.forEach(typeAttrConfig => { this.halResourceTypesStorage.setResourceTypeAttributes(typeConfig.typeName, typeConfig.attrTypes);
this.halResourceTypesStorage.setResourceTypeAttributes(...typeAttrConfig);
}); });
} }
} }

@ -167,7 +167,7 @@ function initializeResource(halResource:HalResource) {
if (Array.isArray(link)) { if (Array.isArray(link)) {
var items = link.map(item => createLinkedResource(linkName, item.$link)); var items = link.map(item => createLinkedResource(linkName, item.$link));
var property:Array = new ObservableArray(...items).on('change', () => { var property:Array<HalResource> = new ObservableArray(...items).on('change', () => {
property.forEach(item => { property.forEach(item => {
if (!item.$link) { if (!item.$link) {
property.splice(property.indexOf(item), 1); property.splice(property.indexOf(item), 1);
@ -246,15 +246,14 @@ function initializeResource(halResource:HalResource) {
} }
} }
function halResourceService() { function halResourceService(...args) {
[$q, lazy, HalLink, halResourceTypesStorage] = arguments; [$q, lazy, halResourceTypesStorage] = args;
return HalResource; return HalResource;
} }
halResourceService.$inject = [ halResourceService.$inject = [
'$q', '$q',
'lazy', 'lazy',
'HalLink',
'halResourceTypesStorage' 'halResourceTypesStorage'
]; ];

@ -40,7 +40,7 @@ interface WorkPackageResourceEmbedded {
author:HalResource|any; author:HalResource|any;
availableWatchers:HalResource|any; availableWatchers:HalResource|any;
category:HalResource|any; category:HalResource|any;
children:HalResource[]|any[]; children:WorkPackageResourceInterface[];
parent:HalResource|any; parent:HalResource|any;
priority:HalResource|any; priority:HalResource|any;
project:HalResource|any; project:HalResource|any;
@ -67,7 +67,7 @@ interface WorkPackageResourceLinks extends WorkPackageResourceEmbedded {
move():ng.IPromise<any>; move():ng.IPromise<any>;
removeWatcher():ng.IPromise<any>; removeWatcher():ng.IPromise<any>;
self():ng.IPromise<any>; self():ng.IPromise<any>;
update():ng.IPromise<any>; update(payload:any):ng.IPromise<any>;
updateImmediately(payload:any):ng.IPromise<any>; updateImmediately(payload:any):ng.IPromise<any>;
watch():ng.IPromise<any>; watch():ng.IPromise<any>;
} }
@ -108,6 +108,8 @@ export class WorkPackageResource extends HalResource {
public schema; public schema;
public $pristine:{ [attribute:string]:any } = {}; public $pristine:{ [attribute:string]:any } = {};
public parentId:number; public parentId:number;
public subject:string;
public lockVersion:number;
private form; private form;
@ -132,7 +134,7 @@ export class WorkPackageResource extends HalResource {
args = args.map(arg => (arg ? arg.$source : arg)); args = args.map(arg => (arg ? arg.$source : arg));
} }
if (!_.isEqual(...args)) { if (!_.isEqual(args[0], args[1])) {
modified.push(key); modified.push(key);
} }
}); });
@ -335,7 +337,7 @@ export class WorkPackageResource extends HalResource {
this.id = 'new'; this.id = 'new';
// Set update link to form // Set update link to form
this.update = this.$links.update = form.$links.self; this['update'] = this.$links.update = form.$links.self;
this.parentId = this.parentId || $stateParams.parent_id; this.parentId = this.parentId || $stateParams.parent_id;
} }
@ -344,8 +346,8 @@ export class WorkPackageResource extends HalResource {
export interface WorkPackageResourceInterface extends WorkPackageResourceLinks, WorkPackageResourceEmbedded, WorkPackageResource { export interface WorkPackageResourceInterface extends WorkPackageResourceLinks, WorkPackageResourceEmbedded, WorkPackageResource {
} }
function wpResource() { function wpResource(...args) {
[$q, $stateParams, apiWorkPackages, wpCacheService, NotificationsService] = arguments; [$q, $stateParams, apiWorkPackages, wpCacheService, NotificationsService] = args;
return WorkPackageResource; return WorkPackageResource;
} }

@ -81,7 +81,7 @@ export class ApiWorkPackagesService {
parent = this.apiV3.one('projects', projectIdentifier); parent = this.apiV3.one('projects', projectIdentifier);
} }
return this.apiV3.service('work_packages', parent); return this.apiV3.one('work_packages', parent);
} }
protected queryAsV3Params(offset:number, pageSize:number, query:api.ex.Query) { protected queryAsV3Params(offset:number, pageSize:number, query:api.ex.Query) {

@ -26,6 +26,7 @@
// See doc/COPYRIGHT.rdoc for more details. // See doc/COPYRIGHT.rdoc for more details.
// ++ // ++
import { expect } from 'chai';
declare var Factory:any; declare var Factory:any;
describe('workPackageContextMenu', () => { describe('workPackageContextMenu', () => {

@ -1,7 +1,9 @@
import {WpAttachmentsService} from './../wp-attachments/wp-attachments.service'; import {WpAttachmentsService} from './../wp-attachments/wp-attachments.service';
import {WorkPackageResource} from './../../api/api-v3/hal-resources/work-package-resource.service'
import {InsertMode, ViewMode} from './wp-attachments-formattable.enums' import {InsertMode, ViewMode} from './wp-attachments-formattable.enums'
import {DropModel, EditorModel, MarkupModel, FieldModel, SingleAttachmentModel} from './wp-attachments-formattable.models' import {DropModel, EditorModel, MarkupModel, FieldModel, SingleAttachmentModel} from './wp-attachments-formattable.models'
import {WorkPackageResourceInterface} from "../../api/api-v3/hal-resources/work-package-resource.service";
import {WorkPackageSingleViewController} from "../wp-single-view/wp-single-view.directive";
import {WorkPackageEditFormController} from "../../wp-edit/wp-edit-form.directive";
export class WpAttachmentsFormattableController { export class WpAttachmentsFormattableController {
private viewMode: ViewMode = ViewMode.SHOW; private viewMode: ViewMode = ViewMode.SHOW;
@ -13,10 +15,8 @@ export class WpAttachmentsFormattableController {
protected wpAttachments: WpAttachmentsService, protected wpAttachments: WpAttachmentsService,
protected $timeout: ng.ITimeoutService) { protected $timeout: ng.ITimeoutService) {
$element.get(0).addEventListener('drop', this.handleDrop); $element.on('drop', this.handleDrop);
$element.bind('dragenter', this.prevDefault) $element.on('dragenter dragleave dragover', this.prevDefault);
.bind('dragleave', this.prevDefault)
.bind('dragover', this.prevDefault);
} }
@ -27,9 +27,9 @@ export class WpAttachmentsFormattableController {
const textarea: ng.IAugmentedJQuery = this.$element.find('textarea'); const textarea: ng.IAugmentedJQuery = this.$element.find('textarea');
this.viewMode = (textarea.length > 0) ? ViewMode.EDIT : ViewMode.SHOW; this.viewMode = (textarea.length > 0) ? ViewMode.EDIT : ViewMode.SHOW;
const workPackage: WorkPackageResource = this.$scope.workPackage; const workPackage: WorkPackageResourceInterface = (this.$scope as any).workPackage;
const dropData: DropModel = new DropModel(this.$location, evt.dataTransfer, workPackage); const dropData: DropModel = new DropModel(this.$location, evt.dataTransfer, workPackage);
var description: any; var description: any;
if (this.viewMode === ViewMode.EDIT) { if (this.viewMode === ViewMode.EDIT) {
@ -105,14 +105,18 @@ export class WpAttachmentsFormattableController {
} }
} }
interface IAttachmentScope extends ng.IScope {
workPackage: WorkPackageResourceInterface
}
function wpAttachmentsFormattable() { function wpAttachmentsFormattable() {
return { return {
bindToController: true, bindToController: true,
controller: WpAttachmentsFormattableController, controller: WpAttachmentsFormattableController,
link: function(scope: ng.IScope, link: function(scope: IAttachmentScope,
element: ng.IAugmentedJQuery, element: ng.IAugmentedJQuery,
attrs: ng.IAttributes, attrs: ng.IAttributes,
controllers: Array<ng.IControllerService>){ controllers: [WorkPackageSingleViewController, WorkPackageEditFormController]){
// right now the attachments directive will only work in combination with either // right now the attachments directive will only work in combination with either
// the wpSingleView or the wpEditForm directive // the wpSingleView or the wpEditForm directive
// else the drop handler will fail because of a missing reference to the current wp // else the drop handler will fail because of a missing reference to the current wp

@ -1,6 +1,8 @@
import {IApplyAttachmentMarkup} from './wp-attachments-formattable.interfaces' import {IApplyAttachmentMarkup} from './wp-attachments-formattable.interfaces'
import {InsertMode} from './wp-attachments-formattable.enums' import {InsertMode} from './wp-attachments-formattable.enums'
import {WorkPackageResource} from "../../api/api-v3/hal-resources/work-package-resource.service"; import {
WorkPackageResourceInterface
} from "../../api/api-v3/hal-resources/work-package-resource.service";
import IAugmentedJQuery = angular.IAugmentedJQuery; import IAugmentedJQuery = angular.IAugmentedJQuery;
export class EditorModel implements IApplyAttachmentMarkup{ export class EditorModel implements IApplyAttachmentMarkup{
@ -34,7 +36,7 @@ export class EditorModel implements IApplyAttachmentMarkup{
export class MarkupModel{ export class MarkupModel{
public createMarkup(insertUrl: string, insertMode: InsertMode, addLineBreak?: boolean = false): string { public createMarkup(insertUrl: string, insertMode: InsertMode, addLineBreak: boolean = false): string {
if (angular.isUndefined((insertUrl))) return ""; if (angular.isUndefined((insertUrl))) return "";
var markup:string = ""; var markup:string = "";
@ -73,7 +75,7 @@ export class DropModel{
maximumAttachmentFileSize : 0, // initialized during init process from ConfigurationService maximumAttachmentFileSize : 0, // initialized during init process from ConfigurationService
}; };
constructor(protected $location: ng.ILocationService, protected dt: DataTransfer, protected workPackage: WorkPackageResource){ constructor(protected $location: ng.ILocationService, protected dt: DataTransfer, protected workPackage: WorkPackageResourceInterface){
this.files = dt.files; this.files = dt.files;
this.filesCount = this.files.length; this.filesCount = this.files.length;
this.isUpload = this._isUpload(dt); this.isUpload = this._isUpload(dt);
@ -158,7 +160,7 @@ export class SingleAttachmentModel {
export class FieldModel implements IApplyAttachmentMarkup { export class FieldModel implements IApplyAttachmentMarkup {
public contentToInsert: string; public contentToInsert: string;
constructor(protected workPackage: WorkPackageResource, protected markupModel: MarkupModel){ constructor(protected workPackage: WorkPackageResourceInterface, protected markupModel: MarkupModel){
this.contentToInsert = workPackage.description.raw || ""; this.contentToInsert = workPackage.description.raw || "";
} }

@ -26,6 +26,7 @@
// See doc/COPYRIGHT.rdoc for more details. // See doc/COPYRIGHT.rdoc for more details.
//++ //++
import {WorkPackageAttachmentsController} from './wp-attachments.directive' import {WorkPackageAttachmentsController} from './wp-attachments.directive'
type FileListAsArray = FileList & typeFixes.ArrayFix;
describe('WorkPackageAttachmentsDirective', function() { describe('WorkPackageAttachmentsDirective', function() {
var compile; var compile;
@ -97,7 +98,7 @@ describe('WorkPackageAttachmentsDirective', function() {
it('filters out attachments of type directory', function() { it('filters out attachments of type directory', function() {
var files = [{type: 'directory'}, {type: 'file'}]; var files = [{type: 'directory'}, {type: 'file'}];
controller.filterFiles(files); controller.filterFiles(<FileListAsArray> files);
expect(files).to.eql([{type: 'file'}]); expect(files).to.eql([{type: 'file'}]);
}); });
@ -122,7 +123,7 @@ describe('WorkPackageAttachmentsDirective', function() {
var uploadStub = wpAttachments.upload = sinon.stub().returns(dumbPromise); var uploadStub = wpAttachments.upload = sinon.stub().returns(dumbPromise);
controller.uploadFilteredFiles(files); controller.uploadFilteredFiles(<FileListAsArray> files);
expect(uploadStub.calledWith(workPackage, [{type: 'file'}])).to.be.true; expect(uploadStub.calledWith(workPackage, [{type: 'file'}])).to.be.true;
}); });

@ -29,34 +29,35 @@
import {wpDirectivesModule} from '../../../angular-modules'; import {wpDirectivesModule} from '../../../angular-modules';
import {WpAttachmentsService} from './wp-attachments.service'; import {WpAttachmentsService} from './wp-attachments.service';
type FileListAsArray = FileList & typeFixes.ArrayFix;
export class WorkPackageAttachmentsController { export class WorkPackageAttachmentsController {
public workPackage:any; public workPackage: any;
public attachments:any[] = []; public attachments: any[] = [];
public fetchingConfiguration:boolean = false; public fetchingConfiguration: boolean = false;
public files:File[] = []; public files: FileListAsArray = [];
public hasRightToUpload:boolean = false; public hasRightToUpload: boolean = false;
public I18n:any; public loading: boolean = false;
public loading:boolean = false; public rejectedFiles: any[] = [];
public rejectedFiles:any[] = [];
public settings = { public settings = {
maximumFileSize: Number maximumFileSize: Number
}; };
public size:any; public size: any;
private currentlyFocussing; private currentlyFocussing;
private editMode:boolean; private editMode: boolean;
constructor(protected $scope:any, constructor(protected $scope: any,
protected $element:ng.IAugmentedJQuery, protected $element: ng.IAugmentedJQuery,
protected $attrs:ng.IAttributes, protected $attrs: ng.IAttributes,
protected wpAttachments:WpAttachmentsService, protected wpAttachments: WpAttachmentsService,
protected NotificationsService:any, protected NotificationsService: any,
protected I18n:any, protected I18n: any,
protected ConfigurationService:any, protected ConfigurationService: any,
protected ConversionService:any) { protected ConversionService: any) {
this.attachments = this.wpAttachments.getCurrentAttachments(); this.attachments = this.wpAttachments.getCurrentAttachments();
this.editMode = $attrs.hasOwnProperty('edit'); this.editMode = $attrs.hasOwnProperty('edit');
@ -76,7 +77,7 @@ export class WorkPackageAttachmentsController {
} }
public upload():void { public upload(): void {
if (this.workPackage.isNew) { if (this.workPackage.isNew) {
this.files.forEach((file) => { this.files.forEach((file) => {
this.attachments.push(file); this.attachments.push(file);
@ -92,7 +93,7 @@ export class WorkPackageAttachmentsController {
} }
}; };
public loadAttachments():void { public loadAttachments(): void {
if (this.editMode) { if (this.editMode) {
this.loading = true; this.loading = true;
this.wpAttachments.load(this.workPackage, true).finally(() => { this.wpAttachments.load(this.workPackage, true).finally(() => {
@ -101,7 +102,7 @@ export class WorkPackageAttachmentsController {
} }
}; };
public remove(file):void { public remove(file): void {
if (this.workPackage.isNew) { if (this.workPackage.isNew) {
_.remove(this.wpAttachments.attachments, file); _.remove(this.wpAttachments.attachments, file);
} else { } else {
@ -109,30 +110,30 @@ export class WorkPackageAttachmentsController {
} }
}; };
public focus(attachment:any):void { public focus(attachment: any): void {
this.currentlyFocussing = attachment; this.currentlyFocussing = attachment;
}; };
public focussing(attachment:any):boolean { public focussing(attachment: any): boolean {
return this.currentlyFocussing === attachment; return this.currentlyFocussing === attachment;
}; };
public filterFiles(files):void { public filterFiles(files): void {
// Directories cannot be uploaded and as such, should not become files in // Directories cannot be uploaded and as such, should not become files in
// the sense of this directive. The files within the directories will // the sense of this directive. The files within the directories will
// be taken though. // be taken though.
_.remove(files, (file:any) => { _.remove(files, (file: any) => {
return file.type === 'directory'; return file.type === 'directory';
}); });
}; };
public uploadFilteredFiles(files):void { public uploadFilteredFiles(files): void {
this.filterFiles(files); this.filterFiles(files);
this.upload(); this.upload();
} }
} }
function wpAttachmentsDirective():ng.IDirective { function wpAttachmentsDirective(): ng.IDirective {
return { return {
bindToController: true, bindToController: true,
controller: WorkPackageAttachmentsController, controller: WorkPackageAttachmentsController,
@ -142,7 +143,7 @@ function wpAttachmentsDirective():ng.IDirective {
scope: { scope: {
workPackage: '&', workPackage: '&',
}, },
templateUrl: (element:ng.IAugmentedJQuery, attrs:ng.IAttributes):string => { templateUrl: (element: ng.IAugmentedJQuery, attrs: ng.IAttributes): string => {
if (attrs.hasOwnProperty('edit')) { if (attrs.hasOwnProperty('edit')) {
return '/components/work-packages/wp-attachments/wp-attachments-edit.directive.html'; return '/components/work-packages/wp-attachments/wp-attachments-edit.directive.html';
} else { } else {

@ -27,28 +27,29 @@
// ++ // ++
import {wpServicesModule} from '../../../angular-modules.ts'; import {wpServicesModule} from '../../../angular-modules.ts';
import ArrayLiteralExpression = ts.ArrayLiteralExpression;
import {WorkPackageResource} from './../../api/api-v3/hal-resources/work-package-resource.service'
import {HalResource} from './../../api/api-v3/hal-resources/hal-resource.service' import {HalResource} from './../../api/api-v3/hal-resources/hal-resource.service'
import {WorkPackageResourceInterface} from "../../api/api-v3/hal-resources/work-package-resource.service";
type FileListAsArray = FileList & typeFixes.ArrayFix;
export class WpAttachmentsService { export class WpAttachmentsService {
public attachments: Array = []; public attachments: Array<any> = [];
constructor( constructor(
protected $q: ng.IQService, protected $q: ng.IQService,
protected $timeout: ng.ITimeoutService, protected $timeout: ng.ITimeoutService,
protected $http: ng.IHttpProvider, protected $http: ng.IHttpService,
protected Upload, protected Upload,
protected I18n, protected I18n,
protected NotificationsService protected NotificationsService
) {} ) {}
public upload(workPackage: WorkPackageResource, files: FileList): ng.IPromise { public upload(workPackage: WorkPackageResourceInterface, files: FileListAsArray): ng.IPromise<any> {
const uploadPath: string = workPackage.$links.attachments.$link.href; const uploadPath: string = workPackage.$links.attachments.$link.href;
const uploads = _.map(files, (file: File) => { const uploads = _.map(files, (file: File) => {
var options: Object = { var options: Object = {
fields: { fields: {
metadata: { metadata: {
description: file.description, description: (file as any).description,
fileName: file.name, fileName: file.name,
} }
}, },
@ -77,11 +78,11 @@ export class WpAttachmentsService {
return allUploadsDone.promise; return allUploadsDone.promise;
} }
public load(workPackage: WorkPackageResource, reload:boolean = false): ng.IPromise<Array> { public load(workPackage: WorkPackageResource, reload:boolean = false): ng.IPromise<Array<any>> {
const loadedAttachments = this.$q.defer(); const loadedAttachments = this.$q.defer();
const path: string = workPackage.$links.attachments.$link.href; const path: string = workPackage.$links.attachments.$link.href;
this.$http.get(path, {cache: !reload}).success(response => { this.$http.get(path, {cache: !reload}).success((response: any) => {
_.remove(this.attachments); _.remove(this.attachments);
_.extend(this.attachments,response._embedded.elements); _.extend(this.attachments,response._embedded.elements);
loadedAttachments.resolve(this.attachments); loadedAttachments.resolve(this.attachments);
@ -104,7 +105,7 @@ export class WpAttachmentsService {
} }
}; };
public hasAttachments(workPackage: WorkPackageResource): ng.IPromise { public hasAttachments(workPackage: WorkPackageResourceInterface): ng.IPromise {
const existance = this.$q.defer(); const existance = this.$q.defer();
this.load(workPackage).then((attachments:any) => { this.load(workPackage).then((attachments:any) => {
@ -121,7 +122,7 @@ export class WpAttachmentsService {
this.attachments.length = 0; this.attachments.length = 0;
}; };
public addPendingAttachments(files: FileList | File): void { public addPendingAttachments(files: FileListAsArray | File): void {
if (angular.isArray(files)) { if (angular.isArray(files)) {
files.forEach(file => { files.forEach(file => {
this.attachments.push(file); this.attachments.push(file);
@ -133,7 +134,7 @@ export class WpAttachmentsService {
} }
// not in use until furinvaders create is merged // not in use until furinvaders create is merged
public uploadPendingAttachments = (wp: WorkPackageResource): ng.IPromise<any> => { public uploadPendingAttachments = (wp: WorkPackageResourceInterface): ng.IPromise<any> => {
if (angular.isDefined(wp) && this.attachments.length > 0){ if (angular.isDefined(wp) && this.attachments.length > 0){
return this.upload(wp, this.attachments); return this.upload(wp, this.attachments);
} }

@ -28,11 +28,15 @@
import {opWorkPackagesModule} from '../../../angular-modules'; import {opWorkPackagesModule} from '../../../angular-modules';
import {scopedObservable} from '../../../helpers/angular-rx-utils'; import {scopedObservable} from '../../../helpers/angular-rx-utils';
import {WorkPackageResource} from '../../api/api-v3/hal-resources/work-package-resource.service'; import {
WorkPackageResource,
WorkPackageResourceInterface
} from '../../api/api-v3/hal-resources/work-package-resource.service';
import {WorkPackageEditFormController} from "../../wp-edit/wp-edit-form.directive";
export class WorkPackageSingleViewController { export class WorkPackageSingleViewController {
public formCtrl: WorkPackageEditFormController; public formCtrl: WorkPackageEditFormController;
public workPackage:any|WorkPackageResource; public workPackage:WorkPackageResourceInterface;
public singleViewWp; public singleViewWp;
public groupedFields:any[] = []; public groupedFields:any[] = [];
public hideEmptyFields:boolean = true; public hideEmptyFields:boolean = true;

@ -28,9 +28,8 @@
import {wpButtonsModule} from '../../../angular-modules'; import {wpButtonsModule} from '../../../angular-modules';
import WorkPackageCreateButtonController from '../wp-create-button/wp-create-button.controller'; import WorkPackageCreateButtonController from '../wp-create-button/wp-create-button.controller';
import {WorkPackageCreateService} from "../../wp-create/wp-create.service"; import {WorkPackageCreateService} from '../../wp-create/wp-create.service';
import {scopedObservable} from "../../../helpers/angular-rx-utils"; import {WorkPackageCacheService} from '../../work-packages/work-package-cache.service';
import {WorkPackageCacheService} from "../../work-packages/work-package-cache.service";
class WorkPackageInlineCreateButtonController extends WorkPackageCreateButtonController { class WorkPackageInlineCreateButtonController extends WorkPackageCreateButtonController {
public query:op.Query; public query:op.Query;

@ -27,6 +27,7 @@
// ++ // ++
import {DisplayField} from "../wp-display-field/wp-display-field.module"; import {DisplayField} from "../wp-display-field/wp-display-field.module";
import {WorkPackageResource} from "../../api/api-v3/hal-resources/work-package-resource.service";
export class DurationDisplayField extends DisplayField { export class DurationDisplayField extends DisplayField {
@ -35,7 +36,7 @@ export class DurationDisplayField extends DisplayField {
isManualRenderer = true; isManualRenderer = true;
constructor(public resource:HalResource, constructor(public resource:WorkPackageResource,
public name:string, public name:string,
public schema) { public schema) {
super(resource, name, schema); super(resource, name, schema);

@ -27,13 +27,14 @@
// ++ // ++
import {DisplayField} from "../wp-display-field/wp-display-field.module"; import {DisplayField} from "../wp-display-field/wp-display-field.module";
import {WorkPackageResource} from "../../api/api-v3/hal-resources/work-package-resource.service";
export class IdDisplayField extends DisplayField { export class IdDisplayField extends DisplayField {
public template: string = '/components/wp-display/field-types/wp-display-id-field.directive.html' public template: string = '/components/wp-display/field-types/wp-display-id-field.directive.html'
public text: Object; public text: Object;
constructor(public resource:HalResource, constructor(public resource:WorkPackageResource,
public name:string, public name:string,
public schema) { public schema) {
super(resource, name, schema); super(resource, name, schema);

@ -11,6 +11,7 @@
"files": [ "files": [
"typings/index.d.ts", "typings/index.d.ts",
"app/typings/open-project.typings.ts", "app/typings/open-project.typings.ts",
"app/typings/type-fixes.d.ts",
"tests/typings/tests.d.ts" "tests/typings/tests.d.ts"
] ]
} }

Loading…
Cancel
Save