@voplus/morpho-csp 10.0.9 → 10.0.10

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.
Files changed (117) hide show
  1. package/es/components/CorporateUnitSelectDialog/index.d.ts +1 -1
  2. package/es/components/CorporateUnitSelectDialog/index.js +4 -12
  3. package/es/components/CorporateUnitSelectDialog/index.js.map +1 -1
  4. package/es/components/CorporateUnitSelectDialog/state.d.ts +2 -2
  5. package/es/components/CorporateUnitSelectDialog/state.js +6 -9
  6. package/es/components/CorporateUnitSelectDialog/state.js.map +1 -1
  7. package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchTabs/index.js +1 -1
  8. package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchTabs/index.js.map +1 -1
  9. package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileLevelLabel/index.js +3 -1
  10. package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileLevelLabel/index.js.map +1 -1
  11. package/es/modules/corporate/company/components/CorporateList/index.js +1 -1
  12. package/es/modules/corporate/company/components/CorporateList/index.js.map +1 -1
  13. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.d.ts +1 -13
  14. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.js +39 -94
  15. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.js.map +1 -1
  16. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCellSimple.d.ts +13 -0
  17. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCellSimple.js +63 -0
  18. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCellSimple.js.map +1 -0
  19. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.css +122 -0
  20. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.d.ts +1 -0
  21. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.js +95 -66
  22. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.js.map +1 -1
  23. package/es/modules/corporate/company/controller-register/controls/ControllerStatusLabel/ControllerStatusLabel2.js +13 -23
  24. package/es/modules/corporate/company/controller-register/controls/ControllerStatusLabel/ControllerStatusLabel2.js.map +1 -1
  25. package/es/modules/corporate/company/controls/CorporateStatusLabel/index.css +22 -0
  26. package/es/modules/corporate/company/controls/CorporateStatusLabel/index.d.ts +1 -0
  27. package/es/modules/corporate/company/controls/CorporateStatusLabel/index.js +8 -1
  28. package/es/modules/corporate/company/controls/CorporateStatusLabel/index.js.map +1 -1
  29. package/es/modules/corporate/company/member-register/components/MemberTableList/index.d.ts +3 -2
  30. package/es/modules/corporate/company/member-register/components/MemberTableList/index.js +9 -63
  31. package/es/modules/corporate/company/member-register/components/MemberTableList/index.js.map +1 -1
  32. package/es/modules/corporate/company/member-register/components/{MemberTableList → MemberTableListCard}/TableCellDetail.d.ts +1 -13
  33. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellDetail.js +77 -0
  34. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellDetail.js.map +1 -0
  35. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellSimple.d.ts +13 -0
  36. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellSimple.js +52 -0
  37. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellSimple.js.map +1 -0
  38. package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.d.ts +16 -1
  39. package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.js +133 -17
  40. package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.js.map +1 -1
  41. package/es/modules/corporate/company/member-register/controls/MemberStatusLabel/MemberStatusLabel2.js +12 -15
  42. package/es/modules/corporate/company/member-register/controls/MemberStatusLabel/MemberStatusLabel2.js.map +1 -1
  43. package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.d.ts +3 -2
  44. package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.js +11 -74
  45. package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.js.map +1 -1
  46. package/es/modules/corporate/company/officer-register/components/{OfficerTableList → OfficerTableListCard}/TableCellDetail.d.ts +1 -13
  47. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellDetail.js +87 -0
  48. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellDetail.js.map +1 -0
  49. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellSimple.d.ts +13 -0
  50. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellSimple.js +65 -0
  51. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellSimple.js.map +1 -0
  52. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.d.ts +24 -3
  53. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.js +140 -22
  54. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.js.map +1 -1
  55. package/es/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.d.ts +2 -0
  56. package/es/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.js +37 -20
  57. package/es/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.js.map +1 -1
  58. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItems/index.css +1 -1
  59. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItems/index.js +1 -1
  60. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionProperties/index.js +1 -1
  61. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionProperties/index.js.map +1 -1
  62. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTabs/index.js +2 -5
  63. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTabs/index.js.map +1 -1
  64. package/es/modules/corporate/company/share-transactions-register/pages/ShareTransactionDefaultView/index.css +1 -1
  65. package/es/modules/corporate/filing-record/components/FilingList/index.js +1 -1
  66. package/es/modules/corporate/filing-record/components/FilingList/index.js.map +1 -1
  67. package/es/modules/corporate/filing-record/filing-year/components/FilingYearCard/index.d.ts +0 -1
  68. package/es/modules/corporate/filing-record/filing-year/components/FilingYearCard/index.js +0 -1
  69. package/es/modules/corporate/filing-record/filing-year/components/FilingYearCard/index.js.map +1 -1
  70. package/es/modules/corporate/filing-record/filing-year/components/FilingYearListCard/index.d.ts +0 -1
  71. package/es/modules/corporate/filing-record/filing-year/components/FilingYearListCard/index.js +0 -1
  72. package/es/modules/corporate/filing-record/filing-year/components/FilingYearListCard/index.js.map +1 -1
  73. package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailItem/index.js +7 -29
  74. package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailItem/index.js.map +1 -1
  75. package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailList/index.js +1 -1
  76. package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailList/index.js.map +1 -1
  77. package/es/page/RegisterTablePage/Controller.d.ts +3 -0
  78. package/es/page/RegisterTablePage/Controller.js +134 -0
  79. package/es/page/RegisterTablePage/Controller.js.map +1 -0
  80. package/es/page/RegisterTablePage/index.d.ts +3 -0
  81. package/es/page/RegisterTablePage/index.js +63 -0
  82. package/es/page/RegisterTablePage/index.js.map +1 -0
  83. package/package.json +1 -2
  84. package/es/components/RegisterTable/index.d.ts +0 -31
  85. package/es/components/RegisterTable/index.js +0 -55
  86. package/es/components/RegisterTable/index.js.map +0 -1
  87. package/es/components/StatusLabel/index.d.ts +0 -36
  88. package/es/components/StatusLabel/index.js +0 -16
  89. package/es/components/StatusLabel/index.js.map +0 -1
  90. package/es/modules/corporate/company/member-register/components/MemberTableList/TableCellDetail.js +0 -125
  91. package/es/modules/corporate/company/member-register/components/MemberTableList/TableCellDetail.js.map +0 -1
  92. package/es/modules/corporate/company/member-register/components/MemberTableListCard/MemberRegisterContainer.d.ts +0 -21
  93. package/es/modules/corporate/company/member-register/components/MemberTableListCard/MemberRegisterContainer.js +0 -86
  94. package/es/modules/corporate/company/member-register/components/MemberTableListCard/MemberRegisterContainer.js.map +0 -1
  95. package/es/modules/corporate/company/officer-register/components/OfficerTableList/TableCellDetail.js +0 -140
  96. package/es/modules/corporate/company/officer-register/components/OfficerTableList/TableCellDetail.js.map +0 -1
  97. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/OfficerRegisterContainer.d.ts +0 -23
  98. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/OfficerRegisterContainer.js +0 -87
  99. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/OfficerRegisterContainer.js.map +0 -1
  100. package/es/modules/corporate/company/pages/RegisterTablePage/index.d.ts +0 -10
  101. package/es/modules/corporate/company/pages/RegisterTablePage/index.js +0 -151
  102. package/es/modules/corporate/company/pages/RegisterTablePage/index.js.map +0 -1
  103. package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/YearNode.d.ts +0 -10
  104. package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/YearNode.js +0 -52
  105. package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/YearNode.js.map +0 -1
  106. package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/index.d.ts +0 -7
  107. package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/index.js +0 -94
  108. package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/index.js.map +0 -1
  109. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/TableCell.d.ts +0 -22
  110. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/TableCell.js +0 -92
  111. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/TableCell.js.map +0 -1
  112. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/getDiffDay.d.ts +0 -1
  113. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/getDiffDay.js +0 -9
  114. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/getDiffDay.js.map +0 -1
  115. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/index.d.ts +0 -5
  116. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/index.js +0 -52
  117. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/index.js.map +0 -1
@@ -0,0 +1,77 @@
1
+ import { faEllipsisVerticalSolid, faEnvelopeSolid, faPhoneSolid, faBarsProgressSolid, faUserGroupSolid, faCircleCheckSolid, FontAwesomeIcon as FAIcon, } from "@voplus/morpho-ui/es/faIcons";
2
+ import { Open } from "@voplus/morpho-document-core/es/controls/ToolBar/buttons";
3
+ import ToolBar from "@voplus/morpho-document-core/es/controls/ToolBar";
4
+ import { observe } from "@voplus/morpho-ui";
5
+ import UnitAvatar from "@voplus/morpho-org/es/components/UnitAvatar/LoadedUnitAvatar";
6
+ import UnitNameNoteAlert from "@voplus/morpho-org/es/components/UnitNameNoteAlert";
7
+ import classnames from "classnames";
8
+ import IdentityStatus from "@voplus/morpho-org/es/modules/verification/IdentityStatus";
9
+ import React from "react";
10
+ import CompanyMemberMenu from "../../../controls/CompanyRegisterMenu";
11
+ import TagView from "@voplus/morpho-org/es/modules/tag/TagView/TagView2";
12
+ import { useMemberStore, useMember } from "../../../../../../data/member";
13
+ import MemberStatusLabel from "../../controls/MemberStatusLabel/MemberStatusLabel2";
14
+ import "./index.css";
15
+ export const columnsListDetail = [
16
+ {
17
+ title: (React.createElement(React.Fragment, null,
18
+ React.createElement(FAIcon, { icon: faUserGroupSolid }),
19
+ " Members Name")),
20
+ dataIndex: "name",
21
+ width: "32%",
22
+ },
23
+ {
24
+ title: (React.createElement(React.Fragment, null,
25
+ React.createElement(FAIcon, { icon: faCircleCheckSolid }),
26
+ " Identity Status")),
27
+ dataIndex: "identity",
28
+ },
29
+ {
30
+ title: (React.createElement(React.Fragment, null,
31
+ React.createElement(FAIcon, { icon: faBarsProgressSolid }),
32
+ " Status")),
33
+ dataIndex: "status",
34
+ },
35
+ {
36
+ title: (React.createElement(React.Fragment, null,
37
+ React.createElement(FAIcon, { icon: faBarsProgressSolid }),
38
+ " Tags")),
39
+ dataIndex: "tags",
40
+ },
41
+ {
42
+ title: " ",
43
+ dataIndex: "menu",
44
+ width: "72px",
45
+ },
46
+ ];
47
+ const TableCellDetail = (props) => {
48
+ const { dataIndex, record, rowIndex, children, ...restProps } = props;
49
+ const store = useMemberStore();
50
+ return observe(() => {
51
+ var _a, _b, _c, _d, _e, _f, _g;
52
+ const member = useMember(record === null || record === void 0 ? void 0 : record.id, { reload: (d) => !d.tags, includes: "tags" });
53
+ return (React.createElement("td", { ...restProps }, dataIndex === "name" ? (React.createElement("div", { className: "member-table-item-info" },
54
+ React.createElement(UnitAvatar, { unit: member.contact }),
55
+ React.createElement("div", { className: "member-table-item-name" },
56
+ ((_a = member.identity) === null || _a === void 0 ? void 0 : _a.fullName) ? (member.identity.fullName) : member.contact ? (React.createElement(UnitNameNoteAlert, { id: member.contact.id, name: member.contact.name })) : null,
57
+ React.createElement("div", { className: "member-table-item-contact2" },
58
+ (member.email || ((_b = member.contact) === null || _b === void 0 ? void 0 : _b.email)) && (React.createElement("div", null,
59
+ React.createElement("span", null,
60
+ React.createElement(FAIcon, { icon: faEnvelopeSolid })),
61
+ member.email || ((_c = member.contact) === null || _c === void 0 ? void 0 : _c.email))),
62
+ (member.phone || ((_d = member.contact) === null || _d === void 0 ? void 0 : _d.phone)) && (React.createElement("div", null,
63
+ React.createElement("span", null,
64
+ React.createElement(FAIcon, { icon: faPhoneSolid })),
65
+ member.phone || ((_e = member.contact) === null || _e === void 0 ? void 0 : _e.phone))))))) : dataIndex === "identity" ? (((_f = member.identity) === null || _f === void 0 ? void 0 : _f.id) ? (React.createElement(IdentityStatus, { id: member.identity.id })) : null) : dataIndex === "status" ? (React.createElement("div", { style: { display: "flex" } },
66
+ React.createElement(MemberStatusLabel, { className: classnames("member-table-status-label", {
67
+ "need-identity": !member.identity,
68
+ }), status: !member.identity ? "Need Identity" : member.status }))) : dataIndex === "tags" ? (React.createElement(TagView, { id: record.id, tags: member.tags, editable: false, items: store.items, maxCount: 1 })) : dataIndex === "menu" ? (React.createElement(ToolBar, { id: record.id, showMenu: false },
69
+ React.createElement(Open, { url: `/member/${record.id}` }),
70
+ React.createElement(CompanyMemberMenu, { id: record.id, title: "Member Menu", unitId: (_g = member.contact) === null || _g === void 0 ? void 0 : _g.id, store: store, closeAside: true, icon: React.createElement(FAIcon, { icon: faEllipsisVerticalSolid }), onChangeContact: (unitId) => store.edit(record.id, {
71
+ data: { ContactId: unitId },
72
+ error: "message",
73
+ }) }))) : (children)));
74
+ });
75
+ };
76
+ export default TableCellDetail;
77
+ //# sourceMappingURL=TableCellDetail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCellDetail.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/MemberTableListCard/TableCellDetail.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,uBAAuB,EACvB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,IAAI,MAAM,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,0DAA0D,CAAC;AAChF,OAAO,OAAO,MAAM,kDAAkD,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,UAAU,MAAM,8DAA8D,CAAC;AACtF,OAAO,iBAAiB,MAAM,oDAAoD,CAAC;AACnF,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,MAAM,2DAA2D,CAAC;AACvF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AACtE,OAAO,OAAO,MAAM,oDAAoD,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,iBAAiB,MAAM,qDAAqD,CAAC;AACpF,OAAO,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC;QACC,KAAK,EAAE,CACN;YACC,oBAAC,MA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+ export declare const columnsSimpleList: ({
4
+ title: React.JSX.Element;
5
+ dataIndex: string;
6
+ width?: undefined;
7
+ } | {
8
+ title: string;
9
+ dataIndex: string;
10
+ width: string;
11
+ })[];
12
+ declare const TableCellSimple: (props: any) => React.JSX.Element;
13
+ export default TableCellSimple;
@@ -0,0 +1,52 @@
1
+ import React from "react";
2
+ import { faEllipsisVerticalSolid, faBarsProgressSolid, faUserGroupSolid, FontAwesomeIcon as FAIcon, } from "@voplus/morpho-ui/es/faIcons";
3
+ import { observe } from "@voplus/morpho-ui";
4
+ import { Open } from "@voplus/morpho-document-core/es/controls/ToolBar/buttons";
5
+ import { useMemberStore, useMember } from "../../../../../../data/member";
6
+ import UnitNameNoteAlert from "@voplus/morpho-org/es/components/UnitNameNoteAlert";
7
+ import IdentityStatus from "@voplus/morpho-org/es/modules/verification/IdentityStatus";
8
+ import CompanyMemberMenu from "../../../controls/CompanyRegisterMenu";
9
+ import MemberStatusLabel from "../../controls/MemberStatusLabel/MemberStatusLabel2";
10
+ import ToolBar from "@voplus/morpho-document-core/es/controls/ToolBar";
11
+ import classnames from "classnames";
12
+ import "./index.css";
13
+ export const columnsSimpleList = [
14
+ {
15
+ title: (React.createElement(React.Fragment, null,
16
+ React.createElement(FAIcon, { icon: faUserGroupSolid }),
17
+ " Members Details")),
18
+ dataIndex: "details",
19
+ // width: "32%",
20
+ },
21
+ {
22
+ title: (React.createElement(React.Fragment, null,
23
+ React.createElement(FAIcon, { icon: faBarsProgressSolid }),
24
+ " Identity Status")),
25
+ dataIndex: "identity",
26
+ },
27
+ {
28
+ title: " ",
29
+ dataIndex: "menu",
30
+ width: "72px",
31
+ },
32
+ ];
33
+ const TableCellSimple = (props) => {
34
+ const { dataIndex, record, rowIndex, children, ...restProps } = props;
35
+ const store = useMemberStore();
36
+ return observe(() => {
37
+ var _a, _b, _c;
38
+ const member = useMember(record === null || record === void 0 ? void 0 : record.id, { reload: (d) => !d.tags, includes: "tags" });
39
+ return (React.createElement("td", { ...restProps }, dataIndex === "details" ? (React.createElement("div", { className: "member-table-item-details" },
40
+ React.createElement("div", null, ((_a = member.identity) === null || _a === void 0 ? void 0 : _a.fullName) ? (member.identity.fullName) : member.contact ? (React.createElement(UnitNameNoteAlert, { id: member.contact.id, name: member.contact.name })) : null),
41
+ React.createElement(MemberStatusLabel, { className: classnames("member-table-status-label", {
42
+ "need-identity": !member.identity,
43
+ }), status: !member.identity ? "Need Identity" : member.status }))) : dataIndex === "identity" ? (((_b = member.identity) === null || _b === void 0 ? void 0 : _b.id) ? (React.createElement(IdentityStatus, { id: member.identity.id })) : null) : dataIndex === "menu" ? (React.createElement(ToolBar, { id: record.id, showMenu: false },
44
+ React.createElement(Open, { url: `/member/${record.id}` }),
45
+ React.createElement(CompanyMemberMenu, { id: record.id, title: "Member Menu", unitId: (_c = member.contact) === null || _c === void 0 ? void 0 : _c.id, store: store, closeAside: true, icon: React.createElement(FAIcon, { icon: faEllipsisVerticalSolid }), onChangeContact: (unitId) => store.edit(record.id, {
46
+ data: { ContactId: unitId },
47
+ error: "message",
48
+ }) }))) : (children)));
49
+ });
50
+ };
51
+ export default TableCellSimple;
52
+ //# sourceMappingURL=TableCellSimple.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCellSimple.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/MemberTableListCard/TableCellSimple.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACN,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,IAAI,MAAM,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,0DAA0D,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,iBAAiB,MAAM,oDAAoD,CAAC;AACnF,OAAO,cA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,CAAC,EAAE,EAAE;oBACrB,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;oBAC3B,KAAK,EAAE,SAAS;iBAChB,CAAC,GAEF,CACO,CACV,CAAC,CAAC,CAAC,CACH,QAAQ,CACR,CACG,CACL,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,9 +1,24 @@
1
- import React from "react";
1
+ import React, { ReactNode } from "react";
2
+ import { ListHeaderToolProps } from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
2
3
  import "./index.css";
3
4
  export type MemberListProps = {
4
5
  membersRegisterId: string;
5
6
  corporateId: string;
7
+ /** 选中的 Corporate Unit list */
8
+ /** 是否需要filter Status active */
6
9
  active?: boolean;
10
+ tableCardProps?: {
11
+ className?: string;
12
+ isHeader?: boolean;
13
+ title?: ReactNode;
14
+ };
15
+ /** 头部的btn显示默认样式 还是 card 的样式 */
16
+ type?: "card";
17
+ /** 是否显示详细的table内容 */
18
+ tableDetail?: boolean;
19
+ listHeaderToolProps?: ListHeaderToolProps;
20
+ onRedirect?: () => void;
21
+ onSelectCorporateUnit?: (params?: any) => void;
7
22
  onDelete?: (corporateId: string, membersRegisterId: string) => void;
8
23
  };
9
24
  declare const MemberTableListCard: (props: MemberListProps) => React.JSX.Element;
@@ -1,19 +1,87 @@
1
- import React from "react";
1
+ import React, { useState, useRef, useEffect } from "react";
2
+ import TableCellSimple, { columnsSimpleList } from "./TableCellSimple";
3
+ import TableCellDetail, { columnsListDetail } from "./TableCellDetail";
2
4
  import TableCell, { columnsList } from "./TableCell";
3
- import { Badge, Button } from "antd";
5
+ import { Badge, Button, Dropdown, Modal } from "antd";
6
+ import { State } from "./state";
7
+ import { useCorporate } from "../../../../../../data/corporate";
8
+ import { faPrintSolid, faEllipsisVerticalSolid, faTrashSolid, FontAwesomeIcon as FAIcon, } from "@voplus/morpho-ui/es/faIcons";
4
9
  import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
5
- import { observe } from "@voplus/morpho-ui";
10
+ import { useDeepMemo, useApplicationContext } from "@voplus/morpho-data";
11
+ import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
12
+ import { useMemberListEffect, useMemberStore } from "../../../../../../data/member";
13
+ import { useAutoUpdateListData } from "@voplus/morpho-document-core";
14
+ import { observe, useRenderOnChange, useAsideContentContext } from "@voplus/morpho-ui";
6
15
  import DocumentTableListCard from "@voplus/morpho-ui/es/components/DocumentTableListCard";
7
16
  import TableListCard from "@voplus/morpho-ui/es/components/TableListCard";
17
+ import UnitsSelectDialog from "@voplus/morpho-org/es/components/UnitsSelectDialog";
8
18
  import AddDropDown2 from "@voplus/morpho-ui/es/components/layout/ListView/controls/AddDropDown2";
9
19
  import MemberStatusFilter from "../../controls/MemberStatusFilter";
20
+ import MemberQuickViewDialog from "../CompanyMemberQuickView";
21
+ import MemberPropertiesView from "../CompanyMemberPropertiesView";
22
+ import SelectMemberForm from "../SelectMemberSendForm";
10
23
  import Scrollbars from "react-custom-scrollbars-2";
11
24
  import classnames from "classnames";
12
25
  import "./index.css";
13
- import MemberRegisterContainer from "./MemberRegisterContainer";
14
26
  const MemberTableListCard = (props) => {
15
- return observe(() => (React.createElement(MemberRegisterContainer, { ...props, children: ({ state, totalCount, setVisible, handleDelete, corporate, user }) => {
16
- return (React.createElement(DocumentTableListCard, { isHeader: true, header: React.createElement(ListHeaderTool, { addAble: false, sortable: false, searchHeader: false, className: classnames("member-table-list-header card"),
27
+ const { membersRegisterId, corporateId, tableDetail } = props;
28
+ const { user } = useApplicationContext();
29
+ const [visible, setVisible] = useState(false);
30
+ const [memberTotal, setMemberTotal] = useState(0);
31
+ const [height, setHeight] = useState(0);
32
+ const ref = useRef(null);
33
+ const asideContext = useAsideContentContext();
34
+ const memberStore = useMemberStore();
35
+ const corporate = useCorporate(corporateId, { includes: "permissions" });
36
+ const state = useDeepMemo(() => new State(), [membersRegisterId]);
37
+ /** 建立 ListView 和useDocumentListEffect所需的ListDataState. 会根据state.id重建所以不需reset. */
38
+ const list = useCreateListDataState({
39
+ filterDefaults: {
40
+ filters: filters(),
41
+ includes: "permissions",
42
+ },
43
+ }, [membersRegisterId]);
44
+ useEffect(() => {
45
+ if (ref.current) {
46
+ setHeight(ref.current.offsetHeight);
47
+ }
48
+ }, [ref]);
49
+ /** useOnNewDocument, useOnDeleteDocument的sugar syntax 自動更新list. */
50
+ useAutoUpdateListData(list, (d) => d.parentId === membersRegisterId);
51
+ useRenderOnChange(() => list.filters.options);
52
+ /** 把ListDataState传给useMemberListEffect,使之可以自動更新loading, hasmore. */
53
+ useMemberListEffect(list, (result, total) => {
54
+ list.union(result);
55
+ setMemberTotal(total !== null && total !== void 0 ? total : 0);
56
+ }, {
57
+ Total: true,
58
+ ...list.filters.options,
59
+ });
60
+ // spec:1756 — CSP: Members register Add, Send Form, and ellipsis actions require corporate edit permission
61
+ const items = [
62
+ {
63
+ key: "print",
64
+ label: (React.createElement("a", { target: "_blank", rel: "noopener noreferrer", href: window.location.origin + `/member/print/${corporateId}` }, "Print")),
65
+ icon: React.createElement(FAIcon, { icon: faPrintSolid }),
66
+ },
67
+ {
68
+ key: "delete-register",
69
+ label: React.createElement("span", null, "Delete"),
70
+ icon: React.createElement(FAIcon, { icon: faTrashSolid }),
71
+ onClick: () => {
72
+ Modal.confirm({
73
+ title: "Confirm Delete",
74
+ content: "Are you sure you want to delete this register?",
75
+ okText: "Delete",
76
+ cancelText: "Cancel",
77
+ onOk: () => { var _a; return (_a = props.onDelete) === null || _a === void 0 ? void 0 : _a.call(props, corporateId, membersRegisterId); },
78
+ });
79
+ },
80
+ },
81
+ ];
82
+ return observe(() => (React.createElement(React.Fragment, null,
83
+ React.createElement(ListDataContext.Provider, { value: list },
84
+ React.createElement(DocumentTableListCard, { isHeader: true, header: React.createElement(ListHeaderTool, { addAble: false, sortable: false, searchHeader: false, className: classnames("member-table-list-header", { card: props.type === "card" }),
17
85
  // spec:1755 — CSP: Members register list filters by parent register and optional Active status
18
86
  filterViewProps: {
19
87
  columns: [
@@ -22,19 +90,27 @@ const MemberTableListCard = (props) => {
22
90
  }, preExtra: () => (React.createElement("div", { className: "title" },
23
91
  "Members Register",
24
92
  " ",
25
- totalCount ? React.createElement(Badge, { count: totalCount, overflowCount: 99 }) : null)), rightExtra: () => (React.createElement(React.Fragment, null,
26
- user.can("edit", corporate.p) && (React.createElement(AddDropDown2, { btnType: "icon", onClick: () => {
93
+ memberTotal ? React.createElement(Badge, { count: memberTotal, overflowCount: 99 }) : null)), rightExtra: () => (React.createElement(React.Fragment, null,
94
+ props.type !== "card" && user.can("edit", corporate.p) && (React.createElement(Button, { className: "send-form-btn", onClick: () => setVisible(true) }, "Send Form")),
95
+ user.can("edit", corporate.p) && (React.createElement(AddDropDown2, { btnType: props.type === "card" ? "icon" : "text", onClick: () => {
27
96
  state.addAble = true;
28
97
  } })),
29
- user.can("edit", corporate.p) && (React.createElement(Button, { className: "send-form-btn", onClick: () => setVisible(true) }, "Send Form")))) }) },
30
- React.createElement("div", { className: "member-table-list-card", style: { height: 298 } },
98
+ props.type !== "card" && user.can("edit", corporate.p) && (React.createElement(Dropdown, { classNames: { root: "member-table-list-dropdown" }, menu: { items }, trigger: ["click", "hover"] },
99
+ React.createElement(Button, null,
100
+ React.createElement(FAIcon, { icon: faEllipsisVerticalSolid })))),
101
+ props.type === "card" && user.can("edit", corporate.p) && (React.createElement(Button, { className: "send-form-btn", onClick: () => setVisible(true) }, "Send Form")))), ...props.listHeaderToolProps }) },
102
+ React.createElement("div", { ref: ref, className: "member-table-list-card", style: { height: props.type === "card" ? 298 : "100%" } },
31
103
  React.createElement(Scrollbars, { autoHide: true },
32
104
  React.createElement(TableListCard
33
105
  // spec:1759 — CSP: Members register adapts column set based on detail mode and aside availability
34
106
  , {
35
107
  // spec:1759 — CSP: Members register adapts column set based on detail mode and aside availability
36
108
  tableListProps: {
37
- columns: columnsList.map((col) => {
109
+ columns: (tableDetail
110
+ ? (asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent)
111
+ ? columnsSimpleList
112
+ : columnsListDetail
113
+ : columnsList).map((col) => {
38
114
  return {
39
115
  ...col,
40
116
  onCell: (record, rowIndex) => {
@@ -47,22 +123,62 @@ const MemberTableListCard = (props) => {
47
123
  };
48
124
  }),
49
125
  components: {
50
- body: { cell: TableCell },
126
+ body: {
127
+ cell: tableDetail
128
+ ? (asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent)
129
+ ? TableCellSimple
130
+ : TableCellDetail
131
+ : TableCell,
132
+ },
51
133
  },
52
- scrollH: 240,
134
+ scrollH: props.type === "card" ? 240 : height - 72,
53
135
  // spec:1758 — CSP: Members register row click opens quick view, or aside properties view in detail mode
54
136
  tableProps: {
55
137
  onRow: (record) => {
56
138
  return {
57
139
  onClick: (e) => {
58
- state.quickId = record.id;
59
- state.visibleQuickView = true;
140
+ if (tableDetail) {
141
+ asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement(MemberPropertiesView, { id: record.id }), {
142
+ span: 12,
143
+ });
144
+ }
145
+ else {
146
+ state.quickId = record.id;
147
+ state.visibleQuickView = true;
148
+ }
60
149
  },
61
150
  };
62
151
  },
63
152
  },
64
- } })))));
65
- } })));
153
+ }, ...props.tableCardProps }))))),
154
+ state.addAble && (React.createElement(UnitsSelectDialog, { type: "click", multiSelect: false, onSelect: onSave, onCancel: () => {
155
+ state.addAble = false;
156
+ } })),
157
+ visible && (React.createElement(SelectMemberForm, { parentId: membersRegisterId, onCancel: () => setVisible(false) })),
158
+ state.visibleQuickView && (React.createElement(MemberQuickViewDialog, { id: state.quickId, visible: true, onCancel: () => {
159
+ state.visibleQuickView = false;
160
+ } })))));
161
+ // spec:1755 — CSP: Members register list filters by parent register and optional Active status
162
+ function filters() {
163
+ let filter = [{ c: "ParentNodeId", o: "=", l: "And", v1: membersRegisterId }];
164
+ if (props.active) {
165
+ filter.push({ c: "Status", o: "=", l: "And", v1: "Active" });
166
+ }
167
+ return filter;
168
+ }
169
+ // spec:1757 — CSP: Adding a member from the company register selects a unit and creates a member record
170
+ /** 新增memberItem */
171
+ async function onSave(unit) {
172
+ /** SelectLegalContactDialog 选择/新增有identity信息的unit */
173
+ if (unit) {
174
+ const res = await memberStore.create({
175
+ data: { RegisterId: membersRegisterId, UnitId: unit[0].id },
176
+ error: "message",
177
+ });
178
+ list.union([res]);
179
+ }
180
+ state.addAble = false;
181
+ }
66
182
  };
67
183
  export default MemberTableListCard;
68
184
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/MemberTableListCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,SAAS,EAAE,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,cAAc,MAAM,wEAAwE,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,qBAAqB,MAAM,uDAAuD,CAAC;AAC1F,OAAO,aAAa,MAAM,+CAA+C,CAAC;AAC1E,OAAO,YAAY,MAAM,uEAAuE,CAAC;AACjG,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,aAAa,CAAC;AACrB,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAShE,MAAM,mBAAmB,GAAG,CAAC,KAAsB,EAAE,EAAE;IACtD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,uBAAuB,OACnB,KAAK,EACT,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAA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AAC,aAAa;wBACb,kGAAkG;;4BAAlG,kGAAkG;4BAClG,cAAc,EAAE;gCACf,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;oCAChC,OAAO;wCACN,GAAG,GAAG;wCACN,MAAM,EAAE,CAAC,MAAW,EAAE,QAAgB,EAAE,EAAE;4CACzC,OAAO;gDACN,MAAM;gDACN,SAAS,EAAE,GAAG,CAAC,SAAS;gDACxB,QAAQ,EAAE,QAAQ;6CAClB,CAAC;wCACH,CAAC;qCACD,CAAC;gCACH,CAAC,CAAC;gCACF,UAAU,EAAE;oCACX,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;iCACzB;gCACD,OAAO,EAAE,GAAG;gCACZ,wGAAwG;gCACxG,UAAU,EAAE;oCACX,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE;wCACjB,OAAO;4CACN,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;gDACd,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC;gDAC1B,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;4CAC/B,CAAC;yCACD,CAAC;oCACH,CAAC;iCACD;6BACD,GACA,CACU,CACR,CACiB,CACxB,CAAC;QACH,CAAC,GACA,CACF,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/MemberTableListCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,eAAe,EAAE,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,eAAe,EAAE,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,SAAS,EAAE,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAErD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GAAI,CACpF;QACA,KAAK,CAAC,gBAAgB,IAAI,CAC1B,oBAAC,qBAAqB,IACrB,EAAE,EAAE,KAAK,CAAC,OAAO,EACjB,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,GAAG,EAAE;gBACd,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC;YAChC,CAAC,GACA,CACF,CACC,CACH,CAAC,CAAC;IAEH,+FAA+F;IAC/F,SAAS,OAAO;QACf,IAAI,MAAM,GAAmB,CAAC,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAE9F,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YAClB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC9D,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAED,wGAAwG;IACxG,mBAAmB;IACnB,KAAK,UAAU,MAAM,CAAC,IAAmD;QACxE,qDAAqD;QACrD,IAAI,IAAI,EAAE,CAAC;YACV,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC,MAAM,CAAC;gBACpC,IAAI,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;gBAC3D,KAAK,EAAE,SAAS;aAChB,CAAC,CAAC;YACH,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACnB,CAAC;QAED,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -1,23 +1,20 @@
1
1
  import React from "react";
2
+ import classnames from "classnames";
2
3
  import "./index.css";
3
- import StatusLabel from "../../../../../../components/StatusLabel";
4
4
  import { observe } from "@voplus/morpho-ui";
5
5
  const MemberStatusLabel = (props) => {
6
- const { status, className } = props;
7
- return observe(() => {
8
- const getColors = () => {
9
- switch (status === null || status === void 0 ? void 0 : status.replace(/\s+/g, "")) {
10
- case "Active":
11
- return { bg: "bg-bg-green-data", text: "text-green-data", dot: "bg-green-data" };
12
- case "NeedIdentity":
13
- return { bg: "bg-bg-brown-data", text: "text-brown-data", dot: "bg-brown-data" };
14
- default:
15
- return { bg: "bg-bg-grey", text: "text-font-grey", dot: "bg-font-grey" };
16
- }
6
+ var _a;
7
+ const item = transformStatus((_a = props.status) !== null && _a !== void 0 ? _a : "");
8
+ return observe(() => (React.createElement("div", { className: classnames("member-status-button", props.className, item.colorName) }, item.displayName ? (React.createElement(React.Fragment, null,
9
+ React.createElement("span", null),
10
+ item.displayName)) : null)));
11
+ function transformStatus(name, displayName) {
12
+ return {
13
+ name: name,
14
+ displayName: displayName || (name === null || name === void 0 ? void 0 : name.split(/(?=[A-Z])/).join(" ")),
15
+ colorName: `${name === null || name === void 0 ? void 0 : name.split(/(?=[A-Z])/).join("-").toLowerCase()}`,
17
16
  };
18
- const colors = getColors();
19
- return React.createElement(StatusLabel, { status: status, className: className, colors: colors });
20
- });
17
+ }
21
18
  };
22
19
  export default MemberStatusLabel;
23
20
  //# sourceMappingURL=MemberStatusLabel2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MemberStatusLabel2.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/controls/MemberStatusLabel/MemberStatusLabel2.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,aAAa,CAAC;AACrB,OAAO,WAAW,MAAM,0CAA0C,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,iBAAiB,GAAG,CAAC,KAA8C,EAAE,EAAE;IAC5E,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEpC,OAAO,OAAO,CAAC,GAAG,EAAE;QACnB,MAAM,SAAS,GAAG,GAAG,EAAE;YACtB,QAAQ,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;gBACrC,KAAK,QAAQ;oBACZ,OAAO,EAAE,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC;gBAClF,KAAK,cAAc;oBAClB,OAAO,EAAE,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC;gBAClF;oBACC,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC;YAC3E,CAAC;QACF,CAAC,CAAC;QAEF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAE3B,OAAO,oBAAC,WAAW,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;IAC9E,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"MemberStatusLabel2.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/controls/MemberStatusLabel/MemberStatusLabel2.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,iBAAiB,GAAG,CAAC,KAA8C,EAAE,EAAE;;IAC5E,MAAM,IAAI,GAAG,eAAe,CAAC,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAC;IAEjD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,6BAAK,SAAS,EAAE,UAAU,CAAC,sBAAsB,EAAE,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,IACjF,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CACnB;QACC,iCAAa;QACZ,IAAI,CAAC,WAAW,CACf,CACH,CAAC,CAAC,CAAC,IAAI,CACH,CACN,CAAC,CAAC;IAEH,SAAS,eAAe,CAAC,IAAY,EAAE,WAAoB;QAC1D,OAAO;YACN,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,WAAW,KAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;YAC9D,SAAS,EAAE,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CACf,KAAK,CAAC,WAAW,EAClB,IAAI,CAAC,GAAG,EACR,WAAW,EAAE,EAAE;SACjB,CAAC;IACH,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
- import { OfficerTableListProps } from "../OfficerTableListCard/OfficerRegisterContainer";
3
- declare const OfficerTableList: (props: OfficerTableListProps) => React.JSX.Element;
2
+ import OfficerTableListCard from "../OfficerTableListCard";
3
+ import "../../../../../../style/common.css";
4
+ declare const OfficerTableList: (props: React.ComponentProps<typeof OfficerTableListCard>) => React.JSX.Element;
4
5
  export default OfficerTableList;
@@ -1,79 +1,16 @@
1
1
  import React from "react";
2
- import TableCellDetail, { columnsListDetail, columnsSimpleList } from "./TableCellDetail";
3
- import AddDropDown2 from "@voplus/morpho-ui/es/components/layout/ListView/controls/AddDropDown2";
4
- import { Button, Dropdown, Menu } from "antd";
5
- import { faPrintSolid, faEllipsisVerticalSolid, faTrashSolid, faFilterSolid, faPaperPlaneSolid, FontAwesomeIcon as FAIcon, } from "@voplus/morpho-ui/es/faIcons";
6
- import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
7
- import { observe, useAsideContentContext } from "@voplus/morpho-ui";
8
- import OfficerStatusFilter from "../../controls/OfficerStatusFilter";
9
- import OfficerPropertiesView from "../OfficerPropertiesView";
10
- import RegisterTable from "../../../../../../components/RegisterTable";
11
- import OfficerRegisterContainer from "../OfficerTableListCard/OfficerRegisterContainer";
2
+ import { observe } from "@voplus/morpho-ui";
3
+ import OfficerTableListCard from "../OfficerTableListCard";
4
+ import OfficerStatusList from "../../controls/OfficerStatusLabel/OfficerStatusList";
5
+ import "../../../../../../style/common.css";
12
6
  const OfficerTableList = (props) => {
13
- const asideContext = useAsideContentContext();
14
- return observe(() => (React.createElement(OfficerRegisterContainer, { ...props }, ({ list, state, dataSource, totalCount, setVisible, handleDelete, corporate, user }) => {
15
- // spec:1777 — CSP: Officers table header offers Send Form, Print, and Delete Register actions only with edit permission
16
- const items = [
17
- {
18
- key: "print",
19
- label: (React.createElement("a", { target: "_blank", rel: "noopener noreferrer", href: window.location.origin + `/officer/print/${props.corporateId}` }, "Print")),
20
- icon: React.createElement(FAIcon, { icon: faPrintSolid }),
21
- },
22
- {
23
- key: "delete-register",
24
- label: React.createElement("span", null, "Delete"),
25
- icon: React.createElement(FAIcon, { icon: faTrashSolid }),
26
- onClick: handleDelete,
27
- },
28
- ];
29
- const columns = ((asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent) ? columnsSimpleList : columnsListDetail).map((col) => {
30
- return {
31
- ...col,
32
- onCell: (record, rowIndex) => {
33
- return {
34
- record,
35
- dataIndex: col.dataIndex,
36
- rowIndex: rowIndex,
37
- };
38
- },
39
- };
40
- });
41
- return (React.createElement("div", { className: "h-full flex flex-col" },
42
- React.createElement(ListHeaderTool, { addAble: false, sortable: false, className: "p-5! [&_.header-tool-space]:gap-3.5 [&_button]:ml-0! [&_.ant-input-outlined]:h-auto! [&_.ant-input-outlined]:bg-bg-blue! [&_.ant-input-outlined]:border-border! [&_.ant-input-outlined:hover]:border-font-secondary! [&_.ant-input-outlined:focus]:border-font-secondary! [&_.ant-input-outlined:focus-within]:border-font-secondary! [&_button]:font-semibold!", searchOptions: { placeholder: "Search in register officer" },
43
- // spec:1778 — CSP: Active officers register defaults to a Present-only filter
44
- filterViewProps: {
45
- icon: (React.createElement(Button, null,
46
- React.createElement(FAIcon, { icon: faFilterSolid }))),
47
- columns: [React.createElement(OfficerStatusFilter, { key: "OfficerStatusFilter" })],
48
- }, rightExtra: () => user.can("edit", corporate.p) && (React.createElement(React.Fragment, null,
49
- React.createElement(Button, { icon: React.createElement(FAIcon, { icon: faPaperPlaneSolid }), className: "text-font-primary font-semibold uppercase", onClick: () => setVisible(true) }, "Send Form"),
50
- React.createElement(AddDropDown2, { trigger: ["click"], btnType: React.createElement(Button, { className: "primary-button" }, "+ NEW ENTRY"), overlay: React.createElement(Menu, { onClick: state.onSelect, items: [
51
- { key: "Director", label: "Director" },
52
- { key: "Managing Director", label: "Managing Director" },
53
- { key: "Nominee Director", label: "Nominee Director" },
54
- { key: "Secretary", label: "Secretary" },
55
- { key: "DPO", label: "DPO" },
56
- { key: "CEO", label: "CEO" },
57
- { key: "Partner", label: "Partner" },
58
- { key: "Owner", label: "Owner" },
59
- { key: "Auditor", label: "Auditor" },
60
- { key: "Manager", label: "Manager" },
61
- ] }) }),
62
- React.createElement(Dropdown, { trigger: ["click", "hover"], menu: { items } },
63
- React.createElement(Button, { className: "w-[45px]" },
64
- React.createElement(FAIcon, { icon: faEllipsisVerticalSolid }))))) }),
65
- React.createElement(RegisterTable, { columns: columns, dataSource: dataSource, loading: list.loading, onLoadMore: () => list.triggerNextPage(), hasMore: dataSource.length < totalCount, components: {
66
- body: {
67
- cell: TableCellDetail,
68
- },
69
- },
70
- // spec:1775 — CSP: Clicking an officer row opens an aside Properties panel or a Quick View dialog
71
- onRowClick: (record) => {
72
- asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement(OfficerPropertiesView, { id: record.id }), {
73
- span: 12,
74
- });
75
- } })));
76
- })));
7
+ return observe(() => (React.createElement("div", { className: "registers-page-item registers-officer-table-list" },
8
+ React.createElement(OfficerTableListCard, { ...props, tableDetail: true, listHeaderToolProps: {
9
+ searchHeader: true,
10
+ preExtra: () => React.createElement(React.Fragment, null),
11
+ searchOptions: { placeholder: "Search in register officer" },
12
+ } }),
13
+ React.createElement(OfficerStatusList, null))));
77
14
  };
78
15
  export default OfficerTableList;
79
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/components/OfficerTableList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,eAAe,EAAE,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE1F,OAAO,YAAY,MAAM,uEAAuE,CAAC;AACjG,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,EACN,YAAY,EACZ,uBAAuB,EACvB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,eAAe,IAAI,MAAM,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,cAAc,MAAM,wEAAwE,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,aAAa,MAAM,4CAA4C,CAAC;AACvE,OAAO,wBAEN,MAAM,kDAAkD,CAAC;AAG1D,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;IACzD,MAAM,YAAY,GAAG,sBAAsB,EAAE,CAAC;IAE9C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,wBAAwB,OAAK,KAAK,IACjC,CAAC,EAAE,IAAI,EA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,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;6BACpC,GACA,GAEF;oBACF,oBAAC,QAAQ,IAAC,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE;wBACrD,oBAAC,MAAM,IAAC,SAAS,EAAC,UAAU;4BAC3B,oBAAC,MAAM,IAAC,IAAI,EAAE,uBAAuB,GAAI,CACjC,CACC,CACT,CACH,GAED;YAGF,oBAAC,aAAa,IACb,OAAO,EAAE,OAAc,EACvB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,EACxC,OAAO,EAAE,UAAU,CAAC,MAAM,GAAG,UAAU,EACvC,UAAU,EAAE;oBACX,IAAI,EAAE;wBACL,IAAI,EAAE,eAAe;qBACrB;iBACD;gBACD,kGAAkG;gBAClG,UAAU,EAAE,CAAC,MAAM,EAAE,EAAE;oBACtB,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,oBAAC,qBAAqB,IAAC,EAAE,EAAE,MAAM,CAAC,EAAG,GAAI,EAAE;wBAClE,IAAI,EAAE,EAAE;qBACR,CAAC,CAAC;gBACJ,CAAC,GACA,CACG,CACN,CAAC;IACH,CAAC,CACyB,CAC3B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/components/OfficerTableList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3D,OAAO,iBAAiB,MAAM,qDAAqD,CAAC;AACpF,OAAO,oCAAoC,CAAC;AAE5C,MAAM,gBAAgB,GAAG,CAAC,KAAwD,EAAE,EAAE;IACrF,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,6BAAK,SAAS,EAAC,kDAAkD;QAChE,oBAAC,oBAAoB,OAChB,KAAK,EACT,WAAW,QACX,mBAAmB,EAAE;gBACpB,YAAY,EAAE,IAAI;gBAClB,QAAQ,EAAE,GAAG,EAAE,CAAC,yCAAK;gBACrB,aAAa,EAAE,EAAE,WAAW,EAAE,4BAA4B,EAAE;aAC5D,GACA;QACF,oBAAC,iBAAiB,OAAG,CAChB,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,17 +1,5 @@
1
1
  import React from "react";
2
- export declare const columnsSimpleList: ({
3
- title: React.JSX.Element;
4
- dataIndex: string;
5
- width: string;
6
- } | {
7
- title: React.JSX.Element;
8
- dataIndex: string;
9
- width?: undefined;
10
- } | {
11
- title: string;
12
- dataIndex: string;
13
- width: string;
14
- })[];
2
+ import "./index.css";
15
3
  export declare const columnsListDetail: ({
16
4
  title: React.JSX.Element;
17
5
  dataIndex: string;