changes
This commit is contained in:
@@ -188,6 +188,7 @@ export class FpPartProcessComposer extends Component {
|
||||
}
|
||||
|
||||
openRecipeEditor(rootId) {
|
||||
// Tree editor — the original drag-and-drop hierarchy view.
|
||||
const id = rootId || this.state.rootId;
|
||||
if (!id) return;
|
||||
this.action.doAction({
|
||||
@@ -199,6 +200,22 @@ export class FpPartProcessComposer extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
openRecipeSimpleEditor(rootId) {
|
||||
// Simple Recipe Editor (Sub 12a) — flat 2-pane drag-drop layout.
|
||||
// Lives alongside the tree editor; the user picks per-variant
|
||||
// which one to open. Both edit the same underlying tree, so
|
||||
// changes flow back-and-forth without conflict.
|
||||
const id = rootId || this.state.rootId;
|
||||
if (!id) return;
|
||||
this.action.doAction({
|
||||
type: "ir.actions.client",
|
||||
tag: "fp_simple_recipe_editor",
|
||||
name: `Process Editor (Simple) — ${(this.state.part && this.state.part.display) || ""}`,
|
||||
context: { recipe_id: id, part_id: this.partId },
|
||||
target: "current",
|
||||
});
|
||||
}
|
||||
|
||||
backToPart() {
|
||||
this.action.doAction({
|
||||
type: "ir.actions.act_window",
|
||||
|
||||
@@ -83,8 +83,15 @@
|
||||
<td class="text-end">
|
||||
<button class="btn btn-sm btn-primary me-1"
|
||||
t-att-disabled="state.busy"
|
||||
t-on-click="() => this.openRecipeEditor(v.id)">
|
||||
<i class="fa fa-pencil"/> Edit
|
||||
t-on-click="() => this.openRecipeEditor(v.id)"
|
||||
title="Open the tree editor (drag-and-drop hierarchy view)">
|
||||
<i class="fa fa-pencil"/> Tree
|
||||
</button>
|
||||
<button class="btn btn-sm btn-info me-1"
|
||||
t-att-disabled="state.busy"
|
||||
t-on-click="() => this.openRecipeSimpleEditor(v.id)"
|
||||
title="Open the Simple Recipe Editor (flat 2-pane drag-drop)">
|
||||
<i class="fa fa-list-alt"/> Simple
|
||||
</button>
|
||||
<button class="btn btn-sm btn-secondary me-1"
|
||||
t-att-disabled="state.busy"
|
||||
|
||||
Reference in New Issue
Block a user