This commit is contained in:
Ravi Gulhane 2026-11-26 10:44:45 +05:30
parent 777fe5c951
commit 99753ad177
3 changed files with 1824 additions and 28 deletions

1846
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -100,6 +100,7 @@ const formentitys = {
{ key: 'status', title: 'Status', type: 'select', required: true, values: STATUS },
{ key: 'metric_submission', title: 'Metric Submission', type: 'yesno', required: true },
{ key: 'metric_authkey', title: 'Auth Key', type: 'text', required: true },
{ key: 'metric_ready_on_submit', title: 'Metric Ready On Submit', type: 'yesno', required: true, default: 'no' },
{ key: 'manager_de_roles', title: 'Manager Data Entry Roles', type: 'multiselect', values: roles },
{
key: 'manager_data_child_type',

View File

@ -23,6 +23,7 @@ const workflows = {
{ key: 'entity', title: 'Entity', type: 'text' },
{ key: 'run_on', title: 'Run on', type: 'text' },
{ key: 'published_version', title: 'Published', type: 'text' },
{ key: 'processing', title: 'Processing', type: 'text' },
{ key: 'status', title: 'Status', type: 'text' },
],
formFields: async () => {
@ -65,6 +66,7 @@ const workflows = {
default: 'insert',
showIf: { entity: 'form_submission' },
},
{ key: 'processing', title: 'Processing', type: 'yesno', required: true, default: 'yes' },
];
},
beforeForm: (item) => ({
@ -73,6 +75,7 @@ const workflows = {
description: item.description || '',
form_id: item.form_id || '',
run_on: item.id ? (item.run_on || '') : (item.run_on || 'insert'),
processing: item.processing === 'no' ? 'no' : 'yes',
}),
duplicateItem: async (row) => {
const response = await signedGet('workflow', 'workflow_definition/get_one', { id: row.id });
@ -84,6 +87,7 @@ const workflows = {
entity: item.entity || 'manual',
form_id: item.entity === 'form_submission' ? item.form_id || '' : '',
...(item.entity === 'form_submission' ? { run_on: item.run_on || '' } : {}),
processing: item.processing === 'no' ? 'no' : 'yes',
nodes: item.nodes || [],
edges: item.edges || [],
layout: item.layout || {},
@ -99,6 +103,7 @@ const workflows = {
} else if (!payload.run_on) {
delete payload.run_on;
}
payload.processing = payload.processing === 'no' ? 'no' : 'yes';
return payload;
},
};