OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
extract time entries into own module
ulfertsbae6c48d63da
diff --git a/frontend/src/app/modules/calendar/openproject-calendar.module.ts b/frontend/src/app/modules/calendar/openproject-calendar.module.tsindex e631f7230f7..1437b1c3520 100644--- a/frontend/src/app/modules/calendar/openproject-calendar.module.ts+++ b/frontend/src/app/modules/calendar/openproject-calendar.module.ts@@ -34,10 +34,8 @@ import {WorkPackagesCalendarController} from "core-app/modules/calendar/wp-calenimport {OpenprojectWorkPackagesModule} from "core-app/modules/work_packages/openproject-work-packages.module";import {Ng2StateDeclaration, UIRouterModule} from "@uirouter/angular";import {TimeEntryCalendarComponent} from "core-app/modules/calendar/te-calendar/te-calendar.component";-import {TimeEntryEditModal} from "core-app/modules/calendar/te-calendar/edit/edit.modal";-import {TimeEntryEditService} from "core-app/modules/calendar/te-calendar/edit/edit.service";import {OpenprojectFieldsModule} from "core-app/modules/fields/openproject-fields.module";-import { TimeEntryCreateModal } from './te-calendar/create/create.modal';+import {OpenprojectTimeEntriesModule} from "core-app/modules/time_entries/openproject-time-entries.module";const menuItemClass = 'calendar-menu-item';@@ -66,29 +64,25 @@ export const CALENDAR_ROUTES:Ng2StateDeclaration[] = [// Work Package moduleOpenprojectWorkPackagesModule,+ // Time entry module+ OpenprojectTimeEntriesModule,+// Editable fields e.g. for modalsOpenprojectFieldsModule,// Calendar componentFullCalendarModule,],- providers: [- TimeEntryEditService,- ],declarations: [// Work package calendarsWorkPackagesCalendarEntryComponent,WorkPackagesCalendarController,TimeEntryCalendarComponent,- TimeEntryEditModal,- TimeEntryCreateModal,],entryComponents: [WorkPackagesCalendarController,WorkPackagesCalendarEntryComponent,TimeEntryCalendarComponent,- TimeEntryEditModal,- TimeEntryCreateModal,],exports: [WorkPackagesCalendarController,diff --git a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.tsindex 331ceeb4537..768c2f3f7c1 100644--- a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts+++ b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts@@ -17,10 +17,10 @@ import {FilterOperator} from "core-components/api/api-v3/api-v3-filter-builder";import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource";import {TimezoneService} from "core-components/datetime/timezone.service";import {CollectionResource} from "core-app/modules/hal/resources/collection-resource";-import { TimeEntryEditService } from './edit/edit.service';import {TimeEntryCacheService} from "core-components/time-entries/time-entry-cache.service";import interactionPlugin from '@fullcalendar/interaction';import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service";+import {TimeEntryEditService} from "core-app/modules/time_entries/edit/edit.service";interface CalendarViewEvent {diff --git a/frontend/src/app/modules/calendar/te-calendar/create/create.modal.html b/frontend/src/app/modules/time_entries/create/create.modal.htmlsimilarity index 100%rename from frontend/src/app/modules/calendar/te-calendar/create/create.modal.htmlrename to frontend/src/app/modules/time_entries/create/create.modal.htmldiff --git a/frontend/src/app/modules/calendar/te-calendar/create/create.modal.ts b/frontend/src/app/modules/time_entries/create/create.modal.tssimilarity index 100%rename from frontend/src/app/modules/calendar/te-calendar/create/create.modal.tsrename to frontend/src/app/modules/time_entries/create/create.modal.tsdiff --git a/frontend/src/app/modules/calendar/te-calendar/edit/edit.modal.html b/frontend/src/app/modules/time_entries/edit/edit.modal.htmlsimilarity index 100%rename from frontend/src/app/modules/calendar/te-calendar/edit/edit.modal.htmlrename to frontend/src/app/modules/time_entries/edit/edit.modal.htmldiff --git a/frontend/src/app/modules/calendar/te-calendar/edit/edit.modal.sass b/frontend/src/app/modules/time_entries/edit/edit.modal.sasssimilarity index 100%rename from frontend/src/app/modules/calendar/te-calendar/edit/edit.modal.sassrename to frontend/src/app/modules/time_entries/edit/edit.modal.sassdiff --git a/frontend/src/app/modules/calendar/te-calendar/edit/edit.modal.ts b/frontend/src/app/modules/time_entries/edit/edit.modal.tssimilarity index 100%rename from frontend/src/app/modules/calendar/te-calendar/edit/edit.modal.tsrename to frontend/src/app/modules/time_entries/edit/edit.modal.tsdiff --git a/frontend/src/app/modules/calendar/te-calendar/edit/edit.service.ts b/frontend/src/app/modules/time_entries/edit/edit.service.tssimilarity index 97%rename from frontend/src/app/modules/calendar/te-calendar/edit/edit.service.tsrename to frontend/src/app/modules/time_entries/edit/edit.service.tsindex dbe499c8f06..d2415798223 100644--- a/frontend/src/app/modules/calendar/te-calendar/edit/edit.service.ts+++ b/frontend/src/app/modules/time_entries/edit/edit.service.ts@@ -5,12 +5,12 @@ import {I18nService} from "core-app/modules/common/i18n/i18n.service";import { TimeEntryResource } from 'core-app/modules/hal/resources/time-entry-resource';import { TimeEntryEditModal } from './edit.modal';import { take } from 'rxjs/operators';-import {TimeEntryCreateModal} from "core-app/modules/calendar/te-calendar/create/create.modal";import {FormResource} from "core-app/modules/hal/resources/form-resource";import {TimeEntryDmService} from "core-app/modules/hal/dm-services/time-entry-dm.service";import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset";import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service";import { Moment } from 'moment';+import {TimeEntryCreateModal} from "core-app/modules/time_entries/create/create.modal";@Injectable()export class TimeEntryEditService {diff --git a/frontend/src/app/modules/time_entries/openproject-time-entries.module.ts b/frontend/src/app/modules/time_entries/openproject-time-entries.module.tsnew file mode 100644index 00000000000..79d79778676--- /dev/null+++ b/frontend/src/app/modules/time_entries/openproject-time-entries.module.ts@@ -0,0 +1,58 @@+// -- copyright+// OpenProject is an open source project management software.+// Copyright (C) 2012-2020 the OpenProject GmbH+//+// This program is free software; you can redistribute it and/or+// modify it under the terms of the GNU General Public License version 3.+//+// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+// Copyright (C) 2006-2013 Jean-Philippe Lang+// Copyright (C) 2010-2013 the ChiliProject Team+//+// This program is free software; you can redistribute it and/or+// modify it under the terms of the GNU General Public License+// as published by the Free Software Foundation; either version 2+// of the License, or (at your option) any later version.+//+// This program is distributed in the hope that it will be useful,+// but WITHOUT ANY WARRANTY; without even the implied warranty of+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+// GNU General Public License for more details.+//+// You should have received a copy of the GNU General Public License+// along with this program; if not, write to the Free Software+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+//+// See docs/COPYRIGHT.rdoc for more details.+// ++++import {OpenprojectCommonModule} from 'core-app/modules/common/openproject-common.module';+import {NgModule} from '@angular/core';+import {OpenprojectFieldsModule} from "core-app/modules/fields/openproject-fields.module";+import {TimeEntryEditService} from "core-app/modules/time_entries/edit/edit.service";+import {TimeEntryCreateModal} from "core-app/modules/time_entries/create/create.modal";+import {TimeEntryEditModal} from "core-app/modules/time_entries/edit/edit.modal";++@NgModule({+ imports: [+ // Commons+ OpenprojectCommonModule,++ // Editable fields e.g. for modals+ OpenprojectFieldsModule,+ ],+ providers: [+ ],+ declarations: [+ TimeEntryEditModal,+ TimeEntryCreateModal,+ ],+ entryComponents: [+ TimeEntryEditModal,+ TimeEntryCreateModal,+ ],+ exports: [+ ]+})+export class OpenprojectTimeEntriesModule {+}