@voplus/morpho-document 6.0.155 → 6.0.157
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/components/DocumentItem/index.less +2 -2
- package/es/components/DocumentListView/index.less +4 -4
- package/es/components/DocumentPropertiesHeader/index.less +3 -1
- package/es/components/DocumentSelectDialog/index.less +2 -3
- package/es/components/DocumentSortableTree/themes/FileExplorerTheme/node-content-renderer.less +4 -4
- package/es/components/ViewFrame/index.less +3 -1
- package/es/data/document-register/interfaces.d.ts +7 -1
- package/es/data/document-register/types.d.ts +6 -0
- package/es/data/registered-document/interfaces.d.ts +2 -0
- package/es/data/registered-document/types.d.ts +3 -4
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/index.d.ts +1 -1
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/index.js +37 -16
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/index.js.map +1 -1
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/index.less +14 -2
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/state.d.ts +17 -0
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/state.js +82 -0
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/state.js.map +1 -0
- package/es/modules/document-register/components/DocumentRegisterTypesSelect/index.d.ts +6 -0
- package/es/modules/document-register/components/DocumentRegisterTypesSelect/index.js +16 -0
- package/es/modules/document-register/components/DocumentRegisterTypesSelect/index.js.map +1 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/index.d.ts +7 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/index.js +49 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/index.js.map +1 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/index.less +45 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/state.d.ts +14 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/state.js +60 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/state.js.map +1 -0
- package/es/modules/document-register/pages/DocumentRegisterDefaultView/index.js +1 -1
- package/es/modules/document-register/pages/DocumentRegisterDefaultView/index.js.map +1 -1
- package/es/modules/document-register/pages/DocumentRegisterListPage/index.js +1 -1
- package/es/modules/document-register/pages/DocumentRegisterListPage/index.js.map +1 -1
- package/es/modules/document-register/pages/DocumentRegisterListPage/index.less +3 -0
- package/es/modules/document-register/pages/DocumentRegisterSettings/index.d.ts +1 -1
- package/es/modules/document-register/pages/DocumentRegisterSettings/index.js +51 -26
- package/es/modules/document-register/pages/DocumentRegisterSettings/index.js.map +1 -1
- package/es/modules/message-template/components/MessageTemplateProperties/index.js +1 -1
- package/es/modules/message-template/components/MessageTemplateProperties/index.js.map +1 -1
- package/es/modules/registered-document/components/Documents/index.less +3 -1
- package/es/modules/registered-document/components/RegisteredDocumentListHeader/index.d.ts +6 -3
- package/es/modules/registered-document/components/RegisteredDocumentListHeader/index.js +22 -56
- package/es/modules/registered-document/components/RegisteredDocumentListHeader/index.js.map +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentNewForm/index.d.ts +0 -1
- package/es/modules/registered-document/components/RegisteredDocumentNewForm/index.js +3 -4
- package/es/modules/registered-document/components/RegisteredDocumentNewForm/index.js.map +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentProperties/index.d.ts +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentProperties/index.js +8 -6
- package/es/modules/registered-document/components/RegisteredDocumentProperties/index.js.map +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentTableList/TableCellDetail.js +3 -5
- package/es/modules/registered-document/components/RegisteredDocumentTableList/TableCellDetail.js.map +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentTableList/index.js +16 -14
- package/es/modules/registered-document/components/RegisteredDocumentTableList/index.js.map +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentTableList/index.less +2 -2
- package/es/modules/registered-document/components/TypesView/index.d.ts +10 -0
- package/es/modules/registered-document/components/TypesView/index.js +49 -0
- package/es/modules/registered-document/components/TypesView/index.js.map +1 -0
- package/es/modules/registered-document/components/TypesView/index.less +59 -0
- package/es/modules/registered-document/components/TypesView/state.d.ts +21 -0
- package/es/modules/registered-document/components/TypesView/state.js +71 -0
- package/es/modules/registered-document/components/TypesView/state.js.map +1 -0
- package/es/pages/Library/LibraryDefaultView/index.less +1 -1
- package/es/pages/Signature/Envelope/components/EnvelopePanelHeader/index.less +2 -2
- package/es/pages/Signature/Envelope/controls/EnvelopeFootbar/index.less +1 -1
- package/es/pages/Signature/Letter/LetterContentHeader/index.less +1 -1
- package/es/pages/Signature/Letter/LetterRecipientItem/index.less +3 -3
- package/es/pages/Signature/components/SigningDropdown/index.less +1 -1
- package/es/views/TreeView/index.less +6 -4
- package/package.json +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentTableList/state.d.ts +0 -22
- package/es/modules/registered-document/components/RegisteredDocumentTableList/state.js +0 -136
- package/es/modules/registered-document/components/RegisteredDocumentTableList/state.js.map +0 -1
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
padding: 0 10px;
|
|
16
16
|
margin-left: 10px;
|
|
17
17
|
&.current {
|
|
18
|
-
color:
|
|
19
|
-
border-color:
|
|
18
|
+
color: @primary-color;
|
|
19
|
+
border-color: @primary-color;
|
|
20
20
|
}
|
|
21
21
|
&:hover {
|
|
22
|
-
color:
|
|
23
|
-
border-color:
|
|
22
|
+
color: @primary-color;
|
|
23
|
+
border-color: @primary-color;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
+
|
|
1
3
|
:global {
|
|
2
4
|
.document-properties-header {
|
|
3
5
|
padding: 10px 20px;
|
|
@@ -10,7 +12,7 @@
|
|
|
10
12
|
justify-content: center;
|
|
11
13
|
width: 27px;
|
|
12
14
|
height: 27px;
|
|
13
|
-
color:
|
|
15
|
+
color: @primary-color;
|
|
14
16
|
background: #f4f9ff;
|
|
15
17
|
border-radius: 2px;
|
|
16
18
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
.ant-modal-content {
|
|
8
8
|
.ant-modal-header {
|
|
9
9
|
padding: 15px 24px !important;
|
|
10
|
-
background:
|
|
10
|
+
background: @primary-color !important;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
|
|
46
46
|
.ant-btn-primary {
|
|
47
47
|
color: #ffffff;
|
|
48
|
-
background: #217eb2;
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
}
|
|
@@ -62,7 +61,7 @@
|
|
|
62
61
|
border-bottom: 1px solid #e6e6e6;
|
|
63
62
|
|
|
64
63
|
.header-title {
|
|
65
|
-
color:
|
|
64
|
+
color: @primary-color;
|
|
66
65
|
font-weight: bold;
|
|
67
66
|
font-size: 14px;
|
|
68
67
|
line-height: 19px;
|
package/es/components/DocumentSortableTree/themes/FileExplorerTheme/node-content-renderer.less
CHANGED
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
|
|
20
20
|
.file-document-name {
|
|
21
21
|
.file-name {
|
|
22
|
-
color:
|
|
22
|
+
color: @primary-color;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.file-type {
|
|
26
26
|
> svg {
|
|
27
|
-
color:
|
|
27
|
+
color: @primary-color;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
.document-name-content {
|
|
35
35
|
.document-pre {
|
|
36
36
|
> svg {
|
|
37
|
-
color:
|
|
37
|
+
color: @primary-color;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.document-header-target {
|
|
42
42
|
.document-name {
|
|
43
|
-
color:
|
|
43
|
+
color: @primary-color;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { IDocument } from "@voplus/morpho-document-core";
|
|
2
2
|
export type DocumentRegisterStatus = "New" | "Followup" | "Won" | "Lost" | "Contacting" | "NoResponse";
|
|
3
|
+
export type ITypeLineOptions = {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
quickAccess: boolean;
|
|
7
|
+
total?: number;
|
|
8
|
+
};
|
|
3
9
|
export interface IDocumentRegister extends IDocument {
|
|
4
10
|
owner: {
|
|
5
11
|
id: string;
|
|
@@ -21,5 +27,5 @@ export interface IDocumentRegister extends IDocument {
|
|
|
21
27
|
identity?: {
|
|
22
28
|
id: string;
|
|
23
29
|
};
|
|
24
|
-
|
|
30
|
+
types?: ITypeLineOptions[];
|
|
25
31
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { CreateDocumentOptions } from "@voplus/morpho-document-core";
|
|
2
2
|
/** Custom create documentRegister options type. Use TitleCase to fit server need. */
|
|
3
3
|
export type CreateDocumentRegisterOptions = {} & CreateDocumentOptions;
|
|
4
|
+
export type ITypeEditOptions = {
|
|
5
|
+
Name: string;
|
|
6
|
+
Id?: number;
|
|
7
|
+
QuickAccess?: boolean;
|
|
8
|
+
};
|
|
4
9
|
/**
|
|
5
10
|
* Custom edit documentRegister options type. Use TitleCase to fit server need.
|
|
6
11
|
*/
|
|
@@ -10,4 +15,5 @@ export type EditDocumentRegisterOptions = {
|
|
|
10
15
|
ContactId?: string;
|
|
11
16
|
Type?: string;
|
|
12
17
|
DocumentRegisterStatus?: string;
|
|
18
|
+
Types?: ITypeEditOptions[];
|
|
13
19
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IDocument } from "@voplus/morpho-document-core";
|
|
2
|
+
import { ITypeLineOptions } from "../document-register";
|
|
2
3
|
export type RegisteredDocumentStatus = "New" | "Followup" | "Won" | "Lost" | "Contacting" | "NoResponse";
|
|
3
4
|
export interface IRegisteredDocument extends IDocument {
|
|
4
5
|
owner: {
|
|
@@ -17,6 +18,7 @@ export interface IRegisteredDocument extends IDocument {
|
|
|
17
18
|
id: string;
|
|
18
19
|
};
|
|
19
20
|
type: string;
|
|
21
|
+
types?: ITypeLineOptions[];
|
|
20
22
|
documentRegisterStatus: RegisteredDocumentStatus;
|
|
21
23
|
identity?: {
|
|
22
24
|
id: string;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { CreateDocumentOptions } from "@voplus/morpho-document-core";
|
|
2
2
|
/** Custom create documentRegister options type. Use TitleCase to fit server need. */
|
|
3
3
|
/** create 必须提供ParentId , parent 必须是 Document Register */
|
|
4
|
-
export type CreateRegisteredDocumentOptions = {
|
|
5
|
-
Type: string;
|
|
6
|
-
} & CreateDocumentOptions;
|
|
4
|
+
export type CreateRegisteredDocumentOptions = {} & CreateDocumentOptions;
|
|
7
5
|
/**
|
|
8
6
|
* Custom edit documentRegister options type. Use TitleCase to fit server need.
|
|
9
7
|
*/
|
|
@@ -11,6 +9,7 @@ export type EditRegisteredDocumentOptions = {
|
|
|
11
9
|
Name?: string;
|
|
12
10
|
OwnerId?: string;
|
|
13
11
|
ContactId?: string;
|
|
14
|
-
|
|
12
|
+
/** 必须是Docuemnt Register 里面的 Types 的 id */
|
|
13
|
+
Types?: number[];
|
|
15
14
|
RegisteredDocumentStatus?: string;
|
|
16
15
|
};
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import "./index.less";
|
|
3
3
|
/** Register Documents Type 和 Quick Filter Access 共用 */
|
|
4
4
|
declare const AddRegisterDocumentsTypeDialog: (props: {
|
|
5
|
+
id: string;
|
|
5
6
|
onCancel?: () => void;
|
|
6
|
-
quickFilter?: boolean;
|
|
7
7
|
}) => React.JSX.Element;
|
|
8
8
|
export default AddRegisterDocumentsTypeDialog;
|
|
@@ -1,23 +1,44 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Modal, Form, Tag,
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Modal, Form, Tag, Divider, Button, Input } from "antd";
|
|
3
3
|
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { useDocumentRegisterStore, useDocumentRegister } from "../../../../data/document-register";
|
|
5
|
+
import { State } from "./state";
|
|
6
|
+
import classnames from "classnames";
|
|
7
|
+
import { cloneDeep } from "lodash-es";
|
|
4
8
|
import "./index.less";
|
|
5
9
|
/** Register Documents Type 和 Quick Filter Access 共用 */
|
|
6
10
|
const AddRegisterDocumentsTypeDialog = (props) => {
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
React.createElement(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
React.createElement(
|
|
20
|
-
|
|
11
|
+
const store = useDocumentRegisterStore();
|
|
12
|
+
const [state] = useState(new State());
|
|
13
|
+
const data = useDocumentRegister(props.id);
|
|
14
|
+
state.update(data);
|
|
15
|
+
return observe(() => {
|
|
16
|
+
var _a;
|
|
17
|
+
return (React.createElement(Modal, { className: "add-register-documents-type-dialog", title: "Add item", open: true, footer: false, onCancel: props.onCancel },
|
|
18
|
+
React.createElement("div", null,
|
|
19
|
+
state.types.map((item) => {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
return (React.createElement(Tag, { key: item.id, className: classnames("voplus-tag", { active: ((_a = state.active) === null || _a === void 0 ? void 0 : _a.id) === item.id }), closeIcon: true, bordered: false, color: ((_b = state.active) === null || _b === void 0 ? void 0 : _b.id) === item.id ? "#217eb2" : "#E6E6E6", onClose: () => onClose(item.id), onClick: () => state.setActive(cloneDeep(item)) }, item.name));
|
|
22
|
+
}),
|
|
23
|
+
React.createElement(Divider, null),
|
|
24
|
+
React.createElement("div", { className: "sub-title" }, "Add new register documents type to show in this section."),
|
|
25
|
+
React.createElement(Form, null,
|
|
26
|
+
React.createElement(Form.Item, { label: "Add" },
|
|
27
|
+
React.createElement(Input, { allowClear: true, value: (_a = state.active) === null || _a === void 0 ? void 0 : _a.name, onChange: (e) => state.setName(e.target.value), onClear: () => state.setActive({ name: "" }) }))),
|
|
28
|
+
React.createElement("div", { className: "footer" },
|
|
29
|
+
React.createElement(Button, { loading: state.loading, onClick: onSave }, "Save")))));
|
|
30
|
+
});
|
|
31
|
+
async function onClose(id) {
|
|
32
|
+
const types = state.getTypes(id);
|
|
33
|
+
state.setActive({ name: "" });
|
|
34
|
+
await store.edit(props.id, { data: { Types: types } });
|
|
35
|
+
}
|
|
36
|
+
async function onSave() {
|
|
37
|
+
state.loading = true;
|
|
38
|
+
await store.edit(props.id, { data: { Types: state.typesEdit } });
|
|
39
|
+
state.setActive({ name: "" });
|
|
40
|
+
state.loading = false;
|
|
41
|
+
}
|
|
21
42
|
};
|
|
22
43
|
export default AddRegisterDocumentsTypeDialog;
|
|
23
44
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/document-register/components/AddRegisterDocumentsTypeDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/document-register/components/AddRegisterDocumentsTypeDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACnG,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC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,CAAC,CAAC;AAEF,eAAe,8BAA8B,CAAC"}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
+
|
|
1
3
|
:global {
|
|
2
4
|
.add-register-documents-type-dialog {
|
|
3
5
|
.voplus-tag {
|
|
4
6
|
margin-bottom: 8px;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
&.active {
|
|
9
|
+
color: #fff;
|
|
10
|
+
.anticon-close {
|
|
11
|
+
color: #fff;
|
|
12
|
+
&:hover {
|
|
13
|
+
color: #fff;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
5
17
|
}
|
|
6
18
|
.ant-divider {
|
|
7
19
|
margin: 16px 0 12px 0;
|
|
@@ -28,13 +40,13 @@
|
|
|
28
40
|
.ant-btn {
|
|
29
41
|
height: 30px;
|
|
30
42
|
color: #fff;
|
|
31
|
-
background:
|
|
43
|
+
background: @primary-color;
|
|
32
44
|
font-weight: bold;
|
|
33
45
|
border: none;
|
|
34
46
|
padding: 0 25px;
|
|
35
47
|
&:hover {
|
|
36
48
|
color: #fff;
|
|
37
|
-
background:
|
|
49
|
+
background: @primary-color;
|
|
38
50
|
}
|
|
39
51
|
}
|
|
40
52
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IDocumentRegister, ITypeLineOptions, ITypeEditOptions } from "../../../../data/document-register";
|
|
2
|
+
export type IType = ITypeLineOptions | {
|
|
3
|
+
id?: number;
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class State {
|
|
7
|
+
loading: boolean;
|
|
8
|
+
active: IType;
|
|
9
|
+
documentRegister: IDocumentRegister;
|
|
10
|
+
constructor();
|
|
11
|
+
update(data: IDocumentRegister): void;
|
|
12
|
+
setName(val: string): void;
|
|
13
|
+
setActive(data: IType): void;
|
|
14
|
+
getTypes(id?: number): ITypeEditOptions[];
|
|
15
|
+
get types(): ITypeLineOptions[];
|
|
16
|
+
get typesEdit(): ITypeEditOptions[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { action, makeObservable, observable, computed } from "mobx";
|
|
3
|
+
export class State {
|
|
4
|
+
constructor() {
|
|
5
|
+
Object.defineProperty(this, "loading", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true,
|
|
9
|
+
value: false
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(this, "active", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: { name: "" }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(this, "documentRegister", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true,
|
|
21
|
+
value: void 0
|
|
22
|
+
});
|
|
23
|
+
makeObservable(this);
|
|
24
|
+
}
|
|
25
|
+
update(data) {
|
|
26
|
+
this.documentRegister = data;
|
|
27
|
+
}
|
|
28
|
+
setName(val) {
|
|
29
|
+
this.active.name = val;
|
|
30
|
+
}
|
|
31
|
+
setActive(data) {
|
|
32
|
+
this.active = data;
|
|
33
|
+
}
|
|
34
|
+
getTypes(id) {
|
|
35
|
+
const data = this.types.filter((item) => item.id !== id);
|
|
36
|
+
const types = [];
|
|
37
|
+
data.map((item) => {
|
|
38
|
+
types.push({ Id: item.id, Name: item.name, QuickAccess: item.quickAccess });
|
|
39
|
+
});
|
|
40
|
+
return types;
|
|
41
|
+
}
|
|
42
|
+
get types() {
|
|
43
|
+
var _a;
|
|
44
|
+
return (_a = this.documentRegister.types) !== null && _a !== void 0 ? _a : [];
|
|
45
|
+
}
|
|
46
|
+
get typesEdit() {
|
|
47
|
+
var _a;
|
|
48
|
+
const types = this.getTypes((_a = this.active) === null || _a === void 0 ? void 0 : _a.id);
|
|
49
|
+
if (this.active.name) {
|
|
50
|
+
return [...types, { Id: this.active.id, Name: this.active.name }];
|
|
51
|
+
}
|
|
52
|
+
return types;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
__decorate([
|
|
56
|
+
observable
|
|
57
|
+
], State.prototype, "loading", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
observable
|
|
60
|
+
], State.prototype, "active", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
observable
|
|
63
|
+
], State.prototype, "documentRegister", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
action
|
|
66
|
+
], State.prototype, "update", null);
|
|
67
|
+
__decorate([
|
|
68
|
+
action
|
|
69
|
+
], State.prototype, "setName", null);
|
|
70
|
+
__decorate([
|
|
71
|
+
action
|
|
72
|
+
], State.prototype, "setActive", null);
|
|
73
|
+
__decorate([
|
|
74
|
+
action
|
|
75
|
+
], State.prototype, "getTypes", null);
|
|
76
|
+
__decorate([
|
|
77
|
+
computed
|
|
78
|
+
], State.prototype, "types", null);
|
|
79
|
+
__decorate([
|
|
80
|
+
computed
|
|
81
|
+
], State.prototype, "typesEdit", null);
|
|
82
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/document-register/components/AddRegisterDocumentsTypeDialog/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AASpE,MAAM,OAAO,KAAK;IAKjB;QAJmB;;;;mBAAmB,KAAK;WAAC;QACzB;;;;mBAAgB,EAAE,IAAI,EAAE,EAAE,EAAE;WAAC;QAC7B;;;;;WAAoC;QAGtD,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAEc,MAAM,CAAC,IAAuB;QAC5C,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC9B,CAAC;IAEc,OAAO,CAAC,GAAW;QACjC,IAAI,CAAC,MAAM,CAAC,IAA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qCAON;AAES;IAAT,QAAQ;kCAER;AAES;IAAT,QAAQ;sCAMR"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Select } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { useDocumentRegister } from "../../../../data/document-register";
|
|
5
|
+
const DocumentRegisterTypesSelect = (props) => {
|
|
6
|
+
const documentRegister = useDocumentRegister(props.id);
|
|
7
|
+
console.log(props.defaultValue, "----Select");
|
|
8
|
+
return observe(() => {
|
|
9
|
+
var _a;
|
|
10
|
+
return (React.createElement(Select, { mode: "multiple", style: { width: "100%" }, options: (_a = documentRegister.types) === null || _a === void 0 ? void 0 : _a.map((item) => {
|
|
11
|
+
return { label: item.name, value: item.id };
|
|
12
|
+
}), ...props }));
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
export default DocumentRegisterTypesSelect;
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/document-register/components/DocumentRegisterTypesSelect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,MAAM,2BAA2B,GAAG,CAAC,KAAmC,EAAE,EAAE;IAC3E,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IAC9C,OAAO,OAAO,CAAC,GAAG,EAAE;;QAAC,OAAA,CACpB,oBAAC,MAAM,IACN,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EACxB,OAAO,EAAE,MAAA,gBAAgB,CAAC,KAAK,0CAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC7C,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;YAC7C,CAAC,CAAC,KACE,KAAK,GACR,CACF,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Modal, Form, Tag, Divider, Button } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { useDocumentRegisterStore, useDocumentRegister, } from "../../../../data/document-register";
|
|
5
|
+
import DocumentRegisterTypesSelect from "../DocumentRegisterTypesSelect";
|
|
6
|
+
import { State } from "./state";
|
|
7
|
+
import "./index.less";
|
|
8
|
+
const QuickFilterAccessDialog = (props) => {
|
|
9
|
+
const { id } = props;
|
|
10
|
+
const store = useDocumentRegisterStore();
|
|
11
|
+
const [state] = useState(new State());
|
|
12
|
+
const data = useDocumentRegister(id);
|
|
13
|
+
state.update(data);
|
|
14
|
+
return observe(() => {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
return (React.createElement(Modal, { className: "quick-filter-access-dialog", title: "Add item", open: true, footer: false, onCancel: props.onCancel },
|
|
17
|
+
React.createElement("div", null,
|
|
18
|
+
((_b = (_a = state.types) === null || _a === void 0 ? void 0 : _a.filter((i) => i.quickAccess)) !== null && _b !== void 0 ? _b : []).map((item) => (React.createElement(Tag, { key: item.id, className: "voplus-tag", closeIcon: true, bordered: false, color: "#E6E6E6", onClose: () => onClose(item.id) }, item.name))),
|
|
19
|
+
React.createElement(Divider, null),
|
|
20
|
+
React.createElement("div", { className: "sub-title" }, "Add new register documents type to show in this section."),
|
|
21
|
+
React.createElement(Form, null,
|
|
22
|
+
React.createElement(Form.Item, { label: "Choose" },
|
|
23
|
+
React.createElement(DocumentRegisterTypesSelect, { id: id, onChange: onChange }))),
|
|
24
|
+
React.createElement("div", { className: "info" }, "*User are only able to add not more than 4 document type file in quick filter."),
|
|
25
|
+
React.createElement("div", { className: "footer" },
|
|
26
|
+
React.createElement(Button, { onClick: onSave, loading: state.loading }, "Save")))));
|
|
27
|
+
});
|
|
28
|
+
async function onClose(id) {
|
|
29
|
+
const types = [];
|
|
30
|
+
state.types.map((item) => {
|
|
31
|
+
types.push({
|
|
32
|
+
Id: item.id,
|
|
33
|
+
Name: item.name,
|
|
34
|
+
QuickAccess: item.id === id ? false : item.quickAccess,
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
await store.edit(props.id, { data: { Types: types } });
|
|
38
|
+
}
|
|
39
|
+
function onChange(value) {
|
|
40
|
+
state.selectVal = value;
|
|
41
|
+
}
|
|
42
|
+
async function onSave() {
|
|
43
|
+
state.loading = true;
|
|
44
|
+
await store.edit(props.id, { data: { Types: state.typesEdit } });
|
|
45
|
+
state.loading = false;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export default QuickFilterAccessDialog;
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/document-register/components/QuickFilterAccessDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAU,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACN,wBAAwB,EACxB,mBAAmB,GAEnB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,2BAA2B,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,KAAK,EA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
+
margin-bottom: 8px;
|
|
5
|
+
}
|
|
6
|
+
.ant-divider {
|
|
7
|
+
margin: 16px 0 12px 0;
|
|
8
|
+
background: #e6e6e6;
|
|
9
|
+
}
|
|
10
|
+
.sub-title {
|
|
11
|
+
color: #5d5d5d;
|
|
12
|
+
line-height: 19px;
|
|
13
|
+
margin-bottom: 13px;
|
|
14
|
+
}
|
|
15
|
+
.ant-form-item {
|
|
16
|
+
margin-bottom: 16px;
|
|
17
|
+
label {
|
|
18
|
+
color: #868686;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
.info {
|
|
22
|
+
color: #cbcbcb;
|
|
23
|
+
line-height: 19px;
|
|
24
|
+
}
|
|
25
|
+
.footer {
|
|
26
|
+
margin-top: 22px;
|
|
27
|
+
text-align: right;
|
|
28
|
+
.ant-btn {
|
|
29
|
+
height: 30px;
|
|
30
|
+
color: #fff;
|
|
31
|
+
background: #217eb2;
|
|
32
|
+
font-weight: bold;
|
|
33
|
+
border: none;
|
|
34
|
+
padding: 0 25px;
|
|
35
|
+
&:hover {
|
|
36
|
+
color: #fff;
|
|
37
|
+
background: #217eb2;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.ant-modal-footer {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IDocumentRegister, ITypeLineOptions, ITypeEditOptions } from "../../../../data/document-register";
|
|
2
|
+
export type IType = ITypeLineOptions | {
|
|
3
|
+
id?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class State {
|
|
7
|
+
loading: boolean;
|
|
8
|
+
selectVal: number[];
|
|
9
|
+
documentRegister: IDocumentRegister;
|
|
10
|
+
constructor();
|
|
11
|
+
update(data: IDocumentRegister): void;
|
|
12
|
+
get types(): ITypeLineOptions[];
|
|
13
|
+
get typesEdit(): ITypeEditOptions[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { action, makeObservable, observable, computed } from "mobx";
|
|
3
|
+
export class State {
|
|
4
|
+
constructor() {
|
|
5
|
+
Object.defineProperty(this, "loading", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true,
|
|
9
|
+
value: false
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(this, "selectVal", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: void 0
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(this, "documentRegister", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true,
|
|
21
|
+
value: void 0
|
|
22
|
+
});
|
|
23
|
+
makeObservable(this);
|
|
24
|
+
}
|
|
25
|
+
update(data) {
|
|
26
|
+
this.documentRegister = data;
|
|
27
|
+
}
|
|
28
|
+
get types() {
|
|
29
|
+
var _a;
|
|
30
|
+
return (_a = this.documentRegister.types) !== null && _a !== void 0 ? _a : [];
|
|
31
|
+
}
|
|
32
|
+
get typesEdit() {
|
|
33
|
+
const types = [];
|
|
34
|
+
this.types.map((item) => {
|
|
35
|
+
var _a;
|
|
36
|
+
const quickAccess = ((_a = this.selectVal) === null || _a === void 0 ? void 0 : _a.filter((i) => i === item.id)) ? true : item.quickAccess;
|
|
37
|
+
types.push({ Id: item.id, Name: item.name, QuickAccess: quickAccess });
|
|
38
|
+
});
|
|
39
|
+
return types;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
__decorate([
|
|
43
|
+
observable
|
|
44
|
+
], State.prototype, "loading", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
observable
|
|
47
|
+
], State.prototype, "selectVal", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
observable
|
|
50
|
+
], State.prototype, "documentRegister", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
action
|
|
53
|
+
], State.prototype, "update", null);
|
|
54
|
+
__decorate([
|
|
55
|
+
computed
|
|
56
|
+
], State.prototype, "types", null);
|
|
57
|
+
__decorate([
|
|
58
|
+
computed
|
|
59
|
+
], State.prototype, "typesEdit", null);
|
|
60
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/document-register/components/QuickFilterAccessDialog/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AASpE,MAAM,OAAO,KAAK;IAKjB;QAJmB;;;;mBAAmB,KAAK;WAAC;QACzB;;;;;WAAoB;QACpB;;;;;WAAoC;QAGtD,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAEc,MAAM,CAAC,IAAuB;QAC5C,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC9B,CAAC;IAES,IAAW,KAAK;;QACzB,OAAO,MAAA,IAAI,CAAC,gBAAgB,CAAC,KAAK,mCAAI,EAAE,CAAC;IAC1C,CAAC;IAES,IAAW,SAAS;QAC7B,MAAM,KAAK,GAAuB,EAAE,CAAC;QACrC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;;YACvB,MAAM,WAAW,GAAG,CAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;YAC3F,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,CAAC;QACxE,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACd,CAAC;CACD;AAxBmB;IAAlB,UAAU;sCAAiC;AACzB;IAAlB,UAAU;wCAA4B;AACpB;IAAlB,UAAU;+CAA4C;AAMxC;IAAd,MAAM;mCAEN;AAES;IAAT,QAAQ;kCAER;AAES;IAAT,QAAQ;sCAOR"}
|
|
@@ -13,7 +13,7 @@ const DocumentRegisterDefaultView = ({ id }) => {
|
|
|
13
13
|
const frame = useFrame();
|
|
14
14
|
if (frame)
|
|
15
15
|
frame.header = null;
|
|
16
|
-
const documentRegister = useDocumentRegister(id, { reload: true, includes: "tags,path" });
|
|
16
|
+
const documentRegister = useDocumentRegister(id, { reload: true, includes: "tags,path,types" });
|
|
17
17
|
return observe(() => (React.createElement(TabItemContext.Provider, { value: store },
|
|
18
18
|
React.createElement(MainContent, { className: "document-register-default-view" },
|
|
19
19
|
React.createElement(MainContent.Nav, { collapsible: true },
|