@voplus/morpho-document 6.1.18 → 6.1.19
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.
- package/es/Modules.js +4 -0
- package/es/Modules.js.map +1 -1
- package/es/components/AddDocOverlay/index.js +6 -2
- package/es/components/AddDocOverlay/index.js.map +1 -1
- package/es/components/AddDocOverlay/index.less +1 -1
- package/es/components/AddDocOverlay/state.js +1 -1
- package/es/components/AddDocOverlay/state.js.map +1 -1
- package/es/components/NewDocumentForm/state.js +4 -1
- package/es/components/NewDocumentForm/state.js.map +1 -1
- package/es/data/action-plan/ActionPlanStore.d.ts +33 -0
- package/es/data/action-plan/ActionPlanStore.js +115 -0
- package/es/data/action-plan/ActionPlanStore.js.map +1 -0
- package/es/data/action-plan/action-plan-events/index.d.ts +3 -0
- package/es/data/action-plan/action-plan-events/index.js +4 -0
- package/es/data/action-plan/action-plan-events/index.js.map +1 -0
- package/es/data/action-plan/action-plan-events/useAutoUpdateListData.d.ts +4 -0
- package/es/data/action-plan/action-plan-events/useAutoUpdateListData.js +15 -0
- package/es/data/action-plan/action-plan-events/useAutoUpdateListData.js.map +1 -0
- package/es/data/action-plan/action-plan-events/useOnDeleteActionPlan.d.ts +4 -0
- package/es/data/action-plan/action-plan-events/useOnDeleteActionPlan.js +16 -0
- package/es/data/action-plan/action-plan-events/useOnDeleteActionPlan.js.map +1 -0
- package/es/data/action-plan/action-plan-events/useOnNewActionPlan.d.ts +4 -0
- package/es/data/action-plan/action-plan-events/useOnNewActionPlan.js +17 -0
- package/es/data/action-plan/action-plan-events/useOnNewActionPlan.js.map +1 -0
- package/es/data/action-plan/hooks.d.ts +10 -0
- package/es/data/action-plan/hooks.js +18 -0
- package/es/data/action-plan/hooks.js.map +1 -0
- package/es/data/action-plan/index.d.ts +4 -0
- package/es/data/action-plan/index.js +5 -0
- package/es/data/action-plan/index.js.map +1 -0
- package/es/data/action-plan/interfaces.d.ts +7 -0
- package/es/data/action-plan/interfaces.js.map +1 -0
- package/es/data/action-plan/metas.d.ts +9 -0
- package/es/data/action-plan/metas.js +31 -0
- package/es/data/action-plan/metas.js.map +1 -0
- package/es/data/action-plan/types.d.ts +22 -0
- package/es/data/action-plan/types.js +2 -0
- package/es/data/action-plan/types.js.map +1 -0
- package/es/data/action-plan-template/ActionPlanTemplateStore.d.ts +12 -0
- package/es/data/action-plan-template/ActionPlanTemplateStore.js +28 -0
- package/es/data/action-plan-template/ActionPlanTemplateStore.js.map +1 -0
- package/es/data/action-plan-template/hook.d.ts +5 -0
- package/es/data/action-plan-template/hook.js +16 -0
- package/es/data/action-plan-template/hook.js.map +1 -0
- package/es/data/action-plan-template/index.d.ts +4 -0
- package/es/data/action-plan-template/index.js +5 -0
- package/es/data/action-plan-template/index.js.map +1 -0
- package/es/data/action-plan-template/interfaces.d.ts +4 -0
- package/es/data/action-plan-template/interfaces.js.map +1 -0
- package/es/data/action-plan-template/metas.d.ts +14 -0
- package/es/data/action-plan-template/metas.js +43 -0
- package/es/data/action-plan-template/metas.js.map +1 -0
- package/es/data/action-plan-template/types.d.ts +8 -0
- package/es/data/action-plan-template/types.js +2 -0
- package/es/data/action-plan-template/types.js.map +1 -0
- package/es/data/library/LibraryStore.js.map +1 -0
- package/es/data/library/hook.js.map +1 -0
- package/es/data/library/index.js.map +1 -0
- package/es/data/library/interfaces.js +2 -0
- package/es/data/library/interfaces.js.map +1 -0
- package/es/data/message-schedule/MessageScheduleStore.d.ts +33 -0
- package/es/data/message-schedule/MessageScheduleStore.js +115 -0
- package/es/data/message-schedule/MessageScheduleStore.js.map +1 -0
- package/es/data/message-schedule/hooks.d.ts +10 -0
- package/es/data/message-schedule/hooks.js +18 -0
- package/es/data/message-schedule/hooks.js.map +1 -0
- package/es/data/message-schedule/index.d.ts +4 -0
- package/es/data/message-schedule/index.js +5 -0
- package/es/data/message-schedule/index.js.map +1 -0
- package/es/data/message-schedule/interfaces.d.ts +12 -0
- package/es/data/message-schedule/interfaces.js +2 -0
- package/es/data/message-schedule/interfaces.js.map +1 -0
- package/es/data/message-schedule/message-schedule-events/index.d.ts +3 -0
- package/es/data/message-schedule/message-schedule-events/index.js +4 -0
- package/es/data/message-schedule/message-schedule-events/index.js.map +1 -0
- package/es/data/message-schedule/message-schedule-events/useAutoUpdateListData.d.ts +4 -0
- package/es/data/message-schedule/message-schedule-events/useAutoUpdateListData.js +15 -0
- package/es/data/message-schedule/message-schedule-events/useAutoUpdateListData.js.map +1 -0
- package/es/data/message-schedule/message-schedule-events/useOnDeleteMessageSchedule.d.ts +4 -0
- package/es/data/message-schedule/message-schedule-events/useOnDeleteMessageSchedule.js +16 -0
- package/es/data/message-schedule/message-schedule-events/useOnDeleteMessageSchedule.js.map +1 -0
- package/es/data/message-schedule/message-schedule-events/useOnNewMessageSchedule.d.ts +4 -0
- package/es/data/message-schedule/message-schedule-events/useOnNewMessageSchedule.js +17 -0
- package/es/data/message-schedule/message-schedule-events/useOnNewMessageSchedule.js.map +1 -0
- package/es/data/message-schedule/metas.d.ts +9 -0
- package/es/data/message-schedule/metas.js +31 -0
- package/es/data/message-schedule/metas.js.map +1 -0
- package/es/data/message-schedule/types.d.ts +25 -0
- package/es/data/message-schedule/types.js +2 -0
- package/es/data/message-schedule/types.js.map +1 -0
- package/es/data/v-submit/VSubmitStore.js.map +1 -0
- package/es/data/v-submit/hook.js.map +1 -0
- package/es/data/v-submit/index.js.map +1 -0
- package/es/data/v-submit/interfaces.js +2 -0
- package/es/data/v-submit/interfaces.js.map +1 -0
- package/es/modules/action-plan/components/ActionPlanHeader/index.d.ts +6 -0
- package/es/modules/action-plan/components/ActionPlanHeader/index.js +19 -0
- package/es/modules/action-plan/components/ActionPlanHeader/index.js.map +1 -0
- package/es/modules/action-plan/components/ActionPlanItem/index.d.ts +5 -0
- package/es/modules/action-plan/components/ActionPlanItem/index.js +39 -0
- package/es/modules/action-plan/components/ActionPlanItem/index.js.map +1 -0
- package/es/modules/action-plan/components/ActionPlanItem/index.less +30 -0
- package/es/modules/action-plan/components/ActionPlanList/index.d.ts +27 -0
- package/es/modules/action-plan/components/ActionPlanList/index.js +93 -0
- package/es/modules/action-plan/components/ActionPlanList/index.js.map +1 -0
- package/es/modules/action-plan/components/ActionPlanList/index.less +16 -0
- package/es/modules/action-plan/components/ActionPlanProperties/index.d.ts +20 -0
- package/es/modules/action-plan/components/ActionPlanProperties/index.js +39 -0
- package/es/modules/action-plan/components/ActionPlanProperties/index.js.map +1 -0
- package/es/modules/action-plan/components/ActionPlanPropertiesView/index.d.ts +6 -0
- package/es/modules/action-plan/components/ActionPlanPropertiesView/index.js +15 -0
- package/es/modules/action-plan/components/ActionPlanPropertiesView/index.js.map +1 -0
- package/es/modules/action-plan/components/ActionPlanQuickViewDialog/index.d.ts +8 -0
- package/es/modules/action-plan/components/ActionPlanQuickViewDialog/index.js +13 -0
- package/es/modules/action-plan/components/ActionPlanQuickViewDialog/index.js.map +1 -0
- package/es/modules/action-plan/components/ActionPlanQuickViewDialog/index.less +7 -0
- package/es/modules/action-plan/components/ActionPlanTabs/index.d.ts +6 -0
- package/es/modules/action-plan/components/ActionPlanTabs/index.js +49 -0
- package/es/modules/action-plan/components/ActionPlanTabs/index.js.map +1 -0
- package/es/modules/action-plan/components/NewActionPlanForm/NewActionPlanFormDialog.d.ts +9 -0
- package/es/modules/action-plan/components/NewActionPlanForm/NewActionPlanFormDialog.js +13 -0
- package/es/modules/action-plan/components/NewActionPlanForm/NewActionPlanFormDialog.js.map +1 -0
- package/es/modules/action-plan/components/NewActionPlanForm/index.d.ts +15 -0
- package/es/modules/action-plan/components/NewActionPlanForm/index.js +59 -0
- package/es/modules/action-plan/components/NewActionPlanForm/index.js.map +1 -0
- package/es/modules/action-plan/components/NewActionPlanForm/index.less +10 -0
- package/es/modules/action-plan/components/NewActionPlanForm/state.d.ts +12 -0
- package/es/modules/action-plan/components/NewActionPlanForm/state.js +32 -0
- package/es/modules/action-plan/components/NewActionPlanForm/state.js.map +1 -0
- package/es/modules/action-plan/controls/ActionPlanMenu/index.d.ts +10 -0
- package/es/modules/action-plan/controls/ActionPlanMenu/index.js +23 -0
- package/es/modules/action-plan/controls/ActionPlanMenu/index.js.map +1 -0
- package/es/modules/action-plan/pages/ActionPlanDefaultView/index.d.ts +3 -0
- package/es/modules/action-plan/pages/ActionPlanDefaultView/index.js +29 -0
- package/es/modules/action-plan/pages/ActionPlanDefaultView/index.js.map +1 -0
- package/es/modules/action-plan/pages/ActionPlanDefaultView/index.less +4 -0
- package/es/modules/action-plan-template/components/ActionPlanTemplateProperties/index.d.ts +25 -0
- package/es/modules/action-plan-template/components/ActionPlanTemplateProperties/index.js +26 -0
- package/es/modules/action-plan-template/components/ActionPlanTemplateProperties/index.js.map +1 -0
- package/es/modules/action-plan-template/components/ActionPlanTemplatePropertiesView/index.d.ts +6 -0
- package/es/modules/action-plan-template/components/ActionPlanTemplatePropertiesView/index.js +25 -0
- package/es/modules/action-plan-template/components/ActionPlanTemplatePropertiesView/index.js.map +1 -0
- package/es/modules/action-plan-template/components/ActionPlanTemplateQuickViewDialog/index.d.ts +7 -0
- package/es/modules/action-plan-template/components/ActionPlanTemplateQuickViewDialog/index.js +26 -0
- package/es/modules/action-plan-template/components/ActionPlanTemplateQuickViewDialog/index.js.map +1 -0
- package/es/modules/action-plan-template/components/ActionPlanTemplateTabs/index.d.ts +6 -0
- package/es/modules/action-plan-template/components/ActionPlanTemplateTabs/index.js +47 -0
- package/es/modules/action-plan-template/components/ActionPlanTemplateTabs/index.js.map +1 -0
- package/es/modules/action-plan-template/controls/ActionPlanTemplateDataIconBar/index.d.ts +12 -0
- package/es/modules/action-plan-template/controls/ActionPlanTemplateDataIconBar/index.js +19 -0
- package/es/modules/action-plan-template/controls/ActionPlanTemplateDataIconBar/index.js.map +1 -0
- package/es/modules/action-plan-template/controls/ActionPlanTemplateMenu/index.d.ts +5 -0
- package/es/modules/action-plan-template/controls/ActionPlanTemplateMenu/index.js +15 -0
- package/es/modules/action-plan-template/controls/ActionPlanTemplateMenu/index.js.map +1 -0
- package/es/modules/action-plan-template/pages/ActionPlanTemplateDefaultView/index.d.ts +5 -0
- package/es/modules/action-plan-template/pages/ActionPlanTemplateDefaultView/index.js +33 -0
- package/es/modules/action-plan-template/pages/ActionPlanTemplateDefaultView/index.js.map +1 -0
- package/es/modules/action-plan-template/pages/ActionPlanTemplateDefaultView/index.less +4 -0
- package/es/modules/message-schedule/components/MessageScheduleHeader/index.d.ts +6 -0
- package/es/modules/message-schedule/components/MessageScheduleHeader/index.js +19 -0
- package/es/modules/message-schedule/components/MessageScheduleHeader/index.js.map +1 -0
- package/es/modules/message-schedule/components/MessageScheduleItem/index.d.ts +5 -0
- package/es/modules/message-schedule/components/MessageScheduleItem/index.js +40 -0
- package/es/modules/message-schedule/components/MessageScheduleItem/index.js.map +1 -0
- package/es/modules/message-schedule/components/MessageScheduleItem/index.less +30 -0
- package/es/modules/message-schedule/components/MessageScheduleList/index.d.ts +27 -0
- package/es/modules/message-schedule/components/MessageScheduleList/index.js +93 -0
- package/es/modules/message-schedule/components/MessageScheduleList/index.js.map +1 -0
- package/es/modules/message-schedule/components/MessageScheduleList/index.less +14 -0
- package/es/modules/message-schedule/components/MessageScheduleProperties/index.d.ts +20 -0
- package/es/modules/message-schedule/components/MessageScheduleProperties/index.js +58 -0
- package/es/modules/message-schedule/components/MessageScheduleProperties/index.js.map +1 -0
- package/es/modules/message-schedule/components/MessageSchedulePropertiesView/index.d.ts +6 -0
- package/es/modules/message-schedule/components/MessageSchedulePropertiesView/index.js +15 -0
- package/es/modules/message-schedule/components/MessageSchedulePropertiesView/index.js.map +1 -0
- package/es/modules/message-schedule/components/MessageScheduleQuickViewDialog/index.d.ts +8 -0
- package/es/modules/message-schedule/components/MessageScheduleQuickViewDialog/index.js +13 -0
- package/es/modules/message-schedule/components/MessageScheduleQuickViewDialog/index.js.map +1 -0
- package/es/modules/message-schedule/components/MessageScheduleQuickViewDialog/index.less +7 -0
- package/es/modules/message-schedule/components/MessageScheduleTabs/index.d.ts +6 -0
- package/es/modules/message-schedule/components/MessageScheduleTabs/index.js +52 -0
- package/es/modules/message-schedule/components/MessageScheduleTabs/index.js.map +1 -0
- package/es/modules/message-schedule/components/NewMessageScheduleForm/NewMessageScheduleFormDialog.d.ts +10 -0
- package/es/modules/message-schedule/components/NewMessageScheduleForm/NewMessageScheduleFormDialog.js +14 -0
- package/es/modules/message-schedule/components/NewMessageScheduleForm/NewMessageScheduleFormDialog.js.map +1 -0
- package/es/modules/message-schedule/components/NewMessageScheduleForm/index.d.ts +15 -0
- package/es/modules/message-schedule/components/NewMessageScheduleForm/index.js +62 -0
- package/es/modules/message-schedule/components/NewMessageScheduleForm/index.js.map +1 -0
- package/es/modules/message-schedule/components/NewMessageScheduleForm/index.less +17 -0
- package/es/modules/message-schedule/components/NewMessageScheduleForm/state.d.ts +12 -0
- package/es/modules/message-schedule/components/NewMessageScheduleForm/state.js +32 -0
- package/es/modules/message-schedule/components/NewMessageScheduleForm/state.js.map +1 -0
- package/es/modules/message-schedule/controls/MessageScheduleMenu/index.d.ts +10 -0
- package/es/modules/message-schedule/controls/MessageScheduleMenu/index.js +23 -0
- package/es/modules/message-schedule/controls/MessageScheduleMenu/index.js.map +1 -0
- package/es/modules/message-schedule/pages/MessageScheduleDefaultView/index.d.ts +3 -0
- package/es/modules/message-schedule/pages/MessageScheduleDefaultView/index.js +29 -0
- package/es/modules/message-schedule/pages/MessageScheduleDefaultView/index.js.map +1 -0
- package/es/modules/message-schedule/pages/MessageScheduleDefaultView/index.less +7 -0
- package/es/modules/message-template/components/MessageTemplateProperties/index.js +3 -3
- package/es/modules/message-template/components/MessageTemplateProperties/index.js.map +1 -1
- package/es/modules/message-template/components/MessageTemplatePropertiesView/index.d.ts +0 -1
- package/es/modules/message-template/components/MessageTemplatePropertiesView/index.js +0 -1
- package/es/modules/message-template/components/MessageTemplatePropertiesView/index.js.map +1 -1
- package/es/modules/quick-access/AdvanceFilterForm/index.js +14 -28
- package/es/modules/quick-access/AdvanceFilterForm/index.js.map +1 -1
- package/es/modules/quick-access/AdvanceFilterForm/state.d.ts +0 -1
- package/es/modules/quick-access/AdvanceFilterForm/state.js +2 -12
- package/es/modules/quick-access/AdvanceFilterForm/state.js.map +1 -1
- package/es/obsolete/LibraryDefaultView/LibraryDefaultView2.js +1 -1
- package/es/obsolete/LibraryDefaultView/LibraryDefaultView2.js.map +1 -1
- package/es/obsolete/LibraryDefaultView/index.js +1 -1
- package/es/obsolete/LibraryDefaultView/index.js.map +1 -1
- package/es/pages/Library/LibraryDefaultView/index.js +20 -15
- package/es/pages/Library/LibraryDefaultView/index.js.map +1 -1
- package/es/pages/Library/components/DocumentTree/index.d.ts +2 -2
- package/es/pages/Library/components/DocumentTree/index.js +31 -4
- package/es/pages/Library/components/DocumentTree/index.js.map +1 -1
- package/es/pages/VSubmit/VSubmitDefaultView/index.js +1 -1
- package/es/pages/VSubmit/VSubmitDefaultView/index.js.map +1 -1
- package/es/pages/VSubmit/VSubmitSubmitterView/index.js +1 -1
- package/es/pages/VSubmit/VSubmitSubmitterView/index.js.map +1 -1
- package/es/routes.d.ts +6 -0
- package/es/routes.js +13 -0
- package/es/routes.js.map +1 -1
- package/package.json +1 -1
- package/es/modules/message-template/components/MessageTemplatePropertiesView/index.less +0 -14
- package/es/pages/Library/data/LibraryStore.js.map +0 -1
- package/es/pages/Library/data/hook.js.map +0 -1
- package/es/pages/Library/data/index.js.map +0 -1
- package/es/pages/Library/data/interfaces.js.map +0 -1
- package/es/pages/VSubmit/data/VSubmitStore.js.map +0 -1
- package/es/pages/VSubmit/data/hook.js.map +0 -1
- package/es/pages/VSubmit/data/index.js.map +0 -1
- package/es/pages/VSubmit/data/interfaces.js.map +0 -1
- /package/es/{pages/VSubmit/data → data/action-plan}/interfaces.js +0 -0
- /package/es/{pages/Library/data → data/action-plan-template}/interfaces.js +0 -0
- /package/es/{pages/Library/data → data/library}/LibraryStore.d.ts +0 -0
- /package/es/{pages/Library/data → data/library}/LibraryStore.js +0 -0
- /package/es/{pages/Library/data → data/library}/hook.d.ts +0 -0
- /package/es/{pages/Library/data → data/library}/hook.js +0 -0
- /package/es/{pages/Library/data → data/library}/index.d.ts +0 -0
- /package/es/{pages/Library/data → data/library}/index.js +0 -0
- /package/es/{pages/Library/data → data/library}/interfaces.d.ts +0 -0
- /package/es/{pages/VSubmit/data → data/v-submit}/VSubmitStore.d.ts +0 -0
- /package/es/{pages/VSubmit/data → data/v-submit}/VSubmitStore.js +0 -0
- /package/es/{pages/VSubmit/data → data/v-submit}/hook.d.ts +0 -0
- /package/es/{pages/VSubmit/data → data/v-submit}/hook.js +0 -0
- /package/es/{pages/VSubmit/data → data/v-submit}/index.d.ts +0 -0
- /package/es/{pages/VSubmit/data → data/v-submit}/index.js +0 -0
- /package/es/{pages/VSubmit/data → data/v-submit}/interfaces.d.ts +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Skeleton } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { useMetaStore } from "@voplus/morpho-document-core";
|
|
5
|
+
import { Open } from "../../../../controls/ToolBar/buttons";
|
|
6
|
+
import { useActionPlan } from "../../../../data/action-plan";
|
|
7
|
+
import { ColumnItem, ColumnItemCol } from "@voplus/morpho-ui/es/controls/ColumnItem";
|
|
8
|
+
import ActionPlanQuickViewDialog from "../ActionPlanQuickViewDialog";
|
|
9
|
+
import ActionPlanPropertiesView from "../ActionPlanPropertiesView";
|
|
10
|
+
import ItemFunction from "@voplus/morpho-org/es/controls/ItemFunction";
|
|
11
|
+
import ActionPlanMenu from "../../controls/ActionPlanMenu";
|
|
12
|
+
import ToolBar from "../../../../controls/ToolBar/ToolBar2";
|
|
13
|
+
import classnames from "classnames";
|
|
14
|
+
import styles from "./index.less";
|
|
15
|
+
const ActionPlanItem = (props) => {
|
|
16
|
+
const { id } = props;
|
|
17
|
+
const actionPlan = useActionPlan(id);
|
|
18
|
+
const meta = useMetaStore();
|
|
19
|
+
const [hover, setHover] = useState(false);
|
|
20
|
+
return observe(() => (React.createElement(ItemFunction, { className: styles["action-plan-item"], onMouseOver: () => setHover(true), onMouseLeave: () => setHover(false), propertiesView: React.createElement(ActionPlanPropertiesView, { id: id }), quickViewDialog: (onCancel) => (React.createElement(ActionPlanQuickViewDialog, { id: id, visible: true, onCancel: onCancel })) },
|
|
21
|
+
React.createElement(Skeleton, { paragraph: { rows: 1 }, loading: !actionPlan.loaded },
|
|
22
|
+
React.createElement(ColumnItem, { className: "action-plan-column-item" },
|
|
23
|
+
React.createElement(ColumnItemCol, { span: 10, label: "Name" },
|
|
24
|
+
React.createElement("div", { className: "action-plan-item-name" }, `${actionPlan.name}`)),
|
|
25
|
+
React.createElement(ColumnItemCol, { span: 8 },
|
|
26
|
+
React.createElement(React.Fragment, null)),
|
|
27
|
+
React.createElement(ColumnItemCol, { span: 3 },
|
|
28
|
+
React.createElement(React.Fragment, null)),
|
|
29
|
+
React.createElement(ColumnItemCol, { span: 3, align: "flex-end" },
|
|
30
|
+
React.createElement("div", { className: classnames("action-plan-item-tool", { show: hover }), onClick: (e) => {
|
|
31
|
+
e.stopPropagation();
|
|
32
|
+
setHover(false);
|
|
33
|
+
} },
|
|
34
|
+
React.createElement(ToolBar, { id: id, showMenu: false },
|
|
35
|
+
React.createElement(Open, { size: "middle", url: meta.getRoute(actionPlan) }),
|
|
36
|
+
React.createElement(ActionPlanMenu, { id: id, closeAside: true })))))))));
|
|
37
|
+
};
|
|
38
|
+
export default ActionPlanItem;
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/action-plan/components/ActionPlanItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,OAAO,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
|
|
6
|
+
|
|
7
|
+
&:hover {
|
|
8
|
+
background-color: #f5f8fd;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:global {
|
|
12
|
+
.action-plan-column-item {
|
|
13
|
+
padding: 7px 20px;
|
|
14
|
+
|
|
15
|
+
.action-plan-item-name {
|
|
16
|
+
color: #575757;
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
word-break: break-all;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.action-plan-item-tool {
|
|
22
|
+
display: none;
|
|
23
|
+
|
|
24
|
+
&.show {
|
|
25
|
+
display: block;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IActionPlan } from "../../../../data/action-plan";
|
|
3
|
+
import { FilterOption } from "@voplus/morpho-data";
|
|
4
|
+
export type ActionPlanListProps = {
|
|
5
|
+
parentNodeId: string;
|
|
6
|
+
/** title */
|
|
7
|
+
viewTitle?: React.ReactNode;
|
|
8
|
+
filterOptions?: FilterOption[];
|
|
9
|
+
/** can aside */
|
|
10
|
+
asideable?: boolean;
|
|
11
|
+
/** 头部的显示方式 */
|
|
12
|
+
headerType?: "dashboard" | "tool" | "card";
|
|
13
|
+
/** Call back when received total number of action plan. */
|
|
14
|
+
onTotal?: (total: number) => void;
|
|
15
|
+
/** Call back when an item has been clicked on the list. */
|
|
16
|
+
onClickItem?: (item: IActionPlan) => void;
|
|
17
|
+
};
|
|
18
|
+
declare const ActionPlanList: {
|
|
19
|
+
(props: ActionPlanListProps): React.JSX.Element;
|
|
20
|
+
defaultProps: {
|
|
21
|
+
viewTitle: string;
|
|
22
|
+
asideable: boolean;
|
|
23
|
+
filter: boolean;
|
|
24
|
+
headerType: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default ActionPlanList;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { useRenderOnChange, observe } from "@voplus/morpho-ui";
|
|
3
|
+
import { useActionPlanListEffect } from "../../../../data/action-plan";
|
|
4
|
+
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
|
5
|
+
import { useAutoUpdateListData } from "../../../../data/action-plan/action-plan-events";
|
|
6
|
+
import { useViewLayoutContext } from "@voplus/morpho-ui/es/components/layout/DefaultViewLayout/ViewLayoutContext";
|
|
7
|
+
import { useViewContext } from "@voplus/morpho-document-core/es/data/context/ViewContext";
|
|
8
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
9
|
+
import { faSuitcase } from "@fortawesome/pro-solid-svg-icons";
|
|
10
|
+
import NewActionPlanForm from "../NewActionPlanForm";
|
|
11
|
+
import NewActionPlanFormDialog from "../NewActionPlanForm/NewActionPlanFormDialog";
|
|
12
|
+
import DocumentItemFrame from "../../../../controls/DocumentItemFrame";
|
|
13
|
+
import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView";
|
|
14
|
+
import ActionPlanItem from "../ActionPlanItem";
|
|
15
|
+
import styles from "./index.less";
|
|
16
|
+
const ActionPlanList = (props) => {
|
|
17
|
+
const { viewTitle, headerType, filterOptions, parentNodeId } = props;
|
|
18
|
+
const [add, setAdd] = useState(false);
|
|
19
|
+
const view = useViewContext();
|
|
20
|
+
const layoutContext = useViewLayoutContext();
|
|
21
|
+
const list = useCreateListDataState({
|
|
22
|
+
filterDefaults: {
|
|
23
|
+
filters: filters(),
|
|
24
|
+
},
|
|
25
|
+
}, [filterOptions, parentNodeId]);
|
|
26
|
+
const listHeaderProps = {
|
|
27
|
+
visible: true,
|
|
28
|
+
addAble: true,
|
|
29
|
+
sortable: false,
|
|
30
|
+
searchOptions: { placeholder: "Search in action plan" },
|
|
31
|
+
onAdd: onAdd,
|
|
32
|
+
};
|
|
33
|
+
/** useOnNewDocument, useOnDeleteDocument的sugar syntax 自動更新list. */
|
|
34
|
+
useAutoUpdateListData(list, (d) => true);
|
|
35
|
+
useRenderOnChange(() => list.filters.options);
|
|
36
|
+
/** 把ListDataState传给useActionPlanListEffect,使之可以自動更新loading, hasmore. */
|
|
37
|
+
useActionPlanListEffect(list, (result, total) => {
|
|
38
|
+
var _a;
|
|
39
|
+
list.union(result);
|
|
40
|
+
(_a = props.onTotal) === null || _a === void 0 ? void 0 : _a.call(props, total);
|
|
41
|
+
}, {
|
|
42
|
+
Total: true,
|
|
43
|
+
...list.filters.options,
|
|
44
|
+
});
|
|
45
|
+
return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
|
|
46
|
+
React.createElement(ListView, { asideable: props.asideable, className: styles["action-plan-list"], headerProps: {
|
|
47
|
+
headerToolProps: headerType === "tool" ? listHeaderProps : undefined,
|
|
48
|
+
headDashboardProps: headerType === "dashboard"
|
|
49
|
+
? {
|
|
50
|
+
headerType: "page",
|
|
51
|
+
title: viewTitle,
|
|
52
|
+
avatarIcon: React.createElement(FAIcon, { icon: faSuitcase }),
|
|
53
|
+
description: "Your tasks: prioritize and complete your action plan.",
|
|
54
|
+
listHeaderProps: listHeaderProps,
|
|
55
|
+
}
|
|
56
|
+
: headerType === "card"
|
|
57
|
+
? {
|
|
58
|
+
headerType: "page",
|
|
59
|
+
title: viewTitle,
|
|
60
|
+
className: "page-card",
|
|
61
|
+
listHeaderProps: listHeaderProps,
|
|
62
|
+
}
|
|
63
|
+
: undefined,
|
|
64
|
+
}, renderItem: ({ item, connectDragSource }) => (React.createElement(DocumentItemFrame, { key: item.id, onClick: () => { var _a; return (_a = props.onClickItem) === null || _a === void 0 ? void 0 : _a.call(props, item); } },
|
|
65
|
+
React.createElement(ActionPlanItem, { id: item.id }))) }),
|
|
66
|
+
add && (React.createElement(NewActionPlanFormDialog, { parentNodeId: parentNodeId, onCancel: () => setAdd(false), onSave: () => setAdd(false) })))));
|
|
67
|
+
function filters() {
|
|
68
|
+
let filter = [
|
|
69
|
+
// { c: "ParentNodeId", o: "=", l: "And", v1: parentNodeId }
|
|
70
|
+
];
|
|
71
|
+
if (filterOptions)
|
|
72
|
+
filter = filterOptions;
|
|
73
|
+
return filter;
|
|
74
|
+
}
|
|
75
|
+
function onAdd(asideContext) {
|
|
76
|
+
if ((view === null || view === void 0 ? void 0 : view.Type) === "PropertiesView") {
|
|
77
|
+
setAdd(!add);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement(NewActionPlanForm, { showView: true, parentNodeId: parentNodeId }), {
|
|
81
|
+
span: (layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.asideColSpan) ? layoutContext.asideColSpan : 12,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
ActionPlanList.defaultProps = {
|
|
87
|
+
viewTitle: "Action Plan",
|
|
88
|
+
asideable: true,
|
|
89
|
+
filter: true,
|
|
90
|
+
headerType: "dashboard",
|
|
91
|
+
};
|
|
92
|
+
export default ActionPlanList;
|
|
93
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/action-plan/components/ActionPlanList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAe,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4EAA4E,CAAC;AAClH,OAAO,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAC1F,OAAO,EAAE,e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ACD,GAAG,IAAI,CACP,oBAAC,uBAAuB,IACvB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAC7B,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAC1B,CACF,CACyB,CAC3B,CAAC,CAAC;IAEH,SAAS,OAAO;QACf,IAAI,MAAM,GAAmB;QAC5B,4DAA4D;SAC5D,CAAC;QAEF,IAAI,aAAa;YAAE,MAAM,GAAG,aAAa,CAAC;QAE1C,OAAO,MAAM,CAAC;IACf,CAAC;IAED,SAAS,KAAK,CAAC,YAA0B;QACxC,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,MAAK,gBAAgB,EAAE,CAAC;YACrC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QACd,CAAC;aAAM,CAAC;YACP,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,oBAAC,iBAAiB,IAAC,QAAQ,QAAC,YAAY,EAAE,YAAY,GAAI,EAAE;gBACnF,IAAI,EAAE,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,YAAY,EAAC,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE;aACnE,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,cAAc,CAAC,YAAY,GAAG;IAC7B,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,WAAW;CACvB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ActionPlanPropertiesName = "ActionPlan";
|
|
3
|
+
declare const ActionPlanProperties: {
|
|
4
|
+
(props: {
|
|
5
|
+
id: string;
|
|
6
|
+
headerVisible?: boolean;
|
|
7
|
+
actionPlanTitle?: string;
|
|
8
|
+
actionPlanProperties?: {
|
|
9
|
+
name: ActionPlanPropertiesName;
|
|
10
|
+
visible?: boolean;
|
|
11
|
+
}[];
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
defaultProps: {
|
|
14
|
+
actionPlanTitle: string;
|
|
15
|
+
actionPlanProperties: {
|
|
16
|
+
name: string;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default ActionPlanProperties;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import { Scrollbars } from "react-custom-scrollbars-2";
|
|
4
|
+
import { faEllipsisVertical } from "@fortawesome/pro-light-svg-icons";
|
|
5
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
6
|
+
import { useActionPlan, useActionPlanStore } from "../../../../data/action-plan";
|
|
7
|
+
import PropertiesSection from "@voplus/morpho-ui/es/controls/PropertiesSection";
|
|
8
|
+
import ActionPlanMenu from "../../controls/ActionPlanMenu";
|
|
9
|
+
import ToolBar from "../../../../controls/ToolBar/ToolBar2";
|
|
10
|
+
import Prop from "@voplus/morpho-ui/es/controls/Prop";
|
|
11
|
+
const ActionPlanProperties = (props) => {
|
|
12
|
+
/** 加class name 为了方便做integration tests */
|
|
13
|
+
const classId = "action-plan-properties";
|
|
14
|
+
const { id, headerVisible, actionPlanTitle, actionPlanProperties } = props;
|
|
15
|
+
const actionPlan = useActionPlan(id);
|
|
16
|
+
const store = useActionPlanStore();
|
|
17
|
+
return observe(() => {
|
|
18
|
+
const filterPro = actionPlanProperties === null || actionPlanProperties === void 0 ? void 0 : actionPlanProperties.filter((i) => (i === null || i === void 0 ? void 0 : i.visible) !== false);
|
|
19
|
+
return (React.createElement("div", { className: "properties-list" },
|
|
20
|
+
headerVisible && (React.createElement("div", { className: "properties-header" },
|
|
21
|
+
React.createElement("div", { className: "title" }, actionPlan === null || actionPlan === void 0 ? void 0 : actionPlan.name),
|
|
22
|
+
React.createElement(ToolBar, { id: id, showMenu: false },
|
|
23
|
+
React.createElement(ActionPlanMenu, { id: id, icon: React.createElement(FAIcon, { icon: faEllipsisVertical }) })))),
|
|
24
|
+
React.createElement(Scrollbars, { autoHide: true },
|
|
25
|
+
React.createElement(PropertiesSection, { title: actionPlanTitle, properties: () => filterPro === null || filterPro === void 0 ? void 0 : filterPro.map((i) => (React.createElement(Prop, { key: i.name, label: i.name, className: `${classId}-${i.name}` }, renderProp(i)))) }))));
|
|
26
|
+
});
|
|
27
|
+
function renderProp(item) {
|
|
28
|
+
switch (item.name) {
|
|
29
|
+
case "ActionPlan":
|
|
30
|
+
return React.createElement("span", { className: "add-info-style" }, "\u6682\u65E0\u5185\u5BB9(\u5360\u4F4D)");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
ActionPlanProperties.defaultProps = {
|
|
35
|
+
actionPlanTitle: "ACTION PLAN PROPERTIES",
|
|
36
|
+
actionPlanProperties: [{ name: "ActionPlan" }],
|
|
37
|
+
};
|
|
38
|
+
export default ActionPlanProperties;
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/action-plan/components/ActionPlanProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,iBAAiB,MAAM,iDAAiD,CAAC;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I,IAAC,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,OAAO,IAAI,CAAC,CAAC,IAAI,EAAE,IACjE,UAAU,CAAC,CAAC,CAAC,CACR,CACP,CAAC,GAEF,CACU,CACR,CACN,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,SAAS,UAAU,CAAC,IAA2D;QAC9E,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,YAAY;gBAChB,OAAO,8BAAM,SAAS,EAAC,gBAAgB,6CAAgB,CAAC;QAC1D,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,oBAAoB,CAAC,YAAY,GAAG;IACnC,eAAe,EAAE,wBAAwB;IACzC,oBAAoB,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;CAC9C,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
import { ViewContext, ViewContextData, } from "@voplus/morpho-document-core/es/data/context/ViewContext";
|
|
3
|
+
import ActionPlanHeader from "../ActionPlanHeader";
|
|
4
|
+
import ActionPlanTabs from "../ActionPlanTabs";
|
|
5
|
+
import { observe } from "@voplus/morpho-ui";
|
|
6
|
+
const ActionPlanPropertiesView = (props) => {
|
|
7
|
+
const id = props.id;
|
|
8
|
+
const view = useMemo(() => new ViewContextData("PropertiesView"), []);
|
|
9
|
+
return observe(() => (React.createElement(ViewContext.Provider, { value: view },
|
|
10
|
+
React.createElement("div", { className: "module-detail-view action-plan-properties-view" },
|
|
11
|
+
React.createElement(ActionPlanHeader, { id: id, close: true }),
|
|
12
|
+
React.createElement(ActionPlanTabs, { id: id, properties: true })))));
|
|
13
|
+
};
|
|
14
|
+
export default ActionPlanPropertiesView;
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/action-plan/components/ActionPlanPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EACN,WAAW,EACX,eAAe,GACf,MAAM,0DAA0D,CAAC;AAClE,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,wBAAwB,GAAG,CAAC,KAAwC,EAAE,EAAE;IAC7E,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;IACpB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEtE,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI;QAChC,6BAAK,SAAS,EAAC,gDAAgD;YAC9D,oBAAC,gBAAgB,IAAC,EAAE,EAAE,EAAE,EAAE,KAAK,SAAG;YAClC,oBAAC,cAAc,IAAC,EAAE,EAAE,EAAE,EAAE,UAAU,SAAG,CAChC,CACgB,CACvB,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import ActionPlanHeader from "../ActionPlanHeader";
|
|
4
|
+
import ActionPlanProperties from "../ActionPlanProperties";
|
|
5
|
+
import QuickViewDialog from "../../../../controls/QuickViewDialog";
|
|
6
|
+
import "./index.less";
|
|
7
|
+
const ActionPlanQuickViewDialog = (props) => {
|
|
8
|
+
const { id } = props;
|
|
9
|
+
return observe(() => (React.createElement(QuickViewDialog, { ...props, className: "action-plan-quick-view", header: React.createElement(ActionPlanHeader, { id: id }), subButtons: [{ name: "Document" }, { name: "Activities" }] },
|
|
10
|
+
React.createElement(ActionPlanProperties, { id: id }))));
|
|
11
|
+
};
|
|
12
|
+
export default ActionPlanQuickViewDialog;
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/action-plan/components/ActionPlanQuickViewDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3D,OAAO,eAAe,MAAM,sCAAsC,CAAC;AACnE,OAAO,cAAc,CAAC;AAEtB,MAAM,yBAAyB,GAAG,CAAC,KAIlC,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IAErB,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,eAAe,OACX,KAAK,EACT,SAAS,EAAC,wBAAwB,EAClC,MAAM,EAAE,oBAAC,gBAAgB,IAAC,EAAE,EAAE,EAAE,GAAI,EACpC,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;QAE1D,oBAAC,oBAAoB,IAAC,EAAE,EAAE,EAAE,GAAI,CACf,CAClB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Badge } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { useDocumentListEffect } from "@voplus/morpho-document-core";
|
|
5
|
+
import ActivityLog from "@voplus/morpho-org/es/components/ActivityLog2/ActivityLog2";
|
|
6
|
+
import MessageScheduleList from "../../../message-schedule/components/MessageScheduleList";
|
|
7
|
+
import DocumentList from "../../../../components/DocumentList";
|
|
8
|
+
import DocumentTabs from "../../../../components/DocumentTabs";
|
|
9
|
+
import ActionPlanProperties from "../ActionPlanProperties";
|
|
10
|
+
const ActionPlanTabs = (props) => {
|
|
11
|
+
const { id, properties } = props;
|
|
12
|
+
const [docTotals, setDocTotals] = useState(0);
|
|
13
|
+
const [activeKey, setActiveKey] = useState();
|
|
14
|
+
useDocumentListEffect(null, (result, total) => setDocTotals(total || 0), {
|
|
15
|
+
Total: true,
|
|
16
|
+
List: false,
|
|
17
|
+
Filters: [{ c: "ParentNodeId", o: "=", l: "And", v1: id }],
|
|
18
|
+
});
|
|
19
|
+
return observe(() => {
|
|
20
|
+
let items = [
|
|
21
|
+
{
|
|
22
|
+
key: "MessageSchedule",
|
|
23
|
+
label: "Message Schedule",
|
|
24
|
+
children: React.createElement(MessageScheduleList, { parentNodeId: id, headerType: "tool" }),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
key: "Document",
|
|
28
|
+
label: (React.createElement(React.Fragment, null,
|
|
29
|
+
"Document",
|
|
30
|
+
React.createElement(Badge, { count: docTotals, className: "margin-left-10" }))),
|
|
31
|
+
children: (React.createElement(DocumentList, { id: id, multiple: true, viewTitle: false, total: false, exclude: ["Task"] })),
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
key: "Activities",
|
|
35
|
+
label: "Activities",
|
|
36
|
+
children: React.createElement(React.Fragment, null, activeKey === "Activities" ? React.createElement(ActivityLog, { id: id, title: " " }) : null),
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
properties &&
|
|
40
|
+
items.unshift({
|
|
41
|
+
key: "Properties",
|
|
42
|
+
label: "Properties",
|
|
43
|
+
children: React.createElement(ActionPlanProperties, { id: id }),
|
|
44
|
+
});
|
|
45
|
+
return (React.createElement(DocumentTabs, { id: id, active: properties ? "Properties" : "MessageSchedule", tabItems: items, onChange: (key) => setActiveKey(key) }));
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
export default ActionPlanTabs;
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/action-plan/components/ActionPlanTabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,WAAW,MAAM,4DAA4D,CAAC;AACrF,OAAO,mBAAmB,MAAM,0DAA0D,CAAC;AAC3F,OAAO,YAAY,MAAM,qCAAqC,CAAC;AAC/D,OAAO,YAAY,MAAM,qCAAqC,CAAC;AAC/D,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAE3D,MAAM,cAAc,GAAG,CAAC,KAA2C,EAAE,EAAE;IACtE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAEjC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAU,CAAC;IAErD,qBAAqB,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE;QACxE,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,C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;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { NewActionPlanFormProps } from "./index";
|
|
3
|
+
declare const NewActionPlanFormDialog: {
|
|
4
|
+
(props: NewActionPlanFormProps): React.JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
openMode: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default NewActionPlanFormDialog;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Modal } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import NewActionPlanForm from "./index";
|
|
5
|
+
const NewActionPlanFormDialog = (props) => {
|
|
6
|
+
return observe(() => (React.createElement(Modal, { title: "New Action Plan Form Dialog", open: true, closable: false, footer: false, onCancel: props.onCancel },
|
|
7
|
+
React.createElement(NewActionPlanForm, { ...props }))));
|
|
8
|
+
};
|
|
9
|
+
NewActionPlanFormDialog.defaultProps = {
|
|
10
|
+
openMode: "openDialog",
|
|
11
|
+
};
|
|
12
|
+
export default NewActionPlanFormDialog;
|
|
13
|
+
//# sourceMappingURL=NewActionPlanFormDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewActionPlanFormDialog.js","sourceRoot":"","sources":["../../../../../src/modules/action-plan/components/NewActionPlanForm/NewActionPlanFormDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,iBAA6C,MAAM,SAAS,CAAC;AAEpE,MAAM,uBAAuB,GAAG,CAAC,KAA6B,EAAE,EAAE;IACjE,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,KAAK,IACL,KAAK,EAAC,6BAA6B,EACnC,IAAI,QACJ,QAAQ,EAAE,KAAK,EACf,MAAM,EAAE,KAAK,EACb,QAAQ,EAAE,KAAK,CAAC,QAAQ;QAExB,oBAAC,iBAAiB,OAAK,KAAK,GAAI,CACzB,CACR,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,uBAAuB,CAAC,YAAY,GAAG;IACtC,QAAQ,EAAE,YAAY;CACtB,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type NewActionPlanFormProps = {
|
|
3
|
+
parentNodeId: string;
|
|
4
|
+
openMode?: "openAside" | "openDialog";
|
|
5
|
+
showView?: boolean;
|
|
6
|
+
onCancel?: () => void;
|
|
7
|
+
onSave?: (params?: any) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const NewActionPlanForm: {
|
|
10
|
+
(props: NewActionPlanFormProps): React.JSX.Element;
|
|
11
|
+
defaultProps: {
|
|
12
|
+
openMode: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default NewActionPlanForm;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { State } from "./state";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { Button, Form, Row, Space, Input, message } from "antd";
|
|
5
|
+
import { useAsideContentContext } from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
|
6
|
+
import { useViewLayoutContext } from "@voplus/morpho-ui/es/components/layout/DefaultViewLayout/ViewLayoutContext";
|
|
7
|
+
import { useActionPlanStore } from "../../../../data/action-plan";
|
|
8
|
+
import ActionPlanPropertiesView from "../ActionPlanPropertiesView";
|
|
9
|
+
import AddFormView from "@voplus/morpho-ui/es/controls/AddFormView";
|
|
10
|
+
import classnames from "classnames";
|
|
11
|
+
import styles from "./index.less";
|
|
12
|
+
const NewActionPlanForm = (props) => {
|
|
13
|
+
const { openMode } = props;
|
|
14
|
+
const [state] = useState(new State(props.parentNodeId));
|
|
15
|
+
const [form] = Form.useForm();
|
|
16
|
+
const [loading, setLoading] = useState(false);
|
|
17
|
+
const asideContext = useAsideContentContext();
|
|
18
|
+
const layoutContext = useViewLayoutContext();
|
|
19
|
+
const store = useActionPlanStore();
|
|
20
|
+
const content = observe(() => (React.createElement("div", { className: classnames(styles["new-action-plan-form"]) },
|
|
21
|
+
React.createElement(Form, { form: form, layout: "vertical" },
|
|
22
|
+
React.createElement(Form.Item, { label: "Name" },
|
|
23
|
+
React.createElement(Input, { onChange: (e) => (state.params.Name = e.target.value) })),
|
|
24
|
+
openMode === "openDialog" && (React.createElement(Form.Item, { className: "from-footer" },
|
|
25
|
+
React.createElement(Row, { justify: "end" },
|
|
26
|
+
React.createElement(Space, null,
|
|
27
|
+
React.createElement(Button, { onClick: onCancel }, "Cancel"),
|
|
28
|
+
React.createElement(Button, { type: "primary", htmlType: "submit", onClick: onSubmit, loading: loading }, "Submit")))))))));
|
|
29
|
+
return observe(() => (React.createElement(React.Fragment, null, openMode === "openDialog" ? (content) : (React.createElement(AddFormView, { title: "Add Action Plan Form", loading: loading, onCancel: onCancel, onSubmit: onSubmit }, content)))));
|
|
30
|
+
async function onSubmit() {
|
|
31
|
+
var _a;
|
|
32
|
+
if (!state.params.Name) {
|
|
33
|
+
message.warning("Name is required");
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
setLoading(true);
|
|
37
|
+
const res = await store.create({
|
|
38
|
+
data: state.params,
|
|
39
|
+
error: (error) => message.error(error.message),
|
|
40
|
+
});
|
|
41
|
+
setLoading(false);
|
|
42
|
+
(_a = props.onSave) === null || _a === void 0 ? void 0 : _a.call(props, state.params);
|
|
43
|
+
if (props.showView && res) {
|
|
44
|
+
asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement(ActionPlanPropertiesView, { id: res.id }), {
|
|
45
|
+
span: (layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.asideColSpan) ? layoutContext.asideColSpan : 12,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function onCancel() {
|
|
50
|
+
var _a;
|
|
51
|
+
asideContext === null || asideContext === void 0 ? void 0 : asideContext.closeAside();
|
|
52
|
+
(_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
NewActionPlanForm.defaultProps = {
|
|
56
|
+
openMode: "openAside",
|
|
57
|
+
};
|
|
58
|
+
export default NewActionPlanForm;
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/action-plan/components/NewActionPlanForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,4EAA4E,CAAC;AAClH,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AACnE,OAAO,WAAW,MAAM,2CAA2C,CAAC;AACpE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,MAAM,MAAM,cAAc,CAAC;AAUlC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAE,EAAE;IAC3D,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE3B,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,I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C,QAAQ,EAAE,WAAW;CACrB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { makeObservable, observable } from "mobx";
|
|
3
|
+
export class State {
|
|
4
|
+
constructor(parentId) {
|
|
5
|
+
Object.defineProperty(this, "parentId", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true,
|
|
9
|
+
value: parentId
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(this, "Params", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: {
|
|
16
|
+
ParentNodeId: this.parentId,
|
|
17
|
+
Name: "",
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(this, "params", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
configurable: true,
|
|
23
|
+
writable: true,
|
|
24
|
+
value: this.Params
|
|
25
|
+
});
|
|
26
|
+
makeObservable(this);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
__decorate([
|
|
30
|
+
observable
|
|
31
|
+
], State.prototype, "params", void 0);
|
|
32
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/action-plan/components/NewActionPlanForm/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClD,MAAM,OAAO,KAAK;IACjB,YAA2B,QAAgB;QAAxB;;;;mBAAQ,QAAQ;WAAQ;QAGpC;;;;mBAAS;gBACf,YAAY,EAAE,IAAI,CAAC,QAAQ;gBAC3B,IAAI,EAAE,EAAE;aACR;WAAC;QAEiB;;;;mBAAS,IAAI,CAAC,MAAM;WAAC;QAPvC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;CAOD;AADmB;IAAlB,UAAU;qCAA6B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const ActionPlanMenu: (props: {
|
|
3
|
+
id: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
closeAside?: boolean;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
/** 是否是在 defaultView 内显示, defaultView 内有显示 menu button的,menu items里不需要重复显示 */
|
|
8
|
+
blankMenu?: string[];
|
|
9
|
+
}) => React.JSX.Element;
|
|
10
|
+
export default ActionPlanMenu;
|