@voplus/morpho-csp 10.0.10 → 10.0.12
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 +1 -1
- package/es/components/CorporateUnitSelectDialog/index.js +12 -4
- package/es/components/CorporateUnitSelectDialog/index.js.map +1 -1
- package/es/components/CorporateUnitSelectDialog/state.d.ts +2 -2
- package/es/components/CorporateUnitSelectDialog/state.js +9 -6
- package/es/components/CorporateUnitSelectDialog/state.js.map +1 -1
- package/es/components/RegisterTable/index.d.ts +31 -0
- package/es/components/RegisterTable/index.js +55 -0
- package/es/components/RegisterTable/index.js.map +1 -0
- package/es/components/StatusLabel/index.d.ts +36 -0
- package/es/components/StatusLabel/index.js +16 -0
- package/es/components/StatusLabel/index.js.map +1 -0
- package/es/data/clda-form/CLDAFormContent.js +3 -1
- package/es/data/clda-form/CLDAFormContent.js.map +1 -1
- package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileLevelLabel/index.js +1 -3
- package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileLevelLabel/index.js.map +1 -1
- package/es/modules/corporate/company/components/CorporateList/index.js +1 -1
- package/es/modules/corporate/company/components/CorporateList/index.js.map +1 -1
- package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.d.ts +13 -1
- package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.js +94 -39
- package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.js.map +1 -1
- package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.d.ts +0 -1
- package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.js +66 -95
- package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.js.map +1 -1
- package/es/modules/corporate/company/controller-register/controls/ControllerStatusLabel/ControllerStatusLabel2.js +23 -13
- package/es/modules/corporate/company/controller-register/controls/ControllerStatusLabel/ControllerStatusLabel2.js.map +1 -1
- package/es/modules/corporate/company/controls/CorporateStatusLabel/index.d.ts +0 -1
- package/es/modules/corporate/company/controls/CorporateStatusLabel/index.js +1 -8
- package/es/modules/corporate/company/controls/CorporateStatusLabel/index.js.map +1 -1
- package/es/modules/corporate/company/member-register/components/{MemberTableListCard → MemberTableList}/TableCellDetail.d.ts +13 -1
- package/es/modules/corporate/company/member-register/components/MemberTableList/TableCellDetail.js +125 -0
- package/es/modules/corporate/company/member-register/components/MemberTableList/TableCellDetail.js.map +1 -0
- package/es/modules/corporate/company/member-register/components/MemberTableList/index.d.ts +2 -3
- package/es/modules/corporate/company/member-register/components/MemberTableList/index.js +63 -9
- package/es/modules/corporate/company/member-register/components/MemberTableList/index.js.map +1 -1
- package/es/modules/corporate/company/member-register/components/MemberTableListCard/MemberRegisterContainer.d.ts +21 -0
- package/es/modules/corporate/company/member-register/components/MemberTableListCard/MemberRegisterContainer.js +86 -0
- package/es/modules/corporate/company/member-register/components/MemberTableListCard/MemberRegisterContainer.js.map +1 -0
- package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.d.ts +1 -16
- package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.js +17 -133
- package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.js.map +1 -1
- package/es/modules/corporate/company/member-register/controls/MemberStatusLabel/MemberStatusLabel2.js +15 -12
- package/es/modules/corporate/company/member-register/controls/MemberStatusLabel/MemberStatusLabel2.js.map +1 -1
- package/es/modules/corporate/company/officer-register/components/{OfficerTableListCard → OfficerTableList}/TableCellDetail.d.ts +13 -1
- package/es/modules/corporate/company/officer-register/components/OfficerTableList/TableCellDetail.js +140 -0
- package/es/modules/corporate/company/officer-register/components/OfficerTableList/TableCellDetail.js.map +1 -0
- package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.d.ts +2 -3
- package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.js +74 -11
- package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.js.map +1 -1
- package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/OfficerRegisterContainer.d.ts +23 -0
- package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/OfficerRegisterContainer.js +87 -0
- package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/OfficerRegisterContainer.js.map +1 -0
- package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.d.ts +3 -24
- package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.js +22 -140
- package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.js.map +1 -1
- package/es/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.d.ts +0 -2
- package/es/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.js +20 -37
- package/es/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.js.map +1 -1
- package/es/modules/corporate/company/pages/RegisterTablePage/index.d.ts +10 -0
- package/es/modules/corporate/company/pages/RegisterTablePage/index.js +152 -0
- package/es/modules/corporate/company/pages/RegisterTablePage/index.js.map +1 -0
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItems/index.css +1 -1
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItems/index.js +1 -1
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionProperties/index.js +1 -1
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionProperties/index.js.map +1 -1
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTabs/index.js +5 -2
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTabs/index.js.map +1 -1
- package/es/modules/corporate/company/share-transactions-register/pages/ShareTransactionDefaultView/index.css +1 -1
- package/es/modules/corporate/filing-record/components/FilingList/index.js +1 -1
- package/es/modules/corporate/filing-record/components/FilingList/index.js.map +1 -1
- package/es/modules/corporate/filing-record/filing-year/components/FilingYearCard/index.d.ts +1 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingYearCard/index.js +1 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingYearCard/index.js.map +1 -1
- package/es/modules/corporate/filing-record/filing-year/components/FilingYearListCard/index.d.ts +1 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingYearListCard/index.js +1 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingYearListCard/index.js.map +1 -1
- package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/YearNode.d.ts +10 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/YearNode.js +48 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/YearNode.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/index.d.ts +7 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/index.js +94 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/TableCell.d.ts +33 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/TableCell.js +121 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/TableCell.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/getDiffDay.d.ts +1 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/getDiffDay.js +9 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/getDiffDay.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/index.d.ts +5 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/index.js +48 -0
- package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/index.js.map +1 -0
- package/es/modules/corporate/virtual-address/receipents/components/ReceipentsSelect/state.js +1 -2
- package/es/modules/corporate/virtual-address/receipents/components/ReceipentsSelect/state.js.map +1 -1
- package/es/modules/corporate/virtual-address-mail/components/MailTypeSelect/index.js +10 -10
- package/es/modules/corporate/virtual-address-mail/components/MailTypeSelect/index.js.map +1 -1
- package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailItem/index.js +30 -7
- package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailItem/index.js.map +1 -1
- package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailList/index.js +1 -1
- package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailList/index.js.map +1 -1
- package/package.json +2 -1
- package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCellSimple.d.ts +0 -13
- package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCellSimple.js +0 -63
- package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCellSimple.js.map +0 -1
- package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.css +0 -122
- package/es/modules/corporate/company/controls/CorporateStatusLabel/index.css +0 -22
- package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellDetail.js +0 -77
- package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellDetail.js.map +0 -1
- package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellSimple.d.ts +0 -13
- package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellSimple.js +0 -52
- package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellSimple.js.map +0 -1
- package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellDetail.js +0 -87
- package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellDetail.js.map +0 -1
- package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellSimple.d.ts +0 -13
- package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellSimple.js +0 -65
- package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellSimple.js.map +0 -1
- package/es/page/RegisterTablePage/Controller.d.ts +0 -3
- package/es/page/RegisterTablePage/Controller.js +0 -134
- package/es/page/RegisterTablePage/Controller.js.map +0 -1
- package/es/page/RegisterTablePage/index.d.ts +0 -3
- package/es/page/RegisterTablePage/index.js +0 -63
- package/es/page/RegisterTablePage/index.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { UnitTypeSelectDialogProps } from "./state";
|
|
3
|
-
declare const CorporateUnitSelectDialog: (
|
|
3
|
+
declare const CorporateUnitSelectDialog: (props: UnitTypeSelectDialogProps) => React.JSX.Element;
|
|
4
4
|
export default CorporateUnitSelectDialog;
|
|
@@ -10,10 +10,18 @@ import OfficerListInCorporateSelect from "../../modules/corporate/company/office
|
|
|
10
10
|
import SubUnitList from "@voplus/morpho-org/es/components/ListInContactSelect";
|
|
11
11
|
import UnitTree from "@voplus/morpho-org/es/components/UnitTree";
|
|
12
12
|
import SelectDialog from "@voplus/morpho-org/es/controls/SelectDialog";
|
|
13
|
-
const CorporateUnitSelectDialog = (
|
|
14
|
-
const
|
|
13
|
+
const CorporateUnitSelectDialog = (props) => {
|
|
14
|
+
const { multiSelect = true, type = "select", title = "Corporate Contact Select", defaultSelection = "Everyone", } = props;
|
|
15
15
|
const [state] = useState(new State(defaultSelection, multiSelect, props.defaultSelected));
|
|
16
|
-
|
|
16
|
+
const context = useApplicationContext();
|
|
17
|
+
const resolvedProps = {
|
|
18
|
+
...props,
|
|
19
|
+
multiSelect,
|
|
20
|
+
type,
|
|
21
|
+
title,
|
|
22
|
+
defaultSelection,
|
|
23
|
+
};
|
|
24
|
+
state.props = resolvedProps;
|
|
17
25
|
state.multiSelect = multiSelect;
|
|
18
26
|
return observe(() => {
|
|
19
27
|
var _a;
|
|
@@ -37,7 +45,7 @@ const CorporateUnitSelectDialog = ({ multiSelect = true, type = "select", title
|
|
|
37
45
|
icon: React.createElement(FAIcon, { icon: faUserTagSolid }),
|
|
38
46
|
isLeaf: true,
|
|
39
47
|
},
|
|
40
|
-
], defaultSelectedKeys: [state.current], onSelect: (id) => state.onExpand(id) }), listView: React.createElement(Checkbox.Group, { value: (_a = state === null || state === void 0 ? void 0 : state.selectedLists) === null || _a === void 0 ? void 0 : _a.map((u) => u.id) }, state.current === "members" ? (React.createElement(MemberListInCorporateSelect, { corporateId:
|
|
48
|
+
], defaultSelectedKeys: [state.current], onSelect: (id) => state.onExpand(id) }), listView: React.createElement(Checkbox.Group, { value: (_a = state === null || state === void 0 ? void 0 : state.selectedLists) === null || _a === void 0 ? void 0 : _a.map((u) => u.id) }, state.current === "members" ? (React.createElement(MemberListInCorporateSelect, { corporateId: resolvedProps.corporateId, selectedLists: state.selectedLists, onSelectCorporateUnit: (item) => state.selectOrDeleteItem(item) })) : state.current === "officers" ? (React.createElement(OfficerListInCorporateSelect, { corporateId: resolvedProps.corporateId, selectedLists: state.selectedLists, onSelectCorporateUnit: (item) => state.selectOrDeleteItem(item) })) : (React.createElement(SubUnitList, { addAble: true, unitSelectAdd: true, parentId: state.id, type: type, filterType: state.filterType, selectedLists: state.selectedLists, maxSelections: resolvedProps.maxSelections, onSelectUnit: (item) => state.selectOrDeleteItem(item), isShowParentItem: state.id === "c896a84e-b31a-4d10-a181-5d34a21b172d" }))), handleCancel: () => state.handleCancel(), handleOk: () => state.handleOk(), selectedLists: state.selectedLists, title: title, maxSelections: resolvedProps.maxSelections, onClear: () => (state.selectedLists = []), deselectNode: (item) => state.deselectUnit(item) }));
|
|
41
49
|
});
|
|
42
50
|
};
|
|
43
51
|
export default CorporateUnitSelectDialog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CorporateUnitSelectDialog/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,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAA6B,MAAM,SAAS,CAAC;AAC3D,OAAO,EACN,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,cAAc,GACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,IA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AAC,QAAQ,EAAE,EAChC,aAAa,EAAE,KAAK,CAAC,aAAa,EAClC,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,CAAC,aAAa,EAC1C,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,GAAG,EAAE,CAAC,EACzC,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,GAC/C,CACF,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -47,7 +47,7 @@ export declare class State {
|
|
|
47
47
|
current: string;
|
|
48
48
|
constructor(defaultSelection: string, multiple: boolean, defaultSelected: any[]);
|
|
49
49
|
/**Select function*/
|
|
50
|
-
handleOk(): void
|
|
50
|
+
handleOk(): void;
|
|
51
51
|
/**cancel function*/
|
|
52
52
|
handleCancel(): void;
|
|
53
53
|
/**已选文件列表 双击取消选择文件*/
|
|
@@ -56,5 +56,5 @@ export declare class State {
|
|
|
56
56
|
selectOrDeleteItem(item: IUnit): void;
|
|
57
57
|
/**UnitTree 选择文件返回unit id, UnitList获得id显示列表*/
|
|
58
58
|
onExpand(expandedKeys: string): void;
|
|
59
|
-
onSelectUnit(item: IUnit): void
|
|
59
|
+
onSelectUnit(item: IUnit): void;
|
|
60
60
|
}
|
|
@@ -91,9 +91,11 @@ export class State {
|
|
|
91
91
|
/**Select function*/
|
|
92
92
|
handleOk() {
|
|
93
93
|
var _a, _b;
|
|
94
|
-
if (!this.selectedLists.length && !this.props.isEmptyData)
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
if (!this.selectedLists.length && !this.props.isEmptyData) {
|
|
95
|
+
message.warning("Please select Unit");
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
(_b = (_a = this.props).onSelect) === null || _b === void 0 ? void 0 : _b.call(_a, this.selectedLists);
|
|
97
99
|
}
|
|
98
100
|
/**cancel function*/
|
|
99
101
|
handleCancel() {
|
|
@@ -125,11 +127,12 @@ export class State {
|
|
|
125
127
|
/*UnitTree,UnitList 双击选择文件显示在已选文件列表*/
|
|
126
128
|
onSelectUnit(item) {
|
|
127
129
|
var _a, _b, _c;
|
|
128
|
-
if (!this.multiSelect)
|
|
129
|
-
|
|
130
|
+
if (!this.multiSelect) {
|
|
131
|
+
((_a = this.props) === null || _a === void 0 ? void 0 : _a.type) === "click"
|
|
130
132
|
? (this.selectedLists = [item])
|
|
131
133
|
: (_c = (_b = this.props).onSelect) === null || _c === void 0 ? void 0 : _c.call(_b, [{ id: item.id, name: item.name, type: item.type }]);
|
|
132
|
-
|
|
134
|
+
}
|
|
135
|
+
else if (!this.selectedLists.some((ele) => ele.id === item.id)) {
|
|
133
136
|
this.selectedLists.push(item);
|
|
134
137
|
}
|
|
135
138
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/CorporateUnitSelectDialog/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAG1D,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAoC/B,MAAM,OAAO,KAAK;IAajB,YACS,gBAAwB,EACxB,QAAiB,EACjB,eAAsB;;QAF9B;;;;mBAAQ,gBAAgB;WAAQ;QAChC;;;;mBAAQ,QAAQ;WAAS;QACzB;;;;mBAAQ,eAAe;WAAO;QAfxB;;;;;WAAkC;QACzC,kBAAkB;QACC;;;;mBAAK,EAAE;WAAC;QAC3B,aAAa;QACM;;;;mBAAyB,EAAE;WAAC;QAC/C,WAAW;QACQ;;;;mBAAc,KAAK;WAAC;QACvC,sBAAsB;QACH;;;;;WAAuB;QAC1C,kCAAkC;QACf;;;;mBAAU,EAAE;WAAC;QAO/B,cAAc,CAAC,IAAI,CAAC,CAAC;QAErB,QAAQ,IAAI,CAAC,gBAAgB,EAAE,CAAC;YA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mDAAG,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAC/E,CAAC;aAAM,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;YAClE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;IACF,CAAC;CACD;AApGmB;IAAlB,UAAU;iCAAgB;AAER;IAAlB,UAAU;4CAAoC;AAE5B;IAAlB,UAAU;0CAA4B;AAEpB;IAAlB,UAAU;yCAA+B;AAEvB;IAAlB,UAAU;sCAAqB;AAqCzB;IADN,MAAM;qCAQN;AAIM;IADN,MAAM;yCAGN;AAIM;IADN,MAAM;yCAGN;AAGO;IADP,MAAM;uCAGN;AAGM;IADN,MAAM;+CAGN;AAIM;IADN,MAAM;qCAUN;AAIM;IADN,MAAM;yCASN"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TableProps } from "antd";
|
|
3
|
+
/**
|
|
4
|
+
* 通用注册表单/列表组件属性接口。
|
|
5
|
+
* 抽离了计算表格容器高度和无限滚动的公共逻辑。
|
|
6
|
+
*/
|
|
7
|
+
export interface RegisterTableProps<T extends {
|
|
8
|
+
id?: string;
|
|
9
|
+
}> extends Omit<TableProps<T>, "dataSource" | "columns"> {
|
|
10
|
+
/** 表格数据源 */
|
|
11
|
+
dataSource: T[];
|
|
12
|
+
/** 表格列定义 */
|
|
13
|
+
columns: TableProps<T>["columns"];
|
|
14
|
+
/** 加载中状态 */
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
/** 触发加载下一页的回调 */
|
|
17
|
+
onLoadMore?: () => void;
|
|
18
|
+
/** 是否还有更多数据 */
|
|
19
|
+
hasMore?: boolean;
|
|
20
|
+
/** 行点击事件,用于打开侧边详情栏等操作 */
|
|
21
|
+
onRowClick?: (record: T) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 具有无限滚动和自动适应高度功能的基于 antd Table 的列表组件。
|
|
25
|
+
* 会自动监听页面容器的高度,计算可容纳的Table Body高度并将其绑定给 `scroll={{ y: xxx }}` 以实现表头固定。
|
|
26
|
+
* 监听滚动到底部以触发分页加载。
|
|
27
|
+
*/
|
|
28
|
+
declare function RegisterTable<T extends {
|
|
29
|
+
id?: string;
|
|
30
|
+
}>(props: RegisterTableProps<T>): React.JSX.Element;
|
|
31
|
+
export default RegisterTable;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React, { useState, useRef, useEffect } from "react";
|
|
2
|
+
import { Table } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
/**
|
|
5
|
+
* 具有无限滚动和自动适应高度功能的基于 antd Table 的列表组件。
|
|
6
|
+
* 会自动监听页面容器的高度,计算可容纳的Table Body高度并将其绑定给 `scroll={{ y: xxx }}` 以实现表头固定。
|
|
7
|
+
* 监听滚动到底部以触发分页加载。
|
|
8
|
+
*/
|
|
9
|
+
function RegisterTable(props) {
|
|
10
|
+
const { dataSource, columns, loading, onLoadMore, hasMore, onRowClick, components, ...rest } = props;
|
|
11
|
+
const [tableScrollY, setTableScrollY] = useState(200);
|
|
12
|
+
const tableContainerRef = useRef(null);
|
|
13
|
+
// 监听容器高度变化来动态设置表格的 scroll.y
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const observer = new ResizeObserver((entries) => {
|
|
16
|
+
for (let entry of entries) {
|
|
17
|
+
const height = entry.contentRect.height;
|
|
18
|
+
// 表头高度约56px,减去表头即为Table Body的可用高度
|
|
19
|
+
setTableScrollY(Math.max(height - 56, 100));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
if (tableContainerRef.current) {
|
|
23
|
+
observer.observe(tableContainerRef.current);
|
|
24
|
+
}
|
|
25
|
+
return () => observer.disconnect();
|
|
26
|
+
}, []);
|
|
27
|
+
// 处理滚动事件,触底则加载下一页
|
|
28
|
+
const handleScroll = (e) => {
|
|
29
|
+
var _a;
|
|
30
|
+
const target = e.target;
|
|
31
|
+
if ((_a = target.classList) === null || _a === void 0 ? void 0 : _a.contains("ant-table-body")) {
|
|
32
|
+
const { scrollTop, scrollHeight, clientHeight } = target;
|
|
33
|
+
if (scrollTop + clientHeight >= scrollHeight - 20) {
|
|
34
|
+
if (hasMore && !loading && onLoadMore) {
|
|
35
|
+
onLoadMore();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return observe(() => (React.createElement("div", { ref: tableContainerRef, className: "flex-1 overflow-hidden", onScrollCapture: handleScroll },
|
|
41
|
+
React.createElement(Table, { columns: columns, dataSource: dataSource, loading: loading, scroll: { y: tableScrollY }, components: components, onRow: (record) => {
|
|
42
|
+
var _a;
|
|
43
|
+
return {
|
|
44
|
+
className: "group/row",
|
|
45
|
+
onClick: () => {
|
|
46
|
+
if (onRowClick) {
|
|
47
|
+
onRowClick(record);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
...(_a = rest.onRow) === null || _a === void 0 ? void 0 : _a.call(rest, record),
|
|
51
|
+
};
|
|
52
|
+
}, pagination: false, className: "whitespace-nowrap [&_.ant-table-thead_>_tr_>_th]:p-5! [&_.ant-table-thead_>_tr_>_th]:text-xs! [&_.ant-table-thead_>_tr_>_th]:uppercase! [&_.ant-table-thead_>_tr_>_th]:font-bold! [&_.ant-table-thead_>_tr_>_th]:text-font-primary! [&_.ant-table-thead_>_tr_>_th]:bg-bg-table!", rowClassName: "group", rowKey: "id", ...rest }))));
|
|
53
|
+
}
|
|
54
|
+
export default RegisterTable;
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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件的属性接口
|
|
4
|
+
*/
|
|
5
|
+
interface StatusLabelProps {
|
|
6
|
+
/**
|
|
7
|
+
* 原始状态值,主要用于判定是否显示标签。
|
|
8
|
+
* 如果没有传入 `text`,则会将此值直接用于展示。
|
|
9
|
+
*/
|
|
10
|
+
status?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 覆盖默认状态的显示文本,可选项。
|
|
13
|
+
* 当需要实际显示的文案与后台返回的状态值 (status) 不一致时使用。
|
|
14
|
+
*/
|
|
15
|
+
text?: string;
|
|
16
|
+
/** 组件的容器自定义 className */
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* 定义标签的各项颜色 Tailwind 类名
|
|
20
|
+
*/
|
|
21
|
+
colors: {
|
|
22
|
+
/** 标签整体背景颜色类名 */
|
|
23
|
+
bg: string;
|
|
24
|
+
/** 标签文本颜色类名 */
|
|
25
|
+
text: string;
|
|
26
|
+
/** 前侧状态小圆点颜色类名 */
|
|
27
|
+
dot: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 通用状态 UI 组件 (共用部分提炼)。
|
|
32
|
+
* 根据不同的状态显示不同的文字和对应的主题色(带有左侧实心小圆点的胶囊样式)。
|
|
33
|
+
* 常用于 MemberRegister、ControllerRegister 等列表或详情处的状态呈现。
|
|
34
|
+
*/
|
|
35
|
+
declare const StatusLabel: (props: StatusLabelProps) => React.JSX.Element;
|
|
36
|
+
export default StatusLabel;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
/**
|
|
5
|
+
* 通用状态 UI 组件 (共用部分提炼)。
|
|
6
|
+
* 根据不同的状态显示不同的文字和对应的主题色(带有左侧实心小圆点的胶囊样式)。
|
|
7
|
+
* 常用于 MemberRegister、ControllerRegister 等列表或详情处的状态呈现。
|
|
8
|
+
*/
|
|
9
|
+
const StatusLabel = (props) => {
|
|
10
|
+
const { status, text, className, colors } = props;
|
|
11
|
+
return observe(() => (React.createElement("span", { className: classnames("inline-flex items-center gap-1 px-2.5 py-1 rounded-xl text-[10px] font-bold uppercase", colors.bg, colors.text, className) }, status ? (React.createElement(React.Fragment, null,
|
|
12
|
+
React.createElement("i", { className: classnames("inline-block w-1.5 h-1.5 rounded-full", colors.dot) }),
|
|
13
|
+
React.createElement("span", null, text || status))) : null)));
|
|
14
|
+
};
|
|
15
|
+
export default StatusLabel;
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/StatusLabel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AA+B5C;;;;GAIG;AACH,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAE,EAAE;IAC/C,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAElD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,8BACC,SAAS,EAAE,UAAU,CACpB,uFAAuF,EACvF,MAAM,CAAC,EAAE,EACT,MAAM,CAAC,IAAI,EACX,SAAS,CACT,IAEA,MAAM,CAAC,CAAC,CAAC,CACT;QACC,2BAAG,SAAS,EAAE,UAAU,CAAC,uCAAuC,EAAE,MAAM,CAAC,GAAG,CAAC,GAAI;QACjF,kCAAO,IAAI,IAAI,MAAM,CAAQ,CAC3B,CACH,CAAC,CAAC,CAAC,IAAI,CACF,CACP,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { Spin } from "antd";
|
|
2
3
|
import IncorporationSGPForm from "../../modules/self-registration/clda-form/incorporation/sgp/index";
|
|
3
4
|
import IncorporationBVIForm from "../../modules/self-registration/clda-form/incorporation/bvi/index";
|
|
4
5
|
import CompanyGeneralForm from "../../modules/self-registration/clda-form/incorporation/company-general";
|
|
@@ -22,7 +23,8 @@ export class CLDAFormContent {
|
|
|
22
23
|
if (meta === "ARE") {
|
|
23
24
|
return React.createElement(AppointRepresentativeForm, { ...props });
|
|
24
25
|
}
|
|
25
|
-
return React.createElement(
|
|
26
|
+
return (React.createElement("div", { className: "flex items-center justify-center h-full" },
|
|
27
|
+
React.createElement(Spin, null)));
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
//# sourceMappingURL=CLDAFormContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CLDAFormContent.js","sourceRoot":"","sources":["../../../src/data/clda-form/CLDAFormContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,oBAAoB,MAAM,mEAAmE,CAAC;AACrG,OAAO,oBAAoB,MAAM,mEAAmE,CAAC;AACrG,OAAO,kBAAkB,MAAM,yEAAyE,CAAC;AACzG,OAAO,OAAO,MAAM,mEAAmE,CAAC;AACxF,OAAO,yBAAyB,MAAM,gFAAgF,CAAC;AAQvH,wDAAwD;AACxD,MAAM,OAAO,eAAe;IACpB,kBAAkB,CAAC,IAAY,EAAE,OAAe,EAAE,KAAoB;QAC5E,IAAI,IAAI,KAAK,KAAK,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;YACxC,OAAO,oBAAC,oBAAoB,OAAK,KAAK,GAAI,CAAC;QAC5C,CAAC;QACD,IAAI,IAAI,KAAK,KAAK,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;YACxC,OAAO,oBAAC,oBAAoB,OAAK,KAAK,GAAI,CAAC;QAC5C,CAAC;QACD,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;YACpB,OAAO,oBAAC,OAAO,OAA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AC;YACpB,OAAO,oBAAC,yBAAyB,OAAK,KAAK,GAAI,CAAC;QACjD,CAAC;QAED,OAAO,CACN,6BAAK,SAAS,EAAC,yCAAyC;YACvD,oBAAC,IAAI,OAAG,CACH,CACN,CAAC;IACH,CAAC;CACD"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { observe } from "@voplus/morpho-ui";
|
|
3
3
|
import DocumentStatusLabel from "@voplus/morpho-document/es/controls/DocumentStatusLabel";
|
|
4
|
-
import classnames from "classnames";
|
|
5
4
|
const RiskLevelLabel = (props) => {
|
|
6
5
|
// spec:1951 — CSP: Risk level inline editor
|
|
7
6
|
const list = [{ name: "High" }, { name: "Medium" }, { name: "Low" }];
|
|
8
7
|
if (props.status && list.findIndex((i) => i.name === props.status) === -1) {
|
|
9
8
|
list.push({ name: props.status });
|
|
10
9
|
}
|
|
11
|
-
return observe(() => (React.createElement(
|
|
12
|
-
React.createElement(DocumentStatusLabel, { className: classnames("risk-profile-status"), editable: props.editable, list: list, status: props.status, onChange: props.onChange }))));
|
|
10
|
+
return observe(() => (React.createElement(DocumentStatusLabel, { className: "risk-profile-status", editable: props.editable, list: list, status: props.status, onChange: props.onChange })));
|
|
13
11
|
};
|
|
14
12
|
export default RiskLevelLabel;
|
|
15
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/background-investigation/risk-profile/controls/RiskProfileLevelLabel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,mBAAmB,MAAM,yDAAyD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/background-investigation/risk-profile/controls/RiskProfileLevelLabel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,mBAAmB,MAAM,yDAAyD,CAAC;AAE1F,MAAM,cAAc,GAAG,CAAC,KAKvB,EAAE,EAAE;IACJ,4CAA4C;IAC5C,MAAM,IAAI,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACrE,IAAI,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QAC3E,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACnC,CAAC;IAED,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,mBAAmB,IACnB,SAAS,EAAC,qBAAqB,EAC/B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ,GACvB,CACF,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -69,7 +69,7 @@ const CorporateList = ({ viewTitle = "Corporate List", asideable = true, headerT
|
|
|
69
69
|
default:
|
|
70
70
|
break;
|
|
71
71
|
}
|
|
72
|
-
if (filterOptions) {
|
|
72
|
+
if (filterOptions === null || filterOptions === void 0 ? void 0 : filterOptions.length) {
|
|
73
73
|
filter = filterOptions;
|
|
74
74
|
}
|
|
75
75
|
return filter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/components/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AC1D,oBAAC,aAAa,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,GAAI,CACvC,CACN,GACA,CACwB,CAC3B,CAAC,CAAC;IAEH,0EAA0E;IAC1E,SAAS,OAAO;QACf,IAAI,MAAM,GAAmB,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEjF,QAAQ,MAAM,EAAE,CAAC;YAChB,KAAK,MAAM;gBACV,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;gBACpE,MAAM;YACP,KAAK,SAAS;gBACb,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;gBACvE,MAAM;YACP,KAAK,QAAQ;gBACZ,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;gBACtE,MAAM;YACP,KAAK,SAAS;gBACb,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;gBACnE,MAAM;YACP;gBACC,MAAM;QACR,CAAC;QAED,IAAI,aAAa,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/components/CorporateList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OA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|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import "./index.css";
|
|
3
2
|
export declare const columnsList: ({
|
|
4
3
|
title: React.JSX.Element;
|
|
5
4
|
dataIndex: string;
|
|
@@ -13,5 +12,18 @@ export declare const columnsList: ({
|
|
|
13
12
|
dataIndex: string;
|
|
14
13
|
width: string;
|
|
15
14
|
})[];
|
|
15
|
+
export declare const columnsSimpleList: ({
|
|
16
|
+
title: React.JSX.Element;
|
|
17
|
+
dataIndex: string;
|
|
18
|
+
width: string;
|
|
19
|
+
} | {
|
|
20
|
+
title: React.JSX.Element;
|
|
21
|
+
dataIndex: string;
|
|
22
|
+
width?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
title: string;
|
|
25
|
+
dataIndex: string;
|
|
26
|
+
width: string;
|
|
27
|
+
})[];
|
|
16
28
|
declare const TableCell: (props: any) => React.JSX.Element;
|
|
17
29
|
export default TableCell;
|
package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.js
CHANGED
|
@@ -1,50 +1,74 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { faEllipsisVerticalSolid, faEnvelopeSolid, faPhoneSolid,
|
|
2
|
+
import { faEllipsisVerticalSolid, faEnvelopeSolid, faPhoneSolid, faCalendarXmarkSolid, faUserGroupSolid, faCalendarCheckSolid, faCalendarDaysSolid, faCalendarSolid, faUserSolid, faCertificateSolid, FontAwesomeIcon as FAIcon, } from "@voplus/morpho-ui/es/faIcons";
|
|
3
3
|
import { Tooltip } from "antd";
|
|
4
|
-
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { observe, useAsideContentContext } from "@voplus/morpho-ui";
|
|
5
5
|
import { Open } from "@voplus/morpho-document-core/es/controls/ToolBar/buttons";
|
|
6
6
|
import { useControllerStore, useController } from "../../../../../../data/controller";
|
|
7
7
|
import UnitAvatar from "@voplus/morpho-org/es/components/UnitAvatar/LoadedUnitAvatar";
|
|
8
8
|
import UnitNameNoteAlert from "@voplus/morpho-org/es/components/UnitNameNoteAlert";
|
|
9
9
|
import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
|
|
10
10
|
import IdentityStatus from "@voplus/morpho-org/es/modules/verification/IdentityStatus/IdentityStatus2";
|
|
11
|
-
import TagView from "@voplus/morpho-org/es/modules/tag/TagView/TagView2";
|
|
12
11
|
import CompanyControllerMenu from "../../../controls/CompanyRegisterMenu";
|
|
13
12
|
import ControllerStatusLabel from "../../controls/ControllerStatusLabel/ControllerStatusLabel2";
|
|
14
13
|
import ToolBar from "@voplus/morpho-document-core/es/controls/ToolBar";
|
|
15
14
|
import classnames from "classnames";
|
|
16
|
-
import "./index.css";
|
|
17
15
|
export const columnsList = [
|
|
18
16
|
{
|
|
19
17
|
title: (React.createElement(React.Fragment, null,
|
|
20
|
-
React.createElement(FAIcon, { icon:
|
|
21
|
-
"
|
|
18
|
+
React.createElement(FAIcon, { icon: faUserSolid }),
|
|
19
|
+
" \u00A0Controllers Name")),
|
|
22
20
|
dataIndex: "name",
|
|
23
21
|
width: "32%",
|
|
24
22
|
},
|
|
25
23
|
{
|
|
26
24
|
title: (React.createElement(React.Fragment, null,
|
|
27
|
-
React.createElement(FAIcon, { icon:
|
|
28
|
-
"
|
|
25
|
+
React.createElement(FAIcon, { icon: faCalendarSolid }),
|
|
26
|
+
" \u00A0Appointment")),
|
|
29
27
|
dataIndex: "appointment",
|
|
30
28
|
},
|
|
31
29
|
{
|
|
32
30
|
title: (React.createElement(React.Fragment, null,
|
|
33
|
-
React.createElement(FAIcon, { icon:
|
|
34
|
-
"
|
|
31
|
+
React.createElement(FAIcon, { icon: faCalendarXmarkSolid }),
|
|
32
|
+
" \u00A0Cease")),
|
|
35
33
|
dataIndex: "cease",
|
|
36
34
|
},
|
|
37
35
|
{
|
|
38
36
|
title: (React.createElement(React.Fragment, null,
|
|
39
|
-
React.createElement(FAIcon, { icon:
|
|
40
|
-
"
|
|
37
|
+
React.createElement(FAIcon, { icon: faCalendarCheckSolid }),
|
|
38
|
+
" \u00A0Confirmation")),
|
|
39
|
+
dataIndex: "confirmation",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: (React.createElement(React.Fragment, null,
|
|
43
|
+
React.createElement(FAIcon, { icon: faCertificateSolid }),
|
|
44
|
+
" \u00A0Identity Status")),
|
|
45
|
+
dataIndex: "identity",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: " ",
|
|
49
|
+
dataIndex: "menu",
|
|
50
|
+
width: "72px",
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
export const columnsSimpleList = [
|
|
54
|
+
{
|
|
55
|
+
title: (React.createElement(React.Fragment, null,
|
|
56
|
+
React.createElement(FAIcon, { icon: faUserGroupSolid }),
|
|
57
|
+
" Controller Details")),
|
|
58
|
+
dataIndex: "details",
|
|
59
|
+
width: "40%",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: (React.createElement(React.Fragment, null,
|
|
63
|
+
React.createElement(FAIcon, { icon: faCalendarCheckSolid }),
|
|
64
|
+
" \u00A0Confirmation")),
|
|
41
65
|
dataIndex: "confirmation",
|
|
42
66
|
},
|
|
43
67
|
{
|
|
44
68
|
title: (React.createElement(React.Fragment, null,
|
|
45
|
-
React.createElement(FAIcon, { icon:
|
|
46
|
-
" Identity Status
|
|
47
|
-
dataIndex: "
|
|
69
|
+
React.createElement(FAIcon, { icon: faCertificateSolid }),
|
|
70
|
+
" Identity Status")),
|
|
71
|
+
dataIndex: "identity",
|
|
48
72
|
},
|
|
49
73
|
{
|
|
50
74
|
title: " ",
|
|
@@ -52,35 +76,66 @@ export const columnsList = [
|
|
|
52
76
|
width: "72px",
|
|
53
77
|
},
|
|
54
78
|
];
|
|
79
|
+
const renderDate = (date) => date ? (React.createElement(UTCShortDate, { value: date, format: "DD MMM YYYY", className: "text-sm text-font-primary font-semibold" })) : (React.createElement("span", { className: "text-font-primary" }, "__"));
|
|
55
80
|
const TableCell = (props) => {
|
|
81
|
+
var _a;
|
|
56
82
|
const { dataIndex, record, rowIndex, children, ...restProps } = props;
|
|
83
|
+
const isAside = (_a = useAsideContentContext()) === null || _a === void 0 ? void 0 : _a.asideContent;
|
|
57
84
|
const store = useControllerStore();
|
|
58
85
|
return observe(() => {
|
|
59
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
60
86
|
const controller = useController(record === null || record === void 0 ? void 0 : record.id, { reload: (d) => !d.tags, includes: "tags" });
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
React.createElement("
|
|
68
|
-
React.createElement(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
React.createElement(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
87
|
+
const renderContent = () => {
|
|
88
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
89
|
+
switch (dataIndex) {
|
|
90
|
+
case "name":
|
|
91
|
+
return (React.createElement("div", { className: "flex items-center gap-3.5" },
|
|
92
|
+
React.createElement(UnitAvatar, { unit: controller.contact, className: "w-10! h-10! rounded-md! text-sm! text-font-secondary! bg-blue-profile!" }),
|
|
93
|
+
React.createElement("div", { className: "flex flex-col gap-1" },
|
|
94
|
+
((_a = controller.identity) === null || _a === void 0 ? void 0 : _a.fullName) ? (React.createElement("div", { className: "text-font-primary uppercase font-semibold" }, controller.identity.fullName)) : controller.contact ? (React.createElement(UnitNameNoteAlert, { id: controller.contact.id, name: controller.contact.name })) : null,
|
|
95
|
+
React.createElement("div", { className: "flex items-center gap-4 text-xs text-font-grey font-medium" },
|
|
96
|
+
React.createElement("div", null,
|
|
97
|
+
React.createElement(FAIcon, { icon: faEnvelopeSolid }),
|
|
98
|
+
controller.email || ((_b = controller.contact) === null || _b === void 0 ? void 0 : _b.email) ? (React.createElement("span", { className: "ml-1" }, controller.email || ((_c = controller.contact) === null || _c === void 0 ? void 0 : _c.email))) : (" -")),
|
|
99
|
+
React.createElement("div", null,
|
|
100
|
+
React.createElement(FAIcon, { icon: faPhoneSolid }),
|
|
101
|
+
controller.phone || ((_d = controller.contact) === null || _d === void 0 ? void 0 : _d.phone) ? (React.createElement("span", { className: "ml-1" }, controller.phone || ((_e = controller.contact) === null || _e === void 0 ? void 0 : _e.phone))) : (" -"))))));
|
|
102
|
+
case "details":
|
|
103
|
+
return (React.createElement("div", { className: "flex items-center gap-3.5" },
|
|
104
|
+
React.createElement(UnitAvatar, { unit: controller.contact, className: "w-10! h-10! rounded-md! text-sm! text-font-secondary! bg-blue-profile!" }),
|
|
105
|
+
React.createElement("div", { className: "flex flex-col gap-1" },
|
|
106
|
+
((_f = controller.identity) === null || _f === void 0 ? void 0 : _f.fullName) ? (React.createElement("div", { className: "text-font-primary uppercase font-semibold" }, controller.identity.fullName)) : controller.contact ? (React.createElement(UnitNameNoteAlert, { id: controller.contact.id, name: controller.contact.name })) : null,
|
|
107
|
+
React.createElement("div", { className: "flex items-center gap-2 text-xs text-font-grey font-medium" },
|
|
108
|
+
React.createElement("div", { className: "flex items-center gap-0.5" },
|
|
109
|
+
React.createElement(FAIcon, { icon: faCalendarCheckSolid }),
|
|
110
|
+
controller.appointment ? (React.createElement(UTCShortDate, { value: controller.appointment, format: "DD MMM YYYY", className: "text-xs text-font-grey font-semibold" })) : (React.createElement("span", { className: "text-font-primary" }, " -"))),
|
|
111
|
+
React.createElement("div", { className: "flex items-center gap-0.5" },
|
|
112
|
+
React.createElement(FAIcon, { icon: faCalendarDaysSolid }),
|
|
113
|
+
controller.cease ? (React.createElement(UTCShortDate, { value: controller.cease, format: "DD MMM YYYY", className: "text-xs text-font-grey font-semibold" })) : (React.createElement("span", { className: "text-font-primary" }, " -")))))));
|
|
114
|
+
case "appointment":
|
|
115
|
+
return renderDate(controller.appointment);
|
|
116
|
+
case "cease":
|
|
117
|
+
return renderDate(controller.cease);
|
|
118
|
+
case "confirmation": {
|
|
119
|
+
const label = (React.createElement(ControllerStatusLabel, { className: classnames({ "need-identity": !controller.identity }), status: !controller.identity ? "Need Identity" : controller.confirmationStatus }));
|
|
120
|
+
if (isAside)
|
|
121
|
+
return label;
|
|
122
|
+
return (React.createElement(Tooltip, { title: controller.confimrationDate ? (React.createElement(React.Fragment, null,
|
|
123
|
+
"Confimration Date:",
|
|
124
|
+
" ",
|
|
125
|
+
React.createElement(UTCShortDate, { value: controller.confimrationDate, format: "DD MMM YYYY" }))) : null, color: "#868686" }, label));
|
|
126
|
+
}
|
|
127
|
+
case "identity":
|
|
128
|
+
return ((_g = controller.identity) === null || _g === void 0 ? void 0 : _g.id) ? (React.createElement(IdentityStatus, { id: controller.identity.id, className: isAside ? "gap-2.5!" : undefined })) : null;
|
|
129
|
+
case "menu":
|
|
130
|
+
return (React.createElement("div", { className: "opacity-0 group-hover/row:opacity-100 transition-opacity" },
|
|
131
|
+
React.createElement(ToolBar, { id: record.id, showMenu: false },
|
|
132
|
+
React.createElement(Open, { url: `/controller/${record.id}` }),
|
|
133
|
+
React.createElement(CompanyControllerMenu, { id: record.id, title: "Controller Menu", unitId: (_h = controller.contact) === null || _h === void 0 ? void 0 : _h.id, store: store, closeAside: true, icon: React.createElement(FAIcon, { icon: faEllipsisVerticalSolid }) }))));
|
|
134
|
+
default:
|
|
135
|
+
return children;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
return React.createElement("td", { ...restProps }, renderContent());
|
|
84
139
|
});
|
|
85
140
|
};
|
|
86
141
|
export default TableCell;
|