@steedos-labs/plugin-workflow 3.0.28 → 3.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -56,7 +56,7 @@ amis_schema: |-
|
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"actionType": "custom",
|
|
59
|
-
"script": "\nconst {instance, appId, objectName} = event.data;\nconsole.log(`instance===`);doAction({\n actionType: 'link',\n args: {\n blank: false,\n url: `/app/${appId}/instances/view/${instance._id}?side_object=instances&side_listview_id=draft
|
|
59
|
+
"script": "\nconst {instance, appId, objectName} = event.data;\nconsole.log(`instance===`);doAction({\n actionType: 'link',\n args: {\n blank: false,\n url: `/app/${appId}/instances/view/${instance._id}?side_object=instances&side_listview_id=draft&additionalFilters=&flowId=&categoryId=`\n }\n});\n"
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"componentId": "",
|
|
@@ -63,7 +63,7 @@ amis_schema: |-
|
|
|
63
63
|
,
|
|
64
64
|
{
|
|
65
65
|
"actionType": "custom",
|
|
66
|
-
"script": "const {instance, appId, objectName} = event.data;\nconsole.log(`instance===`);doAction({\n actionType: 'link',\n args: {\n blank: false,\n link: `/app/${appId}/instances/view/${instance._id}?side_object=instances&side_listview_id=draft
|
|
66
|
+
"script": "const {instance, appId, objectName} = event.data;\nconsole.log(`instance===`);doAction({\n actionType: 'link',\n args: {\n blank: false,\n link: `/app/${appId}/instances/view/${instance._id}?side_object=instances&side_listview_id=draft&additionalFilters=&flowId=&categoryId=`\n }\n});\n;"
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"actionType": "wait",
|
|
@@ -4,6 +4,9 @@ const router = express.Router();
|
|
|
4
4
|
const { requireAuthentication } = require("@steedos/auth");
|
|
5
5
|
const path = require('path');
|
|
6
6
|
|
|
7
|
+
const packageRoot = path.dirname(require.resolve('@steedos-labs/plugin-workflow/package.json'));
|
|
8
|
+
const designerDistPath = path.join(packageRoot, 'designer', 'dist');
|
|
9
|
+
|
|
7
10
|
/**
|
|
8
11
|
* New React-based workflow designer
|
|
9
12
|
* URL: /api/workflow/designer-v2
|
|
@@ -16,8 +19,8 @@ router.get('/api/workflow/designer-v2', requireAuthentication, async (req, res)
|
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
// In production, serve built React app
|
|
19
|
-
const designerPath = path.join(
|
|
20
|
-
res.sendFile(designerPath);
|
|
22
|
+
const designerPath = path.join(designerDistPath, 'index.html');
|
|
23
|
+
res.sendFile(designerPath, { dotfiles: 'allow' });
|
|
21
24
|
} catch (e) {
|
|
22
25
|
res.status(500).send({
|
|
23
26
|
errors: [{ errorMessage: e.message }]
|
|
@@ -56,7 +59,6 @@ router.get('/api/designer-v2/startup', requireAuthentication, async (req, res) =
|
|
|
56
59
|
/**
|
|
57
60
|
* Serve static assets for production (js, css, images, etc.)
|
|
58
61
|
*/
|
|
59
|
-
const designerDistPath = path.join(__dirname, '../../../designer/dist');
|
|
60
62
|
router.use('/api/workflow/designer-v2', express.static(designerDistPath));
|
|
61
63
|
|
|
62
64
|
exports.default = router;
|