This commit is contained in:
gsinghpal
2026-05-27 19:23:17 -04:00
parent e36318f7a5
commit fecd2415f6
2 changed files with 19 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
{
'name': 'Fusion Repairs',
'version': '19.0.2.2.4',
'version': '19.0.2.2.6',
'category': 'Inventory/Repairs',
'summary': 'Guided medical equipment repair intake, dispatch, maintenance, and self-service portal',
'description': """

View File

@@ -114,6 +114,17 @@ export class FlowchartDesigner extends Component {
return {
content: rawHtml ? markup(rawHtml) : markup(""),
Plugins: MAIN_PLUGINS,
// ChatGPTPlugin (and other plugins shipped in MAIN_PLUGINS on
// Enterprise) call config.getRecordInfo() during init AND destroy
// to associate the editor with a record. We're a standalone
// client action, so we return the currently-selected node's
// identity. Without this, ChatGPTPlugin.destroy throws
// "this.config.getRecordInfo is not a function" every time the
// editor unmounts (node switch, view close, navigate away).
getRecordInfo: () => ({
resModel: "fusion.repair.flowchart.node",
resId: this.state.selectedNodeId || false,
}),
// onChange fires after each edit step - read the current HTML
// from the editor and persist it to selectedMeta + dirty flag.
onChange: () => {
@@ -197,7 +208,13 @@ export class FlowchartDesigner extends Component {
// Drawflow: addNode(name, inputs, outputs, posx, posy, class, data, html)
const outputs = n.node_type === "outcome" ? 0 : 1;
const inputs = n.is_start ? 0 : 1;
const cssClass = `fr-node fr-node-${n.node_type} ${n.is_start ? "fr-node-start" : ""}`;
// Build the class string from an array so non-start nodes don't
// emit a trailing space - Drawflow forwards this through
// classList.add(), which throws "The token provided must not be
// empty" on any empty token.
const cssClass = ["fr-node", `fr-node-${n.node_type}`, n.is_start && "fr-node-start"]
.filter(Boolean)
.join(" ");
const dfId = this.editor.addNode(
clientId,
inputs, outputs,