@coding-flow/flow-mobile-approval 0.0.31 → 0.0.32

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.
@@ -26,13 +26,21 @@ const FlowNodeHistory = (props)=>{
26
26
  children: processNodes.length > 0 ? /*#__PURE__*/ jsx(Steps, {
27
27
  direction: "vertical",
28
28
  children: processNodes.map((node)=>{
29
- const operators = node.operators;
29
+ const operators = node.operators || [];
30
+ const operatorStatregy = node.operatorStrategy;
31
+ if ('INITIATOR_SELECT' === operatorStatregy || 'APPROVER_SELECT' === operatorStatregy) return /*#__PURE__*/ jsx(Step, {
32
+ title: node.nodeName,
33
+ description: /*#__PURE__*/ jsx(Fragment, {
34
+ children: 'INITIATOR_SELECT' === operatorStatregy ? '发起人选择审批人' : '审批人选择审批人'
35
+ }),
36
+ status: getNodeStatus(node)
37
+ });
30
38
  return /*#__PURE__*/ jsx(Step, {
31
39
  title: node.nodeName,
32
40
  description: /*#__PURE__*/ jsx(Fragment, {
33
41
  children: operators.map((operator)=>/*#__PURE__*/ jsx(FlowOperatorItem, {
34
42
  operator: operator,
35
- state: node.state
43
+ approveState: node.approveState
36
44
  }))
37
45
  }),
38
46
  status: getNodeStatus(node)
@@ -3,7 +3,7 @@ import { FlowApprovalOperator, ProcessNode } from "@coding-flow/flow-types";
3
3
  export declare const getNodeStatus: (node: ProcessNode) => "finish" | "process" | "wait";
4
4
  interface FlowOperatorItemProps {
5
5
  operator: FlowApprovalOperator;
6
- state: number;
6
+ approveState: string;
7
7
  }
8
8
  export declare const FlowOperatorItem: React.FC<FlowOperatorItemProps>;
9
9
  export {};
@@ -2,14 +2,14 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import dayjs from "dayjs";
4
4
  const getNodeStatus = (node)=>{
5
- if (-1 === node.state) return 'finish';
6
- if (0 === node.state) return 'process';
5
+ if ('PASS' === node.approveState) return 'finish';
6
+ if ('PROCESSING' === node.approveState) return 'process';
7
7
  return 'wait';
8
8
  };
9
9
  const FlowOperatorItem = (props)=>{
10
10
  const operator = props.operator;
11
- const state = props.state;
12
- if (-1 === state) return /*#__PURE__*/ jsxs(Fragment, {
11
+ const approveState = props.approveState;
12
+ if ('PASS' === approveState) return /*#__PURE__*/ jsxs(Fragment, {
13
13
  children: [
14
14
  /*#__PURE__*/ jsxs("div", {
15
15
  style: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coding-flow/flow-mobile-approval",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "description": "flow-engine pc mobile approval components",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -39,15 +39,15 @@
39
39
  "dayjs": "^1.11.19",
40
40
  "immer": "^11.1.3",
41
41
  "react-redux": "^9.2.0",
42
- "@coding-flow/flow-core": "0.0.31",
43
- "@coding-flow/flow-types": "0.0.31",
44
- "@coding-flow/flow-icons": "0.0.31",
45
- "@coding-flow/flow-approval-presenter": "0.0.31",
46
- "@coding-flow/flow-mobile-ui": "0.0.31",
47
- "@coding-flow/flow-mobile-form": "0.0.31"
42
+ "@coding-flow/flow-core": "0.0.32",
43
+ "@coding-flow/flow-approval-presenter": "0.0.32",
44
+ "@coding-flow/flow-types": "0.0.32",
45
+ "@coding-flow/flow-mobile-ui": "0.0.32",
46
+ "@coding-flow/flow-icons": "0.0.32",
47
+ "@coding-flow/flow-mobile-form": "0.0.32"
48
48
  },
49
49
  "devDependencies": {
50
- "@coding-flow/flow-types": "0.0.31"
50
+ "@coding-flow/flow-types": "0.0.32"
51
51
  },
52
52
  "scripts": {
53
53
  "build": "rslib build",