Skip to content

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

create a loading component while non-working days are loading

bsatarnejad4b05d238cc7f
diff --git a/frontend/src/app/shared/components/baseline-loading/baseline-loading.component.html b/frontend/src/app/shared/components/baseline-loading/baseline-loading.component.html
new file mode 100644
index 00000000000..fa87e77fe8d
--- /dev/null
+++ b/frontend/src/app/shared/components/baseline-loading/baseline-loading.component.html
@@ -0,0 +1,8 @@
+<op-content-loader viewBox="0 0 200 140">
+ <svg:rect x="10" width="90%" height="50" rx="1" />
+
+ <svg:rect x="10" y="56" width="90%" height="50" rx="1" />
+
+ <svg:rect x="10" y="112" width="90%" height="30" rx="1" />
+
+</op-content-loader>
diff --git a/frontend/src/app/shared/components/baseline-loading/baseline-loading.component.ts b/frontend/src/app/shared/components/baseline-loading/baseline-loading.component.ts
new file mode 100644
index 00000000000..4a48be72570
--- /dev/null
+++ b/frontend/src/app/shared/components/baseline-loading/baseline-loading.component.ts
@@ -0,0 +1,41 @@
+// -- copyright
+// OpenProject is an open source project management software.
+// Copyright (C) 2012-2023 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 COPYRIGHT and LICENSE files for more details.
+//++
+
+import {
+ ChangeDetectionStrategy,
+ Component,
+ ViewEncapsulation,
+} from '@angular/core';
+
+@Component({
+ templateUrl: './baseline-loading.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'op-baseline-loading',
+ encapsulation: ViewEncapsulation.None,
+})
+export class OpBaselineLoadingComponent { }
diff --git a/frontend/src/app/shared/shared.module.ts b/frontend/src/app/shared/shared.module.ts
index 3a54df17076..567a3ce0639 100644
--- a/frontend/src/app/shared/shared.module.ts
+++ b/frontend/src/app/shared/shared.module.ts
@@ -97,6 +97,7 @@ import { FullCalendarModule } from '@fullcalendar/angular';
import { OpBaselineModalComponent } from './components/baseline-modal/baseline-modal.component';
import { OpBaselineComponent } from './components/baseline/baseline.component';
import { OpDatePickerModule } from 'core-app/shared/components/datepicker/datepicker.module';
+import { OpBaselineLoadingComponent } from './components/baseline-loading/baseline-loading.component';
export function bootstrapModule(injector:Injector):void {
// Ensure error reporter is run
@@ -211,6 +212,7 @@ export function bootstrapModule(injector:Injector):void {
OpBaselineModalComponent,
OpBaselineComponent,
+ OpBaselineLoadingComponent,
// Old datepickers
OpMultiDatePickerComponent,
@@ -275,6 +277,7 @@ export function bootstrapModule(injector:Injector):void {
OpBaselineModalComponent,
OpBaselineComponent,
+ OpBaselineLoadingComponent,
// Old datepickers
OpMultiDatePickerComponent,