@voplus/morpho-csp 1.2.156 → 1.2.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/data/risk-match/RiskMatchStore.d.ts +31 -0
- package/es/data/risk-match/RiskMatchStore.js +105 -0
- package/es/data/risk-match/RiskMatchStore.js.map +1 -0
- package/es/data/risk-match/hooks.d.ts +10 -0
- package/es/data/risk-match/hooks.js +19 -0
- package/es/data/risk-match/hooks.js.map +1 -0
- package/es/data/risk-match/index.d.ts +4 -0
- package/es/data/risk-match/index.js +5 -0
- package/es/data/risk-match/index.js.map +1 -0
- package/es/data/risk-match/interfaces.d.ts +9 -0
- package/es/data/risk-match/interfaces.js +2 -0
- package/es/data/risk-match/interfaces.js.map +1 -0
- package/es/data/risk-match/risk-match-events/index.d.ts +3 -0
- package/es/data/risk-match/risk-match-events/index.js +4 -0
- package/es/data/risk-match/risk-match-events/index.js.map +1 -0
- package/es/data/risk-match/risk-match-events/useAutoUpdateListData.d.ts +4 -0
- package/es/data/risk-match/risk-match-events/useAutoUpdateListData.js +15 -0
- package/es/data/risk-match/risk-match-events/useAutoUpdateListData.js.map +1 -0
- package/es/data/risk-match/risk-match-events/useOnDeleteRiskMatch.d.ts +4 -0
- package/es/data/risk-match/risk-match-events/useOnDeleteRiskMatch.js +16 -0
- package/es/data/risk-match/risk-match-events/useOnDeleteRiskMatch.js.map +1 -0
- package/es/data/risk-match/risk-match-events/useOnNewRiskMatch.d.ts +4 -0
- package/es/data/risk-match/risk-match-events/useOnNewRiskMatch.js +17 -0
- package/es/data/risk-match/risk-match-events/useOnNewRiskMatch.js.map +1 -0
- package/es/data/risk-match/types.d.ts +17 -0
- package/es/data/risk-match/types.js +2 -0
- package/es/data/risk-match/types.js.map +1 -0
- package/es/data/risk-profile/RiskProfileStore.d.ts +36 -0
- package/es/data/risk-profile/RiskProfileStore.js +127 -0
- package/es/data/risk-profile/RiskProfileStore.js.map +1 -0
- package/es/data/risk-profile/hooks.d.ts +11 -0
- package/es/data/risk-profile/hooks.js +24 -0
- package/es/data/risk-profile/hooks.js.map +1 -0
- package/es/data/risk-profile/index.d.ts +4 -0
- package/es/data/risk-profile/index.js +5 -0
- package/es/data/risk-profile/index.js.map +1 -0
- package/es/data/risk-profile/interfaces.d.ts +14 -0
- package/es/data/risk-profile/interfaces.js +2 -0
- package/es/data/risk-profile/interfaces.js.map +1 -0
- package/es/data/risk-profile/risk-profile-events/index.d.ts +3 -0
- package/es/data/risk-profile/risk-profile-events/index.js +4 -0
- package/es/data/risk-profile/risk-profile-events/index.js.map +1 -0
- package/es/data/risk-profile/risk-profile-events/useAutoUpdateListData.d.ts +4 -0
- package/es/data/risk-profile/risk-profile-events/useAutoUpdateListData.js +15 -0
- package/es/data/risk-profile/risk-profile-events/useAutoUpdateListData.js.map +1 -0
- package/es/data/risk-profile/risk-profile-events/useOnDeleteRiskProfile.d.ts +4 -0
- package/es/data/risk-profile/risk-profile-events/useOnDeleteRiskProfile.js +16 -0
- package/es/data/risk-profile/risk-profile-events/useOnDeleteRiskProfile.js.map +1 -0
- package/es/data/risk-profile/risk-profile-events/useOnNewRiskProfile.d.ts +4 -0
- package/es/data/risk-profile/risk-profile-events/useOnNewRiskProfile.js +17 -0
- package/es/data/risk-profile/risk-profile-events/useOnNewRiskProfile.js.map +1 -0
- package/es/data/risk-profile/types.d.ts +23 -0
- package/es/data/risk-profile/types.js +2 -0
- package/es/data/risk-profile/types.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchHeader/index.d.ts +6 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchHeader/index.js +21 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchHeader/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchHeader/index.less +15 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchItem/index.d.ts +7 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchItem/index.js +32 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchItem/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchItem/index.less +28 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchList/index.d.ts +10 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchList/index.js +51 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchList/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchList/index.less +21 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchProperties/index.d.ts +5 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchProperties/index.js +30 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchProperties/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchPropertiesView/index.d.ts +7 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchPropertiesView/index.js +18 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchPropertiesView/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchPropertiesView/index.less +4 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchQuickView/index.d.ts +15 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchQuickView/index.js +31 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchQuickView/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchQuickView/index.less +30 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchReport/index.d.ts +5 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchReport/index.js +10 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchReport/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchResult/index.d.ts +5 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchResult/index.js +31 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchResult/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchSearchDialog/index.d.ts +7 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchSearchDialog/index.js +40 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchSearchDialog/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchTabs/index.d.ts +5 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchTabs/index.js +22 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchTabs/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchTabs/index.less +13 -0
- package/es/modules/corporate/background-investigation/risk-match/controls/RiskMatchDataBar/index.d.ts +10 -0
- package/es/modules/corporate/background-investigation/risk-match/controls/RiskMatchDataBar/index.js +30 -0
- package/es/modules/corporate/background-investigation/risk-match/controls/RiskMatchDataBar/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-match/pages/RiskMatchDefaultView/index.d.ts +3 -0
- package/es/modules/corporate/background-investigation/risk-match/pages/RiskMatchDefaultView/index.js +33 -0
- package/es/modules/corporate/background-investigation/risk-match/pages/RiskMatchDefaultView/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-match/pages/RiskMatchDefaultView/index.less +17 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/NewRiskProfileForm/index.d.ts +15 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/NewRiskProfileForm/index.js +61 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/NewRiskProfileForm/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/NewRiskProfileForm/index.less +10 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/NewRiskProfileForm/state.d.ts +11 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/NewRiskProfileForm/state.js +34 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/NewRiskProfileForm/state.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileHead/index.d.ts +6 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileHead/index.js +33 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileHead/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileHead/index.less +33 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileItem/index.d.ts +7 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileItem/index.js +41 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileItem/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileItem/index.less +53 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileList/index.d.ts +10 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileList/index.js +51 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileList/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileList/index.less +21 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileProperties/index.d.ts +26 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileProperties/index.js +53 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileProperties/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfilePropertiesView/index.d.ts +6 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfilePropertiesView/index.js +23 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfilePropertiesView/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileQuickView/index.d.ts +7 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileQuickView/index.js +12 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileQuickView/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileTabs/index.d.ts +6 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileTabs/index.js +68 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileTabs/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/RiskProfileTabs/index.less +13 -0
- package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileDataBar/index.d.ts +10 -0
- package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileDataBar/index.js +22 -0
- package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileDataBar/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileMenu/index.d.ts +13 -0
- package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileMenu/index.js +52 -0
- package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileMenu/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileMenu/index.less +39 -0
- package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileStatusLabel/index.d.ts +10 -0
- package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileStatusLabel/index.js +14 -0
- package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileStatusLabel/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileStatusLabel/index.less +20 -0
- package/es/modules/corporate/background-investigation/risk-profile/pages/RiskProfileDefaultView/RiskProfileContext.d.ts +7 -0
- package/es/modules/corporate/background-investigation/risk-profile/pages/RiskProfileDefaultView/RiskProfileContext.js +20 -0
- package/es/modules/corporate/background-investigation/risk-profile/pages/RiskProfileDefaultView/RiskProfileContext.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/pages/RiskProfileDefaultView/index.d.ts +3 -0
- package/es/modules/corporate/background-investigation/risk-profile/pages/RiskProfileDefaultView/index.js +31 -0
- package/es/modules/corporate/background-investigation/risk-profile/pages/RiskProfileDefaultView/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/pages/RiskProfileDefaultView/index.less +17 -0
- package/es/modules/corporate/background-investigation/risk-profile/pages/UnitRiskProfilePage/index.d.ts +3 -0
- package/es/modules/corporate/background-investigation/risk-profile/pages/UnitRiskProfilePage/index.js +34 -0
- package/es/modules/corporate/background-investigation/risk-profile/pages/UnitRiskProfilePage/index.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/pages/UnitRiskProfilePage/index.less +11 -0
- package/es/modules/corporate/relationship/components/CorporateRelationshipView/index.d.ts +1 -1
- package/es/modules/corporate/relationship/components/CorporateRelationshipView/index.js +9 -6
- package/es/modules/corporate/relationship/components/CorporateRelationshipView/index.js.map +1 -1
- package/es/routes.d.ts +24 -0
- package/es/routes.js +55 -3
- package/es/routes.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type RiskProfilePropertiesName = "CreateDate" | "RiskLevel";
|
|
3
|
+
declare const RiskProfileProperties: {
|
|
4
|
+
(props: {
|
|
5
|
+
id: string;
|
|
6
|
+
headerVisible?: boolean;
|
|
7
|
+
riskProfileTitle?: string;
|
|
8
|
+
orgContactTitle?: string;
|
|
9
|
+
riskProfileProperties?: {
|
|
10
|
+
name: RiskProfilePropertiesName;
|
|
11
|
+
visible?: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
orgContactProperties?: {
|
|
14
|
+
name: "Phone" | "Address" | "E-mail" | "DingId" | "Site" | "Birthday" | "Gender";
|
|
15
|
+
visible?: boolean;
|
|
16
|
+
}[];
|
|
17
|
+
}): JSX.Element;
|
|
18
|
+
defaultProps: {
|
|
19
|
+
riskProfileTitle: string;
|
|
20
|
+
orgContactTitle: string;
|
|
21
|
+
riskProfileProperties: {
|
|
22
|
+
name: string;
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export default RiskProfileProperties;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Form, Skeleton } from "@voplus/antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { useRiskProfile, useRiskProfileStore } from "../../../../../../data/risk-profile";
|
|
5
|
+
import { Scrollbars } from "react-custom-scrollbars";
|
|
6
|
+
import { faEllipsisVertical } from "@fortawesome/pro-light-svg-icons";
|
|
7
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
8
|
+
import RiskProfileMenu from "../../controls/RiskProfileMenu";
|
|
9
|
+
import UnitsSelectDialog from "@voplus/morpho-org/es/components/UnitsSelectDialog";
|
|
10
|
+
import ContactProperties from "@voplus/morpho-org/es/components/ContactProperties";
|
|
11
|
+
import PropertiesSection from "@voplus/morpho-ui/es/controls/PropertiesSection";
|
|
12
|
+
import RiskProfileStatusLabel from "../../controls/RiskProfileStatusLabel";
|
|
13
|
+
import moment from "moment";
|
|
14
|
+
const RiskProfileProperties = (props) => {
|
|
15
|
+
const { id, headerVisible, riskProfileTitle, orgContactTitle, riskProfileProperties, orgContactProperties, } = props;
|
|
16
|
+
const riskProfile = useRiskProfile(props.id);
|
|
17
|
+
const store = useRiskProfileStore();
|
|
18
|
+
const [visible, setVisible] = useState(false);
|
|
19
|
+
const filterPro = riskProfileProperties === null || riskProfileProperties === void 0 ? void 0 : riskProfileProperties.filter((i) => (i === null || i === void 0 ? void 0 : i.visible) !== false);
|
|
20
|
+
return observe(() => riskProfile.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement("div", { className: "properties-list" },
|
|
21
|
+
headerVisible && (React.createElement("div", { className: "properties-header" },
|
|
22
|
+
React.createElement("div", { className: "title" }, riskProfile.unit.name),
|
|
23
|
+
React.createElement(RiskProfileMenu, { id: id, icon: React.createElement(FAIcon, { icon: faEllipsisVertical }) }))),
|
|
24
|
+
React.createElement(Scrollbars, { autoHide: true },
|
|
25
|
+
React.createElement(PropertiesSection, { title: riskProfileTitle, properties: React.createElement(Form, { labelAlign: "left", labelCol: { span: 10 }, scrollToFirstError: true }, filterPro === null || filterPro === void 0 ? void 0 : filterPro.map((i) => (React.createElement(React.Fragment, { key: i.name }, renderProp(i))))) }),
|
|
26
|
+
React.createElement(ContactProperties, { fromLabelRequired: true, id: riskProfile.unit.id, labelCol: 10, wrapperCol: 14, title: orgContactTitle, customProperties: orgContactProperties })),
|
|
27
|
+
visible && (React.createElement(UnitsSelectDialog, { type: "click", multiSelect: false, onSelect: (unit) => {
|
|
28
|
+
const ids = unit[0].id.toString();
|
|
29
|
+
// store.editRiskProfile(props.id, { data: { }, error: "message" });
|
|
30
|
+
}, onCancel: () => setVisible(false) })))));
|
|
31
|
+
function renderProp(item) {
|
|
32
|
+
switch (item.name) {
|
|
33
|
+
case "CreateDate":
|
|
34
|
+
return (React.createElement(Form.Item, { label: "Create Date" },
|
|
35
|
+
React.createElement("span", null, moment(riskProfile.createDate).format("YYYY-MM-DD"))));
|
|
36
|
+
case "RiskLevel":
|
|
37
|
+
return (React.createElement(Form.Item, { label: "Risk Level" },
|
|
38
|
+
React.createElement(RiskProfileStatusLabel, { editable: true, status: riskProfile.riskLevel, onChange: (status) => store.edit(id, {
|
|
39
|
+
data: {
|
|
40
|
+
RiskLevel: status,
|
|
41
|
+
},
|
|
42
|
+
error: "message",
|
|
43
|
+
}) })));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
RiskProfileProperties.defaultProps = {
|
|
48
|
+
riskProfileTitle: "RiskProfile Properties",
|
|
49
|
+
orgContactTitle: "Contact Properties",
|
|
50
|
+
riskProfileProperties: [{ name: "CreateDate" }, { name: "RiskLevel" }],
|
|
51
|
+
};
|
|
52
|
+
export default RiskProfileProperties;
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/background-investigation/risk-profile/components/RiskProfileProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,Q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AE,CAAC,UAAU,CAAC,KAAK,CAAC,GAChC,CACF,CACI,CACN,CACD,CAAC;IAEF,SAAS,UAAU,CAAC,IAA4D;QAC/E,QAAQ,IAAI,CAAC,IAAI,EAAE;YAClB,KAAK,YAAY;gBAChB,OAAO,CACN,oBAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,aAAa;oBAC7B,kCAAO,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAQ,CACvD,CACZ,CAAC;YACH,KAAK,WAAW;gBACf,OAAO,CACN,oBAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,YAAY;oBAC5B,oBAAC,sBAAsB,IACtB,QAAQ,QACR,MAAM,EAAE,WAAW,CAAC,SAAS,EAC7B,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CACpB,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE;4BACd,IAAI,EAAE;gCACL,SAAS,EAAE,MAAM;6BACjB;4BACD,KAAK,EAAE,SAAS;yBAChB,CAAC,GAEF,CACS,CACZ,CAAC;SACH;IACF,CAAC;AACF,CAAC,CAAC;AAEF,qBAAqB,CAAC,YAAY,GAAG;IACpC,gBAAgB,EAAE,wBAAwB;IAC1C,eAAe,EAAE,oBAAoB;IACrC,qBAAqB,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;CACtE,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { useMemo, useState } from "react";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import { ViewContext, ViewContextData, } from "@voplus/morpho-document-core/es/data/context/ViewContext";
|
|
4
|
+
import RiskProfileProperties from "../RiskProfileProperties";
|
|
5
|
+
import RiskProfileHead from "../RiskProfileHead";
|
|
6
|
+
import RiskProfileTabs from "../RiskProfileTabs";
|
|
7
|
+
/** RiskProfile PropertiesView */
|
|
8
|
+
const RiskProfilePropertiesView = (props) => {
|
|
9
|
+
const view = useMemo(() => new ViewContextData("PropertiesView"), []);
|
|
10
|
+
const [loaded, setLoaded] = useState(true);
|
|
11
|
+
return observe(() => (React.createElement(ViewContext.Provider, { value: view },
|
|
12
|
+
React.createElement("div", { className: "module-detail-view" }, loaded && (React.createElement(React.Fragment, null,
|
|
13
|
+
React.createElement(RiskProfileHead, { id: props.id, onReload: onReload }),
|
|
14
|
+
React.createElement(RiskProfileTabs, { id: props.id, properties: React.createElement(RiskProfileProperties, { id: props.id }) })))))));
|
|
15
|
+
function onReload() {
|
|
16
|
+
setLoaded(false);
|
|
17
|
+
setTimeout(() => {
|
|
18
|
+
setLoaded(true);
|
|
19
|
+
}, 100);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export default RiskProfilePropertiesView;
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/background-investigation/risk-profile/components/RiskProfilePropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACN,WAAW,EACX,eAAe,GACf,MAAM,0DAA0D,CAAC;AAClE,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAEjD,iCAAiC;AACjC,MAAM,yBAAyB,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC3D,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC;IACtE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE3C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI;QAChC,6BAAK,SAAS,EAAC,oBAAoB,IACjC,MAAM,IAAI,CACV,oBAAC,KAAK,CAAC,QAAQ;YACd,oBAAC,eAAe,IAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,QAAQ,EAAE,QAAQ,GAAI;YACrD,oBAAC,eAAe,IAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,UAAU,EAAE,oBAAC,qBAAqB,IAAC,EAAE,EAAE,KAAK,CAAC,EAAE,GAAI,GAAI,CACtE,CACjB,CACI,CACgB,CACvB,CAAC,CAAC;IAEH,SAAS,QAAQ;QAChB,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,UAAU,CAAC,GAAG,EAAE;YACf,SAAS,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC,EAAE,GAAG,CAAC,CAAC;IACT,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import { useRiskProfile } from "../../../../../../data/risk-profile";
|
|
4
|
+
import RiskProfileHead from "../RiskProfileHead";
|
|
5
|
+
import UnitQuickView from "@voplus/morpho-org/es/components/UnitQuickView";
|
|
6
|
+
import RiskProfileProperties from "../RiskProfileProperties";
|
|
7
|
+
const RiskProfileQuickView = (props) => {
|
|
8
|
+
const riskProfile = useRiskProfile(props.id);
|
|
9
|
+
return observe(() => (React.createElement(UnitQuickView, { header: React.createElement(RiskProfileHead, { id: props.id }), children: React.createElement(RiskProfileProperties, { id: props.id }), id: riskProfile.unit.id, visible: props.visible, onCancel: props.onCancel })));
|
|
10
|
+
};
|
|
11
|
+
export default RiskProfileQuickView;
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/background-investigation/risk-profile/components/RiskProfileQuickView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,aAAa,MAAM,gDAAgD,CAAC;AAC3E,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAE7D,MAAM,oBAAoB,GAAG,CAAC,KAA+D,EAAE,EAAE;IAChG,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAE7C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,aAAa,IACb,MAAM,EAAE,oBAAC,eAAe,IAAC,EAAE,EAAE,KAAK,CAAC,EAAE,GAAI,EACzC,QAAQ,EAAE,oBAAC,qBAAqB,IAAC,EAAE,EAAE,KAAK,CAAC,EAAE,GAAI,EACjD,EAAE,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,EACvB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,GACvB,CACF,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React, { useEffect, useMemo, useState } from "react";
|
|
2
|
+
import { Tabs, Badge, Skeleton } from "@voplus/antd";
|
|
3
|
+
import { useRiskProfile } from "../../../../../../data/risk-profile";
|
|
4
|
+
import { observe } from "@voplus/morpho-ui";
|
|
5
|
+
import { useRiskProfileReload } from "../../pages/RiskProfileDefaultView/RiskProfileContext";
|
|
6
|
+
import { useViewContext } from "@voplus/morpho-document-core/es/data/context/ViewContext";
|
|
7
|
+
import { useDocumentListEffect } from "@voplus/morpho-document-core";
|
|
8
|
+
import { useAsideContentContext } from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
|
9
|
+
import { SendFormContext, SendFormContextData, } from "@voplus/morpho-document-core/es/data/context/SendFormContext";
|
|
10
|
+
import RiskMatchList from "../../../risk-match/components/RiskMatchList";
|
|
11
|
+
import RiskProfileList from "../RiskProfileList";
|
|
12
|
+
import RiskMatchPropertiesView from "../../../risk-match/components/RiskMatchPropertiesView";
|
|
13
|
+
import RiskProfilePropertiesView from "../RiskProfilePropertiesView";
|
|
14
|
+
import ActivityLog from "@voplus/morpho-org/es/components/ActivityLog/ActivityLog2";
|
|
15
|
+
import DocumentList from "@voplus/morpho-document/es/components/DocumentList";
|
|
16
|
+
import styles from "./index.less";
|
|
17
|
+
const RiskProfileTabs = (props) => {
|
|
18
|
+
const { id, properties } = props;
|
|
19
|
+
const riskProfile = useRiskProfile(id);
|
|
20
|
+
const view = useViewContext();
|
|
21
|
+
const riskMatchReload = useRiskProfileReload();
|
|
22
|
+
const asideContext = useAsideContentContext();
|
|
23
|
+
const openType = useMemo(() => new SendFormContextData("Dialog"), []);
|
|
24
|
+
const [docTotals, setDocTotals] = useState(0);
|
|
25
|
+
/**Tabs 当前激活 tab 面板的 key */
|
|
26
|
+
const [activeKey, setActiveKey] = useState("");
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
setActiveKey(properties ? "Properties" : "Matches");
|
|
29
|
+
}, [id]);
|
|
30
|
+
useDocumentListEffect(null, (result, total) => setDocTotals(total || 0), {
|
|
31
|
+
Total: true,
|
|
32
|
+
List: false,
|
|
33
|
+
Filters: [
|
|
34
|
+
{ c: "ParentNodeId", o: "=", l: "And", v1: id },
|
|
35
|
+
{
|
|
36
|
+
c: "Type",
|
|
37
|
+
o: "!contains",
|
|
38
|
+
l: "And",
|
|
39
|
+
v1: JSON.stringify(["Task", "Ticket", "Deal"]),
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
});
|
|
43
|
+
return observe(() => riskProfile.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement(SendFormContext.Provider, { value: openType },
|
|
44
|
+
React.createElement(Tabs, { className: styles["risk-profile-tabs"], activeKey: activeKey, onChange: onChange },
|
|
45
|
+
properties && (React.createElement(React.Fragment, null,
|
|
46
|
+
React.createElement(Tabs.TabPane, { tab: "Properties", key: "Properties" }, properties))),
|
|
47
|
+
React.createElement(Tabs.TabPane, { tab: "Matches", key: "Matches" }, riskMatchReload.Loaded && (React.createElement(RiskMatchList, { parentId: id, viewTitle: " ", asideable: false, onClickItem: onOpenRiskMatchPropertiesView }))),
|
|
48
|
+
React.createElement(Tabs.TabPane, { tab: "Related Profiles", key: "RelatedProfiles" },
|
|
49
|
+
React.createElement(RiskProfileList, { parentId: id, viewTitle: " ", asideable: false, onClickItem: onOpenRiskProfilePropertiesView })),
|
|
50
|
+
React.createElement(Tabs.TabPane, { tab: React.createElement(React.Fragment, null,
|
|
51
|
+
"Document",
|
|
52
|
+
React.createElement(Badge, { count: docTotals, className: "margin-left-10" })), key: "Document" }, activeKey === "Document" && (React.createElement(DocumentList, { id: id, multiple: true, viewTitle: " ", total: false, exclude: ["Task", "Ticket", "Deal"] }))),
|
|
53
|
+
React.createElement(Tabs.TabPane, { tab: "Activities", key: "Activities" }, activeKey === "Activities" && React.createElement(ActivityLog, { id: id, nodes: [riskProfile.unit.id] }))))));
|
|
54
|
+
/**切换面板的回调*/
|
|
55
|
+
function onChange(activeKey) {
|
|
56
|
+
setActiveKey(activeKey);
|
|
57
|
+
}
|
|
58
|
+
function onOpenRiskMatchPropertiesView(item) {
|
|
59
|
+
(view === null || view === void 0 ? void 0 : view.Type) !== "PropertiesView" &&
|
|
60
|
+
asideContext.openAside(React.createElement(RiskMatchPropertiesView, { id: item.id }), { span: 12 });
|
|
61
|
+
}
|
|
62
|
+
function onOpenRiskProfilePropertiesView(item) {
|
|
63
|
+
(view === null || view === void 0 ? void 0 : view.Type) !== "PropertiesView" &&
|
|
64
|
+
asideContext.openAside(React.createElement(RiskProfilePropertiesView, { id: item.id }), { span: 12 });
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
export default RiskProfileTabs;
|
|
68
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/background-investigation/risk-profile/components/RiskProfileTabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,cAAc,EAAgB,MAAM,qCAAqC,CAAC;AAEnF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uDAAuD,CAAC;AAC7F,OAAO,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EACN,eAAe,EACf,mBAAmB,GACnB,MAAM,8DAA8D,CAAC;AACtE,OAAO,aAAa,MAAM,8CAA8C,CAAC;AACzE,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,uBAAuB,MAAM,wDAAwD,CAAC;AAC7F,OAAO,yBAAyB,MAAM,8BAA8B,CAAC;AACrE,OAAO,WAAW,MAAM,2DAA2D,CAAC;AACpF,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,eAAe,GAAG,CAAC,KAAmD,EAAE,EAAE;IAC/E,MAAM,EAAE,EAAE,EAAE,UAAU,EAA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,OAAO,IAAC,GAAG,EAAC,YAAY,EAAC,GAAG,EAAC,YAAY,IAC7C,SAAS,KAAK,YAAY,IAAI,oBAAC,WAAW,IAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,GAAI,CACtE,CACT,CACmB,CAC3B,CACD,CAAC;IAEF,YAAY;IACZ,SAAS,QAAQ,CAAC,SAAiB;QAClC,YAAY,CAAC,SAAS,CAAC,CAAC;IACzB,CAAC;IAED,SAAS,6BAA6B,CAAC,IAAgB;QACtD,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,MAAK,gBAAgB;YAC9B,YAAa,CAAC,SAAS,CAAC,oBAAC,uBAAuB,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,GAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAClF,CAAC;IAED,SAAS,+BAA+B,CAAC,IAAkB;QAC1D,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,MAAK,gBAAgB;YAC9B,YAAa,CAAC,SAAS,CAAC,oBAAC,yBAAyB,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,GAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IACpF,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const RiskProfileDataBar: (props: {
|
|
3
|
+
/** id of riskProfile */
|
|
4
|
+
id: string;
|
|
5
|
+
/** visible DataIconBar */
|
|
6
|
+
visible?: boolean | undefined;
|
|
7
|
+
/** props click function */
|
|
8
|
+
onClick?: ((key?: string | undefined) => void) | undefined;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
export default RiskProfileDataBar;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Tooltip } from "@voplus/antd";
|
|
3
|
+
import { useRiskProfile } from "../../../../../../data/risk-profile";
|
|
4
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
5
|
+
import { faCalendarCirclePlus, faNfcMagnifyingGlass } from "@fortawesome/pro-light-svg-icons";
|
|
6
|
+
import DataIconBar from "@voplus/morpho-document/es/controls/DataIconBar";
|
|
7
|
+
import moment from "moment";
|
|
8
|
+
const RiskProfileDataBar = (props) => {
|
|
9
|
+
const { id, visible, onClick } = props;
|
|
10
|
+
const riskProfile = useRiskProfile(id, { reload: false });
|
|
11
|
+
return (React.createElement(DataIconBar, { visible: visible },
|
|
12
|
+
React.createElement(Tooltip, { title: "Date" },
|
|
13
|
+
React.createElement("span", { className: "data-icon", style: { color: "#00000073" } },
|
|
14
|
+
React.createElement(FAIcon, { icon: faCalendarCirclePlus }),
|
|
15
|
+
moment(riskProfile.createDate).format("YYYY-MM-DD"))),
|
|
16
|
+
(riskProfile === null || riskProfile === void 0 ? void 0 : riskProfile.lastSearch) && (React.createElement(Tooltip, { title: "Last Search Date" },
|
|
17
|
+
React.createElement("span", { className: "data-icon", style: { color: "#00000073" } },
|
|
18
|
+
React.createElement(FAIcon, { icon: faNfcMagnifyingGlass }),
|
|
19
|
+
moment(riskProfile.lastSearch).format("YYYY-MM-DD"))))));
|
|
20
|
+
};
|
|
21
|
+
export default RiskProfileDataBar;
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/background-investigation/risk-profile/controls/RiskProfileDataBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAA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|
6
|
+
className?: string;
|
|
7
|
+
closeAside?: boolean;
|
|
8
|
+
}): JSX.Element;
|
|
9
|
+
defaultProps: {
|
|
10
|
+
icon: JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default RiskProfileMenu;
|
package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileMenu/index.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { useLayout } from "@voplus/morpho-data";
|
|
3
|
+
import { Button, Dropdown, Modal } from "@voplus/antd";
|
|
4
|
+
import { useRiskProfileStore, useRiskProfile } from "../../../../../../data/risk-profile";
|
|
5
|
+
import { faTrashAlt, faCircleEllipsis, faMagnifyingGlass, faTableLayout, } from "@fortawesome/pro-light-svg-icons";
|
|
6
|
+
import { observe, useAsideContentContext } from "@voplus/morpho-ui";
|
|
7
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
8
|
+
import RiskMatchSearchDialog from "../../../risk-match/components/RiskMatchSearchDialog";
|
|
9
|
+
import Routes from "../../../../../../routes";
|
|
10
|
+
import classnames from "classnames";
|
|
11
|
+
import styles from "./index.less";
|
|
12
|
+
const RiskProfileMenu = (props) => {
|
|
13
|
+
const riskProfile = useRiskProfile(props.id);
|
|
14
|
+
const store = useRiskProfileStore();
|
|
15
|
+
const layout = useLayout();
|
|
16
|
+
const asideContext = useAsideContentContext();
|
|
17
|
+
const [searchVisible, setSearchVisible] = useState(false);
|
|
18
|
+
return observe(() => (React.createElement(React.Fragment, null,
|
|
19
|
+
React.createElement(Dropdown, { placement: "bottomRight", overlay: React.createElement("div", { className: classnames(styles["risk-profile-menu"], props.className) },
|
|
20
|
+
React.createElement(Button, { type: "link", onClick: () => setSearchVisible(true) },
|
|
21
|
+
React.createElement(FAIcon, { icon: faMagnifyingGlass }),
|
|
22
|
+
React.createElement("span", null, "Search")),
|
|
23
|
+
React.createElement(Button, { type: "link", disabled: true, onClick: () => layout.history.push(Routes.CorporateRelationshipView.getUrl(riskProfile.unit.id)) },
|
|
24
|
+
React.createElement(FAIcon, { icon: faTableLayout }),
|
|
25
|
+
React.createElement("span", null, "View Relationship")),
|
|
26
|
+
React.createElement(Button, { type: "link", onClick: onDelete },
|
|
27
|
+
React.createElement(FAIcon, { icon: faTrashAlt, color: "#f5222d" }),
|
|
28
|
+
React.createElement("span", { className: "delete" }, "Delete"))) },
|
|
29
|
+
React.createElement(Button, { size: "small", type: "link" }, props.icon)),
|
|
30
|
+
searchVisible && (React.createElement(RiskMatchSearchDialog, { id: props.id, onCancel: () => setSearchVisible(false) })))));
|
|
31
|
+
function onDelete() {
|
|
32
|
+
/** 如果文件下有子文件, 询问是否删除所有子文件 */
|
|
33
|
+
Modal.confirm({
|
|
34
|
+
title: "Do you want to delete this item?",
|
|
35
|
+
async onOk() {
|
|
36
|
+
await store.delete([props.id], {
|
|
37
|
+
data: { DeleteChilds: true },
|
|
38
|
+
error: "message",
|
|
39
|
+
});
|
|
40
|
+
/** 删除后是否关闭Aside */
|
|
41
|
+
if (!!props.closeAside && (asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent))
|
|
42
|
+
asideContext === null || asideContext === void 0 ? void 0 : asideContext.closeAside();
|
|
43
|
+
return;
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
RiskProfileMenu.defaultProps = {
|
|
49
|
+
icon: React.createElement(FAIcon, { icon: faCircleEllipsis }),
|
|
50
|
+
};
|
|
51
|
+
export default RiskProfileMenu;
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/background-investigation/risk-profile/controls/RiskProfileMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,E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AE,UAAU,EAAE,CAAC;gBACjF,OAAO;YACR,CAAC;SACD,CAAC,CAAC;IACJ,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG;IAC9B,IAAI,EAAE,oBAAC,MAAM,IAAC,IAAI,EAAE,gBAAgB,GAAI;CACxC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
+
|
|
3
|
+
.risk-profile-menu {
|
|
4
|
+
padding: 4px 8px;
|
|
5
|
+
list-style-type: none;
|
|
6
|
+
background-color: #fff;
|
|
7
|
+
background-clip: padding-box;
|
|
8
|
+
border-radius: @border-radius;
|
|
9
|
+
outline: none;
|
|
10
|
+
box-shadow: @more-box-shadow;
|
|
11
|
+
|
|
12
|
+
:global {
|
|
13
|
+
.ant-btn {
|
|
14
|
+
display: block;
|
|
15
|
+
width: 100%;
|
|
16
|
+
padding: 0 12px;
|
|
17
|
+
height: 34px;
|
|
18
|
+
color: #666;
|
|
19
|
+
text-align: left;
|
|
20
|
+
|
|
21
|
+
&[disabled] {
|
|
22
|
+
color: rgba(0, 0, 0, 0.25);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
background-color: @ant-menu-hover-color;
|
|
27
|
+
box-shadow: @hover-button-shadow;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
>span {
|
|
31
|
+
margin-left: 10px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.delete {
|
|
36
|
+
color: #f5222d;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { RiskLevel } from "../../../../../../data/risk-profile";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
declare const RiskLevelLabel: (props: {
|
|
5
|
+
status: string;
|
|
6
|
+
editable: boolean;
|
|
7
|
+
className?: string | undefined;
|
|
8
|
+
onChange: (status: RiskLevel) => void;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
export default RiskLevelLabel;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import DocumentStatusLabel from "@voplus/morpho-document/es/controls/DocumentStatusLabel";
|
|
4
|
+
import classnames from "classnames";
|
|
5
|
+
import "./index.less";
|
|
6
|
+
const RiskLevelLabel = (props) => {
|
|
7
|
+
return observe(() => (React.createElement(DocumentStatusLabel, { className: classnames("risk-profile-status", props.className), editable: props.editable, list: [
|
|
8
|
+
{ name: "High" },
|
|
9
|
+
{ name: "Medium" },
|
|
10
|
+
{ name: "Low" },
|
|
11
|
+
], status: props.status, onChange: props.onChange })));
|
|
12
|
+
};
|
|
13
|
+
export default RiskLevelLabel;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/background-investigation/risk-profile/controls/RiskProfileStatusLabel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,mBAAmB,MAAM,yDAAyD,CAAC;AAC1F,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,CAAC;AAGtB,MAAM,cAAc,GAAG,CAAC,KAKvB,EAAE,EAAE;IACH,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACnB,oBAAC,mBAAmB,IAClB,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,KAAK,CAAC,SAAS,CAAC,EAC7D,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,IAAI,EAAE;YACJ,EAAE,IAAI,EAAE,MAAM,EAAE;YAChB,EAAE,IAAI,EAAE,QAAQ,EAAE;YAClB,EAAE,IAAI,EAAE,KAAK,EAAE;SAChB,EACD,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ,GACxB,CACH,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
+
|
|
3
|
+
:global {
|
|
4
|
+
.risk-profile-status {
|
|
5
|
+
&.low,
|
|
6
|
+
&.low:hover {
|
|
7
|
+
background: #52c41a;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&.medium,
|
|
11
|
+
&.medium:hover {
|
|
12
|
+
background: orange;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&.high,
|
|
16
|
+
&.high:hover {
|
|
17
|
+
background: #ee6868;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare class RiskProfileContextState {
|
|
3
|
+
Loaded: boolean;
|
|
4
|
+
constructor();
|
|
5
|
+
}
|
|
6
|
+
export declare const RiskProfileContext: import("react").Context<RiskProfileContextState>;
|
|
7
|
+
export declare const useRiskProfileReload: () => RiskProfileContextState;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { makeObservable, observable } from "mobx";
|
|
4
|
+
export class RiskProfileContextState {
|
|
5
|
+
constructor() {
|
|
6
|
+
Object.defineProperty(this, "Loaded", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true,
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
makeObservable(this);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
__decorate([
|
|
16
|
+
observable
|
|
17
|
+
], RiskProfileContextState.prototype, "Loaded", void 0);
|
|
18
|
+
export const RiskProfileContext = createContext(null);
|
|
19
|
+
export const useRiskProfileReload = () => useContext(RiskProfileContext);
|
|
20
|
+
//# sourceMappingURL=RiskProfileContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RiskProfileContext.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/background-investigation/risk-profile/pages/RiskProfileDefaultView/RiskProfileContext.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElD,MAAM,OAAO,uBAAuB;IAGnC;QAFY;;;;mBAAyB,IAAI;WAAC;QAGzC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;CACD;AALY;IAAX,UAAU;uDAA+B;AAO3C,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAA0B,IAAW,CAAC,CAAC;AAEtF,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { TabItemContext, TabItemStore, useTabItem } from "@voplus/morpho-data";
|
|
3
|
+
import { observe, useAutorunEffect } from "@voplus/morpho-ui";
|
|
4
|
+
import { useRiskProfile } from "../../../../../../data/risk-profile";
|
|
5
|
+
import { useRouteMatch } from "react-router";
|
|
6
|
+
import { RiskProfileContext, RiskProfileContextState } from "./RiskProfileContext";
|
|
7
|
+
import RiskProfileTabs from "../../components/RiskProfileTabs";
|
|
8
|
+
import RiskProfileProperties from "../../components/RiskProfileProperties";
|
|
9
|
+
import AsideContent from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
|
10
|
+
import MainContent from "@voplus/morpho-ui/es/components/layout/MainContent";
|
|
11
|
+
import styles from "./index.less";
|
|
12
|
+
const RiskProfileDefaultView = () => {
|
|
13
|
+
const match = useRouteMatch();
|
|
14
|
+
const id = match.params.id;
|
|
15
|
+
const store = new TabItemStore({ url: "" });
|
|
16
|
+
const riskProfile = useRiskProfile(id, { reload: true });
|
|
17
|
+
const [context] = useState(() => new RiskProfileContextState());
|
|
18
|
+
const [asideContext] = useState(AsideContent.createContext());
|
|
19
|
+
const tab = useTabItem();
|
|
20
|
+
useAutorunEffect(() => { var _a; return (tab.title = (_a = riskProfile.unit) === null || _a === void 0 ? void 0 : _a.name); });
|
|
21
|
+
return observe(() => (React.createElement(TabItemContext.Provider, { value: store },
|
|
22
|
+
React.createElement(MainContent, { className: styles["risk-profile-default-view"] },
|
|
23
|
+
React.createElement(RiskProfileContext.Provider, { value: context },
|
|
24
|
+
React.createElement(MainContent.Nav, { collapsible: true },
|
|
25
|
+
React.createElement(RiskProfileProperties, { id: id, headerVisible: true })),
|
|
26
|
+
React.createElement("div", { className: "risk-profile-context" },
|
|
27
|
+
React.createElement(AsideContent, { context: asideContext },
|
|
28
|
+
React.createElement(RiskProfileTabs, { id: id }))))))));
|
|
29
|
+
};
|
|
30
|
+
export default RiskProfileDefaultView;
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/background-investigation/risk-profile/pages/RiskProfileDefaultView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAmB,aAAa,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,E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AqB,IAAC,EAAE,EAAE,EAAE,EAAE,aAAa,SAAG,CAC9B;gBAClB,6BAAK,SAAS,EAAC,sBAAsB;oBACpC,oBAAC,YAAY,IAAC,OAAO,EAAE,YAAY;wBAClC,oBAAC,eAAe,IAAC,EAAE,EAAE,EAAE,GAAI,CACb,CACV,CACuB,CACjB,CACW,CAC1B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Result, Button, Spin, message } from "@voplus/antd";
|
|
3
|
+
import { observe, useAutorunEffect } from "@voplus/morpho-ui";
|
|
4
|
+
import { useRouteMatch, Redirect, Route } from "react-router";
|
|
5
|
+
import { useRiskProfileByUnit, useRiskProfileStore } from "../../../../../../data/risk-profile";
|
|
6
|
+
import { TabItemContext, TabItemStore, useTabItem, useLayout } from "@voplus/morpho-data";
|
|
7
|
+
import Routes from "../../../../../../routes";
|
|
8
|
+
import MainContent from "@voplus/morpho-ui/es/components/layout/MainContent";
|
|
9
|
+
import styles from "./index.less";
|
|
10
|
+
const UnitRiskProfilePage = () => {
|
|
11
|
+
const match = useRouteMatch();
|
|
12
|
+
const id = match.params.id;
|
|
13
|
+
const unit = useRiskProfileByUnit(id);
|
|
14
|
+
const riskProfileStore = useRiskProfileStore();
|
|
15
|
+
const store = new TabItemStore({ url: "" });
|
|
16
|
+
const tab = useTabItem();
|
|
17
|
+
const layout = useLayout();
|
|
18
|
+
useAutorunEffect(() => unit.loaded && (tab.title = unit.unit.name));
|
|
19
|
+
return observe(() => (React.createElement(TabItemContext.Provider, { value: store },
|
|
20
|
+
React.createElement(MainContent, { className: styles["risk-profile-empty-view"] },
|
|
21
|
+
React.createElement("div", { className: "risk-profile-context" }, unit.loading ? (React.createElement(Spin, null)) : unit.id ? (React.createElement(Route, { render: () => React.createElement(Redirect, { to: Routes.RiskProfileDefaultView.getUrl(unit.id) }) })) : (React.createElement(Result, { status: "404", title: unit.unit.name, subTitle: "Risk profile not found. Do you wish to create one ?", extra: React.createElement(Button, { type: "primary", onClick: onCreate }, "Create Risk Profile") })))))));
|
|
22
|
+
async function onCreate() {
|
|
23
|
+
await riskProfileStore
|
|
24
|
+
.create({
|
|
25
|
+
data: {
|
|
26
|
+
UnitId: id,
|
|
27
|
+
},
|
|
28
|
+
error: (error) => message.error(error.message),
|
|
29
|
+
})
|
|
30
|
+
.then((res) => layout.history.replace(Routes.RiskProfileDefaultView.getUrl(res.id)));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export default UnitRiskProfilePage;
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/background-investigation/risk-profile/pages/UnitRiskProfilePage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAmB,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC1F,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,WAAW,MAAM,oDAAoD,CAAC;AAC7E,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAChC,MAAM,KAAK,GAAG,aAAa,EAAkB,CAAC;IAC9C,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;I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