Skip to content

Commit

Permalink
Allow mentioning to happen on new work packages
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Jan 29, 2024
1 parent c172397 commit 3c19f31
Show file tree
Hide file tree
Showing 71 changed files with 83 additions and 142,395 deletions.
14 changes: 11 additions & 3 deletions frontend/src/app/core/path-helper/apiv3-paths.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { ApiV3FilterBuilder } from 'core-app/shared/helpers/api-v3/api-v3-filter-builder';
import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource';
import { HalResource } from 'core-app/features/hal/resources/hal-resource';

export class ApiV3Paths {
readonly apiV3Base:string;
Expand Down Expand Up @@ -35,12 +37,18 @@ export class ApiV3Paths {
* https://github.com/opf/commonmark-ckeditor-build/
*
*/
public principals(workPackageId:string|number, term:string|null) {
public principals(workPackage:WorkPackageResource, term:string|null) {
const filters:ApiV3FilterBuilder = new ApiV3FilterBuilder();
// Only real and activated users:
filters.add('status', '!', ['3']);
// that are members of that project:
filters.add('mentionable_on_work_package', '=', [workPackageId.toString()]);

if (!workPackage.id || workPackage.id === 'new') {
// that are members of that project:
filters.add('member', '=', [(workPackage.project as HalResource).id as string]);
} else {
// that are mentionable on the work package
filters.add('mentionable_on_work_package', '=', [workPackage.id.toString()]);
}
// That are users:
filters.add('type', '=', ['User', 'Group']);

Expand Down
142,326 changes: 3 additions & 142,323 deletions frontend/src/vendor/ckeditor/ckeditor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/src/vendor/ckeditor/ckeditor.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/src/vendor/ckeditor/translations/af.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/src/vendor/ckeditor/translations/ar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/src/vendor/ckeditor/translations/ast.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/src/vendor/ckeditor/translations/az.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3c19f31

Please sign in to comment.