Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions app/views/work_packages/bulk/_errors.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
error_count = erroneous_results.count
total_count = service_result.dependent_results.map(&:result).uniq.count
selected_count = selected_work_packages.count
selected_ids = selected_work_packages.map(&:id)
source_ids = erroneous_results.map { |call| call.state.copied_from_work_package_id }.compact.uniq
source_work_packages_by_id = source_ids.any? ? WorkPackage.visible.where_display_id_in(*source_ids).index_by(&:id) : {}
%>

<% if total_count - error_count == 0 %>
Expand Down Expand Up @@ -31,10 +34,12 @@

<ul>
<% erroneous_results.each do |call| %>
<% wp_id = call.state.copied_from_work_package_id || call.result.id %>
<% source_id = call.state.copied_from_work_package_id %>
<% wp = source_id ? source_work_packages_by_id[source_id] : call.result %>
<% wp_id = wp&.id || call.result.id %>

<li>
<%= link_to "##{wp_id}", work_package_path(wp_id) %><%= selected_work_packages.map(&:id).include?(wp_id) ? "" : " (#{I18n.t('work_packages.bulk.descendant')})" %>:
<%= link_to wp&.formatted_id || "##{wp_id}", work_package_path(wp) %><%= selected_ids.include?(wp_id) ? "" : " (#{I18n.t('work_packages.bulk.descendant')})" %>:
<%= safe_join call.errors.full_messages, " " %>
</li>
<% end %>
Expand Down
4,030 changes: 998 additions & 3,032 deletions extensions/op-blocknote-hocuspocus/package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions extensions/op-blocknote-hocuspocus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "op-blocknote-hocuspocus",
"version": "0.0.1",
"version": "0.0.2",
"main": "src/index.ts",
"type": "module",
"scripts": {
Expand All @@ -23,14 +23,14 @@
"node": ">=22.18"
},
"dependencies": {
"@blocknote/server-util": "^0.44.2",
"@blocknote/server-util": "^0.51.3",
"@hocuspocus/extension-logger": "^3.4.4",
"@hocuspocus/server": "^3.4.0",
"op-blocknote-extensions": "https://github.com/opf/op-blocknote-extensions/releases/download/v0.0.18/op-blocknote-extensions-0.0.18.tgz",
"op-blocknote-extensions": "https://github.com/opf/op-blocknote-extensions/releases/download/v0.1.0/op-blocknote-extensions-0.1.0.tgz",
"tsx": "^4.21.0"
},
"devDependencies": {
"@blocknote/core": "^0.44.2",
"@blocknote/core": "^0.51.3",
"@eslint/js": "^9.35.0",
"@eslint/json": "^1.2.0",
"@stylistic/eslint-plugin": "^5.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { BlockNoteSchema } from "@blocknote/core";
import { ServerBlockNoteEditor } from "@blocknote/server-util";
import type { beforeHandleMessagePayload, onAuthenticatePayload, onLoadDocumentPayload, onStoreDocumentPayload, onTokenSyncPayload } from "@hocuspocus/server";
import { Extension } from "@hocuspocus/server";
import { openProjectWorkPackageStaticBlockSpec } from "op-blocknote-extensions";
import {
openProjectWorkPackageStaticBlockSpec,
openProjectWorkPackageStaticInlineSpec,
} from "op-blocknote-extensions/server";
import * as Y from "yjs";
import { TokenExpired, TokenExpiryMissing, unauthorized } from "../closeEvents";
import { decryptAndValidateToken } from "../services/tokenValidationService";
Expand All @@ -11,7 +14,10 @@ import { fetchResource } from "../services/resourceService";

export const editorSchema = BlockNoteSchema.create().extend({
blockSpecs: {
"openProjectWorkPackage": openProjectWorkPackageStaticBlockSpec(),
openProjectWorkPackageBlock: openProjectWorkPackageStaticBlockSpec(),
},
inlineContentSpecs: {
openProjectWorkPackageInline: openProjectWorkPackageStaticInlineSpec,
},
});

Expand Down
Loading
Loading