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
Also output share button count on 0
Oliver Günther44897793d5f4
diff --git a/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.component.ts b/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.component.tsindex 27d061859f2..f5f528898f8 100644--- a/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.component.ts+++ b/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.component.ts@@ -99,7 +99,6 @@ export class WorkPackageShareButtonComponent extends UntilDestroyedMixin impleme.get().pipe(map((collection:CollectionResource) => collection.total),- filter((count) => count > 0),);}}diff --git a/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.ts b/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.tsindex 66aaecfef77..420957bfdb8 100644--- a/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.ts+++ b/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.ts@@ -15,8 +15,6 @@ import { WorkPackageResource } from 'core-app/features/hal/resources/work-packagimport { PathHelperService } from 'core-app/core/path-helper/path-helper.service';import { ActionsService } from 'core-app/core/state/actions/actions.service';import { shareModalUpdated } from 'core-app/features/work-packages/components/wp-share-modal/sharing.actions';-import { fromEvent } from 'rxjs';-import { filter, take } from 'rxjs/operators';@Component({templateUrl: './wp-share.modal.html',@@ -29,8 +27,6 @@ export class WorkPackageShareModalComponent extends OpModalComponent implementsprivate workPackage:WorkPackageResource;public frameSrc:string;- private count:number|null = null;-text = {title: this.I18n.t('js.work_packages.sharing.title'),button_close: this.I18n.t('js.button_close'),@@ -52,27 +48,11 @@ export class WorkPackageShareModalComponent extends OpModalComponent implementsngOnInit() {super.ngOnInit();-- fromEvent(document, 'turbo:frame-render')- .pipe(- this.untilDestroyed(),- filter((evt) => evt.target === this.frameElement?.nativeElement),- take(1),- )- .subscribe(() => {- this.count = this.getRowCount();- });}onClose():boolean {- if (this.getRowCount() !== this.count) {- this.actions$.dispatch(shareModalUpdated({ workPackageId: this.workPackage.id as string }));- }+ this.actions$.dispatch(shareModalUpdated({ workPackageId: this.workPackage.id as string }));return super.onClose();}-- private getRowCount():number {- return this.elementRef.nativeElement.querySelectorAll('#op-share-wp-active-shares > li').length;- }}