@voplus/morpho-workspace 6.0.162 → 6.0.164

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 (95) hide show
  1. package/es/data/notification/interfaces.d.ts +4 -0
  2. package/es/modules/board/components/BoardTabs/index.js +1 -1
  3. package/es/modules/board/components/BoardTabs/index.js.map +1 -1
  4. package/es/modules/meeting/components/AgendaList/AgendaItem/components/TaskList/index.js +5 -1
  5. package/es/modules/meeting/components/AgendaList/AgendaItem/components/TaskList/index.js.map +1 -1
  6. package/es/modules/meeting/components/AgendaList/AgendaItem/components/TaskList/state.d.ts +1 -0
  7. package/es/modules/meeting/components/AgendaList/AgendaItem/components/TaskList/state.js +10 -0
  8. package/es/modules/meeting/components/AgendaList/AgendaItem/components/TaskList/state.js.map +1 -1
  9. package/es/modules/meeting/pages/MeetingListView/index.js +1 -2
  10. package/es/modules/meeting/pages/MeetingListView/index.js.map +1 -1
  11. package/es/modules/notification/components/DocumentNotificationCard/index.js +26 -7
  12. package/es/modules/notification/components/DocumentNotificationCard/index.js.map +1 -1
  13. package/es/modules/notification/components/DocumentNotificationCard/index.less +62 -5
  14. package/es/modules/notification/components/NotificationList/index.less +1 -1
  15. package/es/modules/tasks/components/NewTaskForm/NewTaskFormDialog.d.ts +5 -0
  16. package/es/modules/tasks/components/NewTaskForm/NewTaskFormDialog.js +11 -0
  17. package/es/modules/tasks/components/NewTaskForm/NewTaskFormDialog.js.map +1 -0
  18. package/es/modules/tasks/components/NewTaskForm/index.d.ts +10 -2
  19. package/es/modules/tasks/components/NewTaskForm/index.js +36 -27
  20. package/es/modules/tasks/components/NewTaskForm/index.js.map +1 -1
  21. package/es/modules/work/components/NewWorkForm/index.d.ts +2 -0
  22. package/es/modules/work/components/NewWorkForm/index.js +1 -1
  23. package/es/modules/work/components/NewWorkForm/index.js.map +1 -1
  24. package/es/modules/work/components/WorkTableListCard/TableCell.d.ts +13 -1
  25. package/es/modules/work/components/WorkTableListCard/TableCell.js +28 -1
  26. package/es/modules/work/components/WorkTableListCard/TableCell.js.map +1 -1
  27. package/es/modules/work/components/WorkTableListCard/TableCellDetails.d.ts +43 -0
  28. package/es/modules/work/components/WorkTableListCard/TableCellDetails.js +130 -0
  29. package/es/modules/work/components/WorkTableListCard/TableCellDetails.js.map +1 -0
  30. package/es/modules/work/components/WorkTableListCard/index.d.ts +9 -0
  31. package/es/modules/work/components/WorkTableListCard/index.js +57 -42
  32. package/es/modules/work/components/WorkTableListCard/index.js.map +1 -1
  33. package/es/modules/work/components/WorkTableListCard/index.less +99 -9
  34. package/es/modules/work/components/WorkTableListCardPage/index.d.ts +17 -0
  35. package/es/modules/work/components/WorkTableListCardPage/index.js +85 -0
  36. package/es/modules/work/components/WorkTableListCardPage/index.js.map +1 -0
  37. package/es/modules/work/components/WorkTableListCardPage/index.less +48 -0
  38. package/es/modules/work/components/WorkTableListCardPage/state.d.ts +8 -0
  39. package/es/modules/work/components/WorkTableListCardPage/state.js +54 -0
  40. package/es/modules/work/components/WorkTableListCardPage/state.js.map +1 -0
  41. package/es/modules/work/work-type/components/ReportsCompletedWorks/index.d.ts +6 -0
  42. package/es/modules/work/work-type/components/ReportsCompletedWorks/index.js +24 -0
  43. package/es/modules/work/work-type/components/ReportsCompletedWorks/index.js.map +1 -0
  44. package/es/modules/work/work-type/components/ReportsCompletedWorks/index.less +60 -0
  45. package/es/modules/work/work-type/components/ReportsCompletedWorks/state.d.ts +6 -0
  46. package/es/modules/work/work-type/components/ReportsCompletedWorks/state.js +27 -0
  47. package/es/modules/work/work-type/components/ReportsCompletedWorks/state.js.map +1 -0
  48. package/es/modules/work/work-type/components/WorkTypeSelect/index.d.ts +1 -0
  49. package/es/modules/work/work-type/components/WorkTypeSelect/index.js +16 -2
  50. package/es/modules/work/work-type/components/WorkTypeSelect/index.js.map +1 -1
  51. package/es/modules/work/work-type/components/WorkTypeSelect/state.d.ts +5 -0
  52. package/es/modules/work/work-type/components/WorkTypeSelect/state.js +24 -0
  53. package/es/modules/work/work-type/components/WorkTypeSelect/state.js.map +1 -0
  54. package/es/modules/work/work-type/components/WorkTypeStatsLabel/StatsItem.d.ts +11 -0
  55. package/es/modules/work/work-type/components/WorkTypeStatsLabel/StatsItem.js +21 -0
  56. package/es/modules/work/work-type/components/WorkTypeStatsLabel/StatsItem.js.map +1 -0
  57. package/es/modules/work/work-type/components/WorkTypeStatsLabel/index.d.ts +7 -0
  58. package/es/modules/work/work-type/components/WorkTypeStatsLabel/index.js +33 -0
  59. package/es/modules/work/work-type/components/WorkTypeStatsLabel/index.js.map +1 -0
  60. package/es/modules/work/work-type/components/WorkTypeStatsLabel/index.less +74 -0
  61. package/es/modules/work/work-type/controls/WorktypeCompleteWorksChart/WorkTypeCompletedWorksChart.d.ts +6 -0
  62. package/es/modules/work/work-type/controls/WorktypeCompleteWorksChart/WorkTypeCompletedWorksChart.js +85 -0
  63. package/es/modules/work/work-type/controls/WorktypeCompleteWorksChart/WorkTypeCompletedWorksChart.js.map +1 -0
  64. package/es/modules/work/work-type/pages/WorkTypePage/Dashboard.js +32 -9
  65. package/es/modules/work/work-type/pages/WorkTypePage/Dashboard.js.map +1 -1
  66. package/es/modules/work/work-type/pages/WorkTypePage/Works.d.ts +7 -0
  67. package/es/modules/work/work-type/pages/WorkTypePage/Works.js +16 -0
  68. package/es/modules/work/work-type/pages/WorkTypePage/Works.js.map +1 -0
  69. package/es/modules/work/work-type/pages/WorkTypePage/index.js +8 -57
  70. package/es/modules/work/work-type/pages/WorkTypePage/index.js.map +1 -1
  71. package/es/modules/work/work-type/pages/WorkTypePage/index.less +17 -0
  72. package/es/modules/work/work-type/pages/WorkTypePage/state.d.ts +2 -0
  73. package/es/modules/work/work-type/pages/WorkTypePage/state.js +37 -0
  74. package/es/modules/work/work-type/pages/WorkTypePage/state.js.map +1 -1
  75. package/es/modules/workspace/pages/WorkspacePage/index.less +8 -0
  76. package/es/obsolete/WorkTypePage/Dashboard.d.ts +5 -0
  77. package/es/obsolete/WorkTypePage/Dashboard.js +18 -0
  78. package/es/obsolete/WorkTypePage/Dashboard.js.map +1 -0
  79. package/es/obsolete/WorkTypePage/Summary.d.ts +5 -0
  80. package/es/obsolete/WorkTypePage/Summary.js +21 -0
  81. package/es/obsolete/WorkTypePage/Summary.js.map +1 -0
  82. package/es/obsolete/WorkTypePage/WorkListPage.d.ts +7 -0
  83. package/es/obsolete/WorkTypePage/WorkListPage.js +25 -0
  84. package/es/obsolete/WorkTypePage/WorkListPage.js.map +1 -0
  85. package/es/obsolete/WorkTypePage/WorkTypeDescriptionCard.d.ts +5 -0
  86. package/es/obsolete/WorkTypePage/WorkTypeDescriptionCard.js +14 -0
  87. package/es/obsolete/WorkTypePage/WorkTypeDescriptionCard.js.map +1 -0
  88. package/es/obsolete/WorkTypePage/index.d.ts +3 -0
  89. package/es/obsolete/WorkTypePage/index.js +181 -0
  90. package/es/obsolete/WorkTypePage/index.js.map +1 -0
  91. package/es/obsolete/WorkTypePage/index.less +57 -0
  92. package/es/obsolete/WorkTypePage/state.d.ts +16 -0
  93. package/es/obsolete/WorkTypePage/state.js +161 -0
  94. package/es/obsolete/WorkTypePage/state.js.map +1 -0
  95. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkTableListCard/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,cAAc,MAAM,sDAAsD,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,WAAW,MAAM,iDAAiD,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAC3E,OAAO,OAAO,MAAM,sDAAsD,C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C,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;YACrB,IAAI,EAAE,EAAE,UAAU,EAAE;YACpB,KAAK,EAAE,CAAC,KAAY,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;SACrD,CAAC,GAEF,CACF,CAAC,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,CAC1B,oBAAC,OAAO,IACP,EAAE,EAAE,MAAM,CAAC,EAAE,EACb,SAAS,EAAE;YACV,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC/B,IAAI,EAAE,oBAAC,MAAM,IAAC,IAAI,EAAE,kBAAkB,GAAI;SAC1C;QAED,oBAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAI,CACzC,CACV,CAAC,CAAC,CAAC,CACH,QAAQ,CACR,CACG,CACL,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,43 @@
1
+ import React from "react";
2
+ /** WorkTypePage 用到的 work list card */
3
+ export declare const columnsSimpleList: ({
4
+ title: React.JSX.Element;
5
+ dataIndex: string;
6
+ width?: undefined;
7
+ } | {
8
+ title: React.JSX.Element;
9
+ dataIndex: string;
10
+ width: string;
11
+ } | {
12
+ title: string;
13
+ dataIndex: string;
14
+ width: string;
15
+ })[];
16
+ export declare const columnsDetailsList: ({
17
+ title: React.JSX.Element;
18
+ dataIndex: string;
19
+ width?: undefined;
20
+ } | {
21
+ title: React.JSX.Element;
22
+ dataIndex: string;
23
+ width: string;
24
+ } | {
25
+ title: string;
26
+ dataIndex: string;
27
+ width: string;
28
+ })[];
29
+ export declare const columnsDetailsList2: ({
30
+ title: React.JSX.Element;
31
+ dataIndex: string;
32
+ width?: undefined;
33
+ } | {
34
+ title: React.JSX.Element;
35
+ dataIndex: string;
36
+ width: string;
37
+ } | {
38
+ title: string;
39
+ dataIndex: string;
40
+ width: string;
41
+ })[];
42
+ declare const TableCell: (props: any) => React.JSX.Element;
43
+ export default TableCell;
@@ -0,0 +1,130 @@
1
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
2
+ import { useMetaStore } from "@voplus/morpho-document-core";
3
+ import { faBarsProgress, faCalendarDays, faUserGroup, faUser, faEllipsisVertical, } from "@fortawesome/pro-solid-svg-icons";
4
+ import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
5
+ import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
6
+ import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
7
+ import ItemFunction from "@voplus/morpho-org/es/controls/ItemFunction";
8
+ import TagView from "@voplus/morpho-document/es/components/TagView/TagView2";
9
+ import UnitAvatar from "@voplus/morpho-org/es/components/UnitAvatar/LoadedUnitAvatar";
10
+ import UnitNameNoteAlert from "@voplus/morpho-org/es/components/UnitNameNoteAlert";
11
+ import WorkPropertiesView from "../WorkPropertiesView";
12
+ import WorkQuickViewDialog from "../WorkQuickViewDialog";
13
+ import { observe } from "@voplus/morpho-ui";
14
+ import classnames from "classnames";
15
+ import React from "react";
16
+ import { useDocumentStore } from "@voplus/morpho-document-core";
17
+ /** WorkTypePage 用到的 work list card */
18
+ export const columnsSimpleList = [
19
+ {
20
+ title: (React.createElement(React.Fragment, null,
21
+ React.createElement(FAIcon, { icon: faUserGroup }),
22
+ " Created Name")),
23
+ dataIndex: "name",
24
+ },
25
+ {
26
+ title: (React.createElement(React.Fragment, null,
27
+ React.createElement(FAIcon, { icon: faCalendarDays }),
28
+ " Create Date")),
29
+ dataIndex: "date",
30
+ width: "30%",
31
+ },
32
+ {
33
+ title: " ",
34
+ dataIndex: "menu",
35
+ width: "68px",
36
+ },
37
+ ];
38
+ export const columnsDetailsList = [
39
+ {
40
+ title: (React.createElement(React.Fragment, null,
41
+ React.createElement(FAIcon, { icon: faUserGroup }),
42
+ " Created Name")),
43
+ dataIndex: "name",
44
+ },
45
+ {
46
+ title: (React.createElement(React.Fragment, null,
47
+ React.createElement(FAIcon, { icon: faCalendarDays }),
48
+ " Create Date")),
49
+ dataIndex: "date",
50
+ width: "22%",
51
+ },
52
+ {
53
+ title: (React.createElement(React.Fragment, null,
54
+ React.createElement(FAIcon, { icon: faBarsProgress }),
55
+ " Tag")),
56
+ dataIndex: "tags",
57
+ width: "20%",
58
+ },
59
+ {
60
+ title: (React.createElement(React.Fragment, null,
61
+ React.createElement(FAIcon, { icon: faUser }),
62
+ " Created By")),
63
+ dataIndex: "by",
64
+ width: "20%",
65
+ },
66
+ {
67
+ title: " ",
68
+ dataIndex: "menu",
69
+ width: "68px",
70
+ },
71
+ ];
72
+ export const columnsDetailsList2 = [
73
+ {
74
+ title: (React.createElement(React.Fragment, null,
75
+ React.createElement(FAIcon, { icon: faUserGroup }),
76
+ " Created Name")),
77
+ dataIndex: "name",
78
+ },
79
+ {
80
+ title: (React.createElement(React.Fragment, null,
81
+ React.createElement(FAIcon, { icon: faCalendarDays }),
82
+ " Create Date")),
83
+ dataIndex: "date",
84
+ width: "15%",
85
+ },
86
+ {
87
+ title: (React.createElement(React.Fragment, null,
88
+ React.createElement(FAIcon, { icon: faBarsProgress }),
89
+ " Tag")),
90
+ dataIndex: "tags",
91
+ width: "20%",
92
+ },
93
+ {
94
+ title: (React.createElement(React.Fragment, null,
95
+ React.createElement(FAIcon, { icon: faUser }),
96
+ " Created By")),
97
+ dataIndex: "by",
98
+ width: "20%",
99
+ },
100
+ {
101
+ title: (React.createElement(React.Fragment, null,
102
+ React.createElement(FAIcon, { icon: faCalendarDays }),
103
+ " Due Date")),
104
+ dataIndex: "due",
105
+ width: "15%",
106
+ },
107
+ {
108
+ title: " ",
109
+ dataIndex: "menu",
110
+ width: "68px",
111
+ },
112
+ ];
113
+ const TableCell = (props) => {
114
+ const { dataIndex, record, rowIndex, children, ...restProps } = props;
115
+ const store = useDocumentStore();
116
+ const meta = useMetaStore();
117
+ return observe(() => (React.createElement("td", { ...restProps }, dataIndex === "name" ? (React.createElement(ItemFunction, { className: "work-table-item-name_2", quickViewDialog: (onCancel) => (React.createElement(WorkQuickViewDialog, { id: record.id, visible: true, onCancel: onCancel })), propertiesView: React.createElement(WorkPropertiesView, { id: record.id }) },
118
+ React.createElement("span", { className: classnames(record.workStatus.charAt(0).toLowerCase() + record.workStatus.slice(1)) }),
119
+ record.name,
120
+ "-",
121
+ record.number)) : dataIndex === "date" ? (React.createElement(UTCShortDate, { className: "work-table-item-createDate", value: record.createDate, format: "DD MMM YYYY" })) : dataIndex === "due" ? (React.createElement(UTCShortDate, { value: record.due, format: "DD MMM YYYY" })) : dataIndex === "tags" ? (React.createElement(TagView, { id: record.id, tags: record.tags, editable: false, items: store.items, maxCount: 1, className: "work-table-item-tags" })) : dataIndex === "by" ? (React.createElement("div", { className: "work-table-item-info" },
122
+ record.contact && React.createElement(UnitAvatar, { unit: record.contact }),
123
+ React.createElement("div", { className: "work-by-name" }, record.contact ? (React.createElement(UnitNameNoteAlert, { id: record.contact.id, name: record.contact.name })) : null))) : dataIndex === "menu" ? (React.createElement(ToolBar, { id: record.id, moreProps: {
124
+ buttonProps: { size: "middle" },
125
+ icon: React.createElement(FAIcon, { icon: faEllipsisVertical }),
126
+ } },
127
+ React.createElement(Open, { size: "middle", url: meta.getRoute(record) }))) : (children))));
128
+ };
129
+ export default TableCell;
130
+ //# sourceMappingURL=TableCellDetails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCellDetails.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkTableListCard/TableCellDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EACN,cAAc,EACd,cAAc,EACd,WAAW,EACX,MAAM,EACN,kBAAkB,GAClB,MAAM,kCAAkC,CA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EAAE,MAAM,CAAC,EAAE,EACb,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,QAAQ,EAAE,KAAK,EACf,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,EACX,SAAS,EAAC,sBAAsB,GAC/B,CACF,CAAC,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,CACxB,6BAAK,SAAS,EAAC,sBAAsB;QACnC,MAAM,CAAC,OAAO,IAAI,oBAAC,UAAU,IAAC,IAAI,EAAE,MAAM,CAAC,OAAO,GAAI;QACvD,6BAAK,SAAS,EAAC,cAAc,IAC3B,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CACjB,oBAAC,iBAAiB,IAAC,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,GAAI,CACvE,CAAC,CAAC,CAAC,IAAI,CACH,CACD,CACN,CAAC,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,CAC1B,oBAAC,OAAO,IACP,EAAE,EAAE,MAAM,CAAC,EAAE,EACb,SAAS,EAAE;YACV,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC/B,IAAI,EAAE,oBAAC,MAAM,IAAC,IAAI,EAAE,kBAAkB,GAAI;SAC1C;QAED,oBAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAI,CACzC,CACV,CAAC,CAAC,CAAC,CACH,QAAQ,CACR,CACG,CACL,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import React, { ReactNode } from "react";
2
+ import "./index.less";
2
3
  export type WorkTableListCardProps = {
3
4
  /** filter by contactId */
4
5
  contactId?: string;
@@ -7,6 +8,8 @@ export type WorkTableListCardProps = {
7
8
  /** status of works shown on the list. */
8
9
  status?: string;
9
10
  isHeader?: boolean;
11
+ /** types id of works shown on the list. */
12
+ typesId?: string;
10
13
  /** 预选 contact */
11
14
  primaryContact?: {
12
15
  id: string;
@@ -21,6 +24,12 @@ export type WorkTableListCardProps = {
21
24
  isHeader?: boolean;
22
25
  title?: ReactNode;
23
26
  };
27
+ scrollH?: number;
28
+ searchVal?: string;
29
+ /** 是否显示 Details 的 内容 */
30
+ details?: boolean;
31
+ type?: "simple" | "details" | "details2";
32
+ onWorkTotal?: (total: number) => void;
24
33
  };
25
34
  declare const WorkTableListCard: {
26
35
  (props: WorkTableListCardProps): React.JSX.Element;
@@ -1,19 +1,20 @@
1
- import { faBarsProgress, faThumbtack, faUserGroup } from "@fortawesome/pro-solid-svg-icons";
2
- import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
3
1
  import { useAutoUpdateListData } from "@voplus/morpho-document-core";
4
2
  import { observe, useRenderOnChange } from "@voplus/morpho-ui";
5
3
  import DocumentTableListCard from "@voplus/morpho-ui/es/components/DocumentTableListCard";
6
4
  import TableListCard from "@voplus/morpho-ui/es/components/TableListCard";
7
5
  import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
6
+ import AddDropDown2 from "@voplus/morpho-ui/es/components/layout/ListView/controls/AddDropDown2";
8
7
  import { Button } from "antd";
8
+ import TableCell, { columnsList } from "./TableCell";
9
+ import TableCellDetails, { columnsSimpleList, columnsDetailsList, columnsDetailsList2, } from "./TableCellDetails";
9
10
  import React, { useState, useEffect } from "react";
10
11
  import { useWorkListEffect } from "../../../../data/work";
11
12
  import NewWorkFormDialog from "../NewWorkForm/NewWorkFormDialog";
12
- import TableCell from "./TableCell";
13
13
  import classnames from "classnames";
14
+ import "./index.less";
14
15
  const WorkTableListCard = (props) => {
15
16
  var _a;
16
- const { contactId } = props;
17
+ const { contactId, typesId, scrollH } = props;
17
18
  const [visible, setVisible] = useState(false);
18
19
  const [workTotal, setWorkTotal] = useState(0);
19
20
  const [status, setStatus] = useState((_a = props.status) !== null && _a !== void 0 ? _a : "Active");
@@ -21,41 +22,9 @@ const WorkTableListCard = (props) => {
21
22
  const list = useCreateListDataState({
22
23
  filterDefaults: {
23
24
  filters: filters(),
25
+ includes: "tags",
24
26
  },
25
- }, [contactId, status]);
26
- const columnsList = [
27
- {
28
- title: (React.createElement(React.Fragment, null,
29
- React.createElement(FAIcon, { icon: faThumbtack }),
30
- " Name")),
31
- dataIndex: "name",
32
- },
33
- {
34
- title: (React.createElement(React.Fragment, null,
35
- React.createElement(FAIcon, { icon: faUserGroup }),
36
- " Assign")),
37
- dataIndex: "assign",
38
- width: "22%",
39
- },
40
- {
41
- title: (React.createElement(React.Fragment, null,
42
- React.createElement(FAIcon, { icon: faBarsProgress }),
43
- " Status")),
44
- dataIndex: "status",
45
- width: "20%",
46
- },
47
- {
48
- title: " ",
49
- dataIndex: "menu",
50
- width: "68px",
51
- },
52
- ];
53
- const components = {
54
- body: {
55
- // row: DragTableRow,
56
- cell: TableCell,
57
- },
58
- };
27
+ }, [contactId, status, typesId]);
59
28
  const columns = columnsList.map((col) => {
60
29
  return {
61
30
  ...col,
@@ -68,6 +37,24 @@ const WorkTableListCard = (props) => {
68
37
  },
69
38
  };
70
39
  });
40
+ const columnsDetails = (props.type === "details"
41
+ ? columnsDetailsList
42
+ : props.type === "details2"
43
+ ? columnsDetailsList2
44
+ : props.type === "simple"
45
+ ? columnsSimpleList
46
+ : []).map((col) => {
47
+ return {
48
+ ...col,
49
+ onCell: (record, rowIndex) => {
50
+ return {
51
+ record,
52
+ dataIndex: col.dataIndex,
53
+ rowIndex: rowIndex,
54
+ };
55
+ },
56
+ };
57
+ });
71
58
  /** useOnNewDocument, useOnDeleteDocument的sugar syntax 自動更新list. */
72
59
  useAutoUpdateListData(list, (d) => {
73
60
  if (status) {
@@ -78,8 +65,10 @@ const WorkTableListCard = (props) => {
78
65
  useRenderOnChange(() => list.filters.options);
79
66
  /** 把ListDataState传给useWorkListEffect,使之可以自動更新loading, hasmore. */
80
67
  useWorkListEffect(list, (result, total) => {
68
+ var _a;
81
69
  list.union(result);
82
70
  setWorkTotal(total);
71
+ (_a = props.onWorkTotal) === null || _a === void 0 ? void 0 : _a.call(props, total);
83
72
  }, {
84
73
  Total: true,
85
74
  ...list.filters.options,
@@ -88,15 +77,33 @@ const WorkTableListCard = (props) => {
88
77
  if (props.status)
89
78
  setStatus(props.status);
90
79
  }, [props.status]);
80
+ useEffect(() => {
81
+ var _a;
82
+ list.triggerSearch((_a = props.searchVal) !== null && _a !== void 0 ? _a : "");
83
+ }, [props.searchVal]);
91
84
  return observe(() => (React.createElement(React.Fragment, null,
92
85
  React.createElement(ListDataContext.Provider, { value: list },
93
86
  React.createElement(DocumentTableListCard, { isHeader: props.isHeader, header: React.createElement(React.Fragment, null,
94
- React.createElement("div", null,
87
+ props.details ? (React.createElement("div", { className: "work-table-card-header" },
88
+ React.createElement("span", { className: classnames("work-status", status.charAt(0).toLowerCase() + status.slice(1)) }),
89
+ React.createElement("span", { className: "title" },
90
+ status,
91
+ workTotal ? `(${workTotal})` : null))) : (React.createElement("div", null,
95
92
  React.createElement("span", { className: "title" }, "Work"),
96
93
  React.createElement(Button, { className: classnames({ current: status === "Active" }), onClick: () => setStatus("Active") }, "Active"),
97
- React.createElement(Button, { className: classnames({ current: status === "Done" }), onClick: () => setStatus("Done") }, "Done")),
98
- React.createElement("div", null, props.addAble && (React.createElement(Button, { className: "create-new", type: "link", onClick: () => setVisible(true) }, "+Create New")))) },
99
- React.createElement(TableListCard, { tableListProps: { columns: columns, components: components }, ...props.tableCardProps, ...props.tableListProps, title: React.createElement(React.Fragment, null,
94
+ React.createElement(Button, { className: classnames({ current: status === "Done" }), onClick: () => setStatus("Done") }, "Done"))),
95
+ React.createElement("div", null, props.addAble && (React.createElement(AddDropDown2, { btnType: props.details ? "icon" : "text", onClick: () => setVisible(true) })))) },
96
+ React.createElement(TableListCard, { tableListProps: {
97
+ // columns: columns, components: components
98
+ columns: props.details ? columnsDetails : columns,
99
+ components: {
100
+ body: {
101
+ // row: DragTableRow,
102
+ cell: props.details ? TableCellDetails : TableCell,
103
+ },
104
+ },
105
+ scrollH: scrollH,
106
+ }, className: "work-table-list-card", ...props.tableCardProps, ...props.tableListProps, title: React.createElement(React.Fragment, null,
100
107
  props.status,
101
108
  workTotal ? ` (${workTotal})` : null) }))),
102
109
  visible && (React.createElement(NewWorkFormDialog, { contact: props.primaryContact, onCancel: () => setVisible(false), onSave: () => setVisible(false) })))));
@@ -113,6 +120,14 @@ const WorkTableListCard = (props) => {
113
120
  v1: status,
114
121
  });
115
122
  }
123
+ if (typesId) {
124
+ filter.push({
125
+ c: "WorkType",
126
+ o: "=",
127
+ l: "And",
128
+ v1: typesId,
129
+ });
130
+ }
116
131
  return filter;
117
132
  }
118
133
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkTableListCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,EAAE,qBAAqB,EAAgB,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,qBAAqB,MAAM,uDAAuD,CAAC;AAC1F,OAAO,aAAa,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAS,MAAM,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAS,iBAAiB,EAAgB,MAAM,uBAAuB,CAAC;AAC/E,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AACjE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SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;QAChE,CAAC;QAED,IAAI,MAAM,EAAE,CAAC;YACZ,MAAM,CAAC,IAAI,CAAC;gBACX,CAAC,EAAE,YAAY;gBACf,CAAC,EAAE,GAAG;gBACN,CAAC,EAAE,KAAK;gBACR,EAAE,EAAE,MAAM;aACM,CAAC,CAAC;QACpB,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;AACF,CAAC,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAEnE,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkTableListCard/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,qBAAqB,MAAM,uDAAuD,CAAC;AAC1F,OAAO,aAAa,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,YAAY,MAAM,uEAAuE,CAAC;AACjG,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,SAAS,EAAE,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,gBAAgB,EAAE,EACxB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAS,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;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I,CAAC;gBACX,CAAC,EAAE,UAAU;gBACb,CAAC,EAAE,GAAG;gBACN,CAAC,EAAE,KAAK;gBACR,EAAE,EAAE,OAAO;aACX,CAAC,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;AACF,CAAC,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAEnE,eAAe,iBAAiB,CAAC"}
@@ -1,14 +1,104 @@
1
1
  :global {
2
- .work-table-item-name {
3
- background-color: transparent;
4
- padding: 0;
5
- cursor: pointer;
6
- .document-name-content .document-name {
7
- font-size: 14px;
8
- color: #5d5d5d;
2
+ .work-table-card-header {
3
+ .work-status {
4
+ display: inline-block;
5
+ width: 9px;
6
+ height: 9px;
7
+ background: #e6e6e6;
8
+ border-radius: 50%;
9
+ margin-right: 9px;
10
+ &.new {
11
+ background: #c5e1ff;
12
+ }
13
+ &.active {
14
+ background: #b7ffc5;
15
+ }
16
+ &.rejected {
17
+ background: #ffb7b7;
18
+ }
19
+ &.closed {
20
+ background: #e0d339;
21
+ }
22
+ &.done {
23
+ background: #fcb7ff;
24
+ }
9
25
  }
10
26
  }
11
- .work-status.work-table-status-label {
12
- width: 95px !important;
27
+ .work-table-list-card {
28
+ .work-table-item-name {
29
+ background-color: transparent;
30
+ padding: 0;
31
+ cursor: pointer;
32
+ .document-name-content .document-name {
33
+ font-size: 14px;
34
+ color: #5d5d5d;
35
+ }
36
+ }
37
+ .work-table-item-name_2 {
38
+ color: #217eb2;
39
+ font-weight: bold;
40
+ text-decoration: underline;
41
+ cursor: pointer;
42
+ display: flex;
43
+ align-items: center;
44
+ span {
45
+ display: inline-block;
46
+ width: 9px;
47
+ height: 9px;
48
+ background: #e6e6e6;
49
+ border-radius: 50%;
50
+ margin-right: 9px;
51
+ &.new {
52
+ background: #c5e1ff;
53
+ }
54
+ &.active {
55
+ background: #b7ffc5;
56
+ }
57
+ &.rejected {
58
+ background: #ffb7b7;
59
+ }
60
+ &.closed {
61
+ background: #e0d339;
62
+ }
63
+ &.done {
64
+ background: #fcb7ff;
65
+ }
66
+ }
67
+ }
68
+ .work-status.work-table-status-label {
69
+ width: 95px !important;
70
+ }
71
+
72
+ .work-table-item-info {
73
+ color: #5d5d5d;
74
+ font-weight: 500;
75
+ padding: 1px 0;
76
+ cursor: pointer;
77
+ display: flex;
78
+ align-items: center;
79
+ .ant-avatar {
80
+ width: 30px;
81
+ height: 30px;
82
+ line-height: 28px;
83
+ border-radius: 2px;
84
+ }
85
+ .work-by-name {
86
+ flex: 1;
87
+ margin-left: 8px;
88
+ }
89
+ }
90
+
91
+ .work-table-item-tags {
92
+ .ant-tag {
93
+ height: auto;
94
+ min-height: 24px;
95
+ line-height: 18px;
96
+ white-space: normal;
97
+ }
98
+ }
99
+
100
+ .work-table-item-createDate {
101
+ line-height: 32px;
102
+ }
13
103
  }
14
104
  }
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { IWork } from "../../../../data/work";
3
+ import "./index.less";
4
+ export type WorkListProps = {
5
+ /** types id of works shown on the list. */
6
+ typesId?: string;
7
+ /** 用于预选的 contact */
8
+ contact?: {
9
+ name: string;
10
+ id: string;
11
+ };
12
+ onChangeFilter?: (status: string) => void;
13
+ /** Call back when an item has been clicked on the list. */
14
+ onClickItem?: (item: IWork) => void;
15
+ };
16
+ declare const WorkTableListCardPage: (props: WorkListProps) => React.JSX.Element;
17
+ export default WorkTableListCardPage;
@@ -0,0 +1,85 @@
1
+ import React, { useState } from "react";
2
+ import { useWorkType } from "../../../../data/worktype";
3
+ import { observe } from "@voplus/morpho-ui";
4
+ import { Button } from "antd";
5
+ import { Scrollbars } from "react-custom-scrollbars-2";
6
+ import { faBriefcase } from "@fortawesome/pro-solid-svg-icons";
7
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
8
+ import AsideContent from "@voplus/morpho-ui/es/components/layout/AsideContent";
9
+ import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
10
+ import PageHeadDashboard from "@voplus/morpho-ui/es/components/layout/headers/PageHeadDashboard";
11
+ import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
12
+ import { useWorkTypeListEffect } from "../../../../data/worktype";
13
+ import WorkTableListCard from "../WorkTableListCard";
14
+ import NewWorkForm from "../NewWorkForm";
15
+ import { useParams } from "react-router-dom";
16
+ import { State } from "./state";
17
+ import classnames from "classnames";
18
+ import "./index.less";
19
+ const WorkTableListCardPage = (props) => {
20
+ const { typesId, contact } = props;
21
+ const [asideContext] = useState(AsideContent.createContext());
22
+ const workType = useWorkType(typesId);
23
+ const [draftTotal, setDraftTotal] = useState();
24
+ const [newTotal, setNewTotal] = useState();
25
+ const [activeTotal, setActiveTotal] = useState();
26
+ const [rejectedTotal, setRejectedTotal] = useState();
27
+ const [closedTotal, setClosedTotal] = useState();
28
+ const [doneTotal, setDoneTotal] = useState();
29
+ const [timer, setTimer] = useState();
30
+ const status = ["All", "Draft", "New", "Active", "Rejected", "Closed", "Done"];
31
+ const params = useParams();
32
+ const [state] = useState(new State(typesId, params.status));
33
+ const list = useCreateListDataState({}, []);
34
+ // 检查能不能 addAble
35
+ useWorkTypeListEffect(null, (result) => {
36
+ const workType = result.find((d) => d.id === typesId);
37
+ state.addAble = workType ? true : false;
38
+ }, {
39
+ Includes: "workspace",
40
+ Filters: [{ c: "Roles", o: "contains", l: "And", v1: JSON.stringify(["Requester"]) }],
41
+ Page: { Page: 1, PageSize: 300 },
42
+ });
43
+ return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
44
+ React.createElement(AsideContent, { context: asideContext },
45
+ React.createElement("div", { className: "work-table-list-card-page" },
46
+ React.createElement(PageHeadDashboard, { headerType: "page", avatarIcon: React.createElement(FAIcon, { icon: faBriefcase }), title: (workType === null || workType === void 0 ? void 0 : workType.name) || "My Works", description: "Your tasks: prioritize and complete your work" }),
47
+ React.createElement(ListHeaderTool, { addAble: state.addAble, onAdd: () => asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement(NewWorkForm, { typeId: typesId, contact: contact, showView: true }), {
48
+ span: 12,
49
+ }), sortable: false, searchHeader: true, searchOptions: {
50
+ placeholder: "search in work list",
51
+ onChange: onSearch,
52
+ }, preExtra: () => (React.createElement(React.Fragment, null,
53
+ React.createElement("div", { className: "work-status-btn" }, status.map((item) => (React.createElement(Button, { key: item, className: classnames({ active: state.active === item }), onClick: () => onChangeFilter(item) },
54
+ item,
55
+ " ",
56
+ item === "Draft" && draftTotal ? `(${draftTotal})` : null,
57
+ item === "New" && newTotal ? `(${newTotal})` : null,
58
+ item === "Active" && activeTotal ? `(${activeTotal})` : null,
59
+ item === "Rejected" && rejectedTotal ? `(${rejectedTotal})` : null,
60
+ item === "Closed" && closedTotal ? `(${closedTotal})` : null,
61
+ item === "Done" && doneTotal ? `(${doneTotal})` : null)))))) }),
62
+ React.createElement(Scrollbars, { autoHide: true },
63
+ React.createElement("div", { className: classnames("content", { "item-card": state.active !== "All" }) },
64
+ (state.active === "All" || state.active === "Draft") && (React.createElement(WorkTableListCard, { status: "Draft", ...state.cardProps, type: asideContext.asideContent ? "simple" : "details2", onWorkTotal: (total) => setDraftTotal(total) })),
65
+ (state.active === "All" || state.active === "New") && (React.createElement(WorkTableListCard, { status: "New", ...state.cardProps, type: asideContext.asideContent ? "simple" : "details2", onWorkTotal: (total) => setNewTotal(total) })),
66
+ (state.active === "All" || state.active === "Active") && (React.createElement(WorkTableListCard, { status: "Active", ...state.cardProps, type: asideContext.asideContent ? "simple" : "details2", onWorkTotal: (total) => setActiveTotal(total) })),
67
+ (state.active === "All" || state.active === "Rejected") && (React.createElement(WorkTableListCard, { status: "Rejected", ...state.cardProps, type: asideContext.asideContent ? "simple" : "details2", onWorkTotal: (total) => setRejectedTotal(total) })),
68
+ (state.active === "All" || state.active === "Closed") && (React.createElement(WorkTableListCard, { status: "Closed", ...state.cardProps, type: asideContext.asideContent ? "simple" : "details2", onWorkTotal: (total) => setClosedTotal(total) })),
69
+ (state.active === "All" || state.active === "Done") && (React.createElement(WorkTableListCard, { status: "Done", ...state.cardProps, type: asideContext.asideContent ? "simple" : "details2", onWorkTotal: (total) => setDoneTotal(total) })))))))));
70
+ function onChangeFilter(item) {
71
+ var _a;
72
+ state.active = item;
73
+ (_a = props.onChangeFilter) === null || _a === void 0 ? void 0 : _a.call(props, item.charAt(0).toLowerCase() + item.slice(1));
74
+ }
75
+ function onSearch(val) {
76
+ if (timer)
77
+ clearTimeout(timer);
78
+ setTimer(setTimeout(() => {
79
+ state.searchVal = val;
80
+ setTimer(undefined);
81
+ }, 1000));
82
+ }
83
+ };
84
+ export default WorkTableListCardPage;
85
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkTableListCardPage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,YAAY,MAAM,qDAAqD,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,iBAAiB,MAAM,kEAAkE,CAAC;AACjG,OAAO,cAAc,MAAM,wEAAwE,CAAC;AACpG,OAAO,EAAa,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,iBAAiB,MAA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