@voplus/morpho-workspace 1.3.3 → 1.3.5

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.
Files changed (151) hide show
  1. package/es/data/work/interfaces.d.ts +4 -4
  2. package/es/data/work/metas.d.ts +13 -0
  3. package/es/data/work/metas.js +34 -0
  4. package/es/data/work/metas.js.map +1 -0
  5. package/es/data/workerror/interfaces.d.ts +2 -3
  6. package/es/data/workerror/workerror-events/useOnDeleteWorkspace.js +0 -1
  7. package/es/data/workerror/workerror-events/useOnDeleteWorkspace.js.map +1 -1
  8. package/es/data/workerror/workerror-events/useOnNewWorkspace.js +0 -1
  9. package/es/data/workerror/workerror-events/useOnNewWorkspace.js.map +1 -1
  10. package/es/data/workspace/interfaces.d.ts +8 -0
  11. package/es/data/workspace/types.d.ts +1 -0
  12. package/es/data/worktype/hook.d.ts +1 -1
  13. package/es/data/worktype/hook.js +3 -3
  14. package/es/data/worktype/hook.js.map +1 -1
  15. package/es/data/worktype/interfaces.d.ts +4 -0
  16. package/es/data/worktype/types.d.ts +1 -0
  17. package/es/modules/board/components/Board/state.js +1 -1
  18. package/es/modules/board/components/Board/state.js.map +1 -1
  19. package/es/modules/meeting/components/AgendaList/AgendaItem/index.js +9 -15
  20. package/es/modules/meeting/components/AgendaList/AgendaItem/index.js.map +1 -1
  21. package/es/modules/tasks/components/SubTaskList/index.js +6 -3
  22. package/es/modules/tasks/components/SubTaskList/index.js.map +1 -1
  23. package/es/modules/tasks/components/SubTaskList/state.d.ts +2 -0
  24. package/es/modules/tasks/components/SubTaskList/state.js.map +1 -1
  25. package/es/modules/tasks/components/TaskItem/ChildTaskItem.d.ts +4 -0
  26. package/es/modules/tasks/components/TaskItem/ChildTaskItem.js +18 -0
  27. package/es/modules/tasks/components/TaskItem/ChildTaskItem.js.map +1 -0
  28. package/es/modules/tasks/components/TaskItem/DefaultTaskItem.js +2 -0
  29. package/es/modules/tasks/components/TaskItem/DefaultTaskItem.js.map +1 -1
  30. package/es/modules/tasks/components/TaskItem/SubTaskItem.js +2 -0
  31. package/es/modules/tasks/components/TaskItem/SubTaskItem.js.map +1 -1
  32. package/es/modules/tasks/controls/ChildTasksDataIcon/index.d.ts +9 -0
  33. package/es/modules/tasks/controls/ChildTasksDataIcon/index.js +19 -0
  34. package/es/modules/tasks/controls/ChildTasksDataIcon/index.js.map +1 -0
  35. package/es/modules/tasks/controls/ChildTasksDataIcon/index.less +29 -0
  36. package/es/modules/work/components/NewWorkErrorDialog/index.js +26 -15
  37. package/es/modules/work/components/NewWorkErrorDialog/index.js.map +1 -1
  38. package/es/modules/work/components/NewWorkErrorDialog/index.less +1 -1
  39. package/es/modules/work/components/NewWorkErrorDialog/state.d.ts +2 -0
  40. package/es/modules/work/components/NewWorkErrorDialog/state.js +1 -0
  41. package/es/modules/work/components/NewWorkErrorDialog/state.js.map +1 -1
  42. package/es/modules/work/components/WorkErrorItem/index.js +18 -8
  43. package/es/modules/work/components/WorkErrorItem/index.js.map +1 -1
  44. package/es/modules/work/components/WorkErrorItem/index.less +35 -7
  45. package/es/modules/work/components/WorkErrorList/index.js +7 -5
  46. package/es/modules/work/components/WorkErrorList/index.js.map +1 -1
  47. package/es/modules/work/components/WorkErrorProperties/index.d.ts +6 -0
  48. package/es/modules/work/components/WorkErrorProperties/index.js +57 -0
  49. package/es/modules/work/components/WorkErrorProperties/index.js.map +1 -0
  50. package/es/modules/work/components/WorkErrorProperties/index.less +8 -0
  51. package/es/modules/work/components/WorkErrorProperties/state.d.ts +5 -0
  52. package/es/modules/work/components/WorkErrorProperties/state.js +26 -0
  53. package/es/modules/work/components/WorkErrorProperties/state.js.map +1 -0
  54. package/es/modules/work/components/WorkErrorPropertiesView/index.js +18 -10
  55. package/es/modules/work/components/WorkErrorPropertiesView/index.js.map +1 -1
  56. package/es/modules/work/components/WorkErrorPropertiesView/index.less +18 -1
  57. package/es/modules/work/components/WorkItem/index.js +1 -1
  58. package/es/modules/work/components/WorkItem/index.js.map +1 -1
  59. package/es/modules/work/components/WorkList/index.d.ts +2 -0
  60. package/es/modules/work/components/WorkList/index.js +13 -2
  61. package/es/modules/work/components/WorkList/index.js.map +1 -1
  62. package/es/modules/work/components/WorkPropertiesView/index.js +1 -1
  63. package/es/modules/work/components/WorkPropertiesView/index.js.map +1 -1
  64. package/es/modules/work/components/WorkQATab/index.js +9 -7
  65. package/es/modules/work/components/WorkQATab/index.js.map +1 -1
  66. package/es/modules/work/components/WorkQATab/index.less +8 -8
  67. package/es/modules/work/components/WorkTaskList/index.js +8 -6
  68. package/es/modules/work/components/WorkTaskList/index.js.map +1 -1
  69. package/es/modules/work/components/WorkTaskList/index.less +3 -3
  70. package/es/modules/work/components/WorkTasksTab/index.js +4 -2
  71. package/es/modules/work/components/WorkTasksTab/index.js.map +1 -1
  72. package/es/modules/work/components/WorkTasksTab/index.less +2 -2
  73. package/es/modules/work/components/WorksProperties/index.js +4 -6
  74. package/es/modules/work/components/WorksProperties/index.js.map +1 -1
  75. package/es/modules/work/controls/WorkErrorMenu/index.d.ts +14 -0
  76. package/es/modules/work/controls/WorkErrorMenu/index.js +39 -0
  77. package/es/modules/work/controls/WorkErrorMenu/index.js.map +1 -0
  78. package/es/modules/{worktype/controls/ToolBar → work/controls/WorkErrorMenu}/index.less +1 -23
  79. package/es/modules/work/pages/WorkDefaultView/index.d.ts +4 -1
  80. package/es/modules/work/pages/WorkDefaultView/index.js +2 -4
  81. package/es/modules/work/pages/WorkDefaultView/index.js.map +1 -1
  82. package/es/modules/work/pages/WorkListPage/index.js +3 -2
  83. package/es/modules/work/pages/WorkListPage/index.js.map +1 -1
  84. package/es/modules/workspace/components/MyWorkspaces/index.js +12 -7
  85. package/es/modules/workspace/components/MyWorkspaces/index.js.map +1 -1
  86. package/es/modules/workspace/components/MyWorkspaces/index.less +2 -2
  87. package/es/modules/workspace/components/WorkspaceCard/index.js +9 -4
  88. package/es/modules/workspace/components/WorkspaceCard/index.js.map +1 -1
  89. package/es/modules/workspace/components/WorkspaceCard/index.less +12 -0
  90. package/es/modules/workspace/components/WorkspaceCardList/index.d.ts +1 -0
  91. package/es/modules/workspace/components/WorkspaceCardList/index.js +8 -8
  92. package/es/modules/workspace/components/WorkspaceCardList/index.js.map +1 -1
  93. package/es/modules/workspace/components/WorkspacePropertiesView/index.js +1 -1
  94. package/es/modules/workspace/components/WorkspacePropertiesView/index.js.map +1 -1
  95. package/es/modules/workspace/components/WorkspaceTabs/index.js +1 -1
  96. package/es/modules/workspace/components/WorkspaceTabs/index.js.map +1 -1
  97. package/es/modules/workspace/controls/WorkspaceMenu/index.js +38 -14
  98. package/es/modules/workspace/controls/WorkspaceMenu/index.js.map +1 -1
  99. package/es/modules/workspace/pages/WorkspaceDefaultView/index.d.ts +3 -1
  100. package/es/modules/workspace/pages/WorkspaceDefaultView/index.js +2 -4
  101. package/es/modules/workspace/pages/WorkspaceDefaultView/index.js.map +1 -1
  102. package/es/modules/workspace/pages/WorkspacePage/index.js +60 -43
  103. package/es/modules/workspace/pages/WorkspacePage/index.js.map +1 -1
  104. package/es/modules/workspace/pages/WorkspacePage/state.d.ts +12 -6
  105. package/es/modules/workspace/pages/WorkspacePage/state.js +42 -24
  106. package/es/modules/workspace/pages/WorkspacePage/state.js.map +1 -1
  107. package/es/modules/worktype/components/NewTypeForm/index.js +3 -5
  108. package/es/modules/worktype/components/NewTypeForm/index.js.map +1 -1
  109. package/es/modules/worktype/components/NewTypeForm/index.less +5 -2
  110. package/es/modules/worktype/components/RepeatTab/index.d.ts +6 -0
  111. package/es/modules/worktype/components/RepeatTab/index.js +44 -0
  112. package/es/modules/worktype/components/RepeatTab/index.js.map +1 -0
  113. package/es/modules/worktype/components/RepeatTab/index.less +30 -0
  114. package/es/modules/worktype/components/WorkTypeItem/index.js +1 -1
  115. package/es/modules/worktype/components/WorkTypeItem/index.js.map +1 -1
  116. package/es/modules/worktype/components/WorkTypeList/index.d.ts +1 -0
  117. package/es/modules/worktype/components/WorkTypeList/index.js +19 -17
  118. package/es/modules/worktype/components/WorkTypeList/index.js.map +1 -1
  119. package/es/modules/worktype/components/WorkTypeList/index.less +7 -0
  120. package/es/modules/worktype/components/WorkTypeProperties/index.js +32 -8
  121. package/es/modules/worktype/components/WorkTypeProperties/index.js.map +1 -1
  122. package/es/modules/worktype/components/WorkTypeProperties/index.less +18 -2
  123. package/es/modules/worktype/components/WorkTypeProperties/state.js +0 -1
  124. package/es/modules/worktype/components/WorkTypeProperties/state.js.map +1 -1
  125. package/es/modules/worktype/components/WorkTypePropertiesView/index.js +1 -1
  126. package/es/modules/worktype/components/WorkTypePropertiesView/index.js.map +1 -1
  127. package/es/modules/worktype/components/WorkTypeQA/index.js +31 -34
  128. package/es/modules/worktype/components/WorkTypeQA/index.js.map +1 -1
  129. package/es/modules/worktype/components/WorkTypeTabs/index.js +13 -13
  130. package/es/modules/worktype/components/WorkTypeTabs/index.js.map +1 -1
  131. package/es/modules/worktype/pages/WorkTypeDefaultView/index.js +10 -2
  132. package/es/modules/worktype/pages/WorkTypeDefaultView/index.js.map +1 -1
  133. package/es/pages/Routes.d.ts +4 -12
  134. package/es/pages/Routes.js +9 -31
  135. package/es/pages/Routes.js.map +1 -1
  136. package/es/pages/Space/components/Tasks/index.js +22 -24
  137. package/es/pages/Space/components/Tasks/index.js.map +1 -1
  138. package/es/pages/Space/pages/MySpace/index.js +7 -7
  139. package/es/pages/Space/pages/MySpace/index.js.map +1 -1
  140. package/es/pages/Space/pages/MySpace/state.d.ts +19 -6
  141. package/es/pages/Space/pages/MySpace/state.js +150 -56
  142. package/es/pages/Space/pages/MySpace/state.js.map +1 -1
  143. package/es/pages/WorkType/WorkTypeSelect/index.js +5 -1
  144. package/es/pages/WorkType/WorkTypeSelect/index.js.map +1 -1
  145. package/package.json +1 -1
  146. package/es/modules/worktype/controls/ToolBar/index.d.ts +0 -10
  147. package/es/modules/worktype/controls/ToolBar/index.js +0 -20
  148. package/es/modules/worktype/controls/ToolBar/index.js.map +0 -1
  149. package/es/modules/worktype/controls/ToolBar/state.d.ts +0 -36
  150. package/es/modules/worktype/controls/ToolBar/state.js +0 -57
  151. package/es/modules/worktype/controls/ToolBar/state.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import "./index.less";
2
- import { Button, Form, Row, Select, Space, } from "@voplus/antd";
2
+ import { Button, Col, Form, Row, Select, Space, DatePicker, } from "@voplus/antd";
3
3
  import React, { useState } from "react";
4
4
  import AvatarList from "@voplus/morpho-document/es/components/AvatarList";
5
5
  import Modal from "@voplus/morpho-ui/es/components/Modal";
@@ -23,20 +23,30 @@ const NewWorkErrorDialog = (props) => {
23
23
  React.createElement("div", { className: classnames("new-error-form", props.className) },
24
24
  React.createElement(Form, { layout: "vertical" },
25
25
  React.createElement(React.Fragment, null,
26
- React.createElement(Form.Item, { label: "type for your error" },
27
- React.createElement(Select, { defaultValue: "Type1", onChange: (value) => state.params.Type = value },
28
- React.createElement(Option, { value: "Type1" }, "Type1"),
29
- React.createElement(Option, { value: "Type2" }, "Type2"),
30
- React.createElement(Option, { value: "Type3" }, "Type3"))),
31
- React.createElement(Form.Item, { label: "Severity for your error" },
32
- React.createElement(Select, { defaultValue: "S0", onChange: (value) => {
33
- state.params.Severity = value;
34
- } },
35
- React.createElement(Option, { value: "S0" }, "S0"),
36
- React.createElement(Option, { value: "S1" }, "S1"),
37
- React.createElement(Option, { value: "S2" }, "S2"))),
38
- React.createElement(Form.Item, { label: "Causer of your error" },
39
- React.createElement(AvatarList, { organizationId: user.info.organizationId, multiple: true, onChange: (ids) => { state.params.CauserIds = ids; } })),
26
+ React.createElement(Row, { gutter: 20 },
27
+ React.createElement(Col, { span: 12 },
28
+ React.createElement(Form.Item, { label: "type for your error" },
29
+ React.createElement(Select, { defaultValue: "Type1", onChange: (value) => (state.params.Type = value) },
30
+ React.createElement(Option, { value: "Type1" }, "Type1"),
31
+ React.createElement(Option, { value: "Type2" }, "Type2"),
32
+ React.createElement(Option, { value: "Type3" }, "Type3")))),
33
+ React.createElement(Col, { span: 12 },
34
+ React.createElement(Form.Item, { label: "Severity for your error" },
35
+ React.createElement(Select, { defaultValue: "S0", onChange: (value) => {
36
+ state.params.Severity = value;
37
+ } },
38
+ React.createElement(Option, { value: "S0" }, "S0"),
39
+ React.createElement(Option, { value: "S1" }, "S1"),
40
+ React.createElement(Option, { value: "S2" }, "S2"))))),
41
+ React.createElement(Row, { gutter: 20 },
42
+ React.createElement(Col, { span: 12 },
43
+ React.createElement(Form.Item, { label: "Incident Date" },
44
+ React.createElement(DatePicker, { value: state.params.IncidentDate, onChange: (value) => (state.params.IncidentDate = value), style: { width: "100%" } }))),
45
+ React.createElement(Col, { span: 12 },
46
+ React.createElement(Form.Item, { label: "Causer of your error" },
47
+ React.createElement(AvatarList, { organizationId: user.info.organizationId, multiple: true, onChange: (ids) => {
48
+ state.params.CauserIds = ids;
49
+ } })))),
40
50
  React.createElement(Form.Item, { label: "Description of your error" },
41
51
  React.createElement(ProseMirror, { toolbarProps: { sticky: false }, scroll: true, className: "proseMirror", onChange: (opt) => (state.params.Description =
42
52
  opt.editor.dom.innerHTML === "<p><br></p>" ? "" : opt.editor.dom.innerHTML) })),
@@ -52,6 +62,7 @@ const NewWorkErrorDialog = (props) => {
52
62
  data: { ...state.params, WorkId: props.WorkId },
53
63
  error: "message",
54
64
  });
65
+ console.log(state.params);
55
66
  runInAction(() => {
56
67
  state.loading = false;
57
68
  state.params = state.Params;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/NewWorkErrorDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAEH,MAAM,EAEN,IAAI,EAEJ,GAAG,EACH,MAAM,EACN,KAAK,GAER,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,KAAK,MAAM,uCAAuC,CAAC;AAC1D,O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CACH,CACK,CACI,CACX,CACF,CACC,CACR,CAAC,CAAC;IACH,KAAK,UAAU,QAAQ;QACtB,uEAAuE;QACvE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;QAC1C,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC;YAC9B,IAAI,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;YAC/C,KAAK,EAAE,SAAS;SAChB,CAAC,CAAC;QACG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QAC/B,WAAW,CAAC,GAAG,EAAE;YAChB,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;YACtB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC7B,CAAC,CAAC,CAAC;QACH,IAAI,KAAK,CAAC,YAAY;YAAE,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1D,CAAC;IACD,mBAAmB;IACnB,SAAS,QAAQ;QAChB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,IAAI,KAAK,CAAC,QAAQ;YAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;AACF,CAAC,CAAC;AACF,eAAe,kBAAkB,CAAC"}
@@ -6,7 +6,7 @@
6
6
  width: 100%;
7
7
  }
8
8
  .proseMirror {
9
- height: 10rem !important;
9
+ height: 22rem !important;
10
10
  .editor-toolbar {
11
11
  padding: 0.2rem 0.65rem;
12
12
  }
@@ -3,12 +3,14 @@ export declare class State {
3
3
  Params: {
4
4
  Type: string;
5
5
  Severity: string;
6
+ IncidentDate: undefined;
6
7
  CauserIds: string[];
7
8
  Description: string;
8
9
  };
9
10
  params: {
10
11
  Type: string;
11
12
  Severity: string;
13
+ IncidentDate: undefined;
12
14
  CauserIds: string[];
13
15
  Description: string;
14
16
  };
@@ -9,6 +9,7 @@ export class State {
9
9
  value: {
10
10
  Type: "Type1",
11
11
  Severity: "S1",
12
+ IncidentDate: undefined,
12
13
  CauserIds: [""],
13
14
  Description: "",
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/NewWorkErrorDialog/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIlD,MAAM,OAAO,KAAK;IACjB;QAGA;;;;mBAAgB;gBACf,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,IAAI;gBACd,SAAS,EAAE,CAAC,EAAE,CAAC;gBACf,WAAW,EAAE,EAAE;aACf;WAAC;QACU;;;;mBAAgB,IAAI,CAAC,MAAM;WAAC;QAC5B;;;;mBAAiB,KAAK;WAAC;QATlC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;CASD;AAFY;IAAX,UAAU;qCAA6B;AAC5B;IAAX,UAAU;sCAAwB"}
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/NewWorkErrorDialog/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIlD,MAAM,OAAO,KAAK;IACjB;QAGA;;;;mBAAgB;gBACf,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,IAAI;gBACd,YAAY,EAAE,SAAS;gBACvB,SAAS,EAAE,CAAC,EAAE,CAAC;gBACf,WAAW,EAAE,EAAE;aACf;WAAC;QACU;;;;mBAAgB,IAAI,CAAC,MAAM;WAAC;QAC5B;;;;mBAAiB,KAAK;WAAC;QAVlC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;CAUD;AAFY;IAAX,UAAU;qCAA6B;AAC5B;IAAX,UAAU;sCAAwB"}
@@ -1,24 +1,34 @@
1
- import "./index.less";
1
+ import React, { useState } from "react";
2
+ import moment from "moment";
2
3
  import { Col, Row, Tag } from "@voplus/antd";
3
4
  import AvatarList from "@voplus/morpho-document/es/components/AvatarList";
4
- import { ExclamationCircleOutlined } from "@ant-design/icons";
5
- import React from "react";
6
- import moment from "moment";
5
+ import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
6
+ import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
7
7
  import { observe } from "@voplus/morpho-ui";
8
8
  import { useApplicationContext } from "@voplus/morpho-data";
9
9
  import { useWorkError } from "../../../../data/workerror";
10
+ import WorkErrorMenu from "../../controls/WorkErrorMenu";
11
+ import classnames from "classnames";
12
+ import "./index.less";
10
13
  const WorkErrorItem = (props) => {
11
14
  const { user } = useApplicationContext();
12
15
  const workError = useWorkError(props.id);
13
- return observe(() => React.createElement("div", { className: "workerror-item" },
16
+ const [hover, setHover] = useState(false);
17
+ return observe(() => (React.createElement("div", { className: "workerror-item", onMouseLeave: () => setHover(false), onMouseOver: () => setHover(true) },
14
18
  React.createElement(Row, null,
15
19
  React.createElement(Col, { flex: 3 },
16
20
  React.createElement("div", null,
17
- React.createElement(ExclamationCircleOutlined, { style: { color: "red" } }),
18
- React.createElement(Tag, { color: "purple" }, workError.type)),
21
+ React.createElement("div", { className: "workerror-info" }, workError.type),
22
+ React.createElement(Tag, { color: "purple" }, workError.severity)),
19
23
  React.createElement("div", { className: "workerror-date" }, moment(workError.due).format("DD MMM yyyy"))),
20
24
  React.createElement(Col, { flex: 2, className: "workerror-causers" },
21
- React.createElement(AvatarList, { organizationId: user.info.organizationId, list: workError.causers || [], editable: false })))));
25
+ React.createElement(AvatarList, { organizationId: user.info.organizationId, list: workError.causers || [], editable: false }))),
26
+ React.createElement("div", { className: classnames("hover-operate-icon", {
27
+ show: hover,
28
+ }) },
29
+ React.createElement(ToolBar, { id: props.id, showMenu: false },
30
+ React.createElement(Open, { size: "middle", url: `/workerror}` }),
31
+ React.createElement(WorkErrorMenu, { id: props.id, size: "middle", closeAside: true }))))));
22
32
  };
23
33
  export default WorkErrorItem;
24
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkErrorItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,aAAa,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC5C,MAAM,EAAE,IAAI,EAAE,GAAG,qBAAqB,EAAE,CAAC;IACzC,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAEzC,OAAO,OAAO,CAAC,GAAG,EAAE,CAChB,6BAAK,SAAS,EAAC,gBAAgB;QAC3B,oBAAC,GAAG;YACA,oBAAC,GAAG,IAAC,IAAI,EAAE,CAAC;gBACR;oBACI,oBAAC,yBAAyB,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAI;oBACtD,oBAAC,GAAG,IAAC,KAAK,EAAC,QAAQ,IAAE,SAAS,CAAC,IAAI,CAAO,CACxC;gBACN,6BAAK,SAAS,EAAC,gBAAgB,IAC1B,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAC1C,CACJ;YACN,oBAAC,GAAG,IAAC,IAAI,EAA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workerror-causers{
3
+ padding: 10px 20px;
4
+ background: transparent;
5
+ position: relative;
6
+
7
+ &:hover {
8
+ background: #f3f1f1;
9
+ }
10
+
11
+ .workerror-info {
12
+ display: inline-block;
13
+ color: #000;
14
+ font-size: 15px;
15
+ // font-weight: 500;
16
+ cursor: pointer;
17
+ }
18
+
19
+ .workerror-causers {
9
20
  display: flex;
10
21
  align-items: center;
11
22
  }
23
+
12
24
  .workerror-name {
13
25
  font-size: 15px;
14
26
  color: #000;
@@ -16,11 +28,27 @@
16
28
  word-break: break-all;
17
29
  margin: 0 8px;
18
30
  }
31
+
19
32
  .ant-tag {
20
33
  padding: 0 5px;
21
34
  font-size: 12px;
22
35
  line-height: 15px;
23
36
  margin-left: 8px;
24
37
  }
38
+
39
+ .hover-operate-icon {
40
+ display: none;
41
+ position: absolute;
42
+ right: 20px;
43
+ top: 16px;
44
+
45
+ .ant-btn:first-child {
46
+ margin-left: 0;
47
+ }
48
+
49
+ &.show {
50
+ display: block;
51
+ }
52
+ }
25
53
  }
26
- }
54
+ }
@@ -4,7 +4,7 @@ import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/da
4
4
  import React, { useState } from "react";
5
5
  import { observe, useRenderOnChange } from "@voplus/morpho-ui";
6
6
  import DocumentItemFrame from "@voplus/morpho-document/es/controls/DocumentItemFrame";
7
- import InfiniteScrollView from "@voplus/morpho-ui/es/controls/InfiniteScrollView";
7
+ import { Empty } from "@voplus/antd";
8
8
  import WorkErrorItem from "../WorkErrorItem";
9
9
  import { useAutoUpdateListData } from "../../../../data/workerror/workerror-events";
10
10
  /** A work error list view shows work error in card style. */
@@ -13,7 +13,8 @@ const WorkErrorList = (props) => {
13
13
  /** 建立 ListView 和useWorkErrorListEffect所需的ListDataState. 会根据state.id重建所以不需reset. */
14
14
  const list = useCreateListDataState({
15
15
  filterDefaults: {
16
- filters: [{ c: "ParentNodeId", o: "=", l: "And", v1: props.id }]
16
+ filters: [{ c: "ParentNodeId", o: "=", l: "And", v1: props.id }],
17
+ page: { Page: 1, PageSize: 200 }
17
18
  },
18
19
  }, [props.id]);
19
20
  /** 如果 list.filters.options变更了就重渲染,使下一行的useWorkErrorListEffect 可以接收新参数*/
@@ -23,8 +24,8 @@ const WorkErrorList = (props) => {
23
24
  /** useOnNewWorkError, useOnDeleteWorkError的sugar syntax 自動更新list. */
24
25
  useAutoUpdateListData(list, (d) => true);
25
26
  return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
26
- React.createElement("div", { className: "workerror-list-view" },
27
- React.createElement(InfiniteScrollView, { empty: list.isEmpty, loading: list.loading, hasMore: list.hasMore, loadMore: loadMore }, list.data.map((item) => (React.createElement(DocumentItemFrame, { key: item.id, frameProps: {
27
+ React.createElement("div", { className: "workerror-list-view" }, list.data.length ?
28
+ list.data.map((item) => (React.createElement(DocumentItemFrame, { key: item.id, frameProps: {
28
29
  active: activeId === item.id,
29
30
  hoverEffect: "none",
30
31
  activeEffect: "border",
@@ -34,7 +35,8 @@ const WorkErrorList = (props) => {
34
35
  setActiveId(item.id);
35
36
  (_a = props.onClickItem) === null || _a === void 0 ? void 0 : _a.call(props, item.id);
36
37
  } },
37
- React.createElement(WorkErrorItem, { id: item.id })))))))));
38
+ React.createElement(WorkErrorItem, { id: item.id }))))
39
+ : React.createElement(Empty, null)))));
38
40
  function loadMore() {
39
41
  list.triggerNextPage();
40
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkErrorList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAc,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,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ACR,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC,EAAE;oBAC5B,WAAW,EAAE,MAAM;oBACnB,YAAY,EAAE,QAAQ;oBACtB,WAAW,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE;iBACrE,EACD,OAAO,EAAE,GAAG,EAAE;;oBACV,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACrB,MAAA,KAAK,CAAC,WAAW,+CAAjB,KAAK,EAAe,IAAI,CAAC,EAAE,CAAC,CAAC;gBACjC,CAAC;gBAED,oBAAC,aAAa,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,GAAI,CACd,CAEvB,CAAC;YACF,CAAC,CAAC,oBAAC,KAAK,OAAG,CAGb,CACiB,CAE9B,CAAC,CAAC;IAEH,SAAS,QAAQ;QACb,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import "./index.less";
3
+ declare const WorkErrorProperties: (props: {
4
+ id: string;
5
+ }) => JSX.Element;
6
+ export default WorkErrorProperties;
@@ -0,0 +1,57 @@
1
+ import "./index.less";
2
+ import AvatarList from "@voplus/morpho-document/es/components/AvatarList";
3
+ import { Form, Select } from "@voplus/antd";
4
+ import React, { useState } from "react";
5
+ import moment from "moment";
6
+ import { InlineEdit, observe } from "@voplus/morpho-ui";
7
+ import { useWorkError, useWorkErrorStore } from "../../../../data/workerror";
8
+ import { useApplicationContext } from "@voplus/morpho-data";
9
+ import { State } from "./state";
10
+ import { runInAction } from "mobx";
11
+ import DateInputEditor from "@voplus/morpho-ui/es/controls/InlineEdit/editors/DateInputEditor";
12
+ const WorkErrorProperties = (props) => {
13
+ const { id } = props;
14
+ const Option = Select.Option;
15
+ const [state] = useState(new State());
16
+ const workerror = useWorkError(id);
17
+ const { user } = useApplicationContext();
18
+ const store = useWorkErrorStore();
19
+ return observe(() => (React.createElement("div", { className: "workerror-properties" },
20
+ React.createElement(Form, { labelAlign: "left", labelCol: { span: 8 }, scrollToFirstError: true },
21
+ React.createElement(Form.Item, { label: "Type" }, state.editType ?
22
+ React.createElement(Select, { defaultValue: workerror.type, onChange: async (value) => {
23
+ await save({ Type: value });
24
+ runInAction(() => state.editType = false);
25
+ }, onBlur: () => state.editType = false },
26
+ React.createElement(Option, { value: "Type1" }, "Type1"),
27
+ React.createElement(Option, { value: "Type2" }, "Type2"),
28
+ React.createElement(Option, { value: "Type3" }, "Type3"))
29
+ :
30
+ React.createElement("div", { onClick: () => runInAction(() => state.editType = true) }, workerror.type || "ADD Type")),
31
+ React.createElement(Form.Item, { label: "Severity" }, state.editSeverity ?
32
+ React.createElement(Select, { defaultValue: workerror.severity, onChange: async (value) => {
33
+ await save({ Severity: value });
34
+ runInAction(() => state.editSeverity = false);
35
+ } },
36
+ React.createElement(Option, { value: "S1" }, "S1"),
37
+ React.createElement(Option, { value: "S2" }, "S2"),
38
+ React.createElement(Option, { value: "S3" }, "S3"))
39
+ :
40
+ React.createElement("div", { onClick: () => runInAction(() => state.editSeverity = true) }, workerror.severity || "ADD Severity")),
41
+ React.createElement(Form.Item, { label: "Due Data" },
42
+ React.createElement(InlineEdit, { defaultValue: moment(workerror.due), editable: false, content: (v) => (React.createElement("span", null, workerror.due ? moment(workerror.due).format("DD MMM YYYY") : "No Date")), editor: DateInputEditor })),
43
+ React.createElement(Form.Item, { label: "Incident Date" },
44
+ React.createElement(InlineEdit, { defaultValue: moment(workerror.incidentDate), content: (v) => (React.createElement("span", null, workerror.incidentDate ? moment(workerror.incidentDate).format("DD MMM YYYY") : "Add Date")), editor: DateInputEditor, onSave: (v) => {
45
+ // date未变更不保存
46
+ if (moment(v).isSame(workerror.incidentDate, "day"))
47
+ return;
48
+ save({ IncidentDate: v.format("YYYY-MM-DD") });
49
+ } })),
50
+ React.createElement(Form.Item, { label: "Causers" },
51
+ React.createElement(AvatarList, { list: workerror.causers || [], multiple: true, buttonText: "Ok", organizationId: user.info.organizationId, onChange: (ids) => save({ CauserIds: ids }) }))))));
52
+ async function save(params) {
53
+ await store.edit(id, { data: params, error: "message" });
54
+ }
55
+ };
56
+ export default WorkErrorProperties;
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkErrorProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,eAAe,MAAM,kEAAkE,CAAC;AAE/F,MAAM,mBAAmB,GAAG,CAAC,KAAqB,EAAE,EAAE;IAClD,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IACrB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IACtC,MAAM,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC,CAAC;IACnC,MAAM,EAAE,IAAI,EAAE,GAAG,qBAAqB,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,iBAAiB,EAAE,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C,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC;4BAAE,OAAO;wBAC5D,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;oBACnD,CAAC,GACH,CACM;YACZ,oBAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,SAAS;gBACtB,oBAAC,UAAU,IACP,IAAI,EAAE,SAAS,CAAC,OAAO,IAAI,EAAE,EAC7B,QAAQ,QACR,UAAU,EAAC,IAAI,EACf,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,EACxC,QAAQ,EAAE,CAAC,GAAa,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,GACvD,CACM,CACT,CACL,CACT,CAAC,CAAC;IAEH,KAAK,UAAU,IAAI,CAAC,MAA+B;QAC/C,MAAM,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC7D,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,8 @@
1
+ :global {
2
+ .workerror-properties {
3
+ padding: 20px;
4
+ .no-data {
5
+ color: #00000040;
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,5 @@
1
+ export declare class State {
2
+ constructor();
3
+ editType: boolean;
4
+ editSeverity: boolean;
5
+ }
@@ -0,0 +1,26 @@
1
+ import { __decorate } from "tslib";
2
+ import { makeObservable, observable } from "mobx";
3
+ export class State {
4
+ constructor() {
5
+ Object.defineProperty(this, "editType", {
6
+ enumerable: true,
7
+ configurable: true,
8
+ writable: true,
9
+ value: false
10
+ });
11
+ Object.defineProperty(this, "editSeverity", {
12
+ enumerable: true,
13
+ configurable: true,
14
+ writable: true,
15
+ value: false
16
+ });
17
+ makeObservable(this);
18
+ }
19
+ }
20
+ __decorate([
21
+ observable
22
+ ], State.prototype, "editType", void 0);
23
+ __decorate([
24
+ observable
25
+ ], State.prototype, "editSeverity", void 0);
26
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkErrorProperties/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElD,MAAM,OAAO,KAAK;IACd;QAGY;;;;mBAAkB,KAAK;WAAC;QACxB;;;;mBAAsB,KAAK;WAAC;QAHpC,cAAc,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CAGJ;AAFe;IAAX,UAAU;uCAAyB;AACxB;IAAX,UAAU;2CAA6B"}
@@ -6,36 +6,44 @@ import ActivityLog from "@voplus/morpho-document/es/components/ActivityLog/Activ
6
6
  import AvatarList from "@voplus/morpho-document/es/components/AvatarList";
7
7
  import DescriptionEditor from "@voplus/morpho-document/es/controls/DescriptionEditor";
8
8
  import DocumentList from "@voplus/morpho-document/es/components/DocumentList";
9
- import { ExclamationCircleOutlined } from "@ant-design/icons";
9
+ import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
10
+ import WorkErrorMenu from "../../controls/WorkErrorMenu";
11
+ import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
10
12
  import moment from "moment";
11
13
  import { observe } from "@voplus/morpho-ui";
12
14
  import { useApplicationContext } from "@voplus/morpho-data";
15
+ import WorkErrorProperties from "../WorkErrorProperties";
13
16
  const WorkErrorPropertiesView = (props) => {
14
17
  const { id } = props;
15
18
  const workerror = useWorkError(id);
16
19
  const store = useWorkErrorStore();
17
20
  const { user } = useApplicationContext();
18
21
  /**Tabs 当前激活 tab 面板的 key */
19
- const [activeKey, setActiveKey] = useState("Activities");
22
+ const [activeKey, setActiveKey] = useState("Properties");
20
23
  useEffect(() => {
21
- setActiveKey("Activities");
24
+ setActiveKey("Properties");
22
25
  }, [props.id]);
23
- return observe(() => React.createElement("div", { className: "workerror-properties-view" },
26
+ return observe(() => (React.createElement("div", { className: "workerror-properties-view" },
24
27
  workerror.loaded !== true ? (React.createElement(Skeleton, { active: true })) : (React.createElement(React.Fragment, null,
25
28
  React.createElement("div", { className: "workerror-header" },
26
- React.createElement("div", { className: "document-name-content" },
27
- React.createElement(ExclamationCircleOutlined, { style: { color: "red" } }),
28
- React.createElement(Tag, { color: "purple" }, workerror.type)),
29
+ React.createElement("div", { className: "workerror-header-content" },
30
+ React.createElement("div", { className: "document-name-content" },
31
+ React.createElement("div", { className: "workerror-info" }, workerror.type),
32
+ React.createElement(Tag, { color: "purple" }, workerror.severity)),
33
+ React.createElement(ToolBar, { id: props.id, showMenu: false },
34
+ React.createElement(Open, { size: "small", url: `/workerror}` }),
35
+ React.createElement(WorkErrorMenu, { id: props.id, size: "small", closeAside: true }))),
36
+ React.createElement("div", { className: "workerror-date" }, moment(workerror.due).format("DD MMM yyyy")),
29
37
  React.createElement(AvatarList, { organizationId: user.info.organizationId, list: workerror.causers || [], onChange: (ids) => {
30
38
  store.edit(id, { data: { CauserIds: ids }, error: "message" });
31
- } }),
32
- React.createElement("div", { className: "workerror-date" }, moment(workerror.due).format("DD MMM yyyy"))),
39
+ } })),
33
40
  React.createElement(DescriptionEditor, { id: id, description: workerror.description, onSave: (description) => {
34
41
  store.edit(id, { data: { Description: description }, error: "message" });
35
42
  } }))),
36
43
  React.createElement(Tabs, { activeKey: activeKey, className: "workerror-tabs", onChange: onChange },
44
+ React.createElement(Tabs.TabPane, { tab: "Properties", key: "Properties" }, activeKey === "Properties" && React.createElement(WorkErrorProperties, { id: id })),
37
45
  React.createElement(Tabs.TabPane, { tab: "Activities", key: "Activities" }, activeKey === "Activities" && React.createElement(ActivityLog, { id: id })),
38
- React.createElement(Tabs.TabPane, { tab: "Document", key: "Document" }, activeKey === "Document" && (React.createElement(DocumentList, { id: id, multiple: true }))))));
46
+ React.createElement(Tabs.TabPane, { tab: "Document", key: "Document" }, activeKey === "Document" && React.createElement(DocumentList, { id: id, multiple: true }))))));
39
47
  /**切换面板的回调*/
40
48
  function onChange(activeKey) {
41
49
  setActiveKey(activeKey);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkErrorPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE7E,OAAO,WAAW,MAAM,gEAAgE,CAAC;AACzF,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,iBAAiB,MAAM,uDAAuD,CAAC;AACtF,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,uBAAuB,GAAG,CAAC,KAAqB,EAAE,EAAE;IACtD,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IACrB,MAAM,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC,CAAC;IACnC,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC;IAClC,MAAM,EAAE,IAAI,EAAE,GAAG,qBAAqB,EAAE,CAAC;IAEzC,2BAA2B;IAC3B,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEzD,SAAS,CAAC,GAAG,EAAE;QACX,YAAY,CAAC,YAAY,CAAC,CAAC;IAC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Y,IAAI,oBAAC,WAAW,IAAC,EAAE,EAAE,EAAE,GAAI,CACxC;YACf,oBAAC,IAAI,CAAC,OAAO,IAAC,GAAG,EAAC,UAAU,EAAC,GAAG,EAAC,UAAU,IACzC,SAAS,KAAK,UAAU,IAAI,oBAAC,YAAY,IAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,SAAG,CAChD,CACT,CACF,CACN,CAAC,CAAC;IAEH,YAAY;IACZ,SAAS,QAAQ,CAAC,SAAiB;QAClC,YAAY,CAAC,SAAS,CAAC,CAAC;IACzB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -3,8 +3,23 @@
3
3
  height: 100%;
4
4
  display: flex;
5
5
  flex-direction: column;
6
+
6
7
  .workerror-header {
7
8
  padding: 10px 20px;
9
+
10
+ .workerror-header-content{
11
+ display: flex;
12
+ justify-content: space-between;
13
+ }
14
+
15
+ .workerror-info {
16
+ display: inline-block;
17
+ color: #000;
18
+ font-size: 24px;
19
+ font-weight: 500;
20
+ cursor: pointer;
21
+ }
22
+
8
23
  .ant-tag {
9
24
  padding: 0 5px;
10
25
  font-size: 12px;
@@ -12,11 +27,13 @@
12
27
  margin-left: 8px;
13
28
  }
14
29
  }
30
+
15
31
  .workerror-tabs {
16
32
  flex: 1;
33
+
17
34
  .ant-tabs-nav {
18
35
  padding-left: 20px;
19
36
  }
20
37
  }
21
38
  }
22
- }
39
+ }
@@ -34,7 +34,7 @@ const WorkItem = (props) => {
34
34
  default: React.createElement(WorkMenu, { id: id })
35
35
  }
36
36
  } },
37
- React.createElement(Open, { size: "middle", url: `/work/${id}` }))) }));
37
+ React.createElement(Open, { size: "middle", url: meta.getRoute(work) }))) }));
38
38
  });
39
39
  };
40
40
  export default WorkItem;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EACN,eAAe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B,EAC7B,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EACnC,YAAY,EACX,oBAAC,KAAK,CAAC,QAAQ;gBACd,oBAAC,WAAW;oBACX,oBAAC,aAAa,IAAC,EAAE,EAAE,EAAE,GAAI;oBACzB,oBAAC,gBAAgB,IAAC,EAAE,EAAE,EAAE,GAAI;oBAC5B,oBAAC,eAAe,IAAC,EAAE,EAAE,EAAE,GAAI;oBAC3B,oBAAC,aAAa,IAAC,EAAE,EAAE,EAAE,GAAI;oBACzB,oBAAC,OAAO,IAAC,KAAK,EAAC,aAAa;wBAC3B,8BAAM,SAAS,EAAC,WAAW,IACzB,IAAI,CAAC,UAAU,CACV,CACE,CACG,CACE,EAElB,KAAK,EACJ,6BACC,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE;oBAC3C,IAAI,EAAE,KAAK;iBACX,CAAC;gBAEF,oBAAC,OAAO,IACP,EAAE,EAAE,EAAE,EACN,SAAS,EAAE;wBACV,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC/B,KAAK,EAAE;4BACN,OAAO,EAAE,oBAAC,QAAQ,IAAC,EAAE,EAAE,EAAE,GAAI;yBAC7B;qBACD;oBAED,oBAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,SAAS,EAAE,EAAE,GAAI,CACjC,CACL,GAEN,CACF,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EACN,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,GACb,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,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,oBAAC,WAAW;oBACX,oBAAC,aAAa,IAAC,EAAE,EAAE,EAAE,GAAI;oBACzB,oBAAC,gBAAgB,IAAC,EAAE,EAAE,EAAE,GAAI;oBAC5B,oBAAC,eAAe,IAAC,EAAE,EAAE,EAAE,GAAI;oBAC3B,oBAAC,aAAa,IAAC,EAAE,EAAE,EAAE,GAAI;oBACzB,oBAAC,OAAO,IAAC,KAAK,EAAC,aAAa;wBAC3B,8BAAM,SAAS,EAAC,WAAW,IACzB,IAAI,CAAC,UAAU,CACV,CACE,CACG,CACE,EAElB,KAAK,EACJ,6BACC,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE;oBAC3C,IAAI,EAAE,KAAK;iBACX,CAAC;gBAEF,oBAAC,OAAO,IACP,EAAE,EAAE,EAAE,EACN,SAAS,EAAE;wBACV,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC/B,KAAK,EAAE;4BACN,OAAO,EAAE,oBAAC,QAAQ,IAAC,EAAE,EAAE,EAAE,GAAI;yBAC7B;qBACD;oBACD,oBAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAI,CACvC,CACL,GAEN,CACF,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -4,6 +4,8 @@ import { IWork } from "../../../../data/work";
4
4
  declare const WorkList: (props: {
5
5
  /** status of works shown on the list. */
6
6
  status?: string | undefined;
7
+ /** types id of works shown on the list. */
8
+ typesId?: string | undefined;
7
9
  /** dueDate of works shown on the list. */
8
10
  dueDate?: string | undefined;
9
11
  /** The current active item */
@@ -1,4 +1,5 @@
1
1
  import "./index.less";
2
+ import { useApplicationContext } from "@voplus/morpho-data";
2
3
  import { useWorkListEffect } from "../../../../data/work";
3
4
  import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
4
5
  import React, { useState } from "react";
@@ -13,12 +14,13 @@ import moment from "moment";
13
14
  import { observe } from "@voplus/morpho-ui";
14
15
  import { useRenderOnChange } from "@voplus/morpho-ui";
15
16
  const WorkList = (props) => {
16
- const { dueDate } = props;
17
+ const { dueDate, typesId } = props;
17
18
  const [activeId, setActiveId] = useState("");
18
19
  const documentStore = useDocumentStore();
20
+ const { user } = useApplicationContext();
19
21
  const list = useCreateListDataState({
20
22
  filterDefaults: { filters: filters() }
21
- }, [props.status, dueDate]);
23
+ }, [props.status, dueDate, typesId]);
22
24
  /** useOnNewDocument, useOnDeleteDocument的sugar syntax 自動更新list. */
23
25
  useAutoUpdateListData(list, (d) => d.type === "Work");
24
26
  useRenderOnChange(() => list.filters.options);
@@ -47,6 +49,7 @@ const WorkList = (props) => {
47
49
  } },
48
50
  React.createElement(WorkItem, { id: item.id, toolsVisible: false })))) }))));
49
51
  function filters() {
52
+ // const filter = [{ c: "Roles", o: "contains", l: "And", v1: "Owner" }];
50
53
  const filter = [];
51
54
  if (props.status) {
52
55
  filter.push({
@@ -56,6 +59,14 @@ const WorkList = (props) => {
56
59
  v1: S(props.status).capitalize().toString(),
57
60
  });
58
61
  }
62
+ if (typesId) {
63
+ filter.push({
64
+ c: "WorkType",
65
+ o: "=",
66
+ l: "And",
67
+ v1: typesId,
68
+ });
69
+ }
59
70
  if (dueDate) {
60
71
  let date = "day";
61
72
  let v1 = "";