Using/Interacting with core UI code in a plugin? #11217
-
|
Hi! I'm trying to create a new page which simplifies the order creation process, as a flow, without having to navigate across different panels/tabs. Don't want to modify the core code so trying to do this as a plugin.
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
|
Sounds achievable in principle, not sure if all things are doable in stable. |
Beta Was this translation helpful? Give feedback.
-
|
@AmitEMV in fact From PartPanel.tsx: const costFields: ApiFormFieldSet = useMemo(() => {
return {
part: {
value: partId,
disabled: true
},
description: {},
quantity: {},
// TODO: Add a "pre-field" element here
rate: {
api_url: apiUrl(RATE_URL),
modelRenderer: RenderRate
},
// TODO: Mark unit_cost and unit_cost currency as "disabled" if a rate is selected
unit_cost: {},
unit_cost_currency: {},
notes: {},
inherited: {},
active: {}
};
}, []);
const createCostForm = context.forms.create({
url: apiUrl(COST_URL),
title: 'Add Manufacturing Cost',
fields: costFields,
successMessage: 'Cost created',
onFormSuccess: () => {
dataQuery.refetch();
}
}); |
Beta Was this translation helpful? Give feedback.
I believe that the integration of custom navigation items is not yet fully implemented