@voplus/morpho-workspace 1.3.2 → 1.3.4
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/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 +18 -2
- package/es/data/workspace/interfaces.d.ts +8 -0
- package/es/data/workspace/types.d.ts +1 -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/interfaces.d.ts +4 -0
- package/es/data/worktype/types.d.ts +1 -0
- 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/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 +7 -6
- 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.js +7 -5
- 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/WorkQATab/index.js +9 -7
- package/es/modules/work/components/WorkQATab/index.js.map +1 -1
- package/es/modules/work/components/WorkQATab/index.less +8 -8
- 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/WorkTaskList/index.js +8 -6
- package/es/modules/work/components/WorkTaskList/index.js.map +1 -1
- package/es/modules/work/components/WorkTaskList/index.less +3 -3
- package/es/modules/work/components/WorkTasksTab/index.js +4 -2
- package/es/modules/work/components/WorkTasksTab/index.js.map +1 -1
- package/es/modules/work/components/WorkTasksTab/index.less +2 -2
- package/es/modules/work/components/WorksProperties/index.js +5 -3
- 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/MyWorkspaces/index.js +9 -7
- package/es/modules/workspace/components/MyWorkspaces/index.js.map +1 -1
- package/es/modules/workspace/components/MyWorkspaces/index.less +2 -2
- package/es/modules/workspace/components/WorkspaceCard/index.js +9 -4
- package/es/modules/workspace/components/WorkspaceCard/index.js.map +1 -1
- package/es/modules/workspace/components/WorkspaceCard/index.less +12 -0
- package/es/modules/workspace/components/WorkspaceCardList/index.js +3 -5
- 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/controls/WorkspaceMenu/index.js +38 -14
- package/es/modules/workspace/controls/WorkspaceMenu/index.js.map +1 -1
- 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 +42 -0
- package/es/modules/worktype/components/NewTypeForm/index.js.map +1 -0
- package/es/modules/worktype/components/NewTypeForm/index.less +8 -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 +10 -0
- package/es/modules/worktype/components/WorkTypeList/index.js +46 -0
- package/es/modules/worktype/components/WorkTypeList/index.js.map +1 -0
- package/es/modules/worktype/components/WorkTypeList/index.less +7 -0
- package/es/modules/worktype/components/WorkTypeProperties/index.js +24 -3
- package/es/modules/worktype/components/WorkTypeProperties/index.js.map +1 -1
- package/es/modules/worktype/components/WorkTypeProperties/index.less +27 -2
- 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 +7 -0
- package/es/modules/worktype/components/WorkTypeTabs/index.js +4 -2
- package/es/modules/worktype/components/WorkTypeTabs/index.js.map +1 -1
- 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/pages/Routes.js +3 -3
- package/es/pages/Routes.js.map +1 -1
- package/es/pages/Space/components/Tasks/index.js +22 -24
- package/es/pages/Space/components/Tasks/index.js.map +1 -1
- package/es/pages/Space/pages/MySpace/index.js +5 -5
- package/es/pages/Space/pages/MySpace/index.js.map +1 -1
- package/es/pages/Space/pages/MySpace/state.d.ts +3 -2
- package/es/pages/Space/pages/MySpace/state.js +19 -5
- package/es/pages/Space/pages/MySpace/state.js.map +1 -1
- package/es/pages/WorkType/WorkTypeSelect/index.js +5 -1
- package/es/pages/WorkType/WorkTypeSelect/index.js.map +1 -1
- package/package.json +1 -1
@@ -2,11 +2,8 @@ import "./index.less";
|
|
2
2
|
import { useWorkTypeListEffect } from "../../../../data/worktype";
|
3
3
|
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
4
4
|
import React, { useState } from "react";
|
5
|
-
import DocumentItemFrame from "@voplus/morpho-document/es/controls/DocumentItemFrame";
|
6
5
|
import InfiniteScrollView from "@voplus/morpho-ui/es/controls/InfiniteScrollView";
|
7
6
|
import WorkTypeCard from "../WorkTypeCard";
|
8
|
-
import WorkTypeItem from "../WorkTypeItem";
|
9
|
-
import classnames from "classnames";
|
10
7
|
import { observe } from "@voplus/morpho-ui";
|
11
8
|
import { useRenderOnChange } from "@voplus/morpho-ui";
|
12
9
|
/** A worktype list view shows worktype in card style. */
|
@@ -14,7 +11,6 @@ const WorkTypeCardList = (props) => {
|
|
14
11
|
const [active, setActive] = useState(null);
|
15
12
|
const list = useCreateListDataState({
|
16
13
|
filterDefaults: {
|
17
|
-
includes: "tags",
|
18
14
|
filters: [],
|
19
15
|
},
|
20
16
|
}, []);
|
@@ -23,17 +19,10 @@ const WorkTypeCardList = (props) => {
|
|
23
19
|
/** 把ListDataState传给useWorkTypeListEffect,使之可以自動更新loading, hasmore. */
|
24
20
|
useWorkTypeListEffect(list, (result) => list.union(result), list.filters.options);
|
25
21
|
return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
|
26
|
-
React.createElement("div", { className:
|
22
|
+
React.createElement("div", { className: "worktype-list-view" },
|
27
23
|
React.createElement(InfiniteScrollView, { empty: list.isEmpty, loading: list.loading, hasMore: list.hasMore, loadMore: loadMore },
|
28
|
-
React.createElement("div", { className: "worktype-list-content" }, list.data.map((i) => (React.createElement("div", { key: i.id, onClick: () => onItemClick(i) },
|
29
|
-
React.createElement(WorkTypeCard, { id: i.id, active: active === i.id })
|
30
|
-
:
|
31
|
-
React.createElement(DocumentItemFrame, { frameProps: {
|
32
|
-
active: active === i.id,
|
33
|
-
hoverEffect: "background",
|
34
|
-
hoverBackgroundProps: { color: "#f2f2f2" },
|
35
|
-
} },
|
36
|
-
React.createElement(WorkTypeItem, { id: i.id })))))))))));
|
24
|
+
React.createElement("div", { className: "worktype-list-content" }, list.data.map((i) => (React.createElement("div", { key: i.id, onClick: () => onItemClick(i) },
|
25
|
+
React.createElement(WorkTypeCard, { id: i.id, active: active === i.id }))))))))));
|
37
26
|
function loadMore() {
|
38
27
|
list.triggerNextPage();
|
39
28
|
}
|
@@ -43,8 +32,5 @@ const WorkTypeCardList = (props) => {
|
|
43
32
|
(_a = props.onItemClick) === null || _a === void 0 ? void 0 : _a.call(props, item);
|
44
33
|
}
|
45
34
|
};
|
46
|
-
WorkTypeCardList.defaultProps = {
|
47
|
-
type: "default"
|
48
|
-
};
|
49
35
|
export default WorkTypeCardList;
|
50
36
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeCardList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAa,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeCardList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAa,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MA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,YAAY,IAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC,CAAC,EAAE,GAAI,CAC9C,CACN,CAAC,CACG,CACc,CAChB,CACoB,CAC3B,CAAC,CAAC;IAEH,SAAS,QAAQ;QAChB,IAAI,CAAC,eAAe,EAAE,CAAC;IACxB,CAAC;IAED,SAAS,WAAW,CAAC,IAAe;;QACnC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnB,MAAA,KAAK,CAAC,WAAW,+CAAjB,KAAK,EAAe,IAAI,CAAC,CAAC;IAC3B,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
@@ -1,15 +1,13 @@
|
|
1
1
|
:global {
|
2
2
|
.worktype-list-view {
|
3
3
|
height: 100%;
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
margin: 8px;
|
11
|
-
}
|
4
|
+
padding: 0 12px;
|
5
|
+
.worktype-list-content {
|
6
|
+
display: flex;
|
7
|
+
flex-wrap: wrap;
|
8
|
+
>div {
|
9
|
+
margin: 8px;
|
12
10
|
}
|
13
11
|
}
|
14
12
|
}
|
15
|
-
}
|
13
|
+
}
|
@@ -1,11 +1,23 @@
|
|
1
1
|
import "./index.less";
|
2
|
-
import React from "react";
|
2
|
+
import React, { useState } from "react";
|
3
|
+
import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
4
|
+
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
5
|
+
import WorkTypeMenu from "../../controls/WorkTypeMenu";
|
6
|
+
import classnames from "classnames";
|
3
7
|
import { observe } from "@voplus/morpho-ui";
|
4
8
|
import { useWorkType } from "../../../../data/worktype";
|
5
9
|
const WorkTypeItem = (props) => {
|
6
10
|
const { id, active } = props;
|
7
11
|
const worktype = useWorkType(id, { reload: false });
|
8
|
-
|
12
|
+
const [hover, setHover] = useState(false);
|
13
|
+
return observe(() => (React.createElement("div", { className: classnames("worktype-item", { active: active }), onMouseLeave: () => setHover(false), onMouseOver: () => setHover(true) },
|
14
|
+
React.createElement("div", null, worktype.name),
|
15
|
+
React.createElement("div", { className: classnames("hover-operate-icon", {
|
16
|
+
show: hover,
|
17
|
+
}) },
|
18
|
+
React.createElement(ToolBar, { id: id, showMenu: false },
|
19
|
+
React.createElement(Open, { size: "middle", url: `/work-types/${id}` }),
|
20
|
+
React.createElement(WorkTypeMenu, { id: id, size: "middle", closeAside: true }))))));
|
9
21
|
};
|
10
22
|
export default WorkTypeItem;
|
11
23
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAC3E,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,YAAY,GAAG,CAAC,KAIrB,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC7B,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IACrD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,6BACC,SAAS,EAAE,UAAU,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAC1D,YAAY,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EACnC,WAAW,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;QAEjC,iCAAM,QAAQ,CAAC,IAAI,CAAO;QAC1B,6BACC,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE;gBAC3C,IAAI,EAAE,KAAK;aACX,CAAC;YAEF,oBAAC,OAAO,IACP,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,KAAK;gBAEf,oBAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,eAAe,EAAE,EAAE,GAAI;gBAChD,oBAAC,YAAY,IAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAC,QAAQ,EAAC,UAAU,EAAE,IAAI,GAAI,CAC/C,CACL,CACD,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
@@ -6,6 +6,8 @@
|
|
6
6
|
font-weight: 500;
|
7
7
|
word-break: break-all;
|
8
8
|
padding: 20px;
|
9
|
+
display: flex;
|
10
|
+
align-items: center;
|
9
11
|
// background: transparent;
|
10
12
|
&:after {
|
11
13
|
position: absolute;
|
@@ -15,5 +17,16 @@
|
|
15
17
|
bottom: 0;
|
16
18
|
border-bottom: 1px solid #f2f2f2;
|
17
19
|
}
|
20
|
+
.hover-operate-icon {
|
21
|
+
display: none;
|
22
|
+
position: absolute;
|
23
|
+
right: 20px;
|
24
|
+
.ant-btn:first-child {
|
25
|
+
margin-left: 0;
|
26
|
+
}
|
27
|
+
&.show {
|
28
|
+
display: block;
|
29
|
+
}
|
30
|
+
}
|
18
31
|
}
|
19
32
|
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { IWorkType } from "../../../../data/worktype";
|
3
|
+
import "./index.less";
|
4
|
+
declare const WorkTypeList: (props: {
|
5
|
+
workspaceId: string;
|
6
|
+
active?: string | undefined;
|
7
|
+
/** item onclick */
|
8
|
+
onClickItem?: ((item: IWorkType) => void) | undefined;
|
9
|
+
}) => JSX.Element;
|
10
|
+
export default WorkTypeList;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import React, { useState } from "react";
|
2
|
+
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
3
|
+
import { useRenderOnChange } from "@voplus/morpho-ui";
|
4
|
+
import { observe } from "@voplus/morpho-ui";
|
5
|
+
import { useAutoUpdateListData } from "../../../../data/worktype/worktype-events";
|
6
|
+
import { useWorkTypeListEffect } from "../../../../data/worktype";
|
7
|
+
// import InfiniteScrollView from "@voplus/morpho-ui/es/controls/InfiniteScrollView";
|
8
|
+
import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView2";
|
9
|
+
import DocumentItemFrame from "@voplus/morpho-document/es/controls/DocumentItemFrame";
|
10
|
+
import WorkTypeItem from "../WorkTypeItem";
|
11
|
+
import NewTypeForm from "../NewTypeForm";
|
12
|
+
import "./index.less";
|
13
|
+
const WorkTypeList = (props) => {
|
14
|
+
const [activeId, setActiveId] = useState("");
|
15
|
+
const [showAdd, setShowAdd] = useState(false);
|
16
|
+
const list = useCreateListDataState({
|
17
|
+
filterDefaults: {
|
18
|
+
filters: [],
|
19
|
+
},
|
20
|
+
}, []);
|
21
|
+
useAutoUpdateListData(list, (d) => true);
|
22
|
+
/** 如果 list.filters.options变更了就重渲染,使下一行的useWorkTypeListEffect 可以接收新参数*/
|
23
|
+
useRenderOnChange(() => list.filters.options);
|
24
|
+
/** 把ListDataState传给useWorkTypeListEffect,使之可以自動更新loading, hasmore. */
|
25
|
+
useWorkTypeListEffect(list, (result) => list.union(result), list.filters.options);
|
26
|
+
return observe(() => (React.createElement("div", { className: "work-type-list" },
|
27
|
+
React.createElement(ListDataContext.Provider, { value: list },
|
28
|
+
React.createElement(ListView, { headerProps: {
|
29
|
+
viewTitle: "WorkTypes",
|
30
|
+
sortable: false,
|
31
|
+
onAdd: () => setShowAdd(true),
|
32
|
+
}, formViewTitle: "Add WorkType", renderItem: ({ item, connectDragSource }) => (React.createElement(React.Fragment, null,
|
33
|
+
React.createElement(DocumentItemFrame, { key: item.id, frameProps: {
|
34
|
+
active: activeId === item.id,
|
35
|
+
hoverEffect: "background",
|
36
|
+
hoverBackgroundProps: { color: "#f2f2f2" },
|
37
|
+
}, onClick: () => {
|
38
|
+
var _a;
|
39
|
+
setActiveId(item.id);
|
40
|
+
(_a = props.onClickItem) === null || _a === void 0 ? void 0 : _a.call(props, item);
|
41
|
+
} },
|
42
|
+
React.createElement(WorkTypeItem, { id: item.id })))) }),
|
43
|
+
showAdd && (React.createElement(NewTypeForm, { workspaceId: props.workspaceId, onCancel: () => setShowAdd(false), onSave: () => setShowAdd(false) }))))));
|
44
|
+
};
|
45
|
+
export default WorkTypeList;
|
46
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAAa,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,qFAAqF;AACrF,OAAO,QAAQ,MAAM,2DA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QAAQ;oBACd,oBAAC,iBAAiB,IACjB,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,UAAU,EAAE;4BACX,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC,EAAE;4BAC5B,WAAW,EAAE,YAAY;4BACzB,oBAAoB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;yBAC1C,EACD,OAAO,EAAE,GAAG,EAAE;;4BACb,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;4BACrB,MAAA,KAAK,CAAC,WAAW,+CAAjB,KAAK,EAAe,IAAI,CAAC,CAAC;wBAC3B,CAAC;wBAED,oBAAC,YAAY,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,GAAI,CACV,CACJ,CACjB,GACA;YACD,OAAO,IAAI,CACX,oBAAC,WAAW,IACX,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EACjC,MAAM,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAC9B,CACF,CACyB,CACtB,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
@@ -1,16 +1,21 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
|
-
import { Form } from "@voplus/antd";
|
2
|
+
import { Form, Button } from "@voplus/antd";
|
3
3
|
import { InlineEdit, observe } from "@voplus/morpho-ui";
|
4
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
5
|
+
import { faMinusCircle } from "@fortawesome/pro-light-svg-icons";
|
4
6
|
import DocumentSelectDialog from "@voplus/morpho-document/es/components/DocumentSelectDialog";
|
5
7
|
import AvatarList from "@voplus/morpho-document/es/components/AvatarList";
|
6
8
|
import { useApplicationContext } from "@voplus/morpho-data";
|
7
9
|
import { useWorkType, useWorkTypeStore } from "../../../../data/worktype";
|
10
|
+
import DocumentQuickViewDialog from "@voplus/morpho-document/es/components/DocumentQuickViewDialog";
|
8
11
|
import { State } from "./state";
|
9
12
|
import { runInAction } from "mobx";
|
10
13
|
import "./index.less";
|
11
14
|
const WorkTypeProperties = (props) => {
|
12
15
|
const store = useWorkTypeStore();
|
13
16
|
const [state] = useState(new State(store));
|
17
|
+
const [visible, setVisible] = useState(false);
|
18
|
+
const [ids, setIds] = useState("");
|
14
19
|
const worktype = useWorkType(props.id);
|
15
20
|
state.update(worktype);
|
16
21
|
const [form] = Form.useForm();
|
@@ -28,7 +33,18 @@ const WorkTypeProperties = (props) => {
|
|
28
33
|
return (React.createElement("div", null, ((_a = worktype.sequence) === null || _a === void 0 ? void 0 : _a.format) ? worktype.sequence.format : "Add NumberFormat"));
|
29
34
|
}, onSave: (value) => { var _a; return state.save(value, (_a = worktype.sequence) === null || _a === void 0 ? void 0 : _a.format, { Sequence: { format: value } }); } })),
|
30
35
|
React.createElement(Form.Item, { label: "Default Folder" },
|
31
|
-
React.createElement("div", { onClick: () => runInAction(() =>
|
36
|
+
React.createElement("div", { onClick: () => runInAction(() => {
|
37
|
+
var _a;
|
38
|
+
((_a = state.worktype.defaultFolder) === null || _a === void 0 ? void 0 : _a.id)
|
39
|
+
? (state.folderEdit = false)
|
40
|
+
: (state.folderEdit = true);
|
41
|
+
}) }, ((_b = state.worktype.defaultFolder) === null || _b === void 0 ? void 0 : _b.id) ? (React.createElement("div", null,
|
42
|
+
React.createElement("span", { className: "prosemirror-mention-node", onClick: () => {
|
43
|
+
var _a;
|
44
|
+
setVisible(true);
|
45
|
+
setIds((_a = state.worktype.defaultFolder) === null || _a === void 0 ? void 0 : _a.id);
|
46
|
+
} }, `&${state.worktype.defaultFolder.name}`),
|
47
|
+
React.createElement(Button, { type: "text", icon: React.createElement(FAIcon, { icon: faMinusCircle, onClick: () => store.edit(props.id, { data: { DefaultFolderId: "" }, error: "message" }) }) }))) : (React.createElement("span", null, " Add Default Folder ")))),
|
32
48
|
React.createElement(Form.Item, { label: "Documentation" },
|
33
49
|
React.createElement("div", { onClick: () => runInAction(() => (state.documentationEdit = true)) }, ((_c = state.worktype.document) === null || _c === void 0 ? void 0 : _c.name) || "Add Documentation")),
|
34
50
|
React.createElement(Form.Item, { label: "Default Due" },
|
@@ -40,6 +56,10 @@ const WorkTypeProperties = (props) => {
|
|
40
56
|
React.createElement(Form.Item, { label: "Accepters" },
|
41
57
|
React.createElement(AvatarList, { organizationId: user.info.organizationId, multiple: true, buttonText: "Ok", list: worktype.accepters, onChange: (ids) => {
|
42
58
|
store.edit(worktype.id, { data: { AccepterIds: ids }, error: "message" });
|
59
|
+
} })),
|
60
|
+
React.createElement(Form.Item, { label: "Default Owner" },
|
61
|
+
React.createElement(AvatarList, { organizationId: user.info.organizationId, multiple: true, buttonText: "Ok", list: worktype.owners, onChange: (ids) => {
|
62
|
+
store.edit(worktype.id, { data: { OwnerIds: ids }, error: "message" });
|
43
63
|
} }))),
|
44
64
|
state.folderEdit && (React.createElement(DocumentSelectDialog, { multiSelect: false, onCancel: () => runInAction(() => (state.folderEdit = false)), onSelect: (data) => {
|
45
65
|
store.edit(props.id, { data: { DefaultFolderId: data[0].id }, error: "message" });
|
@@ -48,7 +68,8 @@ const WorkTypeProperties = (props) => {
|
|
48
68
|
state.documentationEdit && (React.createElement(DocumentSelectDialog, { multiSelect: false, onCancel: () => runInAction(() => (state.documentationEdit = false)), onSelect: (data) => {
|
49
69
|
store.edit(props.id, { data: { DocumentId: data[0].id }, error: "message" });
|
50
70
|
runInAction(() => (state.documentationEdit = false));
|
51
|
-
} }))
|
71
|
+
} })),
|
72
|
+
React.createElement(DocumentQuickViewDialog, { id: ids, visible: visible, onCancel: () => setVisible(false) })));
|
52
73
|
});
|
53
74
|
};
|
54
75
|
export default WorkTypeProperties;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAa,MA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AAS,EAAE,CAAC,CAAC;oBAC7E,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC,CAAC;gBACtD,CAAC,GACA,CACF;YACD,oBAAC,uBAAuB,IAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAI,CACpF,CACN,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
@@ -1,5 +1,30 @@
|
|
1
|
-
:global{
|
2
|
-
.work-type-properties{
|
1
|
+
:global {
|
2
|
+
.work-type-properties {
|
3
3
|
padding: 10px 20px;
|
4
4
|
}
|
5
|
+
|
6
|
+
.prosemirror-mention-node {
|
7
|
+
color: rgb(66, 82, 110);
|
8
|
+
cursor: pointer;
|
9
|
+
line-height: 1.714;
|
10
|
+
font-size: 1em;
|
11
|
+
font-weight: normal;
|
12
|
+
word-break: break-word;
|
13
|
+
background: rgba(9, 30, 66, 0.08);
|
14
|
+
border-width: 1px;
|
15
|
+
border-style: solid;
|
16
|
+
border-color: transparent;
|
17
|
+
border-image: initial;
|
18
|
+
border-radius: 20px;
|
19
|
+
padding: 0px 0.3em 2px 0.23em;
|
20
|
+
}
|
21
|
+
|
22
|
+
.ant-btn {
|
23
|
+
left: -15px;
|
24
|
+
top: -10px;
|
25
|
+
}
|
26
|
+
|
27
|
+
.ant-btn-text {
|
28
|
+
color: rgb(247 4 4);
|
29
|
+
}
|
5
30
|
}
|
@@ -1,14 +1,16 @@
|
|
1
|
-
import
|
2
|
-
import { useDocumentStore } from "@voplus/morpho-document-core";
|
3
|
-
import { useApplicationContext } from "@voplus/morpho-data";
|
4
|
-
import { runInAction } from "mobx";
|
1
|
+
import "./index.less";
|
5
2
|
import { InlineEdit, observe } from "@voplus/morpho-ui";
|
3
|
+
import React, { useEffect, useState } from "react";
|
6
4
|
import { useWorkType, useWorkTypeStore } from "../../../../data/worktype";
|
5
|
+
import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
7
6
|
import { State } from "./state";
|
8
|
-
import
|
9
|
-
import
|
7
|
+
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
8
|
+
import WorkTypeMenu from "../../controls/WorkTypeMenu";
|
10
9
|
import WorkTypePropertiesTabs from '../WorkTypePropertiesTabs';
|
11
|
-
import "
|
10
|
+
import WorktypeCompleteWorksChart from "../../controls/WorktypeCompleteWorksChart";
|
11
|
+
import { runInAction } from "mobx";
|
12
|
+
import { useApplicationContext } from "@voplus/morpho-data";
|
13
|
+
import { useDocumentStore } from "@voplus/morpho-document-core";
|
12
14
|
const WorkTypePropertiesView = (props) => {
|
13
15
|
const id = props.id;
|
14
16
|
const store = useWorkTypeStore();
|
@@ -26,7 +28,10 @@ const WorkTypePropertiesView = (props) => {
|
|
26
28
|
React.createElement("div", { className: "worktype-header" },
|
27
29
|
React.createElement("div", { className: "worktype-name" },
|
28
30
|
React.createElement(InlineEdit, { defaultValue: worktype.name, content: (v) => React.createElement("div", null, worktype.name), onSave: (value) => state.save(value, worktype.name, { Name: value }) }),
|
29
|
-
React.createElement(
|
31
|
+
React.createElement("div", { className: "tools-bar" },
|
32
|
+
React.createElement(ToolBar, { id: id, showMenu: false },
|
33
|
+
React.createElement(Open, { url: `/work-types/${id}` }),
|
34
|
+
React.createElement(WorkTypeMenu, { id: id, closeAside: true }))))),
|
30
35
|
React.createElement(WorktypeCompleteWorksChart, { id: props.id }),
|
31
36
|
React.createElement(WorkTypePropertiesTabs, { id: id }))))));
|
32
37
|
// async function onChange(ids: string[], members: IUnit[]) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypePropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAA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;IAC5E,qDAAqD;IACrD,IAAI;AACL,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
@@ -1,15 +1,16 @@
|
|
1
|
-
import "./index.less";
|
2
|
-
import { Form, InputNumber } from "@voplus/antd";
|
3
1
|
import React, { useState } from "react";
|
2
|
+
import { Form, InputNumber } from "@voplus/antd";
|
3
|
+
import { Scrollbars } from "react-custom-scrollbars";
|
4
|
+
import { State } from "./state";
|
4
5
|
import { useWorkType, useWorkTypeStore } from "../../../../data/worktype";
|
6
|
+
import { observe } from "@voplus/morpho-ui";
|
7
|
+
import { runInAction } from "mobx";
|
8
|
+
import { useApplicationContext } from "@voplus/morpho-data";
|
5
9
|
import AsideContent from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
6
10
|
import AvatarList from "@voplus/morpho-document/es/components/AvatarList";
|
7
11
|
import CheckList from "@voplus/morpho-ui/es/controls/CheckList";
|
8
|
-
import { State } from "./state";
|
9
12
|
import TaskQuickViewDialog from "../../../tasks/components/TaskQuickViewDialog";
|
10
|
-
import
|
11
|
-
import { runInAction } from "mobx";
|
12
|
-
import { useApplicationContext } from "@voplus/morpho-data";
|
13
|
+
import "./index.less";
|
13
14
|
const WorkTypeQA = (props) => {
|
14
15
|
const { id } = props;
|
15
16
|
const [form] = Form.useForm();
|
@@ -23,37 +24,37 @@ const WorkTypeQA = (props) => {
|
|
23
24
|
return observe(() => {
|
24
25
|
var _a, _b, _c, _d, _e, _f;
|
25
26
|
return (React.createElement(AsideContent, { context: asideContext },
|
26
|
-
React.createElement("div",
|
27
|
+
React.createElement("div", { className: "work-type-qa" },
|
27
28
|
React.createElement("div", { className: "work-type-qa-head" }, "Quality Assurance Setting"),
|
28
|
-
React.createElement(
|
29
|
-
React.createElement(Form
|
30
|
-
React.createElement(
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
React.createElement(
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
.audit) === null || _b === void 0 ? void 0 : _b.auditors) === null || _c === void 0 ? void 0 : _c.length) && (React.createElement(React.Fragment, null,
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
29
|
+
React.createElement(Scrollbars, { autoHide: true },
|
30
|
+
React.createElement(Form, { className: "work-type-qa-content", form: form, labelAlign: "left", labelCol: { span: 10 }, scrollToFirstError: true },
|
31
|
+
React.createElement(Form.Item, { label: "Reviewer" },
|
32
|
+
React.createElement(AvatarList, { organizationId: user.info.organizationId, multiple: true, buttonText: "Ok", list: state.worktype.reviewers, onChange: (ids) => {
|
33
|
+
state.save({ ReviewerIds: ids });
|
34
|
+
} })),
|
35
|
+
React.createElement(Form.Item, { label: "Auditor" },
|
36
|
+
React.createElement(AvatarList, { organizationId: user.info.organizationId, multiple: true, buttonText: "Ok", list: (_a = state.worktype.audit) === null || _a === void 0 ? void 0 : _a.auditors, onChange: (ids) => {
|
37
|
+
state.save({ AuditorIds: ids });
|
38
|
+
} })),
|
39
|
+
((_c = (_b = state.worktype.audit) === null || _b === void 0 ? void 0 : _b.auditors) === null || _c === void 0 ? void 0 : _c.length) && (React.createElement(React.Fragment, null,
|
40
|
+
React.createElement(Form.Item, { label: "Audit Rate" }, state.auditRateEdit ? (React.createElement(InputNumber, { defaultValue: ((_d = state.worktype.audit) === null || _d === void 0 ? void 0 : _d.auditRate) || 0, min: 0, max: 100, formatter: (value) => `${value}%`, parser: (value) => value.replace("%", ""), onChange: (value) => {
|
41
|
+
state.save({ AuditRate: value });
|
42
|
+
}, onBlur: () => runInAction(() => (state.auditRateEdit = false)) })) : (React.createElement("div", { onClick: () => runInAction(() => (state.auditRateEdit = true)) }, ((_e = state.worktype.audit) === null || _e === void 0 ? void 0 : _e.auditRate)
|
43
|
+
? `${(_f = state.worktype.audit) === null || _f === void 0 ? void 0 : _f.auditRate}%`
|
44
|
+
: "Add Audit Rate"))),
|
45
|
+
React.createElement(Form.Item, { label: "Audit Task" },
|
46
|
+
React.createElement("div", { className: "open-btn", onClick: () => setVisible(true) }, "Open")))),
|
47
|
+
React.createElement(Form.Item, { label: "Reject Reasons" },
|
48
|
+
React.createElement(CheckList, { headerProps: {
|
49
|
+
viewTitle: " ",
|
50
|
+
visible: true,
|
51
|
+
}, allowAdd: true, list: state.rejectReasons, onChange: (item) => state.onChangeRejectReasons(item), onCreate: (item) => state.onCreateRejectReasons(item), onDelete: (item) => state.onDeleteRejectReasons(item) })),
|
52
|
+
React.createElement(Form.Item, { label: "Error Types" },
|
53
|
+
React.createElement(CheckList, { headerProps: {
|
54
|
+
viewTitle: " ",
|
55
|
+
visible: true,
|
56
|
+
}, allowAdd: true, list: state.errorTypes, onChange: (item) => state.onChangeErrorTypes(item), onCreate: (item) => state.onCreateErrorTypes(item), onDelete: (item) => state.onDeleteErrorTypes(item) }))),
|
57
|
+
React.createElement(TaskQuickViewDialog, { id: props.id, visible: visible, onCancel: () => setVisible(false) })))));
|
57
58
|
});
|
58
59
|
};
|
59
60
|
export default WorkTypeQA;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeQA/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeQA/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO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AC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,GACpD,CACS;wBACZ,oBAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,aAAa;4BAC7B,oBAAC,SAAS,IACT,WAAW,EAAE;oCACZ,SAAS,EAAE,GAAG;oCACd,OAAO,EAAE,IAAI;iCACb,EACD,QAAQ,QACR,IAAI,EAAE,KAAK,CAAC,UAAU,EACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAClD,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAClD,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,GACjD,CACS,CACN;oBACP,oBAAC,mBAAmB,IAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAI,CAC9E,CACR,CACQ,CACf,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
@@ -1,12 +1,13 @@
|
|
1
|
+
import "./index.less";
|
2
|
+
import { Badge, Tabs } from "@voplus/antd";
|
1
3
|
import React, { useEffect, useState } from "react";
|
2
4
|
import { observe, useAsideContentContext } from "@voplus/morpho-ui";
|
3
|
-
import
|
5
|
+
import ActivityLog from "@voplus/morpho-document/es/components/ActivityLog/ActivityLog2";
|
4
6
|
import DocumentList from "@voplus/morpho-document/es/components/DocumentList";
|
5
7
|
import TaskPropertiesView from "../../../tasks/components/TaskPropertiesView";
|
6
8
|
import WorkTaskList from "../../../work/components/WorkTaskList";
|
7
9
|
import WorkTypeQA from "../WorkTypeQA";
|
8
10
|
import WorkTypeStats from "../WorkTypeStats";
|
9
|
-
import "./index.less";
|
10
11
|
const WorkTypeTabs = (props) => {
|
11
12
|
const { id } = props;
|
12
13
|
/**Tabs 当前激活 tab 面板的 key */
|
@@ -23,6 +24,7 @@ const WorkTypeTabs = (props) => {
|
|
23
24
|
React.createElement(Tabs.TabPane, { tab: React.createElement(React.Fragment, null,
|
24
25
|
"Documents",
|
25
26
|
React.createElement(Badge, { count: 3, className: "site-badge-count" })), key: "Document" }, activeKey === "Document" && React.createElement(DocumentList, { id: id, multiple: true, exclude: ["Task"] })),
|
27
|
+
React.createElement(Tabs.TabPane, { tab: "Activities", key: "Activities" }, activeKey === "Activities" && React.createElement(ActivityLog, { id: id })),
|
26
28
|
React.createElement(Tabs.TabPane, { tab: "QA Setting", key: "QA Setting" }, activeKey === "QA Setting" && React.createElement(WorkTypeQA, { id: id })))));
|
27
29
|
/**切换面板的回调*/
|
28
30
|
function onChange(activeKey) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeTabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeTabs/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;AACnD,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,WAAW,MAAM,gEAAgE,CAAC;AACzF,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,kBAAkB,MAA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AC9C,EAEJ,GAAG,EAAC,UAAU,IAEb,SAAS,KAAK,UAAU,IAAI,oBAAC,YAAY,IAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,QAAC,OAAO,EAAE,CAAC,MAAM,CAAC,GAAI,CACnE;QACf,oBAAC,IAAI,CAAC,OAAO,IAAC,GAAG,EAAC,YAAY,EAAC,GAAG,EAAC,YAAY,IAC7C,SAAS,KAAK,YAAY,IAAI,oBAAC,WAAW,IAAC,EAAE,EAAE,EAAE,GAAI,CACxC;QACf,oBAAC,IAAI,CAAC,OAAO,IAAC,GAAG,EAAC,YAAY,EAAC,GAAG,EAAC,YAAY,IAC7C,SAAS,KAAK,YAAY,IAAI,oBAAC,UAAU,IAAC,EAAE,EAAE,EAAE,GAAI,CACvC,CACT,CACP,CAAC,CAAC;IAEH,YAAY;IACZ,SAAS,QAAQ,CAAC,SAAiB;QAClC,YAAY,CAAC,SAAS,CAAC,CAAC;IACzB,CAAC;IAED,SAAS,WAAW,CAAC,EAAU;QAC9B,2BAA2B;QAC3B,mCAAmC;QACnC,gBAAgB;QAChB,KAAK;QACL,IAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,YAAY,EAAE;YAC/B,YAAY,CAAC,UAAU,EAAE,CAAC;SAC1B;aAAM;YACN,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,oBAAC,kBAAkB,IAAC,EAAE,EAAE,EAAE,GAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;SACtE;IACF,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import "./index.less";
|
3
|
+
declare const WorkTypeMenu: {
|
4
|
+
(props: {
|
5
|
+
id: string;
|
6
|
+
className?: string;
|
7
|
+
closeAside?: boolean;
|
8
|
+
size: "small" | "middle" | "large" | undefined;
|
9
|
+
}): JSX.Element;
|
10
|
+
defaultProps: {
|
11
|
+
size: string;
|
12
|
+
};
|
13
|
+
};
|
14
|
+
export default WorkTypeMenu;
|