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() {
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 {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 { TimeEntryCreateService } from '../time_entries/create/create.service';
import { HalResourceEditingService } from './edit/services/hal-resource-editing.service';
@NgModule({
imports: [
@ -84,8 +82,6 @@ import { HalResourceEditingService } from './edit/services/hal-resource-editing.
deps: [DisplayFieldService],
multi: true
},
TimeEntryCreateService,
HalResourceEditingService,
],
declarations: [
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 {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 {TimeEntryCreateService} from "core-app/modules/time_entries/create/create.service";
/**
* 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,
HalResourceEditingService,
TimeEntryCreateService,
WorkPackageCreateService,
WorkPackageStatesInitializationService,

Loading…
Cancel
Save