@voplus/morpho-csp 1.3.5 → 1.3.7
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/CorporateUnitSelectDialog/index.d.ts +12 -0
- package/es/components/CorporateUnitSelectDialog/index.js +33 -0
- package/es/components/CorporateUnitSelectDialog/index.js.map +1 -0
- package/es/components/CorporateUnitSelectDialog/index.less +36 -0
- package/es/components/CorporateUnitSelectDialog/state.d.ts +65 -0
- package/es/components/CorporateUnitSelectDialog/state.js +263 -0
- package/es/components/CorporateUnitSelectDialog/state.js.map +1 -0
- package/es/components/CorporateUnitSortableTree/index.d.ts +10 -0
- package/es/components/CorporateUnitSortableTree/index.js +87 -0
- package/es/components/CorporateUnitSortableTree/index.js.map +1 -0
- package/es/components/CorporateUnitSortableTree/state.d.ts +62 -0
- package/es/components/CorporateUnitSortableTree/state.js +220 -0
- package/es/components/CorporateUnitSortableTree/state.js.map +1 -0
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.d.ts +3 -0
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.js +22 -0
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.js.map +1 -0
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.d.ts +4 -0
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js +84 -0
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js.map +1 -0
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.less +319 -0
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.d.ts +3 -0
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js +21 -0
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js.map +1 -0
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.less +4 -0
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.d.ts +4 -0
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.js +23 -0
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.js.map +1 -0
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.d.ts +3 -0
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js +58 -0
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js.map +1 -0
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.less +45 -0
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.d.ts +3 -0
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js +73 -0
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js.map +1 -0
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.less +12 -0
- package/es/data/corporate/interfaces.d.ts +3 -0
- package/es/data/corporate/types.d.ts +3 -0
- package/es/data/share-certificate/ShareCertificateStore.d.ts +2 -0
- package/es/data/share-certificate/ShareCertificateStore.js +15 -1
- package/es/data/share-certificate/ShareCertificateStore.js.map +1 -1
- package/es/data/share-certificate/interfaces.d.ts +3 -0
- package/es/data/share-certificate/types.d.ts +2 -0
- package/es/modules/corporate/company/components/CompanyDetailsView/index.js +11 -46
- package/es/modules/corporate/company/components/CompanyDetailsView/index.js.map +1 -1
- package/es/modules/corporate/company/components/CompanyProperties/Properties.d.ts +7 -0
- package/es/modules/corporate/company/components/CompanyProperties/Properties.js +68 -0
- package/es/modules/corporate/company/components/CompanyProperties/Properties.js.map +1 -0
- package/es/modules/corporate/company/components/CompanyProperties/index.d.ts +9 -3
- package/es/modules/corporate/company/components/CompanyProperties/index.js +18 -86
- package/es/modules/corporate/company/components/CompanyProperties/index.js.map +1 -1
- package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.d.ts +6 -2
- package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.js +10 -5
- package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.js.map +1 -1
- package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.less +9 -1
- package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.d.ts +10 -4
- package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.js +37 -11
- package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.js.map +1 -1
- package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.less +15 -12
- package/es/modules/corporate/company/member-register/components/CompanyMemberList/state.d.ts +1 -0
- package/es/modules/corporate/company/member-register/components/CompanyMemberList/state.js +9 -0
- package/es/modules/corporate/company/member-register/components/CompanyMemberList/state.js.map +1 -1
- package/es/modules/corporate/company/officer-register/components/OfficerItem/index.d.ts +6 -2
- package/es/modules/corporate/company/officer-register/components/OfficerItem/index.js +13 -6
- package/es/modules/corporate/company/officer-register/components/OfficerItem/index.js.map +1 -1
- package/es/modules/corporate/company/officer-register/components/OfficerItem/index.less +8 -1
- package/es/modules/corporate/company/officer-register/components/OfficerList/index.d.ts +9 -4
- package/es/modules/corporate/company/officer-register/components/OfficerList/index.js +34 -8
- package/es/modules/corporate/company/officer-register/components/OfficerList/index.js.map +1 -1
- package/es/modules/corporate/company/officer-register/components/OfficerList/state.d.ts +1 -0
- package/es/modules/corporate/company/officer-register/components/OfficerList/state.js +9 -0
- package/es/modules/corporate/company/officer-register/components/OfficerList/state.js.map +1 -1
- package/es/modules/corporate/company/pages/CompanyDefaultView/index.js +1 -1
- package/es/modules/corporate/company/pages/CompanyDefaultView/index.js.map +1 -1
- package/es/modules/corporate/company/pages/CompanyPage/CompanySetting.d.ts +7 -0
- package/es/modules/corporate/company/pages/CompanyPage/CompanySetting.js +25 -0
- package/es/modules/corporate/company/pages/CompanyPage/CompanySetting.js.map +1 -0
- package/es/modules/corporate/company/pages/CompanyPage/index.js +6 -3
- package/es/modules/corporate/company/pages/CompanyPage/index.js.map +1 -1
- package/es/modules/corporate/company/pages/CompanyPage/index.less +6 -0
- package/es/modules/corporate/company/share-transactions-register/components/ShareTablePreview/index.d.ts +7 -0
- package/es/modules/corporate/company/share-transactions-register/components/ShareTablePreview/index.js +34 -0
- package/es/modules/corporate/company/share-transactions-register/components/ShareTablePreview/index.js.map +1 -0
- package/es/modules/corporate/company/share-transactions-register/components/ShareTablePreview/index.less +10 -0
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItem/index.d.ts +0 -4
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItem/index.js +21 -42
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItem/index.js.map +1 -1
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItem/index.less +30 -70
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionList/index.d.ts +0 -2
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionList/index.js +3 -3
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionList/index.js.map +1 -1
- package/es/modules/corporate/share-certificate/components/ShareCertificate/index.js +28 -21
- package/es/modules/corporate/share-certificate/components/ShareCertificate/index.js.map +1 -1
- package/es/modules/corporate/share-certificate/components/ShareCertificate/index.less +18 -6
- package/es/modules/corporate/share-certificate/components/ShareCertificateProperties/index.d.ts +1 -1
- package/es/modules/corporate/share-certificate/components/ShareCertificateProperties/index.js +24 -0
- package/es/modules/corporate/share-certificate/components/ShareCertificateProperties/index.js.map +1 -1
- package/es/modules/corporate/share-certificate/components/ShareCertificateQuickViewDialog/index.js +3 -3
- package/es/modules/corporate/share-certificate/components/ShareCertificateQuickViewDialog/index.js.map +1 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/index.js +4 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/index.js.map +1 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToShareholder.d.ts +8 -0
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToShareholder.js +22 -0
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToShareholder.js.map +1 -0
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToSignee.d.ts +8 -0
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToSignee.js +22 -0
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToSignee.js.map +1 -0
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/index.d.ts +2 -0
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/index.js +3 -0
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/index.js.map +1 -0
- package/es/modules/corporate/share-certificate/pages/ShareCertificateClientView/index.d.ts +3 -0
- package/es/modules/corporate/share-certificate/pages/ShareCertificateClientView/index.js +56 -0
- package/es/modules/corporate/share-certificate/pages/ShareCertificateClientView/index.js.map +1 -0
- package/es/modules/corporate/share-certificate/pages/ShareCertificateClientView/index.less +54 -0
- package/es/obsolete/OfficerRegisterDefaultView/index.js +1 -1
- package/es/obsolete/OfficerRegisterDefaultView/index.js.map +1 -1
- package/es/routes.d.ts +6 -0
- package/es/routes.js +13 -0
- package/es/routes.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,95 +1,27 @@
|
|
|
1
|
+
import Properties from "./Properties";
|
|
2
|
+
import PropertiesCard from "@voplus/morpho-ui/es/controls/PropertiesCard";
|
|
1
3
|
import React from "react";
|
|
2
|
-
import { observe, InlineEdit } from "@voplus/morpho-ui";
|
|
3
4
|
import { Skeleton } from "@voplus/antd";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import CorporateStatusLabel from "../../controls/CorporateStatusLabel";
|
|
7
|
-
import InlineEditAddress from "../InlineEditAddress";
|
|
8
|
-
import InlineEditCountry from "../InlineEditCountry";
|
|
9
|
-
import InlineEditType from "../InlineEditType";
|
|
10
|
-
import classnames from "classnames";
|
|
11
|
-
import moment from "moment";
|
|
5
|
+
import { observe } from "@voplus/morpho-ui";
|
|
6
|
+
import { useCorporate } from "../../../../../data/corporate";
|
|
12
7
|
const CompanyPropertiesCard = (props) => {
|
|
13
|
-
const { id } = props;
|
|
8
|
+
const { id, companyProperties } = props;
|
|
14
9
|
const corporate = useCorporate(id, { includes: "registers" });
|
|
15
|
-
const corporateStore = useCorporateStore();
|
|
16
10
|
return observe(() => {
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
title: "Country of Registration",
|
|
20
|
-
content: (React.createElement(InlineEditCountry, { country: corporate.jurisdiction, list: corporate.allowedJurisdictions, onChange: (country) => save({
|
|
21
|
-
Jurisdiction: country,
|
|
22
|
-
}) })),
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
title: "Type",
|
|
26
|
-
content: (React.createElement(InlineEditType, { type: corporate.corporateType, list: ["Proprietorship", "Company", "Partnership"], readonly: !corporate.allowEdit, onSave: (value) => save({
|
|
27
|
-
CorporateType: value,
|
|
28
|
-
}) })),
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
title: "Liability Type",
|
|
32
|
-
content: (React.createElement(InlineEditType, { type: corporate.liabilityType, list: ["Unlimited", "LimitedByShares", "LimitedByGuarantee"], readonly: !corporate.allowEdit, onSave: (value) => save({
|
|
33
|
-
LiabilityType: value,
|
|
34
|
-
}) })),
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
title: "Registration Number",
|
|
38
|
-
content: (React.createElement(InlineEdit, { defaultValue: corporate.registrationNumber, editable: corporate.allowEdit, content: (v) => v.store.value ? (React.createElement("span", null, v.store.value)) : (React.createElement("span", { className: "add-info-style" }, "No Registration Number")), onSave: (value) => value &&
|
|
39
|
-
value !== corporate.registrationNumber &&
|
|
40
|
-
save({
|
|
41
|
-
RegistrationNumber: value,
|
|
42
|
-
}) })),
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
title: "Registration Date",
|
|
46
|
-
content: (React.createElement(InlineEdit, { defaultValue: moment(corporate.registrationDate), editable: corporate.allowEdit, content: (v) => corporate.registrationDate ? (React.createElement("span", null, moment(corporate.registrationDate).format("DD MMM yyyy"))) : (React.createElement("span", { className: "add-info-style" }, "No Registration Date")), editor: DateInputEditor, onSave: changeRegistrationDate })),
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
title: "Registered Address",
|
|
50
|
-
content: (React.createElement(InlineEditAddress, { address: corporate.registeredAddress, readonly: !corporate.allowEdit, modal: true, onChange: (address) => save({
|
|
51
|
-
RegisteredAddress: address,
|
|
52
|
-
}) })),
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
title: "Corporate Status",
|
|
56
|
-
content: (React.createElement(CorporateStatusLabel, { status: corporate.corporateStatus, editable: true, onChange: (status) => save({
|
|
57
|
-
CorporateStatus: status,
|
|
58
|
-
}) })),
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
title: "FYE",
|
|
62
|
-
content: (React.createElement(InlineEdit, { defaultValue: (corporate === null || corporate === void 0 ? void 0 : corporate.fYE) ? moment(corporate === null || corporate === void 0 ? void 0 : corporate.fYE) : undefined, editable: corporate.allowEdit, content: (v) => (corporate === null || corporate === void 0 ? void 0 : corporate.fYE) ? (React.createElement("span", null, moment(corporate === null || corporate === void 0 ? void 0 : corporate.fYE).format("DD MMM"))) : (React.createElement("span", { className: "add-info-style" }, "Add FYE")), editor: DateInputEditor, onSave: changeFYEDate })),
|
|
63
|
-
},
|
|
64
|
-
];
|
|
65
|
-
return corporate.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement("div", { className: "mt-5 overflow-hidden bg-white shadow sm:rounded-lg" },
|
|
66
|
-
React.createElement("div", { className: "px-4 py-4 sm:px-6" },
|
|
67
|
-
React.createElement("h3", { className: "text-lg font-medium leading-6 text-gray-900" }, "Company Details")),
|
|
68
|
-
React.createElement("div", { className: "border-t border-gray-200" },
|
|
69
|
-
React.createElement("dl", null, dataList.map((item, index) => (React.createElement("div", { key: index, className: classnames("flex items-center px-4 py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6", {
|
|
70
|
-
"bg-gray-50": index % 2 === 0,
|
|
71
|
-
"bg-white": index % 2 === 1,
|
|
72
|
-
}) },
|
|
73
|
-
React.createElement("div", { className: "text-sm font-medium text-gray-500" }, item.title),
|
|
74
|
-
React.createElement("div", { className: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0" }, item.content))))))));
|
|
75
|
-
async function save(options) {
|
|
76
|
-
await corporateStore.edit(id, {
|
|
77
|
-
data: options,
|
|
78
|
-
error: "message",
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function changeRegistrationDate(v) {
|
|
82
|
-
// date未变更不保存
|
|
83
|
-
if ((corporate === null || corporate === void 0 ? void 0 : corporate.registrationDate) && moment(v).isSame(corporate.registrationDate, "day"))
|
|
84
|
-
return;
|
|
85
|
-
save({ RegistrationDate: v });
|
|
86
|
-
}
|
|
87
|
-
function changeFYEDate(v) {
|
|
88
|
-
if ((corporate === null || corporate === void 0 ? void 0 : corporate.fYE) && moment(v).isSame(corporate.fYE, "day"))
|
|
89
|
-
return;
|
|
90
|
-
save({ FYE: v !== null ? v : "" });
|
|
91
|
-
}
|
|
11
|
+
return corporate.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement(PropertiesCard, { title: "Company Details", cardList: companyProperties, cardItem: (item) => React.createElement(Properties, { id: id, propertiesName: item }) }));
|
|
92
12
|
});
|
|
93
13
|
};
|
|
14
|
+
CompanyPropertiesCard.defaultProps = {
|
|
15
|
+
companyProperties: [
|
|
16
|
+
"Country of Registration",
|
|
17
|
+
"Type",
|
|
18
|
+
"Liability Type",
|
|
19
|
+
"Registration Number",
|
|
20
|
+
"Registration Date",
|
|
21
|
+
"Registered Address",
|
|
22
|
+
"Corporate Status",
|
|
23
|
+
"FYE",
|
|
24
|
+
],
|
|
25
|
+
};
|
|
94
26
|
export default CompanyPropertiesCard;
|
|
95
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/components/CompanyProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/components/CompanyProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAqC,MAAM,cAAc,CAAC;AAEjE,OAAO,cAAc,MAAM,8CAA8C,CAAC;AAC1E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,MAAM,qBAAqB,GAAG,CAAC,KAAmD,EAAE,EAAE;IACrF,MAAM,EAAE,EAAE,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAC;IACxC,MAAM,SAAS,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;IAE9D,OAAO,OAAO,CAAC,GAAG,EAAE;QACnB,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAC1B,oBAAC,QAAQ,IAAC,MAAM,SAAG,CACnB,CAAC,CAAC,CAAC,CACH,oBAAC,cAAc,IACd,KAAK,EAAC,iBAAiB,EACvB,QAAQ,EAAE,iBAAiB,EAC3B,QAAQ,EAAE,CAAC,IAA2B,EAAE,EAAE,CAAC,oBAAC,UAAU,IAAC,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,GAAI,GACtF,CACF,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAqB,CAAC,YAAY,GAAG;IACpC,iBAAiB,EAAE;QAClB,yBAAyB;QACzB,MAAM;QACN,gBAAgB;QAChB,qBAAqB;QACrB,mBAAmB;QACnB,oBAAoB;QACpB,kBAAkB;QAClB,KAAK;KACL;CACD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.d.ts
CHANGED
|
@@ -4,7 +4,11 @@ declare const CompanyMemberItem: (props: {
|
|
|
4
4
|
id: string;
|
|
5
5
|
/** index of member list */
|
|
6
6
|
index: number;
|
|
7
|
-
className?: string;
|
|
8
|
-
quickView?: boolean;
|
|
7
|
+
className?: string | undefined;
|
|
8
|
+
quickView?: boolean | undefined;
|
|
9
|
+
checked?: boolean | undefined;
|
|
10
|
+
/** 是否在 selectDialog 中显示 */
|
|
11
|
+
selectDialog?: boolean | undefined;
|
|
12
|
+
onSelectCorporateUnit?: ((params?: any) => void) | undefined;
|
|
9
13
|
}) => JSX.Element;
|
|
10
14
|
export default CompanyMemberItem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
3
3
|
import { Badge, Skeleton } from "@voplus/antd";
|
|
4
|
-
import { faCalendar, faEnvelope, faPhone } from "@fortawesome/pro-light-svg-icons";
|
|
4
|
+
import { faCalendar, faEnvelope, faPhone, faCheck } from "@fortawesome/pro-light-svg-icons";
|
|
5
5
|
import { observe } from "@voplus/morpho-ui";
|
|
6
6
|
import { useMember, useMemberStore } from "../../../../../../data/member";
|
|
7
7
|
import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
|
@@ -14,7 +14,7 @@ import classnames from "classnames";
|
|
|
14
14
|
import moment from "moment";
|
|
15
15
|
import styles from "./index.less";
|
|
16
16
|
const CompanyMemberItem = (props) => {
|
|
17
|
-
const { id, index, quickView } = props;
|
|
17
|
+
const { id, index, quickView, selectDialog, checked } = props;
|
|
18
18
|
const [isHover, setIsHover] = useState(false);
|
|
19
19
|
const [visible, setVisible] = useState(false);
|
|
20
20
|
const member = useMember(id);
|
|
@@ -24,7 +24,11 @@ const CompanyMemberItem = (props) => {
|
|
|
24
24
|
const phone = (_a = member.phone) !== null && _a !== void 0 ? _a : (_b = member.contact) === null || _b === void 0 ? void 0 : _b.phone;
|
|
25
25
|
const email = (_c = member.email) !== null && _c !== void 0 ? _c : (_d = member.contact) === null || _d === void 0 ? void 0 : _d.email;
|
|
26
26
|
return (React.createElement(React.Fragment, null,
|
|
27
|
-
React.createElement("div", { className: styles["member-item"], onMouseOver: () => setIsHover(true), onMouseLeave: () => setIsHover(false), onClick: () =>
|
|
27
|
+
React.createElement("div", { className: styles["member-item"], onMouseOver: () => setIsHover(true), onMouseLeave: () => setIsHover(false), onClick: () => {
|
|
28
|
+
var _a;
|
|
29
|
+
quickView && setVisible(true);
|
|
30
|
+
(_a = props.onSelectCorporateUnit) === null || _a === void 0 ? void 0 : _a.call(props, member);
|
|
31
|
+
} }, member.loading ? (React.createElement(Skeleton, { avatar: true, paragraph: { rows: 1 } })) : (React.createElement(React.Fragment, null,
|
|
28
32
|
React.createElement(CompanyMemberAvatar, { id: member.id, index: index, size: "large" }),
|
|
29
33
|
React.createElement("div", { className: "member-info" },
|
|
30
34
|
React.createElement("div", { className: "title" }, (_f = (_e = member.identity) === null || _e === void 0 ? void 0 : _e.fullName) !== null && _f !== void 0 ? _f : (_g = member.contact) === null || _g === void 0 ? void 0 : _g.name),
|
|
@@ -42,10 +46,11 @@ const CompanyMemberItem = (props) => {
|
|
|
42
46
|
phone)),
|
|
43
47
|
React.createElement(ShareTransactionsDataIcon, { id: member.id }))),
|
|
44
48
|
React.createElement("div", { className: classnames("member-item-identity", { hide: isHover }) }, !member.identity && React.createElement(Badge, { status: "warning", text: "Need Identity Info" })),
|
|
45
|
-
React.createElement("div", { className: classnames("member-item-tool", { show: isHover }), onClick: (e) => e.stopPropagation() },
|
|
49
|
+
!selectDialog && (React.createElement("div", { className: classnames("member-item-tool", { show: isHover }), onClick: (e) => e.stopPropagation() },
|
|
46
50
|
React.createElement(ToolBar, { id: id, showMenu: false },
|
|
47
51
|
React.createElement(Open, { url: `/member/${id}` }),
|
|
48
|
-
React.createElement(CompanyMemberMenu, { id: id, unitId: member.contact.id, store: store, closeAside: true }))))
|
|
52
|
+
React.createElement(CompanyMemberMenu, { id: id, unitId: member.contact.id, store: store, closeAside: true })))),
|
|
53
|
+
checked && React.createElement(FAIcon, { icon: faCheck, className: classnames("icon-check") })))),
|
|
49
54
|
visible && (React.createElement(CompanyMemberQuickView, { id: id, visible: true, onCancel: () => setVisible(false) }))));
|
|
50
55
|
});
|
|
51
56
|
};
|
package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/CompanyMemberItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/CompanyMemberItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AA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AAK,CAAC,GAAI,CACpF,CACe,CACjB,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,iBAAiB,CAAC"}
|
package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.less
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import "~@voplus/antd/es/style/themes/default.less";
|
|
2
|
+
|
|
1
3
|
.member-item {
|
|
2
4
|
position: relative;
|
|
3
5
|
display: flex;
|
|
@@ -12,6 +14,7 @@
|
|
|
12
14
|
right: 20px;
|
|
13
15
|
border-bottom: 1px solid #f2f2f2;
|
|
14
16
|
}
|
|
17
|
+
|
|
15
18
|
:global {
|
|
16
19
|
.member-info {
|
|
17
20
|
flex: 1;
|
|
@@ -50,5 +53,10 @@
|
|
|
50
53
|
font-size: 13px;
|
|
51
54
|
line-height: 22px;
|
|
52
55
|
}
|
|
56
|
+
|
|
57
|
+
.icon-check {
|
|
58
|
+
font-size: 18px;
|
|
59
|
+
color: @primary-color;
|
|
60
|
+
}
|
|
53
61
|
}
|
|
54
|
-
}
|
|
62
|
+
}
|
package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ICompanyMember } from "../../../../../../data/member";
|
|
2
3
|
import "./index.less";
|
|
3
4
|
declare const CompanyMemberList: (props: {
|
|
4
|
-
membersRegisterId
|
|
5
|
-
corporateId
|
|
6
|
-
allowEdit?: boolean;
|
|
7
|
-
|
|
5
|
+
membersRegisterId?: string | undefined;
|
|
6
|
+
corporateId?: string | undefined;
|
|
7
|
+
allowEdit?: boolean | undefined;
|
|
8
|
+
/** 是否在 selectDialog 中显示 */
|
|
9
|
+
selectDialog?: boolean | undefined;
|
|
10
|
+
/** 选中的 Corporate Unit list */
|
|
11
|
+
selectedLists?: ICompanyMember[] | undefined;
|
|
12
|
+
onRedirect?: (() => void) | undefined;
|
|
13
|
+
onSelectCorporateUnit?: ((params?: any) => void) | undefined;
|
|
8
14
|
}) => JSX.Element;
|
|
9
15
|
export default CompanyMemberList;
|
|
@@ -20,17 +20,14 @@ import UnitsSelectDialog from "@voplus/morpho-org/es/components/UnitsSelectDialo
|
|
|
20
20
|
import PageHeader from "@voplus/morpho-ui/es/components/PageHeader";
|
|
21
21
|
import "./index.less";
|
|
22
22
|
const CompanyMemberList = (props) => {
|
|
23
|
-
const { membersRegisterId, corporateId, allowEdit } = props;
|
|
23
|
+
const { membersRegisterId, corporateId, allowEdit, selectDialog } = props;
|
|
24
24
|
const [memberTotal, setMemberTotal] = useState(0);
|
|
25
25
|
const view = useViewContext();
|
|
26
26
|
const memberStore = useMemberStore();
|
|
27
27
|
const corporateStore = useCorporateStore();
|
|
28
28
|
const list = useCreateListDataState({
|
|
29
29
|
filterDefaults: {
|
|
30
|
-
filters:
|
|
31
|
-
{ c: "ParentNodeId", o: "=", l: "And", v1: membersRegisterId },
|
|
32
|
-
{ c: "Status", o: "=", l: "And", v1: "Active" },
|
|
33
|
-
],
|
|
30
|
+
filters: filters(),
|
|
34
31
|
},
|
|
35
32
|
}, [membersRegisterId]);
|
|
36
33
|
const state = useDeepMemo(() => new State(), [membersRegisterId]);
|
|
@@ -53,14 +50,43 @@ const CompanyMemberList = (props) => {
|
|
|
53
50
|
onFilter: onFilter,
|
|
54
51
|
} }));
|
|
55
52
|
return (React.createElement(ListDataContext.Provider, { value: list },
|
|
56
|
-
React.createElement(ListView, { headerProps:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
53
|
+
React.createElement(ListView, { headerProps: props.selectDialog
|
|
54
|
+
? {
|
|
55
|
+
filterViewProps: {
|
|
56
|
+
columns: [React.createElement(MemberStatusFilter, { key: "MemberStatusFilter" })],
|
|
57
|
+
},
|
|
58
|
+
viewTitle: " ",
|
|
59
|
+
addAble: false,
|
|
60
|
+
sortable: false,
|
|
61
|
+
quickSearch: true,
|
|
62
|
+
}
|
|
63
|
+
: {
|
|
64
|
+
header: header,
|
|
65
|
+
sortable: false,
|
|
66
|
+
addAble: false,
|
|
67
|
+
}, renderItem: ({ item, index }) => (React.createElement(DocumentItemFrame, { key: item.id },
|
|
68
|
+
React.createElement(CompanyMemberItem, { id: item.id, index: index, selectDialog: selectDialog, quickView: (view === null || view === void 0 ? void 0 : view.Type) === "PropertiesView", checked: state.checkMemberId === item.id, onSelectCorporateUnit: (member) => onCheckItem(member) }))), asideable: !selectDialog, propertiesView: (id) => (view === null || view === void 0 ? void 0 : view.Type) !== "PropertiesView" && (React.createElement(CompanyMemberPropertiesView, { id: id, allowEdit: allowEdit })), className: "member-list-view" }),
|
|
62
69
|
state.addAble && (React.createElement(UnitsSelectDialog, { type: "click", multiSelect: false, onSelect: onSave, onCancel: () => runInAction(() => (state.addAble = false)) }))));
|
|
63
70
|
});
|
|
71
|
+
function filters() {
|
|
72
|
+
let filter = [];
|
|
73
|
+
if (membersRegisterId) {
|
|
74
|
+
filter = [
|
|
75
|
+
{ c: "ParentNodeId", o: "=", l: "And", v1: membersRegisterId },
|
|
76
|
+
{ c: "Status", o: "=", l: "And", v1: "Active" },
|
|
77
|
+
];
|
|
78
|
+
}
|
|
79
|
+
if (selectDialog && corporateId) {
|
|
80
|
+
filter.push({ c: "CorporateId", o: "=", l: "And", v1: corporateId });
|
|
81
|
+
}
|
|
82
|
+
return filter;
|
|
83
|
+
}
|
|
84
|
+
function onCheckItem(member) {
|
|
85
|
+
var _a;
|
|
86
|
+
/** 已选中的再次click时取消选中状态 */
|
|
87
|
+
state.checkMemberId = state.checkMemberId === member.id ? "" : member.id;
|
|
88
|
+
(_a = props.onSelectCorporateUnit) === null || _a === void 0 ? void 0 : _a.call(props, member);
|
|
89
|
+
}
|
|
64
90
|
function onFilter(context) {
|
|
65
91
|
context.paging.Page = 1;
|
|
66
92
|
context.filter();
|
package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/CompanyMemberList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAkB,mBAAmB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/CompanyMemberList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAkB,mBAAmB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAA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C;gBACpC,IAAI,EAAE;oBACL,UAAU,EAAE,iBAAkB;oBAC9B,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;iBAClB;gBACD,KAAK,EAAE,SAAS;aAChB,CAAC,CAAC;YACH,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;SAClB;QAED,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,SAAS,gBAAgB;QACxB,KAAK,CAAC,OAAO,CAAC;YACb,KAAK,EAAE,6CAA6C;YACpD,KAAK,CAAC,IAAI;gBACT,MAAM,cAAc;qBAClB,cAAc,CAAC,WAAY,EAAE,iBAAkB,EAAE;oBACjD,KAAK,EAAE,SAAS;iBAChB,CAAC;qBACD,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;YACtD,CAAC;SACD,CAAC,CAAC;IACJ,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.less
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
@import "~@voplus/antd/es/style/themes/default.less";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
@import "~@voplus/antd/es/style/themes/default.less";
|
|
2
|
+
|
|
3
|
+
:global {
|
|
4
|
+
.member-list-view {
|
|
5
|
+
padding: 0 !important;
|
|
6
|
+
|
|
7
|
+
.list-view-header .view-title {
|
|
8
|
+
flex: 1;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
aside {
|
|
12
|
+
border-top: 0;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -15,6 +15,12 @@ export class State {
|
|
|
15
15
|
writable: true,
|
|
16
16
|
value: false
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(this, "checkMemberId", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true,
|
|
22
|
+
value: ""
|
|
23
|
+
});
|
|
18
24
|
makeAutoObservable(this);
|
|
19
25
|
}
|
|
20
26
|
}
|
|
@@ -24,4 +30,7 @@ __decorate([
|
|
|
24
30
|
__decorate([
|
|
25
31
|
observable
|
|
26
32
|
], State.prototype, "loading", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
observable
|
|
35
|
+
], State.prototype, "checkMemberId", void 0);
|
|
27
36
|
//# sourceMappingURL=state.js.map
|
package/es/modules/corporate/company/member-register/components/CompanyMemberList/state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/CompanyMemberList/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEtD,MAAM,OAAO,KAAK;
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/CompanyMemberList/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEtD,MAAM,OAAO,KAAK;IAOjB;QANA,4BAA4B;QAChB;;;;mBAAiB,KAAK;WAAC;QACvB;;;;mBAAiB,KAAK;WAAC;QAEvB;;;;mBAAuB,EAAE;WAAC;QAGrC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACD;AARY;IAAX,UAAU;sCAAwB;AACvB;IAAX,UAAU;sCAAwB;AAEvB;IAAX,UAAU;4CAA2B"}
|
|
@@ -8,7 +8,11 @@ declare const OfficerItem: (props: {
|
|
|
8
8
|
identityId: string;
|
|
9
9
|
/** index of officer list */
|
|
10
10
|
index: number;
|
|
11
|
-
className?: string;
|
|
12
|
-
|
|
11
|
+
className?: string | undefined;
|
|
12
|
+
checked?: boolean | undefined;
|
|
13
|
+
quickView?: boolean | undefined;
|
|
14
|
+
/** 是否在 selectDialog 中显示 */
|
|
15
|
+
selectDialog?: boolean | undefined;
|
|
16
|
+
onSelectCorporateUnit?: ((params?: any) => void) | undefined;
|
|
13
17
|
}) => JSX.Element;
|
|
14
18
|
export default OfficerItem;
|
|
@@ -2,7 +2,7 @@ import React, { useState } from "react";
|
|
|
2
2
|
import { observe } from "@voplus/morpho-ui";
|
|
3
3
|
import { useOfficer, useOfficerStore } from "../../../../../../data/officer";
|
|
4
4
|
import { Badge, Skeleton } from "@voplus/antd";
|
|
5
|
-
import { faEnvelope, faPhone } from "@fortawesome/pro-light-svg-icons";
|
|
5
|
+
import { faEnvelope, faPhone, faCheck } from "@fortawesome/pro-light-svg-icons";
|
|
6
6
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
7
7
|
import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
|
8
8
|
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
|
@@ -13,7 +13,7 @@ import moment from "moment";
|
|
|
13
13
|
import classnames from "classnames";
|
|
14
14
|
import styles from "./index.less";
|
|
15
15
|
const OfficerItem = (props) => {
|
|
16
|
-
const { id, unitId, index, quickView } = props;
|
|
16
|
+
const { id, unitId, index, quickView, selectDialog, checked } = props;
|
|
17
17
|
const [isHover, setIsHover] = useState(false);
|
|
18
18
|
const [visible, setVisible] = useState(false);
|
|
19
19
|
const officer = useOfficer(id);
|
|
@@ -23,7 +23,11 @@ const OfficerItem = (props) => {
|
|
|
23
23
|
const phone = (_a = officer.phone) !== null && _a !== void 0 ? _a : (_b = officer.contact) === null || _b === void 0 ? void 0 : _b.phone;
|
|
24
24
|
const email = (_c = officer.email) !== null && _c !== void 0 ? _c : (_d = officer.contact) === null || _d === void 0 ? void 0 : _d.email;
|
|
25
25
|
return (React.createElement(React.Fragment, null,
|
|
26
|
-
React.createElement("div", { className: styles["officer-item"], onMouseOver: () => setIsHover(true), onMouseLeave: () => setIsHover(false), onClick: () =>
|
|
26
|
+
React.createElement("div", { className: styles["officer-item"], onMouseOver: () => setIsHover(true), onMouseLeave: () => setIsHover(false), onClick: () => {
|
|
27
|
+
var _a;
|
|
28
|
+
quickView && setVisible(true);
|
|
29
|
+
(_a = props.onSelectCorporateUnit) === null || _a === void 0 ? void 0 : _a.call(props, officer);
|
|
30
|
+
} }, officer.loading ? (React.createElement(Skeleton, { avatar: true, paragraph: { rows: 1 } })) : (React.createElement(React.Fragment, null,
|
|
27
31
|
React.createElement(UnitAvatar, { id: unitId, index: index, size: "large" }),
|
|
28
32
|
React.createElement("div", { className: "officer-info" },
|
|
29
33
|
React.createElement("div", { className: "title" }, (_f = (_e = officer.identity) === null || _e === void 0 ? void 0 : _e.fullName) !== null && _f !== void 0 ? _f : (_g = officer.contact) === null || _g === void 0 ? void 0 : _g.name,
|
|
@@ -42,13 +46,16 @@ const OfficerItem = (props) => {
|
|
|
42
46
|
officer.cease && (React.createElement("span", { className: "margin-right-15" },
|
|
43
47
|
"Cease Date: ",
|
|
44
48
|
moment(officer.cease).format("YYYY-MM-DD"))))),
|
|
45
|
-
React.createElement("div", { className: classnames("officer-item-identity", {
|
|
49
|
+
React.createElement("div", { className: classnames("officer-item-identity", {
|
|
50
|
+
hide: selectDialog ? false : isHover,
|
|
51
|
+
}) },
|
|
46
52
|
!officer.identity && React.createElement(Badge, { status: "warning", text: "Need Identity Info" }),
|
|
47
53
|
officer.status && officer.identity && (React.createElement("div", null, officer.status === "Present" && React.createElement(Badge, { status: "success", text: "Present" })))),
|
|
48
|
-
React.createElement("div", { className: classnames("officer-item-tool", { show: isHover }), onClick: (e) => e.stopPropagation() },
|
|
54
|
+
!selectDialog && (React.createElement("div", { className: classnames("officer-item-tool", { show: isHover }), onClick: (e) => e.stopPropagation() },
|
|
49
55
|
React.createElement(ToolBar, { id: id, showMenu: false },
|
|
50
56
|
React.createElement(Open, { url: `/officer/${id}` }),
|
|
51
|
-
React.createElement(CompanOfficerMenu, { id: id, unitId: officer.contact.id, store: store, closeAside: true }))))
|
|
57
|
+
React.createElement(CompanOfficerMenu, { id: id, unitId: officer.contact.id, store: store, closeAside: true })))),
|
|
58
|
+
checked && React.createElement(FAIcon, { icon: faCheck, className: classnames("icon-check") })))),
|
|
52
59
|
visible && React.createElement(OfficerQuickView, { id: id, visible: true, onCancel: () => setVisible(false) })));
|
|
53
60
|
});
|
|
54
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/components/OfficerItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/components/OfficerItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,O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E,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAI,CAC1E,CACjB,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import "~@voplus/antd/es/style/themes/default.less";
|
|
2
|
+
|
|
1
3
|
.officer-item {
|
|
2
4
|
position: relative;
|
|
3
5
|
display: flex;
|
|
@@ -51,5 +53,10 @@
|
|
|
51
53
|
font-size: 13px;
|
|
52
54
|
line-height: 22px;
|
|
53
55
|
}
|
|
56
|
+
|
|
57
|
+
.icon-check {
|
|
58
|
+
font-size: 18px;
|
|
59
|
+
color: @primary-color;
|
|
60
|
+
}
|
|
54
61
|
}
|
|
55
|
-
}
|
|
62
|
+
}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { IOfficer } from "../../../../../../data/officer";
|
|
2
3
|
import "./index.less";
|
|
3
4
|
declare const OfficerList: (props: {
|
|
4
|
-
officersRegisterId
|
|
5
|
-
corporateId
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
officersRegisterId?: string | undefined;
|
|
6
|
+
corporateId?: string | undefined;
|
|
7
|
+
/** 是否在 selectDialog 中显示 */
|
|
8
|
+
selectDialog?: boolean | undefined;
|
|
9
|
+
allowEdit?: boolean | undefined;
|
|
10
|
+
selectedLists?: IOfficer[] | undefined;
|
|
11
|
+
onRedirect?: (() => void) | undefined;
|
|
12
|
+
onSelectCorporateUnit?: ((params?: any) => void) | undefined;
|
|
8
13
|
}) => JSX.Element;
|
|
9
14
|
export default OfficerList;
|
|
@@ -21,14 +21,14 @@ import UnitsSelectDialog from "@voplus/morpho-org/es/components/UnitsSelectDialo
|
|
|
21
21
|
import PageHeader from "@voplus/morpho-ui/es/components/PageHeader";
|
|
22
22
|
import "./index.less";
|
|
23
23
|
const OfficerList = (props) => {
|
|
24
|
-
const { officersRegisterId, corporateId, allowEdit } = props;
|
|
24
|
+
const { officersRegisterId, corporateId, allowEdit, selectDialog } = props;
|
|
25
25
|
const [officerTotal, setOfficerTotal] = useState(0);
|
|
26
26
|
const view = useViewContext();
|
|
27
27
|
const officerStore = useOfficerStore();
|
|
28
28
|
const corporateStore = useCorporateStore();
|
|
29
29
|
const list = useCreateListDataState({
|
|
30
30
|
filterDefaults: {
|
|
31
|
-
filters:
|
|
31
|
+
filters: filters(),
|
|
32
32
|
},
|
|
33
33
|
}, [officersRegisterId]);
|
|
34
34
|
const state = useDeepMemo(() => new State(), [officersRegisterId]);
|
|
@@ -63,17 +63,43 @@ const OfficerList = (props) => {
|
|
|
63
63
|
React.createElement(Menu.Item, { key: "Manager" }, "Manager"))),
|
|
64
64
|
}, moreFunBtn: toolBtns }));
|
|
65
65
|
return (React.createElement(ListDataContext.Provider, { value: list },
|
|
66
|
-
React.createElement(ListView, { headerProps:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
React.createElement(ListView, { headerProps: props.selectDialog
|
|
67
|
+
? {
|
|
68
|
+
filterViewProps: {
|
|
69
|
+
columns: [React.createElement(OfficerStatusFilter, { key: "OfficerStatusFilter" })],
|
|
70
|
+
},
|
|
71
|
+
viewTitle: " ",
|
|
72
|
+
addAble: false,
|
|
73
|
+
sortable: false,
|
|
74
|
+
quickSearch: true,
|
|
75
|
+
}
|
|
76
|
+
: {
|
|
77
|
+
header: header,
|
|
78
|
+
sortable: false,
|
|
79
|
+
addAble: false,
|
|
80
|
+
}, asideable: !selectDialog, renderItem: ({ item, index }) => {
|
|
71
81
|
var _a;
|
|
72
82
|
return (React.createElement(DocumentItemFrame, { key: item.id },
|
|
73
|
-
React.createElement(OfficerItem, { id: item.id, unitId: item.contact.id, identityId: (_a = item.identity) === null || _a === void 0 ? void 0 : _a.id, index: index, quickView: (view === null || view === void 0 ? void 0 : view.Type) === "PropertiesView" })));
|
|
83
|
+
React.createElement(OfficerItem, { id: item.id, unitId: item.contact.id, identityId: (_a = item.identity) === null || _a === void 0 ? void 0 : _a.id, index: index, quickView: (view === null || view === void 0 ? void 0 : view.Type) === "PropertiesView", selectDialog: selectDialog, checked: state.checkOfficerId === item.id, onSelectCorporateUnit: (officer) => onCheckItem(officer) })));
|
|
74
84
|
}, propertiesView: (id) => (view === null || view === void 0 ? void 0 : view.Type) !== "PropertiesView" && (React.createElement(OfficerPropertiesView, { id: id, allowEdit: allowEdit })), className: "officer-list-view" }),
|
|
75
85
|
state.addAble && (React.createElement(UnitsSelectDialog, { type: "click", multiSelect: false, onSelect: onSave, onCancel: () => runInAction(() => (state.addAble = false)) }))));
|
|
76
86
|
});
|
|
87
|
+
function filters() {
|
|
88
|
+
const filter = [];
|
|
89
|
+
if (officersRegisterId) {
|
|
90
|
+
filter.push({ c: "ParentNodeId", o: "=", l: "And", v1: officersRegisterId });
|
|
91
|
+
}
|
|
92
|
+
if (selectDialog && corporateId) {
|
|
93
|
+
filter.push({ c: "CorporateId", o: "=", l: "And", v1: corporateId });
|
|
94
|
+
}
|
|
95
|
+
return filter;
|
|
96
|
+
}
|
|
97
|
+
function onCheckItem(member) {
|
|
98
|
+
var _a;
|
|
99
|
+
/** 已选中的再次click时取消选中状态 */
|
|
100
|
+
state.checkOfficerId = state.checkOfficerId === member.id ? "" : member.id;
|
|
101
|
+
(_a = props.onSelectCorporateUnit) === null || _a === void 0 ? void 0 : _a.call(props, member);
|
|
102
|
+
}
|
|
77
103
|
/** 新增officerItem */
|
|
78
104
|
async function onSave(unit) {
|
|
79
105
|
/** SelectLegalContactDialog 选择/新增有identity信息的unit */
|