@voplus/morpho-workspace 5.0.44 → 5.0.46

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. package/es/modules/work/components/WorkList/index.js +4 -1
  2. package/es/modules/work/components/WorkList/index.js.map +1 -1
  3. package/es/modules/work/components/WorksProperties/index.js +6 -10
  4. package/es/modules/work/components/WorksProperties/index.js.map +1 -1
  5. package/es/modules/work/controls/WorkDataIconBar/index.js +4 -4
  6. package/es/modules/work/controls/WorkDataIconBar/index.js.map +1 -1
  7. package/es/modules/work/work-schedule/components/WorkScheduleItem/index.js +2 -2
  8. package/es/modules/work/work-schedule/components/WorkScheduleItem/index.js.map +1 -1
  9. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/index.d.ts +6 -11
  10. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/index.js +11 -73
  11. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/index.js.map +1 -1
  12. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/item/CreateWork.d.ts +7 -0
  13. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/item/CreateWork.js +54 -0
  14. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/item/CreateWork.js.map +1 -0
  15. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/item/LinkWork.d.ts +7 -0
  16. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/item/LinkWork.js +28 -0
  17. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/item/LinkWork.js.map +1 -0
  18. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/item/UnLinkWork.d.ts +7 -0
  19. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/item/UnLinkWork.js +22 -0
  20. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/item/UnLinkWork.js.map +1 -0
  21. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/item/index.d.ts +3 -0
  22. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/item/index.js +4 -0
  23. package/es/modules/work/work-schedule/controls/WorkScheduleMenu/item/index.js.map +1 -0
  24. package/es/modules/work/work-type/controls/WorkTypeMenu/index.d.ts +6 -11
  25. package/es/modules/work/work-type/controls/WorkTypeMenu/index.js +11 -30
  26. package/es/modules/work/work-type/controls/WorkTypeMenu/index.js.map +1 -1
  27. package/es/modules/workspace/controls/WorkspaceMenu/index.js +11 -27
  28. package/es/modules/workspace/controls/WorkspaceMenu/index.js.map +1 -1
  29. package/package.json +1 -1
@@ -21,7 +21,10 @@ const WorkList = (props) => {
21
21
  const documentStore = useDocumentStore();
22
22
  const workType = useWorkType(typesId, { reload: false });
23
23
  const list = useCreateListDataState({
24
- filterDefaults: { filters: filters() },
24
+ filterDefaults: {
25
+ includes: "tags",
26
+ filters: filters(),
27
+ },
25
28
  }, [props.status, dueDate, typesId]);
26
29
  /** useOnNewDocument, useOnDeleteDocument的sugar syntax 自動更新list. */
27
30
  useAutoUpdateListData(list, (d) => d.type === "Work");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAS,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAa,WAAW,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,iBAAiB,MAAM,uDAAuD,CAAC;AACtF,OAAO,QAAQ,MAAM,2DAA2D,CAA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AI,CAAC,SAAS,CAAC,CAAC;SACvB;QACD,IAAI,OAAO,KAAK,WAAW,EAAE;YAC5B,MAAM,GAAG,WAAW;gBACnB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,GAAG,eAAe,CAAC;gBAC7E,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC;SACxB;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED,KAAK,UAAU,SAAS,CAAC,EAAU,EAAE,OAAe;QACnD,MAAM,aAAa,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED,SAAS,YAAY;QACpB,QAAQ,OAAO,EAAE;YAChB,KAAK,OAAO,CAAC;YACb,KAAK,MAAM,CAAC;YACZ,KAAK,OAAO,CAAC;YACb,KAAK,KAAK;gBACT,OAAO,CAAC,QAAQ,CAAC,CAAC;YACnB,KAAK,WAAW;gBACf,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;YACnC;gBACC,MAAM;SACP;QACD,IAAI,SAAS;YAAE,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACxC,OAAO,EAAE,CAAC;IACX,CAAC;IAED,SAAS,QAAQ,CAAC,OAAY;QAC7B,OAAO,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC;QACxB,OAAO,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;AACF,CAAC,CAAC;AAEF,QAAQ,CAAC,YAAY,GAAG;IACvB,SAAS,EAAE,IAAI;CACf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,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nC;gBACC,MAAM;SACP;QACD,IAAI,SAAS;YAAE,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACxC,OAAO,EAAE,CAAC;IACX,CAAC;IAED,SAAS,QAAQ,CAAC,OAAY;QAC7B,OAAO,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC;QACxB,OAAO,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;AACF,CAAC,CAAC;AAEF,QAAQ,CAAC,YAAY,GAAG;IACvB,SAAS,EAAE,IAAI;CACf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -9,9 +9,9 @@ import DocumentProperties from "@voplus/morpho-document/es/components/DocumentPr
9
9
  import NodeLink from "../../../../controls/NodeLink";
10
10
  import DescriptionEditor from "@voplus/morpho-document/es/controls/DescriptionEditor";
11
11
  import ToolBar from "@voplus/morpho-org/es/controls/ToolBar";
12
- import UnitReference from "@voplus/morpho-org/es/controls/UnitReference";
12
+ import UnitReference from "@voplus/morpho-org/es/controls/UnitReference/LoadedUnitReference";
13
13
  import UnitsSelectDialog from "@voplus/morpho-org/es/components/UnitsSelectDialog";
14
- import AvatarItem from "@voplus/morpho-org/es/components/AvatarList/AvatarItem";
14
+ import AvatarItem from "@voplus/morpho-org/es/components/AvatarList/AvatarItem/LoadedAvatarItem";
15
15
  import ChangeAvatarDialog from "@voplus/morpho-org/es/controls/ChangeAvatarDialog";
16
16
  import DocumentPanelHeader from "@voplus/morpho-document/es/components/DocumentPanelHeader";
17
17
  import DocumentReference from "@voplus/morpho-document/es/controls/DocumentReference";
@@ -23,7 +23,7 @@ const WorksProperties = (props) => {
23
23
  /** 加class name 为了方便做integration tests */
24
24
  const classId = "work-properties";
25
25
  const { id, headerVisible, workTitle, documentTitle, workProperties, documentProperties } = props;
26
- const work = useWork(id, { reload: true, includes: "tags" });
26
+ const work = useWork(id);
27
27
  const store = useWorkStore();
28
28
  const state = useMemo(() => new State(id, store), [id]);
29
29
  const noData = React.createElement("span", { className: "add-info-style" }, "no data");
@@ -61,11 +61,7 @@ const WorksProperties = (props) => {
61
61
  var _a, _b;
62
62
  return work.contact ? (React.createElement(ToolBar, { id: (_a = work.contact) === null || _a === void 0 ? void 0 : _a.id, moreProps: {
63
63
  id: (_b = work.contact) === null || _b === void 0 ? void 0 : _b.id,
64
- children: ({ onClickItem }) => {
65
- var _a;
66
- return (React.createElement("span", { onClick: () => onClickItem() },
67
- React.createElement(UnitReference, { id: (_a = work.contact) === null || _a === void 0 ? void 0 : _a.id, symbol: true })));
68
- },
64
+ children: React.createElement(UnitReference, { unit: work.contact, symbol: true }),
69
65
  } })) : (noData);
70
66
  } })));
71
67
  case "Document":
@@ -76,8 +72,8 @@ const WorksProperties = (props) => {
76
72
  return (React.createElement(Form.Item, { label: "Owner", className: classId + "-owner" },
77
73
  React.createElement(InlineEdit, { defaultValue: "", showEditIcon: true, editable: false, onEditIconClick: () => runInAction(() => (state.ownerEditable = true)), content: (v) => {
78
74
  var _a;
79
- return work.owners || state.ownerEditable ? (React.createElement(Avatar.Group, null, (_a = work.owners) === null || _a === void 0 ? void 0 : _a.map((item, index) => (React.createElement(UnitReference, { key: item.id, id: item.id },
80
- React.createElement(AvatarItem, { id: item.id, index: index })))))) : (noData);
75
+ return work.owners || state.ownerEditable ? (React.createElement(Avatar.Group, null, (_a = work.owners) === null || _a === void 0 ? void 0 : _a.map((item, index) => (React.createElement(UnitReference, { key: item.id, unit: item },
76
+ React.createElement(AvatarItem, { unit: item, index: index })))))) : (noData);
81
77
  } })));
82
78
  case "Work Type":
83
79
  return (React.createElement(Form.Item, { label: "Work Type", className: classId + "-workType" },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorksProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;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,EAAE;QAClB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,UAAU,EAAE;QACpB,EAAE,IAAI,EAAE,KAAK,EAAE;QACf,EAAE,IAAI,EAAE,OAAO,EAAE;KACjB;CACD,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorksProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACN,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,aAAa,IAAI,UAAU,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,kBAEN,MAAM,0DAA0D,CAAC;AAClE,OAAO,QAAQ,MAAM,+BAA+B,CAAC;AACrD,OAAO,iBAAiB,MAAM,uDAAuD,CAAC;AACtF,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,aAAa,MAAM,kEAAkE,CAAC;AAC7F,OAAO,iBAAiB,MAAM,oDAAoD,CAAC;AACnF,OAAO,UAAU,MAAM,yEAAyE,CAAC;AACjG,OAAO,kBAAkB,MAAM,mDAAmD,CAAC;AACnF,OAAO,mBAAmB,MAAM,2DAA2D,CAAC;AAC5F,OAAO,iBAAiB,MAAM,uDAAuD,CAAC;AACtF,OAAO,eAAe,MAAM,gCAAgC,CAAC;AAC7D,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,MAAM,MAAM,cAAc,CA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B,SAAS,EAAE,iBAAiB;IAC5B,aAAa,EAAE,qBAAqB;IACpC,cAAc,EAAE;QACf,EAAE,IAAI,EAAE,WAAW,EAAE;QACrB,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClB,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,UAAU,EAAE;QACpB,EAAE,IAAI,EAAE,KAAK,EAAE;QACf,EAAE,IAAI,EAAE,OAAO,EAAE;KACjB;CACD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -3,7 +3,7 @@ import React, { useState } from "react";
3
3
  import DataIconBar from "@voplus/morpho-document/es/controls/DataIconBar";
4
4
  import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
5
5
  import { Tooltip } from "antd";
6
- import UnitReference from "@voplus/morpho-org/es/controls/UnitReference";
6
+ import UnitReference from "@voplus/morpho-org/es/controls/UnitReference/LoadedUnitReference";
7
7
  import WorkStatusDataIcon from "../WorkStatusDataIcon";
8
8
  import { faAlarmExclamation } from "@fortawesome/pro-light-svg-icons";
9
9
  import moment from "moment";
@@ -12,9 +12,9 @@ import { useWork } from "../../../../data/work";
12
12
  const WorkDataIconBar = (props) => {
13
13
  const { id, dueDateVisible, documentDateVisible, commentVisible, statusVisible } = props;
14
14
  const [visible, setVisible] = useState(false);
15
- const work = useWork(id, { reload: false });
15
+ const work = useWork(id);
16
16
  return observe(() => {
17
- var _a, _b;
17
+ var _a;
18
18
  return (React.createElement(DataIconBar, null,
19
19
  dueDateVisible && (React.createElement(Tooltip, { title: "Due Date" },
20
20
  React.createElement("span", { className: "due-date data-icon" },
@@ -27,7 +27,7 @@ const WorkDataIconBar = (props) => {
27
27
  React.createElement(UserQuickIcon, { id: id }),
28
28
  ((_a = work.contact) === null || _a === void 0 ? void 0 : _a.id) && (React.createElement(Tooltip, { title: "Work Contact", open: visible, onOpenChange: onVisibleChange },
29
29
  React.createElement("span", { className: "data-icon", onClick: () => setVisible(false) },
30
- React.createElement(UnitReference, { id: (_b = work.contact) === null || _b === void 0 ? void 0 : _b.id })))),
30
+ React.createElement(UnitReference, { unit: work.contact })))),
31
31
  statusVisible && React.createElement(WorkStatusDataIcon, { id: id })));
32
32
  });
33
33
  function onVisibleChange(visible) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/controls/WorkDataIconBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,eAAe,EACf,gBAAgB,EAChB,aAAa,GACb,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,WAAW,MAAM,iDAAiD,CAAC;AAC1E,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,aAAa,MAAM,8CAA8C,CAAC;AACzE,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,MAAM,eAAe,GAAG,CAAC,KAMxB,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,cAAc,EAAE,mBAAmB,EAAE,cAAc,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IACzF,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAE5C,OAAO,OAAO,CAAC,GAAG,EAAE;;QAAC,OAAA,CACp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F,eAAe,eAAe,CAAC"}
@@ -8,7 +8,7 @@ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
8
8
  import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
9
9
  import { Skeleton } from "antd";
10
10
  import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
11
- import UnitReference from "@voplus/morpho-org/es/controls/UnitReference";
11
+ import UnitReference from "@voplus/morpho-org/es/controls/UnitReference/LoadedUnitReference";
12
12
  import WorkScheduleMenu from "../../controls/WorkScheduleMenu";
13
13
  import WorkScheduleQuickViewDialog from "../WorkScheduleQuickViewDialog";
14
14
  import classnames from "classnames";
@@ -44,7 +44,7 @@ const WorkScheduleItem = (props) => {
44
44
  React.createElement(WorkScheduleMenu, { id: id, closeAside: true })))))) : (React.createElement(React.Fragment, null,
45
45
  React.createElement(ColumnItemCol, { span: 7, title: "Owner(s)" },
46
46
  React.createElement("div", { className: "work-schedule-item-data-info text-sm text-gray-500 margin-right-15" }, workSchedule.owners.map((item) => (React.createElement("span", { key: item.id, className: "data-icon" },
47
- React.createElement(UnitReference, { id: item.id })))))),
47
+ React.createElement(UnitReference, { unit: item })))))),
48
48
  React.createElement(ColumnItemCol, { span: 7, align: "flex-end" },
49
49
  React.createElement(UpDownStatusBar, { className: classnames("work-schedule-item-menus", { hide: hover }), upNode: React.createElement("div", { className: classnames("flex items-baseline text-xl font-semibold commission-amount") }, workSchedule.schedule && (React.createElement("span", null, moment(workSchedule === null || workSchedule === void 0 ? void 0 : workSchedule.schedule).format("YYYY-MM-DD")))), downNode: React.createElement("div", { className: "work-schedule-item-schedule" }, workSchedule.status) }),
50
50
  React.createElement("div", { className: classnames("work-schedule-item-tool", { show: hover }), onClick: (e) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/components/WorkScheduleItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAA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F,6BACC,SAAS,EAAE,UAAU,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EACjE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;gCACd,CAAC,CAAC,eAAe,EAAE,CAAC;gCACpB,QAAQ,CAAC,KAAK,CAAC,CAAC;4BACjB,CAAC;4BAED,oBAAC,OAAO,IAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK;gCAC/B,oBAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAmB,CAAC,GAAI;gCAC/D,oBAAC,gBAAgB,IAAC,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,GAAI,CACrC,CACL,CACS,CACd,CACH,CACW,CACb;YACA,gBAAgB,IAAI,CACpB,oBAAC,2BAA2B,IAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,GAAI,CAC7E,CACI,CACN,CAAA;KAAA,CAAC,CAAC;IAEH,iBAAiB;IACjB,SAAS,WAAW;QACnB,IAAI,CAAC,SAAS;YAAE,OAAO;QACvB,mBAAmB,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACxC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/components/WorkScheduleItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC7D,O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,EAAE,KAAK;gCAC/B,oBAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAmB,CAAC,GAAI;gCAC/D,oBAAC,gBAAgB,IAAC,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,GAAI,CACrC,CACL,CACS,CACd,CACH,CACW,CACb;YACA,gBAAgB,IAAI,CACpB,oBAAC,2BAA2B,IAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,GAAI,CAC7E,CACI,CACN,CAAA;KAAA,CAAC,CAAC;IAEH,iBAAiB;IACjB,SAAS,WAAW;QACnB,IAAI,CAAC,SAAS;YAAE,OAAO;QACvB,mBAAmB,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACxC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,13 +1,8 @@
1
1
  import React from "react";
2
- declare const WorkScheduleMenu: {
3
- (props: {
4
- id: string;
5
- className?: string;
6
- closeAside?: boolean;
7
- icon?: React.ReactNode;
8
- }): React.JSX.Element;
9
- defaultProps: {
10
- icon: React.JSX.Element;
11
- };
12
- };
2
+ declare const WorkScheduleMenu: (props: {
3
+ id: string;
4
+ className?: string;
5
+ closeAside?: boolean;
6
+ icon?: React.ReactNode;
7
+ }) => React.JSX.Element;
13
8
  export default WorkScheduleMenu;
@@ -1,81 +1,19 @@
1
- import React, { useState } from "react";
2
- import { faBriefcase, faCircleEllipsis, faTrashAlt } from "@fortawesome/pro-light-svg-icons";
3
- import { observe, useAsideContentContext } from "@voplus/morpho-ui";
4
- import { useWorkSchedule, useWorkScheduleStore } from "../../../../../data/work-schedule";
5
- import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
6
- import { Access } from "@voplus/morpho-org/es/controls/NodeMenu/items";
7
- import { Button, Modal } from "antd";
8
- import { useLayout } from "@voplus/morpho-data";
9
- import { useMetaStore } from "@voplus/morpho-document-core";
1
+ import React from "react";
2
+ import { observe } from "@voplus/morpho-ui";
3
+ import { useWorkScheduleStore } from "../../../../../data/work-schedule";
4
+ import { Access, Delete } from "@voplus/morpho-org/es/controls/NodeMenu/items";
5
+ import { CreateWork, LinkWork, UnLinkWork } from "./item";
10
6
  import NodeMenu from "@voplus/morpho-org/es/controls/NodeMenu";
11
- import DocumentSelectDialog from "@voplus/morpho-document/es/components/DocumentSelectDialog";
12
7
  const WorkScheduleMenu = (props) => {
13
8
  /** 加class name 为了方便做integration tests */
14
9
  const classId = "workSchedule-menu";
15
- const [visible, setVisible] = useState(false);
16
- const [createWorkVisible, setCreateWorkVisible] = useState(false);
17
- const asideContext = useAsideContentContext();
18
- const workSchedule = useWorkSchedule(props.id);
19
10
  const store = useWorkScheduleStore();
20
- const layout = useLayout();
21
- const meta = useMetaStore();
22
- return observe(() => (React.createElement(React.Fragment, null,
23
- React.createElement(NodeMenu, { id: props.id, icon: props.icon, menus: ({ onClickItem }) => (React.createElement(React.Fragment, null,
24
- !workSchedule.work && (React.createElement(Button, { type: "link", onClick: () => {
25
- onClickItem();
26
- setCreateWorkVisible(!createWorkVisible);
27
- }, className: classId + "-createWork" },
28
- React.createElement(FAIcon, { icon: faBriefcase }),
29
- React.createElement("span", null, "Create Work"))),
30
- !workSchedule.work && (React.createElement(Button, { type: "link", onClick: () => {
31
- onClickItem();
32
- setVisible(true);
33
- }, className: classId + "-linkWork" },
34
- React.createElement(FAIcon, { icon: faBriefcase }),
35
- React.createElement("span", null, "Link Work"))),
36
- workSchedule.work && (React.createElement(Button, { type: "link", onClick: () => {
37
- store.unlinkWork(props.id, { error: "message" });
38
- }, className: classId + "-unLinkWork" },
39
- React.createElement(FAIcon, { icon: faBriefcase }),
40
- React.createElement("span", null, "UnLink Work"))),
41
- React.createElement(Access, { onClickItem: onClickItem }),
42
- React.createElement(Button, { type: "link", onClick: onClick, className: classId + "-delete" },
43
- React.createElement(FAIcon, { icon: faTrashAlt, color: "#f5222d" }),
44
- React.createElement("span", { className: "delete" }, "Delete")))) }),
45
- createWorkVisible && (React.createElement(Modal, { open: true, title: "Create Work", okText: "Create", onCancel: () => setCreateWorkVisible(false), onOk: () => store
46
- .createWork(props.id, {
47
- data: {
48
- WorkTypeId: workSchedule.workType.id,
49
- Name: "work",
50
- ContactId: "",
51
- },
52
- error: "message",
53
- })
54
- .then((res) => {
55
- setCreateWorkVisible(false);
56
- layout.history.push(meta.getRoute({ ...res.work, type: "Work" }));
57
- }) },
58
- React.createElement("p", null, `Confirm to create ${workSchedule.workType.name} now?`))),
59
- visible && (React.createElement(DocumentSelectDialog, { multiSelect: false, contains: ["Work"], onSelect: (docs) => store.linkWork(props.id, docs[0].id, { error: "message" }).then(() => setVisible(false)) })))));
60
- function onClick() {
61
- /** 如果文件下有子文件, 询问是否删除所有子文件 */
62
- Modal.confirm({
63
- title: "Do you want to delete this item?",
64
- async onOk() {
65
- await store.delete([props.id], {
66
- data: { DeleteChilds: true },
67
- error: "message",
68
- });
69
- /** 删除后是否关闭Aside */
70
- if (!!props.closeAside && (asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent))
71
- asideContext === null || asideContext === void 0 ? void 0 : asideContext.closeAside();
72
- return;
73
- },
74
- });
75
- }
76
- };
77
- WorkScheduleMenu.defaultProps = {
78
- icon: React.createElement(FAIcon, { icon: faCircleEllipsis }),
11
+ return observe(() => (React.createElement(NodeMenu, { id: props.id, icon: props.icon, className: props.className, store: store, menus: React.createElement(React.Fragment, null,
12
+ React.createElement(CreateWork, { className: classId + "-createWork" }),
13
+ React.createElement(LinkWork, { className: classId + "-linkWork" }),
14
+ React.createElement(UnLinkWork, { className: classId + "-unLinkWork" }),
15
+ React.createElement(Access, null),
16
+ React.createElement(Delete, { closeAside: props.closeAside })) })));
79
17
  };
80
18
  export default WorkScheduleMenu;
81
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules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C,GAExF,CACF,CACC,CACH,CAAC,CAAC;IAEH,SAAS,OAAO;QACf,6BAA6B;QAC7B,KAAK,CAAC,OAAO,CAAC;YACb,KAAK,EAAE,kCAAkC;YACzC,KAAK,CAAC,IAAI;gBACT,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;oBAC9B,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;oBAC5B,KAAK,EAAE,SAAS;iBAChB,CAAC,CAAC;gBACH,mBAAmB;gBACnB,IAAI,CAAC,CAAC,KAAK,CAAC,UAAU,KAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,YAAY,CAAA;oBAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,UAAU,EAAE,CAAC;gBACjF,OAAO;YACR,CAAC;SACD,CAAC,CAAC;IACJ,CAAC;AACF,CAAC,CAAC;AAEF,gBAAgB,CAAC,YAAY,GAAG;IAC/B,IAAI,EAAE,oBAAC,MAAM,IAAC,IAAI,EAAE,gBAAgB,GAAI;CACxC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/controls/WorkScheduleMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAE/D,MAAM,gBAAgB,GAAG,CAAC,KAKzB,EAAE,EAAE;IACJ,yCAAyC;IACzC,MAAM,OAAO,GAAG,mBAAmB,CAAC;IACpC,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,QAAQ,IACR,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,EACZ,KAAK,EACJ;YACC,oBAAC,UAAU,IAAC,SAAS,EAAE,OAAO,GAAG,aAAa,GAAI;YAClD,oBAAC,QAAQ,IAAC,SAAS,EAAE,OAAO,GAAG,WAAW,GAAI;YAC9C,oBAAC,UAAU,IAAC,SAAS,EAAE,OAAO,GAAG,aAAa,GAAI;YAClD,oBAAC,MAAM,OAAG;YACV,oBAAC,MAAM,IAAC,UAAU,EAAE,KAAK,CAAC,UAAU,GAAI,CACtC,GAEH,CACF,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ declare const CreateWork: (props: {
3
+ /** disabled Button */
4
+ disabled?: boolean;
5
+ className?: string;
6
+ }) => React.JSX.Element;
7
+ export default CreateWork;
@@ -0,0 +1,54 @@
1
+ import React, { useState } from "react";
2
+ import { Button, Modal } from "antd";
3
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
4
+ import { faBriefcase } from "@fortawesome/pro-light-svg-icons";
5
+ import { useMetaStore } from "@voplus/morpho-document-core";
6
+ import { useLayout } from "@voplus/morpho-data";
7
+ import { useNodeMenuContext } from "@voplus/morpho-org/es/controls/NodeMenu/state";
8
+ import { useWorkSchedule, useWorkScheduleStore } from "../../../../../../data/work-schedule";
9
+ import { observe } from "@voplus/morpho-ui";
10
+ const CreateWork = (props) => {
11
+ const { disabled, className } = props;
12
+ const layout = useLayout();
13
+ const meta = useMetaStore();
14
+ const store = useWorkScheduleStore();
15
+ const context = useNodeMenuContext();
16
+ const workSchedule = useWorkSchedule(context.id);
17
+ const [loading, setLoading] = useState(false);
18
+ const [createWorkVisible, setCreateWorkVisible] = useState(false);
19
+ return observe(() => (React.createElement(React.Fragment, null,
20
+ !workSchedule.work && (React.createElement(Button, { className: className, type: "link", disabled: disabled, onClick: onClick },
21
+ React.createElement(FAIcon, { icon: faBriefcase }),
22
+ React.createElement("span", null, "Create Work"))),
23
+ createWorkVisible && (React.createElement(Modal, { open: true, title: "Create Work", okText: "Create", footer: [
24
+ React.createElement(Button, { onClick: onCancel }, "Cancel"),
25
+ React.createElement(Button, { type: "primary", loading: loading, onClick: handleOk }, "Create"),
26
+ ], onCancel: onCancel },
27
+ React.createElement("p", null, `Confirm to create ${workSchedule.workType.name} now?`))))));
28
+ function onClick() {
29
+ context.menuItemClick();
30
+ setCreateWorkVisible(!createWorkVisible);
31
+ }
32
+ function handleOk() {
33
+ setLoading(true);
34
+ store
35
+ .createWork(context.id, {
36
+ data: {
37
+ WorkTypeId: workSchedule.workType.id,
38
+ Name: "work",
39
+ ContactId: "",
40
+ },
41
+ error: "message",
42
+ })
43
+ .then((res) => {
44
+ setLoading(false);
45
+ setCreateWorkVisible(false);
46
+ layout.history.push(meta.getRoute({ ...res.work, type: "Work" }));
47
+ });
48
+ }
49
+ function onCancel() {
50
+ setCreateWorkVisible(false);
51
+ }
52
+ };
53
+ export default CreateWork;
54
+ //# sourceMappingURL=CreateWork.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateWork.js","sourceRoot":"","sources":["../../../../../../../src/modules/work/work-schedule/controls/WorkScheduleMenu/item/CreateWork.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OA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AiB;gBAC1C,oBAAC,MAAM,IAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,aAEjD;aACT,EACD,QAAQ,EAAE,QAAQ;YAElB,+BAAI,qBAAqB,YAAY,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAK,CACxD,CACR,CACC,CACH,CAAC,CAAC;IACH,SAAS,OAAO;QACf,OAAO,CAAC,aAAa,EAAE,CAAC;QAExB,oBAAoB,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC1C,CAAC;IAED,SAAS,QAAQ;QAChB,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,KAAK;aACH,UAAU,CAAC,OAAO,CAAC,EAAE,EAAE;YACvB,IAAI,EAAE;gBACL,UAAU,EAAE,YAAY,CAAC,QAAQ,CAAC,EAAE;gBACpC,IAAI,EAAE,MAAM;gBACZ,SAAS,EAAE,EAAE;aACb;YACD,KAAK,EAAE,SAAS;SAChB,CAAC;aACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACb,UAAU,CAAC,KAAK,CAAC,CAAC;YAClB,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAC5B,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,GAAG,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAS,CAAC,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;IACL,CAAC;IAED,SAAS,QAAQ;QAChB,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ declare const LinkWork: (props: {
3
+ /** disabled Button */
4
+ disabled?: boolean;
5
+ className?: string;
6
+ }) => React.JSX.Element;
7
+ export default LinkWork;
@@ -0,0 +1,28 @@
1
+ import React, { useState } from "react";
2
+ import { Button } from "antd";
3
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
4
+ import { faBriefcase } from "@fortawesome/pro-light-svg-icons";
5
+ import { useNodeMenuContext } from "@voplus/morpho-org/es/controls/NodeMenu/state";
6
+ import { useWorkSchedule, useWorkScheduleStore } from "../../../../../../data/work-schedule";
7
+ import { observe } from "@voplus/morpho-ui";
8
+ import DocumentSelectDialog from "@voplus/morpho-document/es/components/DocumentSelectDialog";
9
+ const LinkWork = (props) => {
10
+ const { disabled, className } = props;
11
+ const store = useWorkScheduleStore();
12
+ const context = useNodeMenuContext();
13
+ const workSchedule = useWorkSchedule(context.id);
14
+ const [visible, setVisible] = useState(false);
15
+ return observe(() => (React.createElement(React.Fragment, null,
16
+ !workSchedule.work && (React.createElement(Button, { className: className, type: "link", disabled: disabled, onClick: onClick },
17
+ React.createElement(FAIcon, { icon: faBriefcase }),
18
+ React.createElement("span", null, "Link Work"))),
19
+ visible && (React.createElement(DocumentSelectDialog, { multiSelect: false, contains: ["Work"], onSelect: (docs) => store
20
+ .linkWork(context.id, docs[0].id, { error: "message" })
21
+ .then(() => setVisible(false)) })))));
22
+ function onClick() {
23
+ context.menuItemClick();
24
+ setVisible(true);
25
+ }
26
+ };
27
+ export default LinkWork;
28
+ //# sourceMappingURL=LinkWork.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkWork.js","sourceRoot":"","sources":["../../../../../../../src/modules/work/work-schedule/controls/WorkScheduleMenu/item/LinkWork.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,oBAAoB,EA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CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ declare const LinkWork: (props: {
3
+ /** disabled Button */
4
+ disabled?: boolean;
5
+ className?: string;
6
+ }) => React.JSX.Element;
7
+ export default LinkWork;
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ import { Button } from "antd";
3
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
4
+ import { faBriefcase } from "@fortawesome/pro-light-svg-icons";
5
+ import { useNodeMenuContext } from "@voplus/morpho-org/es/controls/NodeMenu/state";
6
+ import { useWorkSchedule, useWorkScheduleStore } from "../../../../../../data/work-schedule";
7
+ import { observe } from "@voplus/morpho-ui";
8
+ const LinkWork = (props) => {
9
+ const { disabled, className } = props;
10
+ const store = useWorkScheduleStore();
11
+ const context = useNodeMenuContext();
12
+ const workSchedule = useWorkSchedule(context.id);
13
+ return observe(() => (React.createElement(React.Fragment, null, workSchedule.work && (React.createElement(Button, { className: className, type: "link", disabled: disabled, onClick: onClick },
14
+ React.createElement(FAIcon, { icon: faBriefcase }),
15
+ React.createElement("span", null, "UnLink Work"))))));
16
+ function onClick() {
17
+ context.menuItemClick();
18
+ store.unlinkWork(context.id, { error: "message" });
19
+ }
20
+ };
21
+ export default LinkWork;
22
+ //# sourceMappingURL=UnLinkWork.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnLinkWork.js","sourceRoot":"","sources":["../../../../../../../src/modules/work/work-schedule/controls/WorkScheduleMenu/item/UnLinkWork.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC7F,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,QAAQ,GAAG,CAAC,KAIjB,EAAE,EAAE;IACJ,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACtC,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IACrC,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IACrC,MAAM,YAAY,GAAG,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAEjD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,0CACE,YAAY,CAAC,IAAI,IAAI,CACrB,oBAAC,MAAM,IAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO;QAC7E,oBAAC,MAAM,IAAC,IAAI,EAAE,WAAW,GAAI;QAC7B,gDAAwB,CAChB,CACT,CACC,CACH,CAAC,CAAC;IACH,SAAS,OAAO;QACf,OAAO,CAAC,aAAa,EAAE,CAAC;QAExB,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACpD,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as CreateWork } from "./CreateWork";
2
+ export { default as LinkWork } from "./LinkWork";
3
+ export { default as UnLinkWork } from "./UnLinkWork";
@@ -0,0 +1,4 @@
1
+ export { default as CreateWork } from "./CreateWork";
2
+ export { default as LinkWork } from "./LinkWork";
3
+ export { default as UnLinkWork } from "./UnLinkWork";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/work/work-schedule/controls/WorkScheduleMenu/item/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -1,13 +1,8 @@
1
1
  import React from "react";
2
- declare const WorkTypeMenu: {
3
- (props: {
4
- id: string;
5
- className?: string;
6
- closeAside?: boolean;
7
- icon?: React.ReactNode;
8
- }): React.JSX.Element;
9
- defaultProps: {
10
- icon: React.JSX.Element;
11
- };
12
- };
2
+ declare const WorkTypeMenu: (props: {
3
+ id: string;
4
+ className?: string;
5
+ closeAside?: boolean;
6
+ icon?: React.ReactNode;
7
+ }) => React.JSX.Element;
13
8
  export default WorkTypeMenu;
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
- import { Access } from "@voplus/morpho-org/es/controls/NodeMenu/items";
3
- import { Button, Modal } from "antd";
2
+ import { Access, Delete } from "@voplus/morpho-org/es/controls/NodeMenu/items";
3
+ import { Button } from "antd";
4
4
  import { useWorkType, useWorkTypeStore } from "../../../../../data/worktype";
5
- import { faCircleEllipsis, faTrashAlt, faUserLock, faUserUnlock, } from "@fortawesome/pro-light-svg-icons";
6
- import { observe, useAsideContentContext } from "@voplus/morpho-ui";
5
+ import { faUserLock, faUserUnlock } from "@fortawesome/pro-light-svg-icons";
6
+ import { observe } from "@voplus/morpho-ui";
7
7
  import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
8
8
  import NodeMenu from "@voplus/morpho-org/es/controls/NodeMenu";
9
9
  import Select from "./item/Select";
@@ -15,41 +15,22 @@ const WorkTypeMenu = (props) => {
15
15
  includes: "actions",
16
16
  });
17
17
  const store = useWorkTypeStore();
18
- const asideContext = useAsideContentContext();
19
- return observe(() => (React.createElement(NodeMenu, { id: props.id, icon: props.icon, menus: ({ onClickItem }) => {
20
- var _a, _b, _c;
21
- return (React.createElement(React.Fragment, null,
22
- React.createElement(Access, { onClickItem: onClickItem }),
18
+ return observe(() => {
19
+ var _a, _b, _c;
20
+ return (React.createElement(NodeMenu, { id: props.id, icon: props.icon, store: store, menus: React.createElement(React.Fragment, null,
21
+ React.createElement(Access, null),
23
22
  React.createElement(Select, { id: props.id, className: classId + "-move" }),
24
- ((_a = worktype.actions) === null || _a === void 0 ? void 0 : _a.canDelete) && (React.createElement(Button, { type: "link", onClick: onClick, className: classId + "-delete" },
25
- React.createElement(FAIcon, { icon: faTrashAlt, color: "#f5222d" }),
26
- React.createElement("span", { className: "delete" }, "Delete"))),
23
+ ((_a = worktype.actions) === null || _a === void 0 ? void 0 : _a.canDelete) && React.createElement(Delete, { closeAside: props.closeAside }),
27
24
  ((_b = worktype.actions) === null || _b === void 0 ? void 0 : _b.canDisable) && (React.createElement(Button, { type: "link", onClick: () => onChangeStatus("Disabled"), className: classId + "-disabled" },
28
25
  React.createElement(FAIcon, { icon: faUserLock }),
29
26
  React.createElement("span", null, "Disabled"))),
30
27
  ((_c = worktype.actions) === null || _c === void 0 ? void 0 : _c.canEnable) && (React.createElement(Button, { type: "link", onClick: () => onChangeStatus("Enable"), className: classId + "-enable" },
31
28
  React.createElement(FAIcon, { icon: faUserUnlock }),
32
- React.createElement("span", null, "Enable")))));
33
- } })));
34
- function onClick() {
35
- /** 如果文件下有子文件, 询问是否删除所有子文件 */
36
- Modal.confirm({
37
- title: "Do you want to delete this item?",
38
- async onOk() {
39
- await store.delete([props.id], { DeleteChilds: true });
40
- /** 删除后是否关闭Aside */
41
- if (!!props.closeAside && (asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent))
42
- asideContext === null || asideContext === void 0 ? void 0 : asideContext.closeAside();
43
- return;
44
- },
45
- });
46
- }
29
+ React.createElement("span", null, "Enable")))) }));
30
+ });
47
31
  function onChangeStatus(status) {
48
32
  store.edit(props.id, { data: { Status: status }, error: "message" });
49
33
  }
50
34
  };
51
- WorkTypeMenu.defaultProps = {
52
- icon: React.createElement(FAIcon, { icon: faCircleEllipsis }),
53
- };
54
35
  export default WorkTypeMenu;
55
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-type/controls/WorkTypeMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAa,WAAW,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACxF,OAAO,EACN,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,YAAY,GACZ,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAC/D,OAAO,MAAM,MAAM,eAAe,CAAC;AAEnC,MAAM,YAAY,GAAG,CAAC,KAKrB,EAAE,EAAE;IACJ,yCAAyC;IACzC,MAAM,OAAO,GAAG,eAAe,CAAC;IAEhC,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,EAAE;QACtC,MAAM,EAAE,CAAC,CAAY,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO;QACpC,QAAQ,EAAE,SAAS;KACnB,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IACjC,MAAM,YAAY,GAAG,sBAAsB,EAAE,CAAC;IAE9C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,QAAQ,IACR,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,KAAK,EAAE,CAAC,EAAE,WA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BAC9B,2CAAmB,CACX,CACT,CACC,GAEH,CACF,CAAA;KAAA,CAAC,CAAC;IAEH,SAAS,cAAc,CAAC,MAAe;QACtC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACtE,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,48 +1,32 @@
1
1
  import React from "react";
2
- import { Button, Modal } from "antd";
2
+ import { Button } from "antd";
3
3
  import { useWorkspace, useWorkspaceStore } from "../../../../data/workspace";
4
- import { faEllipsisVertical, faTrashAlt, faUserLock, faUserUnlock, } from "@fortawesome/pro-light-svg-icons";
5
- import { observe, useAsideContentContext } from "@voplus/morpho-ui";
4
+ import { faEllipsisVertical, faUserLock, faUserUnlock } from "@fortawesome/pro-light-svg-icons";
5
+ import { observe } from "@voplus/morpho-ui";
6
6
  import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
7
- import { Paste, Access } from "@voplus/morpho-org/es/controls/NodeMenu/items";
7
+ import { Paste, Access, Delete } from "@voplus/morpho-org/es/controls/NodeMenu/items";
8
8
  import NodeMenu from "@voplus/morpho-org/es/controls/NodeMenu";
9
9
  const WorkspaceMenu = (props) => {
10
10
  /** 加class name 为了方便做integration tests */
11
11
  const classId = "workSpace-menu";
12
12
  const store = useWorkspaceStore();
13
- const asideContext = useAsideContentContext();
14
13
  const workspace = useWorkspace(props.id, {
15
14
  reload: (i) => !i.actions,
16
15
  includes: "actions",
17
16
  });
18
- return observe(() => (React.createElement(NodeMenu, { id: props.id, icon: React.createElement(FAIcon, { icon: faEllipsisVertical }), menus: ({ onClickItem }) => {
19
- var _a, _b, _c;
20
- return (React.createElement(React.Fragment, null,
21
- ((_a = workspace.actions) === null || _a === void 0 ? void 0 : _a.canDelete) && (React.createElement(Button, { type: "link", onClick: onClick, className: classId + "-delete" },
22
- React.createElement(FAIcon, { icon: faTrashAlt, color: "#f5222d" }),
23
- React.createElement("span", { className: "delete" }, "Delete"))),
17
+ return observe(() => {
18
+ var _a, _b, _c;
19
+ return (React.createElement(NodeMenu, { id: props.id, icon: React.createElement(FAIcon, { icon: faEllipsisVertical }), menus: React.createElement(React.Fragment, null,
20
+ ((_a = workspace.actions) === null || _a === void 0 ? void 0 : _a.canDelete) && React.createElement(Delete, { closeAside: props.closeAside }),
24
21
  !((_b = workspace.actions) === null || _b === void 0 ? void 0 : _b.canDelete) && workspace.status === "Active" && (React.createElement(Button, { type: "link", onClick: () => onChangeStatus("Disabled"), className: classId + "-disabled" },
25
22
  React.createElement(FAIcon, { icon: faUserLock }),
26
23
  React.createElement("span", null, "Disabled"))),
27
24
  !((_c = workspace.actions) === null || _c === void 0 ? void 0 : _c.canDelete) && workspace.status === "Disabled" && (React.createElement(Button, { type: "link", onClick: () => onChangeStatus("Enable"), className: classId + "-enable" },
28
25
  React.createElement(FAIcon, { icon: faUserUnlock }),
29
26
  React.createElement("span", null, "Enable"))),
30
- React.createElement(Access, { onClickItem: onClickItem }),
31
- React.createElement(Paste, { types: ["Document", "WorkTypeNode"] })));
32
- } })));
33
- function onClick() {
34
- /** 如果文件下有子文件, 询问是否删除所有子文件 */
35
- Modal.confirm({
36
- title: "Do you want to delete this item?",
37
- async onOk() {
38
- await store.delete([props.id], { DeleteChilds: true });
39
- /** 删除后是否关闭Aside */
40
- if (!!props.closeAside && (asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent))
41
- asideContext === null || asideContext === void 0 ? void 0 : asideContext.closeAside();
42
- return;
43
- },
44
- });
45
- }
27
+ React.createElement(Access, null),
28
+ React.createElement(Paste, { types: ["Document", "WorkTypeNode"] })) }));
29
+ });
46
30
  /** Disabled/Enable function */
47
31
  function onChangeStatus(status) {
48
32
  store.edit(props.id, { data: { Status: status }, error: "message" });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../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CAAC,MAAe;QACtC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACtE,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voplus/morpho-workspace",
3
- "version": "5.0.44",
3
+ "version": "5.0.46",
4
4
  "description": "morpho workspace module",
5
5
  "repository": {
6
6
  "type": "git",