@voplus/morpho-workspace 1.3.1 → 1.3.3
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/data/notification/interfaces.d.ts +2 -1
- package/es/data/work/WorkStore.d.ts +12 -0
- package/es/data/work/WorkStore.js +21 -0
- package/es/data/work/WorkStore.js.map +1 -1
- package/es/data/work/interfaces.d.ts +17 -1
- package/es/data/workerror/types.d.ts +4 -0
- package/es/data/worktype/WorkTypeStore.d.ts +6 -0
- package/es/data/worktype/WorkTypeStore.js +22 -0
- package/es/data/worktype/WorkTypeStore.js.map +1 -1
- package/es/data/worktype/worktype-events/index.d.ts +3 -0
- package/es/data/worktype/worktype-events/index.js +4 -0
- package/es/data/worktype/worktype-events/index.js.map +1 -0
- package/es/data/worktype/worktype-events/useAutoUpdateListData.d.ts +4 -0
- package/es/data/worktype/worktype-events/useAutoUpdateListData.js +15 -0
- package/es/data/worktype/worktype-events/useAutoUpdateListData.js.map +1 -0
- package/es/data/worktype/worktype-events/useOnDeleteWorkType.d.ts +4 -0
- package/es/data/worktype/worktype-events/useOnDeleteWorkType.js +16 -0
- package/es/data/worktype/worktype-events/useOnDeleteWorkType.js.map +1 -0
- package/es/data/worktype/worktype-events/useOnNewWorkType.d.ts +4 -0
- package/es/data/worktype/worktype-events/useOnNewWorkType.js +17 -0
- package/es/data/worktype/worktype-events/useOnNewWorkType.js.map +1 -0
- package/es/modules/notification/components/{MentionNotificationCard → DocumentNotificationCard}/index.d.ts +2 -2
- package/es/modules/notification/components/{MentionNotificationCard → DocumentNotificationCard}/index.js +3 -3
- package/es/modules/notification/components/DocumentNotificationCard/index.js.map +1 -0
- package/es/modules/notification/components/NotificationList/index.js +2 -2
- package/es/modules/notification/components/NotificationList/index.js.map +1 -1
- package/es/modules/work/components/NewWorkForm/index.d.ts +10 -0
- package/es/modules/work/components/NewWorkForm/index.js +60 -0
- package/es/modules/work/components/NewWorkForm/index.js.map +1 -0
- package/es/modules/work/components/NewWorkForm/index.less +17 -0
- package/es/modules/work/components/SubWorkList/index.d.ts +4 -0
- package/es/modules/work/components/SubWorkList/index.js +42 -0
- package/es/modules/work/components/SubWorkList/index.js.map +1 -0
- package/es/modules/work/components/SubWorkList/index.less +7 -0
- package/es/modules/work/components/WorkErrorList/index.js +0 -1
- package/es/modules/work/components/WorkErrorList/index.js.map +1 -1
- package/es/modules/work/components/WorkItem/index.d.ts +1 -3
- package/es/modules/work/components/WorkItem/index.js +20 -4
- package/es/modules/work/components/WorkItem/index.js.map +1 -1
- package/es/modules/work/components/WorkItem/index.less +11 -0
- package/es/modules/work/components/WorkList/index.d.ts +3 -1
- package/es/modules/work/components/WorkList/index.js +35 -11
- package/es/modules/work/components/WorkList/index.js.map +1 -1
- package/es/modules/work/components/WorkPropertiesView/index.js +8 -2
- package/es/modules/work/components/WorkPropertiesView/index.js.map +1 -1
- package/es/modules/work/components/WorkTabs/index.js +10 -1
- package/es/modules/work/components/WorkTabs/index.js.map +1 -1
- package/es/modules/work/components/WorksProperties/index.js +4 -2
- package/es/modules/work/components/WorksProperties/index.js.map +1 -1
- package/es/modules/work/controls/WorkMenu/Accept.d.ts +8 -0
- package/es/modules/work/controls/WorkMenu/Accept.js +31 -0
- package/es/modules/work/controls/WorkMenu/Accept.js.map +1 -0
- package/es/modules/work/controls/WorkMenu/Reject.d.ts +8 -0
- package/es/modules/work/controls/WorkMenu/Reject.js +31 -0
- package/es/modules/work/controls/WorkMenu/Reject.js.map +1 -0
- package/es/modules/work/controls/WorkMenu/Send.d.ts +8 -0
- package/es/modules/work/controls/WorkMenu/Send.js +31 -0
- package/es/modules/work/controls/WorkMenu/Send.js.map +1 -0
- package/es/modules/work/controls/WorkMenu/index.d.ts +7 -0
- package/es/modules/work/controls/WorkMenu/index.js +27 -0
- package/es/modules/work/controls/WorkMenu/index.js.map +1 -0
- package/es/modules/work/pages/WorkDefaultView/index.less +1 -2
- package/es/modules/workspace/components/WorkspaceCardList/index.js +0 -1
- package/es/modules/workspace/components/WorkspaceCardList/index.js.map +1 -1
- package/es/modules/workspace/components/WorkspacePropertiesView/index.js +11 -5
- package/es/modules/workspace/components/WorkspacePropertiesView/index.js.map +1 -1
- package/es/modules/workspace/components/WorkspaceTabs/index.d.ts +5 -0
- package/es/modules/workspace/components/WorkspaceTabs/index.js +26 -0
- package/es/modules/workspace/components/WorkspaceTabs/index.js.map +1 -0
- package/es/modules/workspace/pages/WorkspaceDefaultView/index.js +1 -1
- package/es/modules/workspace/pages/WorkspaceDefaultView/index.js.map +1 -1
- package/es/modules/workspace/pages/WorkspacePage/index.js +1 -1
- package/es/modules/workspace/pages/WorkspacePage/index.js.map +1 -1
- package/es/modules/worktype/components/NewTypeForm/index.d.ts +10 -0
- package/es/modules/worktype/components/NewTypeForm/index.js +44 -0
- package/es/modules/worktype/components/NewTypeForm/index.js.map +1 -0
- package/es/modules/worktype/components/NewTypeForm/index.less +5 -0
- package/es/modules/worktype/components/NewTypeForm/state.d.ts +11 -0
- package/es/modules/worktype/components/NewTypeForm/state.js +41 -0
- package/es/modules/worktype/components/NewTypeForm/state.js.map +1 -0
- package/es/modules/worktype/components/WorkTypeCardList/index.d.ts +4 -11
- package/es/modules/worktype/components/WorkTypeCardList/index.js +3 -17
- package/es/modules/worktype/components/WorkTypeCardList/index.js.map +1 -1
- package/es/modules/worktype/components/WorkTypeCardList/index.less +7 -9
- package/es/modules/worktype/components/WorkTypeItem/index.d.ts +1 -1
- package/es/modules/worktype/components/WorkTypeItem/index.js +14 -2
- package/es/modules/worktype/components/WorkTypeItem/index.js.map +1 -1
- package/es/modules/worktype/components/WorkTypeItem/index.less +13 -0
- package/es/modules/worktype/components/WorkTypeList/index.d.ts +9 -0
- package/es/modules/worktype/components/WorkTypeList/index.js +44 -0
- package/es/modules/worktype/components/WorkTypeList/index.js.map +1 -0
- package/es/modules/worktype/components/WorkTypeProperties/index.js +19 -20
- package/es/modules/worktype/components/WorkTypeProperties/index.js.map +1 -1
- package/es/modules/worktype/components/WorkTypeProperties/state.d.ts +2 -3
- package/es/modules/worktype/components/WorkTypeProperties/state.js +7 -15
- package/es/modules/worktype/components/WorkTypeProperties/state.js.map +1 -1
- package/es/modules/worktype/components/WorkTypePropertiesView/index.js +13 -8
- package/es/modules/worktype/components/WorkTypePropertiesView/index.js.map +1 -1
- package/es/modules/worktype/components/WorkTypeQA/index.js +37 -36
- package/es/modules/worktype/components/WorkTypeQA/index.js.map +1 -1
- package/es/modules/worktype/components/WorkTypeQA/index.less +8 -1
- package/es/modules/worktype/components/WorkTypeTabs/index.js +1 -1
- package/es/modules/worktype/components/WorkTypeTabs/index.js.map +1 -1
- package/es/modules/worktype/controls/ToolBar/index.d.ts +10 -0
- package/es/modules/worktype/controls/ToolBar/index.js +20 -0
- package/es/modules/worktype/controls/ToolBar/index.js.map +1 -0
- package/es/modules/worktype/controls/ToolBar/index.less +55 -0
- package/es/modules/worktype/controls/ToolBar/state.d.ts +36 -0
- package/es/modules/worktype/controls/ToolBar/state.js +57 -0
- package/es/modules/worktype/controls/ToolBar/state.js.map +1 -0
- package/es/modules/worktype/controls/WorkTypeMenu/index.d.ts +14 -0
- package/es/modules/worktype/controls/WorkTypeMenu/index.js +26 -0
- package/es/modules/worktype/controls/WorkTypeMenu/index.js.map +1 -0
- package/es/modules/worktype/controls/WorkTypeMenu/index.less +0 -0
- package/es/modules/worktype/pages/WorkTypeDefaultView/index.less +4 -3
- package/es/pages/Space/components/Tasks/index.d.ts +2 -2
- package/es/pages/Space/components/Tasks/index.js +50 -11
- package/es/pages/Space/components/Tasks/index.js.map +1 -1
- package/es/pages/Space/components/Works/index.d.ts +2 -2
- package/es/pages/Space/components/Works/index.js +13 -37
- package/es/pages/Space/components/Works/index.js.map +1 -1
- package/es/pages/Space/pages/MySpace/index.js +43 -12
- package/es/pages/Space/pages/MySpace/index.js.map +1 -1
- package/es/pages/Space/pages/MySpace/state.d.ts +27 -6
- package/es/pages/Space/pages/MySpace/state.js +114 -24
- package/es/pages/Space/pages/MySpace/state.js.map +1 -1
- package/package.json +1 -1
- package/es/modules/notification/components/MentionNotificationCard/index.js.map +0 -1
- /package/es/modules/notification/components/{MentionNotificationCard → DocumentNotificationCard}/index.less +0 -0
@@ -1,24 +1,40 @@
|
|
1
1
|
import "./index.less";
|
2
2
|
import { CommentDataIcon, DateQuickIcon, DocumentDataIcon, UserQuickIcon, } from "@voplus/morpho-document/es/controls/data-icons";
|
3
|
-
import React from "react";
|
3
|
+
import React, { useState } from "react";
|
4
4
|
import DataIconBar from "@voplus/morpho-document/es/controls/DataIconBar";
|
5
5
|
import DocumentHeader from "@voplus/morpho-document/es/components/DocumentHeader";
|
6
|
+
import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
7
|
+
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
6
8
|
import { Tooltip } from "@voplus/antd";
|
9
|
+
import WorkMenu from "../../controls/WorkMenu";
|
10
|
+
import classnames from "classnames";
|
7
11
|
import { observe } from "@voplus/morpho-ui";
|
12
|
+
import { useMetaStore } from "@voplus/morpho-document";
|
8
13
|
import { useWork } from "../../../../data/work";
|
9
14
|
const WorkItem = (props) => {
|
10
|
-
const { id, reload } = props;
|
15
|
+
const { id, reload, toolsVisible } = props;
|
16
|
+
const [hover, setHover] = useState(false);
|
17
|
+
const meta = useMetaStore();
|
11
18
|
const work = useWork(id, { reload: !!reload });
|
12
19
|
return observe(() => {
|
13
20
|
var _a;
|
14
|
-
return (React.createElement(DocumentHeader, { id: work.id, quickDataBarAlign: "left", preVisible: false, flagVisible: false, toolsVisible:
|
21
|
+
return (React.createElement(DocumentHeader, { id: work.id, quickDataBarAlign: "left", preVisible: false, flagVisible: false, toolsVisible: toolsVisible, tagsVisible: !!((_a = work.tags) === null || _a === void 0 ? void 0 : _a.length), className: "default-work-item", onMouse: (over) => (setHover(over)), quickDataBar: React.createElement(React.Fragment, null,
|
15
22
|
React.createElement(DataIconBar, null,
|
16
23
|
React.createElement(DateQuickIcon, { id: id }),
|
17
24
|
React.createElement(DocumentDataIcon, { id: id }),
|
18
25
|
React.createElement(CommentDataIcon, { id: id }),
|
19
26
|
React.createElement(UserQuickIcon, { id: id }),
|
20
27
|
React.createElement(Tooltip, { title: "Work Status" },
|
21
|
-
React.createElement("span", { className: "data-icon" }, work.
|
28
|
+
React.createElement("span", { className: "data-icon" }, work.workStatus)))), tools: React.createElement("div", { className: classnames("hover-operate-icon", {
|
29
|
+
show: hover,
|
30
|
+
}) },
|
31
|
+
React.createElement(ToolBar, { id: id, moreProps: {
|
32
|
+
buttonProps: { size: "middle" },
|
33
|
+
menus: {
|
34
|
+
default: React.createElement(WorkMenu, { id: id })
|
35
|
+
}
|
36
|
+
} },
|
37
|
+
React.createElement(Open, { size: "middle", url: `/work/${id}` }))) }));
|
22
38
|
});
|
23
39
|
};
|
24
40
|
export default WorkItem;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EACN,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,GACb,MAAM,gDAAgD,CAAC;AACxD,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EACN,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,GACb,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,WAAW,MAAM,iDAAiD,CAAC;AAC1E,OAAO,cAAc,MAAM,sDAAsD,CAAC;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAC3E,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc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AE,EAAE,EAAE,GAAI;oBACzB,oBAAC,OAAO,IAAC,KAAK,EAAC,aAAa;wBAC3B,8BAAM,SAAS,EAAC,WAAW,IACzB,IAAI,CAAC,UAAU,CACV,CACE,CACG,CACE,EAElB,KAAK,EACJ,6BACC,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE;oBAC3C,IAAI,EAAE,KAAK;iBACX,CAAC;gBAEF,oBAAC,OAAO,IACP,EAAE,EAAE,EAAE,EACN,SAAS,EAAE;wBACV,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC/B,KAAK,EAAE;4BACN,OAAO,EAAE,oBAAC,QAAQ,IAAC,EAAE,EAAE,EAAE,GAAI;yBAC7B;qBACD;oBAED,oBAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,SAAS,EAAE,EAAE,GAAI,CACjC,CACL,GAEN,CACF,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
@@ -3,7 +3,9 @@ import "./index.less";
|
|
3
3
|
import { IWork } from "../../../../data/work";
|
4
4
|
declare const WorkList: (props: {
|
5
5
|
/** status of works shown on the list. */
|
6
|
-
status
|
6
|
+
status?: string | undefined;
|
7
|
+
/** dueDate of works shown on the list. */
|
8
|
+
dueDate?: string | undefined;
|
7
9
|
/** The current active item */
|
8
10
|
active?: string | undefined;
|
9
11
|
/** Call back when an item has been clicked on the list. */
|
@@ -5,19 +5,22 @@ import React, { useState } from "react";
|
|
5
5
|
import { useAutoUpdateListData, useDocumentStore } from "@voplus/morpho-document-core";
|
6
6
|
import DocumentItemFrame from "@voplus/morpho-document/es/controls/DocumentItemFrame";
|
7
7
|
import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView2";
|
8
|
+
import NewWorkForm from "../NewWorkForm";
|
8
9
|
import S from "string";
|
9
10
|
import WorkItem from '../WorkItem';
|
10
11
|
import WorkPropertiesView from '../WorkPropertiesView';
|
12
|
+
import moment from "moment";
|
11
13
|
import { observe } from "@voplus/morpho-ui";
|
12
14
|
import { useRenderOnChange } from "@voplus/morpho-ui";
|
13
15
|
const WorkList = (props) => {
|
16
|
+
const { dueDate } = props;
|
14
17
|
const [activeId, setActiveId] = useState("");
|
15
18
|
const documentStore = useDocumentStore();
|
16
19
|
const list = useCreateListDataState({
|
17
20
|
filterDefaults: { filters: filters() }
|
18
|
-
}, [props.status]);
|
21
|
+
}, [props.status, dueDate]);
|
19
22
|
/** useOnNewDocument, useOnDeleteDocument的sugar syntax 自動更新list. */
|
20
|
-
useAutoUpdateListData(list, (d) => d.type === "Work"
|
23
|
+
useAutoUpdateListData(list, (d) => d.type === "Work");
|
21
24
|
useRenderOnChange(() => list.filters.options);
|
22
25
|
/** 把ListDataState传给useWorkListEffect,使之可以自動更新loading, hasmore. */
|
23
26
|
useWorkListEffect(list, (result, total) => {
|
@@ -31,9 +34,8 @@ const WorkList = (props) => {
|
|
31
34
|
return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
|
32
35
|
React.createElement(ListView, { headerProps: {
|
33
36
|
viewTitle: "My Works",
|
34
|
-
addAble: false,
|
35
37
|
sortable: false
|
36
|
-
}, className: "work-list", propertiesView: (id) => React.createElement(WorkPropertiesView, { id: id }), moveAfter: moveAfter, renderItem: ({ item, connectDragSource }) => (React.createElement(React.Fragment, null,
|
38
|
+
}, className: "work-list", propertiesView: (id) => React.createElement(WorkPropertiesView, { id: id }), moveAfter: moveAfter, formViewTitle: "Add Work", formView: React.createElement(NewWorkForm, { showView: true }), renderItem: ({ item, connectDragSource }) => (React.createElement(React.Fragment, null,
|
37
39
|
React.createElement(DocumentItemFrame, { key: item.id, frameProps: {
|
38
40
|
active: activeId === item.id,
|
39
41
|
hoverEffect: "background",
|
@@ -43,18 +45,40 @@ const WorkList = (props) => {
|
|
43
45
|
setActiveId(item.id);
|
44
46
|
(_a = props.onClickItem) === null || _a === void 0 ? void 0 : _a.call(props, item);
|
45
47
|
} },
|
46
|
-
React.createElement(WorkItem, { id: item.id })))) }))));
|
48
|
+
React.createElement(WorkItem, { id: item.id, toolsVisible: false })))) }))));
|
47
49
|
function filters() {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
{
|
50
|
+
const filter = [];
|
51
|
+
if (props.status) {
|
52
|
+
filter.push({
|
52
53
|
c: "WorkStatus",
|
53
54
|
o: "=",
|
54
55
|
l: "And",
|
55
56
|
v1: S(props.status).capitalize().toString(),
|
56
|
-
}
|
57
|
-
|
57
|
+
});
|
58
|
+
}
|
59
|
+
if (dueDate) {
|
60
|
+
let date = "day";
|
61
|
+
let v1 = "";
|
62
|
+
let v2 = "";
|
63
|
+
if (dueDate !== "today")
|
64
|
+
date = dueDate;
|
65
|
+
if (dueDate !== "unscheduled") {
|
66
|
+
v1 = moment().startOf(date).format("YYYY-MM-DD HH:mm:ss");
|
67
|
+
v2 = moment().endOf(date).format("YYYY-MM-DD HH:mm:ss");
|
68
|
+
}
|
69
|
+
else {
|
70
|
+
v1 = moment().add(1, "months").startOf("month").format("YYYY-MM-DD HH:mm:ss");
|
71
|
+
v2 = moment().add(1, "months").endOf("month").format("YYYY-MM-DD HH:mm:ss");
|
72
|
+
}
|
73
|
+
filter.push({
|
74
|
+
c: "DueDate",
|
75
|
+
o: "between",
|
76
|
+
l: "And",
|
77
|
+
v1: v1,
|
78
|
+
v2: v2,
|
79
|
+
});
|
80
|
+
}
|
81
|
+
return filter;
|
58
82
|
}
|
59
83
|
async function moveAfter(id, afterId) {
|
60
84
|
await documentStore.moveAfter(id, afterId);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAqB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,KAAK,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M,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;gBAC9E,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;aAC5E;YACD,MAAM,CAAC,IAAI,CAAC;gBACX,CAAC,EAAE,SAAS;gBACZ,CAAC,EAAE,SAAS;gBACZ,CAAC,EAAE,KAAK;gBACR,EAAE,EAAE,EAAE;gBACN,EAAE,EAAE,EAAE;aACU,CAAC,CAAA;SAClB;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;AACF,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
@@ -5,6 +5,7 @@ import { useWork, useWorkStore } from "../../../../data/work";
|
|
5
5
|
import DescriptionEditor from "@voplus/morpho-document/es/controls/DescriptionEditor";
|
6
6
|
import DocumentHeader from "@voplus/morpho-document/es/components/DocumentHeader";
|
7
7
|
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
8
|
+
import WorkMenu from "../../controls/WorkMenu";
|
8
9
|
import WorkTabs from "../WorkTabs";
|
9
10
|
import { observe } from "@voplus/morpho-ui";
|
10
11
|
import { useApplicationContext } from "@voplus/morpho-data";
|
@@ -18,9 +19,14 @@ const WorkPropertiesView = (props) => {
|
|
18
19
|
const [loaded, setLoaded] = useState(true);
|
19
20
|
return observe(() => (React.createElement("div", { className: "module-detail-view" }, loaded && (React.createElement(React.Fragment, null,
|
20
21
|
React.createElement(DocumentHeader, { id: id, size: "h3", quickVisible: false, quickDataBarAlign: "left", clickNameEffect: "edit", autoSaveName: true, className: "task-properties-view-header", tools: React.createElement("div", { className: "tools-bar" },
|
21
|
-
React.createElement(ToolBar, { id: id, moreProps: {
|
22
|
+
React.createElement(ToolBar, { id: id, moreProps: {
|
23
|
+
closeAside: true,
|
24
|
+
menus: {
|
25
|
+
default: React.createElement(WorkMenu, { id: id })
|
26
|
+
}
|
27
|
+
} },
|
22
28
|
React.createElement(Reload, { action: onReload }),
|
23
|
-
React.createElement(Open, { url:
|
29
|
+
React.createElement(Open, { url: `/work/${id}` }))), descriptionVisible: false }),
|
24
30
|
React.createElement(DescriptionEditor, { id: id, description: work.description, readonly: work.readonly }),
|
25
31
|
React.createElement(WorkTabs, { id: id, propertie: true }))))));
|
26
32
|
/** reload data */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,iBAAiB,MAAM,uDAAuD,CAAC;AACtF,OAAO,cAAc,MAAM,sDAAsD,CAAC;AAClF,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,YAAY,E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,CAAC,QAAQ,GACzB;QACF,oBAAC,QAAQ,IAAC,EAAE,EAAE,EAAE,EAAE,SAAS,SAAG,CACjB,CACpB,CACC,CACT,CAAC,CAAC;IACH,kBAAkB;IAClB,SAAS,QAAQ;QACb,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,UAAU,CAAC,GAAG,EAAE;YACZ,SAAS,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC,EAAE,GAAG,CAAC,CAAC;IACZ,CAAC;AACL,CAAC,CAAC;AACF,eAAe,kBAAkB,CAAC"}
|
@@ -8,6 +8,7 @@ import WorkTasksTab from "../WorkTasksTab";
|
|
8
8
|
import WorksProperties from "../WorksProperties";
|
9
9
|
import { observe } from "@voplus/morpho-ui";
|
10
10
|
import { useApplicationContext } from "@voplus/morpho-data";
|
11
|
+
import { useDocumentListEffect } from "@voplus/morpho-document-core";
|
11
12
|
import { useTaskListEffect } from "../../../../data/task";
|
12
13
|
const WorkTabs = (props) => {
|
13
14
|
const { id, propertie } = props;
|
@@ -15,6 +16,7 @@ const WorkTabs = (props) => {
|
|
15
16
|
/**Tabs 当前激活 tab 面板的 key */
|
16
17
|
const [activeKey, setActiveKey] = useState(propertie ? "Properties" : "Activities");
|
17
18
|
const [taskTotals, setTaskTotals] = useState(0);
|
19
|
+
const [docTotals, setDocTotals] = useState(0);
|
18
20
|
useEffect(() => {
|
19
21
|
setActiveKey(propertie ? "Properties" : "Activities");
|
20
22
|
}, [props.id]);
|
@@ -25,6 +27,13 @@ const WorkTabs = (props) => {
|
|
25
27
|
{ c: "Members", o: "contains", l: "And", v1: JSON.stringify([user.info.unit.id]) }
|
26
28
|
],
|
27
29
|
});
|
30
|
+
useDocumentListEffect(null, (result, total) => setDocTotals(total || 0), {
|
31
|
+
Total: true, List: false,
|
32
|
+
Filters: [
|
33
|
+
{ c: "ParentNodeId", o: "=", l: "And", v1: id },
|
34
|
+
{ c: "Type", o: "!contains", l: "And", v1: '["Task"]' }
|
35
|
+
],
|
36
|
+
});
|
28
37
|
return observe(() => (React.createElement(Tabs, { activeKey: activeKey, className: "work-tabs", onChange: onChange },
|
29
38
|
propertie &&
|
30
39
|
React.createElement(Tabs.TabPane, { tab: "Properties", key: "Properties" }, activeKey === "Properties" && React.createElement(WorksProperties, { id: id })),
|
@@ -34,7 +43,7 @@ const WorkTabs = (props) => {
|
|
34
43
|
React.createElement(Badge, { count: taskTotals, className: "site-badge-count" })), key: "Tasks" }, activeKey === "Tasks" && (React.createElement(WorkTasksTab, { id: id }))),
|
35
44
|
React.createElement(Tabs.TabPane, { tab: React.createElement(React.Fragment, null,
|
36
45
|
"Documents",
|
37
|
-
React.createElement(Badge, { count:
|
46
|
+
React.createElement(Badge, { count: docTotals, className: "site-badge-count" })), key: "Documents" }, activeKey === "Documents" && (React.createElement(DocumentList, { id: id, multiple: true, exclude: ["Task"] }))),
|
38
47
|
React.createElement(Tabs.TabPane, { tab: "QA", key: "QA" }, activeKey === "QA" && React.createElement(WorkQATab, { id: id })))));
|
39
48
|
/**切换面板的回调*/
|
40
49
|
function onChange(activeKey) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkTabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkTabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,WAAW,MAAM,gEAAgE,CAAC;AACzF,OAAO,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,IAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAC,kBAAkB,GAAG,CAAG,EAAE,GAAG,EAAC,OAAO,IAC9F,SAAS,KAAK,OAAO,IAAI,CACtB,oBAAC,YAAY,IAAC,EAAE,EAAE,EAAE,GAAI,CAC3B,CACU;QACf,oBAAC,IAAI,CAAC,OAAO,IAAC,GAAG,EAAE;;gBAAW,oBAAC,KAAK,IAAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAC,kBAAkB,GAAG,CAAG,EAAE,GAAG,EAAC,WAAW,IACrG,SAAS,KAAK,WAAW,IAAI,CAC1B,oBAAC,YAAY,IAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,QAAC,OAAO,EAAE,CAAC,MAAM,CAAC,GAAI,CACvD,CACU;QACf,oBAAC,IAAI,CAAC,OAAO,IAAC,GAAG,EAAC,IAAI,EAAC,GAAG,EAAC,IAAI,IAC1B,SAAS,KAAK,IAAI,IAAI,oBAAC,SAAS,IAAC,EAAE,EAAE,EAAE,GAAI,CACjC,CACZ,CACV,CAAC,CAAC;IAEH,YAAY;IACZ,SAAS,QAAQ,CAAC,SAAiB;QAC/B,YAAY,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
@@ -11,13 +11,15 @@ const WorksProperties = (props) => {
|
|
11
11
|
const { user } = useApplicationContext();
|
12
12
|
const noData = (React.createElement("span", { className: "no-data" }, "no data"));
|
13
13
|
return observe(() => {
|
14
|
-
var _a;
|
14
|
+
var _a, _b;
|
15
15
|
return (React.createElement("div", { className: "work-roperties" },
|
16
|
+
React.createElement("h2", null, (_a = work.workType) === null || _a === void 0 ? void 0 : _a.name),
|
16
17
|
React.createElement(Form, { labelAlign: "left", labelCol: { span: 8 }, scrollToFirstError: true },
|
17
18
|
React.createElement(Form.Item, { label: "No" }, work.no || noData),
|
18
19
|
React.createElement(Form.Item, { label: "Type" }, work.type || noData),
|
19
20
|
React.createElement(Form.Item, { label: "Status" }, work.status || noData),
|
20
|
-
React.createElement(Form.Item, { label: "
|
21
|
+
React.createElement(Form.Item, { label: "Contact" }),
|
22
|
+
React.createElement(Form.Item, { label: "Folder" }, ((_b = work.folder) === null || _b === void 0 ? void 0 : _b.name) || noData),
|
21
23
|
React.createElement(Form.Item, { label: "Due" }, work.due ? moment(work.due).format("DD MMM yyyy") : noData),
|
22
24
|
React.createElement(Form.Item, { label: "Owner" },
|
23
25
|
React.createElement(AvatarList, { editable: false })))));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorksProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,MAAM,eAAe,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC9C,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAE/B,MAAM,EAAE,IAAI,EAAE,GAAG,qBAAqB,EAAE,CAAC;IACzC,MAAM,MAAM,GAAG,CAAC,8BAAM,SAAS,EAAC,SAAS,cAAe,CAAC,CAAC;IAE1D,OAAO,OAAO,CAAC,GAAG,EAAE;;QAAC,OAAA,CACjB,6BAAK,SAAS,EAAC,gBAAgB;YAC3B,oBAAC,IAAI,IACD,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EACrB,kBAAkB;gBAElB,oBAAC,IAAI,CAA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AAC,UAAU,IAAC,QAAQ,EAAE,KAAK,GAAI,CACvB,CACT,CACL,CACT,CAAA;KAAA,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { useWork, useWorkStore } from "../../../../data/work";
|
2
|
+
import { useDocumentMenuContext, } from "@voplus/morpho-document-core";
|
3
|
+
import { Button } from "@voplus/antd";
|
4
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
5
|
+
import React from "react";
|
6
|
+
import { faVoteYea } from "@fortawesome/pro-light-svg-icons";
|
7
|
+
import { observe } from "@voplus/morpho-ui";
|
8
|
+
import { useApplicationContext } from "@voplus/morpho-data";
|
9
|
+
const Accept = (props) => {
|
10
|
+
const { disabled, action } = props;
|
11
|
+
const context = useDocumentMenuContext();
|
12
|
+
const { user } = useApplicationContext();
|
13
|
+
const store = useWorkStore();
|
14
|
+
const document = useWork(context.id, {
|
15
|
+
reload: (i) => !i.requester || !i.accepters,
|
16
|
+
includes: "requester,accepters"
|
17
|
+
});
|
18
|
+
return observe(() => {
|
19
|
+
var _a;
|
20
|
+
return document.workStatus == "New" && ((_a = document.accepters) === null || _a === void 0 ? void 0 : _a.some(i => i.id === user.info.id)) ? (React.createElement(Button, { type: "link", disabled: disabled, onClick: onClick },
|
21
|
+
React.createElement(FAIcon, { icon: faVoteYea }),
|
22
|
+
React.createElement("span", null, "Accept"))) : null;
|
23
|
+
});
|
24
|
+
function onClick() {
|
25
|
+
!!action
|
26
|
+
? action()
|
27
|
+
: store.accept(context.id);
|
28
|
+
}
|
29
|
+
};
|
30
|
+
export default Accept;
|
31
|
+
//# sourceMappingURL=Accept.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Accept.js","sourceRoot":"","sources":["../../../../../src/modules/work/controls/WorkMenu/Accept.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,OAAO,EAAE,YAAY,EAAE,MAAM,uB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mB,CACd,CACZ,CAAC,CAAC,CAAC,IAAI,CAAA;KAAA,CACX,CAAC;IAEF,SAAS,OAAO;QACZ,CAAC,CAAC,MAAM;YACJ,CAAC,CAAC,MAAM,EAAE;YACV,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { useWork, useWorkStore } from "../../../../data/work";
|
2
|
+
import { useDocumentMenuContext, } from "@voplus/morpho-document-core";
|
3
|
+
import { Button } from "@voplus/antd";
|
4
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
5
|
+
import React from "react";
|
6
|
+
import { faVoteNay } from "@fortawesome/pro-light-svg-icons";
|
7
|
+
import { observe } from "@voplus/morpho-ui";
|
8
|
+
import { useApplicationContext } from "@voplus/morpho-data";
|
9
|
+
const Reject = (props) => {
|
10
|
+
const { disabled, action } = props;
|
11
|
+
const context = useDocumentMenuContext();
|
12
|
+
const { user } = useApplicationContext();
|
13
|
+
const store = useWorkStore();
|
14
|
+
const document = useWork(context.id, {
|
15
|
+
reload: (i) => !i.requester || !i.accepters,
|
16
|
+
includes: "requester,accepters"
|
17
|
+
});
|
18
|
+
return observe(() => {
|
19
|
+
var _a;
|
20
|
+
return document.workStatus == "New" && ((_a = document.accepters) === null || _a === void 0 ? void 0 : _a.some(i => i.id === user.info.id)) ? (React.createElement(Button, { type: "link", disabled: disabled, onClick: onClick },
|
21
|
+
React.createElement(FAIcon, { icon: faVoteNay }),
|
22
|
+
React.createElement("span", null, "Reject"))) : null;
|
23
|
+
});
|
24
|
+
function onClick() {
|
25
|
+
!!action
|
26
|
+
? action()
|
27
|
+
: store.reject(context.id);
|
28
|
+
}
|
29
|
+
};
|
30
|
+
export default Reject;
|
31
|
+
//# sourceMappingURL=Reject.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3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IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO;YACpD,oBAAC,MAAM,IAAC,IAAI,EAAE,SAAS,GAAI;YAC3B,2CAAmB,CACd,CACZ,CAAC,CAAC,CAAC,IAAI,CAAA;KAAA,CACX,CAAC;IAEF,SAAS,OAAO;QACZ,CAAC,CAAC,MAAM;YACJ,CAAC,CAAC,MAAM,EAAE;YACV,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { useWork, useWorkStore } from "../../../../data/work";
|
2
|
+
import React from "react";
|
3
|
+
import { useDocumentMenuContext, } from "@voplus/morpho-document-core";
|
4
|
+
import { Button } from "@voplus/antd";
|
5
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
6
|
+
import { faFileImport } from "@fortawesome/pro-light-svg-icons";
|
7
|
+
import { observe } from "@voplus/morpho-ui";
|
8
|
+
import { useApplicationContext } from "@voplus/morpho-data";
|
9
|
+
const Send = (props) => {
|
10
|
+
const { disabled, action } = props;
|
11
|
+
const context = useDocumentMenuContext();
|
12
|
+
const { user } = useApplicationContext();
|
13
|
+
const store = useWorkStore();
|
14
|
+
const document = useWork(context.id, {
|
15
|
+
reload: (i) => !i.requester || !i.accepters,
|
16
|
+
includes: "requester,accepters"
|
17
|
+
});
|
18
|
+
return observe(() => {
|
19
|
+
var _a;
|
20
|
+
return document.workStatus == "Draft" && ((_a = document.requester) === null || _a === void 0 ? void 0 : _a.id) === user.info.id ? (React.createElement(Button, { type: "link", disabled: disabled, onClick: onClick },
|
21
|
+
React.createElement(FAIcon, { icon: faFileImport }),
|
22
|
+
React.createElement("span", null, "Send"))) : null;
|
23
|
+
});
|
24
|
+
function onClick() {
|
25
|
+
!!action
|
26
|
+
? action()
|
27
|
+
: store.send(context.id);
|
28
|
+
}
|
29
|
+
};
|
30
|
+
export default Send;
|
31
|
+
//# sourceMappingURL=Send.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Send.js","sourceRoot":"","sources":["../../../../../src/modules/work/controls/WorkMenu/Send.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAEN,sBAAsB,GACtB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,IAAI,GAAG,CAAC,KAKb,EAAE,EAAE;IACJ,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAEnC,MAAM,OAAO,GAAG,sBAAsB,EAAE,CAAC;IACzC,MAAM,EAAE,IAAI,EAAE,GAAG,qBAAqB,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,YAAY,EAAE,CAAC;IAC7B,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE;QACpC,MAAM,EAAE,CAAC,CAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS;QAClD,QAAQ,EAAE,qBAAqB;KAC/B,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,GAAG,EAAE;;QACnB,OAAA,QAAQ,CAAC,UAAU,IAAI,OAAO,IAAI,CAAA,MAAA,QAAQ,CAAC,SAAS,0CAAE,EAAE,MAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAC3E,oBAAC,MAAM,IAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO;YACvD,oBAAC,MAAM,IAAC,IAAI,EAAE,YAAY,GAAI;YAC9B,yCAAiB,CACT,CACT,CAAC,CAAC,CAAC,IAAI,CAAA;KAAA,CACR,CAAC;IAEF,SAAS,OAAO;QACf,CAAC,CAAC,MAAM;YACP,CAAC,CAAC,MAAM,EAAE;YACV,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { Access, Delete, Lock, Move, Notifications, OpenReferenceView, Paste, Publish, PublishLock, Unlock, } from "@voplus/morpho-document/es/controls/DocumentMenu/items";
|
2
|
+
import { DocumentMenuContext, DocumentMenuState } from "@voplus/morpho-document-core";
|
3
|
+
import React, { useMemo } from "react";
|
4
|
+
import Accept from "./Accept";
|
5
|
+
import Reject from "./Reject";
|
6
|
+
import Send from "./Send";
|
7
|
+
import classnames from "classnames";
|
8
|
+
const WorkMenu = (props) => {
|
9
|
+
const context = useMemo(() => new DocumentMenuState(props.id), [props.id]);
|
10
|
+
return (React.createElement("div", { className: classnames("document-menu", props.className) },
|
11
|
+
React.createElement(DocumentMenuContext.Provider, { value: context },
|
12
|
+
React.createElement(Send, null),
|
13
|
+
React.createElement(Accept, null),
|
14
|
+
React.createElement(Reject, null),
|
15
|
+
React.createElement(Move, null),
|
16
|
+
React.createElement(Paste, null),
|
17
|
+
React.createElement(Lock, null),
|
18
|
+
React.createElement(Unlock, null),
|
19
|
+
React.createElement(Publish, null),
|
20
|
+
React.createElement(PublishLock, null),
|
21
|
+
React.createElement(Access, null),
|
22
|
+
React.createElement(Notifications, null),
|
23
|
+
React.createElement(OpenReferenceView, null),
|
24
|
+
React.createElement(Delete, { closeAside: props.closeAside }))));
|
25
|
+
};
|
26
|
+
export default WorkMenu;
|
27
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/controls/WorkMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,MAAM,EACN,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,aAAa,EACb,iBAAiB,EACjB,KAAK,EACL,OAAO,EACP,WAAW,EAEX,MAAM,GACT,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAe,MAAM,8BAA8B,CAAC;AACnG,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,MAAM,QAAQ,GAAG,CAAC,KAA+D,EAAE,EAAE;IACjF,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3E,OAAO,CACH,6BAAK,SAAS,EAAE,UAAU,CAAC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC;QACxD,oBAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO;YACxC,oBAAC,IAAI,OAAG;YACR,oBAAC,MAAM,OAAG;YACV,oBAAC,MAAM,OAAG;YACV,oBAAC,IAAI,OAAG;YACR,oBAAC,KAAK,OAAG;YACT,oBAAC,IAAI,OAAG;YACR,oBAAC,MAAM,OAAG;YACV,oBAAC,OAAO,OAAG;YACX,oBAAC,WAAW,OAAG;YACf,oBAAC,MAAM,OAAG;YACV,oBAAC,aAAa,OAAG;YACjB,oBAAC,iBAAiB,OAAG;YACrB,oBAAC,MAAM,IAAC,UAAU,EAAE,KAAK,CAAC,UAAU,GAAI,CACb,CAC7B,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
@@ -2,8 +2,7 @@
|
|
2
2
|
.work-default-view {
|
3
3
|
.main-content-nav {
|
4
4
|
width: 250px;
|
5
|
-
box-shadow:
|
6
|
-
12px 0 48px 16px rgb(0 0 0 / 3%) !important;
|
5
|
+
box-shadow: 1px 0 3px 0px rgb(0 0 0 / 15%) !important;
|
7
6
|
}
|
8
7
|
.work-context {
|
9
8
|
display: flex;
|
@@ -15,7 +15,6 @@ const WorkspaceCardList = (props) => {
|
|
15
15
|
/** 建立 ListView 和useWorkspaceListEffect所需的ListDataState. 会根据state.id重建所以不需reset. */
|
16
16
|
const list = useCreateListDataState({
|
17
17
|
filterDefaults: {
|
18
|
-
includes: "tags",
|
19
18
|
filters: props.roles
|
20
19
|
? [{ c: "Roles", o: "contains", l: "And", v1: 'Member' }]
|
21
20
|
: [],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/components/WorkspaceCardList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAc,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,kBAAkB,MAAM,kDAAkD,CAAC;AAClF,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACp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AAC,CAAC;oBACzC,oBAAC,aAAa,IACV,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAC5B,MAAM,EAAE,MAAM,KAAK,CAAC,CAAC,EAAE,GACzB,CACA,CAET,CAAC,CACA,CACW,CACnB,CACiB,CAE9B,CAAC,CAAC;IAEH,SAAS,QAAQ;QACb,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;IAED,SAAS,WAAW,CAAC,IAAgB;;QACjC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAClB,MAAA,KAAK,CAAC,WAAW,+CAAjB,KAAK,EAAe,IAAI,CAAC,CAAC;IAC9B,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import "./index.less";
|
2
2
|
import { InlineEdit, observe } from "@voplus/morpho-ui";
|
3
|
+
import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
3
4
|
import React, { useEffect, useState } from "react";
|
4
5
|
import { useWorkspace, useWorkspaceStore } from "../../../../data/workspace";
|
5
6
|
import AvatarList from "@voplus/morpho-document/es/components/AvatarList";
|
6
|
-
import DocumentTabs from "@voplus/morpho-document/es/components/DocumentTabs";
|
7
7
|
import { State } from "./state";
|
8
|
-
import
|
8
|
+
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
9
9
|
import WorkspaceCompletedWorksChart from "../../controls/WorkspaceCompletedWorksChart";
|
10
10
|
import WorkspaceMenu from "../../controls/WorkspaceMenu";
|
11
|
+
import WorkspaceTabs from "../WorkspaceTabs";
|
11
12
|
import { runInAction } from "mobx";
|
12
13
|
import { useApplicationContext } from "@voplus/morpho-data";
|
13
14
|
import { useDocumentStore } from "@voplus/morpho-document-core";
|
@@ -28,13 +29,18 @@ const WorkspacePropertiesView = (props) => {
|
|
28
29
|
React.createElement("div", { className: "workspace-header" },
|
29
30
|
React.createElement("div", { className: "workspace-name" },
|
30
31
|
React.createElement(InlineEdit, { defaultValue: workspace.name, content: (v) => (React.createElement("div", null, workspace.name)), onSave: (value) => state.save(value, workspace.name, { Name: value }) }),
|
31
|
-
React.createElement(
|
32
|
+
React.createElement("div", { className: "tools-bar" },
|
33
|
+
React.createElement(ToolBar, { id: id, showMenu: false },
|
34
|
+
React.createElement(Open, { url: `/workSpace/${id}` }),
|
35
|
+
React.createElement(WorkspaceMenu, { id: id, closeAside: true })))),
|
32
36
|
React.createElement(AvatarList, { organizationId: user.info.organizationId, list: state.members, multiple: true, onChange: onChange })),
|
33
37
|
React.createElement(WorkspaceCompletedWorksChart, { id: props.id }),
|
34
|
-
React.createElement(
|
38
|
+
React.createElement(WorkspaceTabs, { id: id }))))));
|
35
39
|
async function onChange(ids, members) {
|
36
40
|
await store.edit(id, { data: { MemberIds: ids }, error: "message" });
|
37
|
-
runInAction(() => {
|
41
|
+
runInAction(() => {
|
42
|
+
state.members = members;
|
43
|
+
});
|
38
44
|
}
|
39
45
|
};
|
40
46
|
export default WorkspacePropertiesView;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/components/WorkspacePropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE7E,OAAO,UAAU,MAAM,kDAAkD,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/components/WorkspacePropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,UAAU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