Add timeEntryCreateService to the isolated query space because of the dependency to the HalResourceEditingService

pull/8306/head
Henriette Dinger 5 years ago
parent ec3935ba3f
commit fc1cd082f4
  1. 6
      frontend/src/app/modules/fields/display/field-types/wp-spent-time-display-field.module.ts
  2. 4
      frontend/src/app/modules/fields/openproject-fields.module.ts
  3. 2
      frontend/src/app/modules/work_packages/query-space/wp-isolated-query-space.directive.ts

@ -95,6 +95,10 @@ export class WorkPackageSpentTimeDisplayField extends DurationDisplayField {
} }
private showTimelogWidget() { private showTimelogWidget() {
this.timeEntryCreateService.create(moment(new Date()), this.resource, false); this.timeEntryCreateService
.create(moment(new Date()), this.resource, false)
.catch(() => {
// do nothing, the user closed without changes
});
} }
} }

@ -54,8 +54,6 @@ import {ProjectStatusEditFieldComponent} from "core-app/modules/fields/edit/fiel
import {PortalCleanupService} from "core-app/modules/fields/display/display-portal/portal-cleanup.service"; import {PortalCleanupService} from "core-app/modules/fields/display/display-portal/portal-cleanup.service";
import {PlainFormattableEditFieldComponent} from "core-app/modules/fields/edit/field-types/plain-formattable-edit-field.component"; import {PlainFormattableEditFieldComponent} from "core-app/modules/fields/edit/field-types/plain-formattable-edit-field.component";
import {TimeEntryWorkPackageEditFieldComponent} from "core-app/modules/fields/edit/field-types/te-work-package-edit-field.component"; import {TimeEntryWorkPackageEditFieldComponent} from "core-app/modules/fields/edit/field-types/te-work-package-edit-field.component";
import { TimeEntryCreateService } from '../time_entries/create/create.service';
import { HalResourceEditingService } from './edit/services/hal-resource-editing.service';
@NgModule({ @NgModule({
imports: [ imports: [
@ -84,8 +82,6 @@ import { HalResourceEditingService } from './edit/services/hal-resource-editing.
deps: [DisplayFieldService], deps: [DisplayFieldService],
multi: true multi: true
}, },
TimeEntryCreateService,
HalResourceEditingService,
], ],
declarations: [ declarations: [
EditFormPortalComponent, EditFormPortalComponent,

@ -65,6 +65,7 @@ import {WorkPackageViewDisplayRepresentationService} from "core-app/modules/work
import {WorkPackageViewHierarchyIdentationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service"; import {WorkPackageViewHierarchyIdentationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service";
import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service";
import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service";
import {TimeEntryCreateService} from "core-app/modules/time_entries/create/create.service";
/** /**
* Directive to open a work package query 'space', an isolated injector hierarchy * Directive to open a work package query 'space', an isolated injector hierarchy
@ -118,6 +119,7 @@ import {WorkPackageNotificationService} from "core-app/modules/work_packages/not
WorkPackageCardViewService, WorkPackageCardViewService,
HalResourceEditingService, HalResourceEditingService,
TimeEntryCreateService,
WorkPackageCreateService, WorkPackageCreateService,
WorkPackageStatesInitializationService, WorkPackageStatesInitializationService,

Loading…
Cancel
Save