@voplus/morpho-csp 5.0.60 → 5.0.62
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/corporate/CorporateStore.d.ts +1 -1
- package/es/data/corporate/CorporateStore.js +4 -2
- package/es/data/corporate/CorporateStore.js.map +1 -1
- package/es/data/corporate/hooks.d.ts +1 -1
- package/es/data/corporate/hooks.js +3 -4
- package/es/data/corporate/hooks.js.map +1 -1
- package/es/data/corporate/interfaces.d.ts +11 -0
- package/es/data/corporate/types.d.ts +1 -0
- package/es/modules/corporate/clda/controls/CLDAMenu/index.d.ts +0 -1
- package/es/modules/corporate/clda/controls/CLDAMenu/index.js +3 -3
- package/es/modules/corporate/clda/controls/CLDAMenu/index.js.map +1 -1
- package/es/modules/corporate/clda/controls/CLDAMenu/items/LegalDocuments.d.ts +0 -1
- package/es/modules/corporate/clda/controls/CLDAMenu/items/LegalDocuments.js +3 -2
- package/es/modules/corporate/clda/controls/CLDAMenu/items/LegalDocuments.js.map +1 -1
- package/es/modules/corporate/clda/controls/CLDAMenu/items/SendCLDA.d.ts +0 -1
- package/es/modules/corporate/clda/controls/CLDAMenu/items/SendCLDA.js +3 -1
- package/es/modules/corporate/clda/controls/CLDAMenu/items/SendCLDA.js.map +1 -1
- package/es/modules/corporate/clda/pages/CLDAAddressDefaultView/index.js +1 -1
- package/es/modules/corporate/clda/pages/CLDAAddressDefaultView/index.js.map +1 -1
- package/es/modules/corporate/company/components/CompanyProperties/CompanyPropertiesCard.d.ts +20 -0
- package/es/modules/corporate/company/components/CompanyProperties/CompanyPropertiesCard.js +46 -0
- package/es/modules/corporate/company/components/CompanyProperties/CompanyPropertiesCard.js.map +1 -0
- package/es/modules/corporate/company/components/CompanyProperties/Properties.d.ts +1 -1
- package/es/modules/corporate/company/components/CompanyProperties/Properties.js +27 -1
- package/es/modules/corporate/company/components/CompanyProperties/Properties.js.map +1 -1
- package/es/modules/corporate/company/components/CompanyProperties/index.d.ts +17 -12
- package/es/modules/corporate/company/components/CompanyProperties/index.js +36 -35
- package/es/modules/corporate/company/components/CompanyProperties/index.js.map +1 -1
- package/es/modules/corporate/company/components/CorporateHead/index.d.ts +6 -0
- package/es/modules/corporate/company/components/CorporateHead/index.js +30 -0
- package/es/modules/corporate/company/components/CorporateHead/index.js.map +1 -0
- package/es/modules/corporate/company/components/CorporateHead/index.less +33 -0
- package/es/modules/corporate/company/components/CorporateItem/index.d.ts +7 -0
- package/es/modules/corporate/company/components/CorporateItem/index.js +56 -0
- package/es/modules/corporate/company/components/CorporateItem/index.js.map +1 -0
- package/es/modules/corporate/company/components/CorporateItem/index.less +50 -0
- package/es/modules/corporate/company/components/CorporateList/index.d.ts +11 -0
- package/es/modules/corporate/company/components/CorporateList/index.js +65 -0
- package/es/modules/corporate/company/components/CorporateList/index.js.map +1 -0
- package/es/modules/corporate/company/components/CorporateList/index.less +19 -0
- package/es/modules/corporate/company/components/CorporatePropertiesView/index.d.ts +6 -0
- package/es/modules/corporate/company/components/CorporatePropertiesView/index.js +23 -0
- package/es/modules/corporate/company/components/CorporatePropertiesView/index.js.map +1 -0
- package/es/modules/corporate/company/components/CorporateTabs/index.d.ts +6 -0
- package/es/modules/corporate/company/components/CorporateTabs/index.js +44 -0
- package/es/modules/corporate/company/components/CorporateTabs/index.js.map +1 -0
- package/es/modules/corporate/company/controls/CorporateMenu/index.js +1 -1
- package/es/modules/corporate/company/controls/CorporateMenu/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/IdentifyQuickViewDialog/index.js +3 -2
- package/es/modules/corporate/company/identity/components/IdentifyQuickViewDialog/index.js.map +1 -1
- package/es/modules/corporate/company/identity/controls/IdentifyMenu/index.js +5 -12
- package/es/modules/corporate/company/identity/controls/IdentifyMenu/index.js.map +1 -1
- package/es/modules/corporate/company/pages/CompanyPage/Dashboard.js +18 -5
- package/es/modules/corporate/company/pages/CompanyPage/Dashboard.js.map +1 -1
- package/es/modules/corporate/company/pages/CompanyPage/index.js +1 -1
- package/es/modules/corporate/company/pages/CompanyPage/index.js.map +1 -1
- package/es/modules/corporate/company/pages/CompanyPage/index.less +6 -0
- package/es/modules/corporate/company/share-transactions-register/controls/ShareTransactionMenu/index.d.ts +0 -1
- package/es/modules/corporate/company/share-transactions-register/controls/ShareTransactionMenu/index.js +1 -1
- package/es/modules/corporate/company/share-transactions-register/controls/ShareTransactionMenu/index.js.map +1 -1
- package/es/modules/corporate/company/share-transactions-register/pages/ShareTransactionDefaultView/index.less +1 -0
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/index.d.ts +3 -4
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/index.js +5 -5
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/index.js.map +1 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/Cancel.d.ts +0 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/Cancel.js +3 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/Cancel.js.map +1 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/DeleteSignee1.d.ts +0 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/DeleteSignee1.js +3 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/DeleteSignee1.js.map +1 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/DeleteSignee2.d.ts +0 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/DeleteSignee2.js +3 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/DeleteSignee2.js.map +1 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/UndoCancel.d.ts +0 -1
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/UndoCancel.js +3 -2
- package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/UndoCancel.js.map +1 -1
- package/es/modules/self-registration/clda-form/controls/CLDAFormMenu/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/controls/CLDAFormMenu/index.js +1 -1
- package/es/modules/self-registration/clda-form/controls/CLDAFormMenu/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/switch-to-us/index.d.ts +4 -0
- package/es/modules/self-registration/clda-form/incorporation/switch-to-us/index.js +53 -0
- package/es/modules/self-registration/clda-form/incorporation/switch-to-us/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/switch-to-us/index.less +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Skeleton } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { useCorporate, useCorporateStore } from "../../../../../data/corporate";
|
|
5
|
+
import { Open, Reload, Delete } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
|
6
|
+
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
|
7
|
+
import UnitAvatar from "@voplus/morpho-org/es/components/UnitAvatar";
|
|
8
|
+
import styles from "./index.less";
|
|
9
|
+
const CorporateHead = (props) => {
|
|
10
|
+
const { id, onReload } = props;
|
|
11
|
+
const corporate = useCorporate(id);
|
|
12
|
+
const store = useCorporateStore();
|
|
13
|
+
return observe(() => {
|
|
14
|
+
var _a;
|
|
15
|
+
return (React.createElement("div", { className: styles["unit-head"] }, corporate.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement(React.Fragment, null,
|
|
16
|
+
React.createElement("div", { className: "tool-bar-content" },
|
|
17
|
+
React.createElement(ToolBar, { id: id, showMenu: false },
|
|
18
|
+
React.createElement(Open, { url: `/corporate-page/${id}` }),
|
|
19
|
+
React.createElement(Reload, { action: onReload }),
|
|
20
|
+
React.createElement(Delete, { action: onItemDelete }))),
|
|
21
|
+
React.createElement(UnitAvatar, { id: (_a = corporate.unit) === null || _a === void 0 ? void 0 : _a.id, size: 70 }),
|
|
22
|
+
React.createElement("div", { className: "unit-name" }, corporate.name)))));
|
|
23
|
+
});
|
|
24
|
+
/**delete corporate*/
|
|
25
|
+
async function onItemDelete() {
|
|
26
|
+
await store.delete(id, { error: "message" });
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export default CorporateHead;
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/components/CorporateHead/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qDAAqD,CAAC;AAC3F,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,UAAU,MAAM,6CAA6C,CAAC;AACrE,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,aAAa,GAAG,CAAC,KAA4C,EAAE,EAAE;IACtE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE/B,MAAM,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC,CAAC;IACnC,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC;IAElC,OAAO,OAAO,CAAC,GAAG,EAAE;;QAAC,OAAA,CACpB,6BAAK,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,IACjC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CACpB,oBAAC,QAAQ,IAAC,MAAM,SAAG,CACnB,CAAC,CAAC,CAAC,CACH,oBAAC,KAAK,CAAC,QAAQ;YACd,6BAAK,SAAS,EAAC,kBAAkB;gBAChC,oBAAC,OAAO,IAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK;oBAC/B,oBAAC,IAAI,IAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE,GAAI;oBACtC,oBAAC,MAAM,IAAC,MAAM,EAAE,QAAQ,GAAI;oBAC5B,oBAAC,MAAM,IAAC,MAAM,EAAE,YAAY,GAAI,CACvB,CACL;YACN,oBAAC,UAAU,IAAC,EAAE,EAAE,MAAA,SAAS,CAAC,IAAI,0CAAE,EAAG,EAAE,IAAI,EAAE,EAAE,GAAI;YACjD,6BAAK,SAAS,EAAC,WAAW,IAAE,SAAS,CAAC,IAAI,CAAO,CACjC,CACjB,CACI,CACN,CAAA;KAAA,CAAC,CAAC;IAEH,qBAAqB;IACrB,KAAK,UAAU,YAAY;QAC1B,MAAM,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC9C,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.unit-head {
|
|
2
|
+
position: relative;
|
|
3
|
+
text-align: center;
|
|
4
|
+
padding: 10px 0;
|
|
5
|
+
margin: 0 20px;
|
|
6
|
+
|
|
7
|
+
:global {
|
|
8
|
+
.tool-bar-content {
|
|
9
|
+
text-align: right;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.unit-name {
|
|
13
|
+
color: #000;
|
|
14
|
+
font-size: 16px;
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
margin-top: 12px;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
|
|
19
|
+
&.inline-edit {
|
|
20
|
+
cursor: text;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.unit-type{
|
|
25
|
+
margin-bottom: 6px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.unit-tag {
|
|
29
|
+
display: inline-block;
|
|
30
|
+
margin: auto;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import { useCorporate } from "../../../../../data/corporate";
|
|
4
|
+
import { ColumnItem, ColumnItemCol } from "@voplus/morpho-ui/es/controls/ColumnItem";
|
|
5
|
+
import { Skeleton, Tag } from "antd";
|
|
6
|
+
import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
|
7
|
+
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
|
8
|
+
import CorporateMenu from "../../controls/CorporateMenu";
|
|
9
|
+
import CorporatePropertiesView from "../CorporatePropertiesView";
|
|
10
|
+
import ItemFunction from "@voplus/morpho-document/es/controls/ItemFunction";
|
|
11
|
+
import UnitAvatar from "@voplus/morpho-org/es/components/UnitAvatar/LoadedUnitAvatar";
|
|
12
|
+
import Routes from "../../../../../routes";
|
|
13
|
+
import classnames from "classnames";
|
|
14
|
+
import dayjs from "dayjs";
|
|
15
|
+
import styles from "./index.less";
|
|
16
|
+
const CorporateItem = (props) => {
|
|
17
|
+
const { id, index } = props;
|
|
18
|
+
const [hover, setHover] = useState(false);
|
|
19
|
+
const corporate = useCorporate(id);
|
|
20
|
+
return observe(() => {
|
|
21
|
+
var _a, _b, _c;
|
|
22
|
+
return (React.createElement(ItemFunction, { className: styles["corporate-item"], onMouseOver: () => setHover(true), onMouseLeave: () => setHover(false), propertiesView: React.createElement(CorporatePropertiesView, { id: id }) }, corporate.loading ? (React.createElement(Skeleton, { avatar: true, paragraph: { rows: 1 } })) : (React.createElement(ColumnItem, null,
|
|
23
|
+
React.createElement(ColumnItemCol, { span: 14 },
|
|
24
|
+
React.createElement("div", { className: "corporate-item-info" },
|
|
25
|
+
React.createElement("div", { className: "corporate-item-avatar" },
|
|
26
|
+
React.createElement(UnitAvatar, { unit: corporate.unit, index: index, size: "large" })),
|
|
27
|
+
React.createElement("div", { className: "corporate-item-name-contact-information" },
|
|
28
|
+
React.createElement("div", { className: "corporate-item-name-position" }, corporate.name),
|
|
29
|
+
React.createElement("div", { className: "corporate-item-contact-information" }, corporate.corporateType)))),
|
|
30
|
+
React.createElement(ColumnItemCol, { span: 4, title: "Latest Filing Year" },
|
|
31
|
+
React.createElement("div", { className: "corporate-item-date" }, dayjs((_a = corporate.latestFilingYear) === null || _a === void 0 ? void 0 : _a.fye).format("YYYY-MM-DD"))),
|
|
32
|
+
React.createElement(ColumnItemCol, { span: 3, title: "Status" },
|
|
33
|
+
React.createElement("div", { className: "corporate-item-date" }, corporate.corporateStatus && (React.createElement(Tag, { color: statusColor(corporate.corporateStatus) }, corporate.corporateStatus)))),
|
|
34
|
+
React.createElement(ColumnItemCol, { span: 3, align: "flex-end" },
|
|
35
|
+
React.createElement("div", { className: classnames("corporate-item-tool", { show: hover }) },
|
|
36
|
+
React.createElement(ToolBar, { id: id, showMenu: false },
|
|
37
|
+
React.createElement(Open, { url: Routes.UnitCorporatePage.getUrl((_b = corporate.unit) === null || _b === void 0 ? void 0 : _b.id) }),
|
|
38
|
+
React.createElement(CorporateMenu, { id: id, unitId: (_c = corporate.unit) === null || _c === void 0 ? void 0 : _c.id }))))))));
|
|
39
|
+
});
|
|
40
|
+
function statusColor(status) {
|
|
41
|
+
switch (status) {
|
|
42
|
+
case "Live":
|
|
43
|
+
return "#1890ff";
|
|
44
|
+
case "Dormant":
|
|
45
|
+
return "#765fee";
|
|
46
|
+
case "Closed":
|
|
47
|
+
return "#ff4d4f";
|
|
48
|
+
case "Invalid Current Filing":
|
|
49
|
+
return "#ccc";
|
|
50
|
+
default:
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
export default CorporateItem;
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/components/CorporateItem/index.tsx"],"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IAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK;wBAC/B,oBAAC,IAAI,IAAC,GAAG,EAAE,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAA,SAAS,CAAC,IAAI,0CAAE,EAAG,CAAC,GAAI;wBACnE,oBAAC,aAAa,IAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAA,SAAS,CAAC,IAAI,0CAAE,EAAG,GAAI,CAC7C,CACL,CACS,CACJ,CACb,CACa,CACf,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,SAAS,WAAW,CAAC,MAAiE;QACrF,QAAQ,MAAM,EAAE;YACf,KAAK,MAAM;gBACV,OAAO,SAAS,CAAC;YAClB,KAAK,SAAS;gBACb,OAAO,SAAS,CAAC;YAClB,KAAK,QAAQ;gBACZ,OAAO,SAAS,CAAC;YAClB,KAAK,wBAAwB;gBAC5B,OAAO,MAAM,CAAC;YACf;gBACC,OAAO;SACR;IACF,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
+
|
|
3
|
+
.corporate-item {
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
|
|
6
|
+
&:hover {
|
|
7
|
+
background-color: #f5f8fd;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:global {
|
|
11
|
+
.corporate-item-info {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
|
|
15
|
+
.corporate-item-avatar {
|
|
16
|
+
width: 40px;
|
|
17
|
+
margin-right: 7px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.corporate-item-name-contact-information {
|
|
21
|
+
.corporate-item-name-position {
|
|
22
|
+
color: #575757;
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
word-break: break-all;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.corporate-item-contact-information {
|
|
28
|
+
min-height: 22px;
|
|
29
|
+
color: rgba(0, 0, 0, 0.45);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.corporate-item-date {
|
|
35
|
+
min-height: 22px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.corporate-item-tool {
|
|
39
|
+
display: none;
|
|
40
|
+
|
|
41
|
+
&.show {
|
|
42
|
+
display: block;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.custom-column-item___yTecf {
|
|
47
|
+
padding: 10px 20px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ICorporate } from "../../../../../data/corporate";
|
|
3
|
+
declare const CorporateList: (props: {
|
|
4
|
+
centerId: string;
|
|
5
|
+
viewTitle?: string | undefined;
|
|
6
|
+
status?: string | undefined;
|
|
7
|
+
onTotal?: ((total: number) => void) | undefined;
|
|
8
|
+
onReload?: (() => void) | undefined;
|
|
9
|
+
onClickItem?: ((item: ICorporate) => void) | undefined;
|
|
10
|
+
}) => React.JSX.Element;
|
|
11
|
+
export default CorporateList;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { useCorporateListEffect } from "../../../../../data/corporate";
|
|
3
|
+
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
|
4
|
+
import { observe, useRenderOnChange } from "@voplus/morpho-ui";
|
|
5
|
+
import { useAutoUpdateListData } from "@voplus/morpho-document-core";
|
|
6
|
+
import CorporateItem from "../CorporateItem";
|
|
7
|
+
import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView2";
|
|
8
|
+
import AsideContent from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
|
9
|
+
import styles from "./index.less";
|
|
10
|
+
const CorporateList = (props) => {
|
|
11
|
+
const { centerId, viewTitle, status } = props;
|
|
12
|
+
const [asideContext] = useState(AsideContent.createContext());
|
|
13
|
+
const list = useCreateListDataState({
|
|
14
|
+
filterDefaults: {
|
|
15
|
+
filters: filters(),
|
|
16
|
+
},
|
|
17
|
+
}, [status]);
|
|
18
|
+
/** 如果 list.filters.options变更了就重渲染,使下一行的useWorkTypeListEffect 可以接收新参数*/
|
|
19
|
+
useRenderOnChange(() => list.filters.options);
|
|
20
|
+
useCorporateListEffect(list, (result, total) => {
|
|
21
|
+
var _a;
|
|
22
|
+
list.union(result);
|
|
23
|
+
(_a = props.onTotal) === null || _a === void 0 ? void 0 : _a.call(props, total);
|
|
24
|
+
}, {
|
|
25
|
+
Total: true,
|
|
26
|
+
...list.filters.options,
|
|
27
|
+
});
|
|
28
|
+
useAutoUpdateListData(list, (d) => true);
|
|
29
|
+
return observe(() => (React.createElement(AsideContent, { context: asideContext },
|
|
30
|
+
React.createElement("div", { className: styles["corporate-list"] },
|
|
31
|
+
React.createElement(ListDataContext.Provider, { value: list },
|
|
32
|
+
React.createElement(ListView, { headerProps: {
|
|
33
|
+
viewTitle: viewTitle,
|
|
34
|
+
sortable: false,
|
|
35
|
+
addAble: false,
|
|
36
|
+
quickSearch: true,
|
|
37
|
+
}, renderItem: ({ item, index }) => (React.createElement("div", { key: item.id, onClick: () => { var _a; return (_a = props.onClickItem) === null || _a === void 0 ? void 0 : _a.call(props, item); } },
|
|
38
|
+
React.createElement(CorporateItem, { id: item.id, index: index }))) }))))));
|
|
39
|
+
function filters() {
|
|
40
|
+
let filter = [{ c: "CenterId", o: "=", l: "And", v1: centerId }];
|
|
41
|
+
switch (status) {
|
|
42
|
+
case "live":
|
|
43
|
+
filter.push({ c: "CorporateStatus", o: "=", l: "And", v1: "Live" });
|
|
44
|
+
break;
|
|
45
|
+
case "dormant":
|
|
46
|
+
filter.push({ c: "CorporateStatus", o: "=", l: "And", v1: "Dormant" });
|
|
47
|
+
break;
|
|
48
|
+
case "closed":
|
|
49
|
+
filter.push({ c: "CorporateStatus", o: "=", l: "And", v1: "Closed" });
|
|
50
|
+
break;
|
|
51
|
+
case "invalid":
|
|
52
|
+
filter.push({ c: "NoActiveFilingYear", o: "=", l: "And", v1: "" });
|
|
53
|
+
break;
|
|
54
|
+
default:
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
return filter;
|
|
58
|
+
}
|
|
59
|
+
function onFilter(context) {
|
|
60
|
+
context.paging.Page = 1;
|
|
61
|
+
context.filter();
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
export default CorporateList;
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/components/CorporateList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAc,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,QAAQ,MAAM,2DAA2D,CAAC;AACjF,OAAO,YAAY,MAAM,qDAAqD,CAAC;AAC/E,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,aAAa,GAAG,CAAC,KAOtB,EAAE,EAAE;IACJ,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAE9C,MAAM,CAAC,YAAY,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC,CAAC;IAE9D,MAAM,IAAI,GAAG,sBAAsB,CAClC;QACC,cAAc,EAAE;YACf,OAAO,EAAE,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global {
|
|
7
|
+
.list-view-header > div:first-child {
|
|
8
|
+
flex: 1;
|
|
9
|
+
|
|
10
|
+
.site-badge-count {
|
|
11
|
+
margin-left: 10px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.vo-plus-column-item > div {
|
|
16
|
+
flex: 1;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { useMemo, useState } from "react";
|
|
2
|
+
import { ViewContext, ViewContextData, } from "@voplus/morpho-document-core/es/data/context/ViewContext";
|
|
3
|
+
import CorporateHead from "../CorporateHead";
|
|
4
|
+
import CorporateTabs from "../CorporateTabs";
|
|
5
|
+
import CompanyProperties from "../CompanyProperties";
|
|
6
|
+
import { observe } from "@voplus/morpho-ui";
|
|
7
|
+
/** Corporate PropertiesView */
|
|
8
|
+
const CorporatePropertiesView = (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(CorporateHead, { id: props.id, onReload: onReload }),
|
|
14
|
+
React.createElement(CorporateTabs, { id: props.id, details: React.createElement(CompanyProperties, { id: props.id }) })))))));
|
|
15
|
+
function onReload() {
|
|
16
|
+
setLoaded(false);
|
|
17
|
+
setTimeout(() => {
|
|
18
|
+
setLoaded(true);
|
|
19
|
+
}, 100);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export default CorporatePropertiesView;
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/components/CorporatePropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EA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|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import { Badge, Skeleton, Tabs } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { useCorporate } from "../../../../../data/corporate";
|
|
5
|
+
import { useDocumentListEffect } from "@voplus/morpho-document-core";
|
|
6
|
+
import ActivityLog from "@voplus/morpho-org/es/components/ActivityLog/ActivityLog2";
|
|
7
|
+
import DocumentList from "@voplus/morpho-document/es/components/DocumentList";
|
|
8
|
+
const CorporateTabs = (props) => {
|
|
9
|
+
const { id, details } = props;
|
|
10
|
+
const [docTotals, setDocTotals] = useState(0);
|
|
11
|
+
const corporate = useCorporate(id);
|
|
12
|
+
/**Tabs 当前激活 tab 面板的 key */
|
|
13
|
+
const [activeKey, setActiveKey] = useState("");
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
setActiveKey(details ? "Details" : "Document");
|
|
16
|
+
}, [id]);
|
|
17
|
+
useDocumentListEffect(null, (result, total) => setDocTotals(total || 0), {
|
|
18
|
+
Total: true,
|
|
19
|
+
List: false,
|
|
20
|
+
Filters: [{ c: "ParentNodeId", o: "=", l: "And", v1: id }],
|
|
21
|
+
});
|
|
22
|
+
const items = [
|
|
23
|
+
{
|
|
24
|
+
key: "Document",
|
|
25
|
+
label: (React.createElement(React.Fragment, null,
|
|
26
|
+
"Document ",
|
|
27
|
+
React.createElement(Badge, { count: docTotals, className: "margin-left-10" }))),
|
|
28
|
+
children: (React.createElement(DocumentList, { id: id, multiple: true, viewTitle: " ", total: false, exclude: ["Task", "Ticket", "Deal"] })),
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
key: "Activities",
|
|
32
|
+
label: "Activities",
|
|
33
|
+
children: React.createElement(React.Fragment, null, activeKey === "Activities" ? React.createElement(ActivityLog, { id: id, title: " " }) : null),
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
details && items.unshift({ key: "Details", label: "Details", children: details });
|
|
37
|
+
return observe(() => corporate.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement(Tabs, { className: "element-tabs", activeKey: activeKey, onChange: onChange, items: items })));
|
|
38
|
+
/**切换面板的回调*/
|
|
39
|
+
function onChange(activeKey) {
|
|
40
|
+
setActiveKey(activeKey);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export default CorporateTabs;
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/components/CorporateTabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,WAAW,MAAM,2DAA2D,CAAC;AACpF,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAE9E,MAAM,aAAa,GAAG,CAAC,KAA0C,EAAE,EAAE;IACpE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE9C,MAAM,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC,CAAC;IAEnC,2BAA2B;IAC3B,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC/C,SAAS,CAAC,GAAG,EAAE;QACd,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAChD,CAAC,EAAE,CAAC,EA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,cAAc,EAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,GAAI,CACzF,CACD,CAAC;IAEF,YAAY;IACZ,SAAS,QAAQ,CAAC,SAAiB;QAClC,YAAY,CAAC,SAAS,CAAC,CAAC;IACzB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -27,7 +27,7 @@ const CorporateMenu = (props) => {
|
|
|
27
27
|
// store.edit(props.id, { data: { Status: status }, error: "message" });
|
|
28
28
|
}
|
|
29
29
|
async function onDelete() {
|
|
30
|
-
await store.delete(props.id);
|
|
30
|
+
await store.delete(props.id, { error: "message" });
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
export default CorporateMenu;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/controls/CorporateMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAC3C,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAC/D,OAAO,gBAAgB,MAAM,yDAAyD,CAAC;AACvF,OAAO,mBAAmB,MAAM,4DAA4D,CAAC;AAE7F,MAAM,aAAa,GAAG,CAAC,KAA8D,EAAE,EAAE;IACxF,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC;IAElC,OAAO,OAAO,CAAC,GAAG,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AC,IAAI,IACJ,KAAK,EAAC,YAAY,EAClB,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,CAAC,KAAK,CAAC,MAAM,EACvB,GAAG,EAAE,iBAAiB,KAAK,CAAC,MAAM,EAAE,EACpC,SAAS,EAAC,iBAAiB,GAC1B,CACA,CACH,GACA,CACF,CAAC,CAAC;IAEH,+BAA+B;IAC/B,SAAS,cAAc,CAAC,MAAe;QACtC,wEAAwE;IACzE,CAAC;IAED,KAAK,UAAU,QAAQ;QACtB,MAAM,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/controls/CorporateMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAC3C,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAC/D,OAAO,gBAAgB,MAAM,yDAAyD,CAAC;AACvF,OAAO,mBAAmB,MAAM,4DAA4D,CAAC;AAE7F,MAAM,aAAa,GAAG,CAAC,KAA8D,EAAE,EAAE;IACxF,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC;IAElC,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,QAAQ,IACR,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,KAAK,EAAE,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AAiB,KAAK,CAAC,MAAM,EAAE,EACpC,SAAS,EAAC,iBAAiB,GAC1B,CACA,CACH,GACA,CACF,CAAC,CAAC;IAEH,+BAA+B;IAC/B,SAAS,cAAc,CAAC,MAAe;QACtC,wEAAwE;IACzE,CAAC;IAED,KAAK,UAAU,QAAQ;QACtB,MAAM,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACpD,CAAC;AACF,CAAC,CAAC;AACF,eAAe,aAAa,CAAC"}
|
|
@@ -10,8 +10,9 @@ const IdentifyQuickViewDialog = (props) => {
|
|
|
10
10
|
return observe(() => (React.createElement(QuickViewDialog, { id: props.identityId, visible: props.visible, onCancel: props.onCancel, header: React.createElement("div", { className: styles["identify-quickView-dialog-header"] },
|
|
11
11
|
React.createElement("div", { className: "identify-quickView-title" }, `${identityName} Identity`),
|
|
12
12
|
React.createElement("div", { className: "tools-bar" },
|
|
13
|
-
React.createElement(ToolBar, { id: props.identityId,
|
|
14
|
-
|
|
13
|
+
React.createElement(ToolBar, { id: props.identityId, moreProps: {
|
|
14
|
+
menus: { default: React.createElement(IdentifyMenu, { id: props.identityId, size: "middle" }) },
|
|
15
|
+
} }))), subButtons: [{ name: "Document" }, { name: "Activities" }] },
|
|
15
16
|
React.createElement("div", { className: styles["identify-quickView-dialog-content"] },
|
|
16
17
|
React.createElement(IdentityInformation, { id: identityId, allowEdit: allowEdit })))));
|
|
17
18
|
};
|
package/es/modules/corporate/company/identity/components/IdentifyQuickViewDialog/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/identity/components/IdentifyQuickViewDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,eAAe,MAAM,qDAAqD,CAAC;AAClF,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AACzD,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,uBAAuB,GAAG,CAAC,KAOhC,EAAE,EAAE;IACJ,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEtD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,eAAe,IACf,EAAE,EAAE,KAAK,CAAC,UAAU,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,MAAM,EACL,6BAAK,SAAS,EAAE,MAAM,CAAC,kCAAkC,CAAC;YACzD,6BAAK,SAAS,EAAC,0BAA0B,IAAE,GAAG,YAAY,WAAW,CAAO;YAC5E,6BAAK,SAAS,EAAC,WAAW;gBACzB,oBAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/identity/components/IdentifyQuickViewDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,eAAe,MAAM,qDAAqD,CAAC;AAClF,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AACzD,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,uBAAuB,GAAG,CAAC,KAOhC,EAAE,EAAE;IACJ,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEtD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,eAAe,IACf,EAAE,EAAE,KAAK,CAAC,UAAU,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,MAAM,EACL,6BAAK,SAAS,EAAE,MAAM,CAAC,kCAAkC,CAAC;YACzD,6BAAK,SAAS,EAAC,0BAA0B,IAAE,GAAG,YAAY,WAAW,CAAO;YAC5E,6BAAK,SAAS,EAAC,WAAW;gBACzB,oBAAC,OAAO,IACP,EAAE,EAAE,KAAK,CAAC,UAAU,EACpB,SAAS,EAAE;wBACV,KAAK,EAAE,EAAE,OAAO,EAAE,oBAAC,YAAY,IAAC,EAAE,EAAE,KAAK,CAAC,UAAU,EAAE,IAAI,EAAC,QAAQ,GAAG,EAAE;qBACxE,GACA,CACG,CACD,EAEP,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;QAE1D,6BAAK,SAAS,EAAE,MAAM,CAAC,mCAAmC,CAAC;YAC1D,oBAAC,mBAAmB,IAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,GAAI,CACxD,CACW,CAClB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React, { useMemo
|
|
2
|
-
import { Button, Dropdown } from "antd";
|
|
1
|
+
import React, { useMemo } from "react";
|
|
3
2
|
import { faCircleEllipsis } from "@fortawesome/pro-light-svg-icons";
|
|
4
|
-
import { Access, Delete
|
|
3
|
+
import { Access, Delete } from "@voplus/morpho-document/es/controls/DocumentMenu/items";
|
|
5
4
|
import { useIdentityStore } from "../../../../../../data/identity";
|
|
6
5
|
import { observe } from "@voplus/morpho-ui";
|
|
7
6
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
@@ -9,18 +8,12 @@ import { DocumentMenuContext, DocumentMenuState } from "@voplus/morpho-document-
|
|
|
9
8
|
import SubPasteMenu from "@voplus/morpho-document/es/controls/SubPasteMenu";
|
|
10
9
|
import "./index.less";
|
|
11
10
|
const IdentityMenu = (props) => {
|
|
12
|
-
const [open, setOpen] = useState(false);
|
|
13
11
|
const context = useMemo(() => new DocumentMenuState(props.id), [props.id]);
|
|
14
12
|
const store = useIdentityStore();
|
|
15
13
|
return observe(() => (React.createElement(DocumentMenuContext.Provider, { value: context },
|
|
16
|
-
React.createElement(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
React.createElement(Delete, { action: () => store.delete(props.id) }))) },
|
|
20
|
-
React.createElement(Button, { size: props.size, type: "link" }, props.icon)))));
|
|
21
|
-
function handleOpenChange(flag) {
|
|
22
|
-
setOpen(flag);
|
|
23
|
-
}
|
|
14
|
+
React.createElement(Access, null),
|
|
15
|
+
React.createElement(SubPasteMenu, null),
|
|
16
|
+
React.createElement(Delete, { action: () => store.delete(props.id) }))));
|
|
24
17
|
};
|
|
25
18
|
IdentityMenu.defaultProps = {
|
|
26
19
|
size: "small",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/identity/controls/IdentifyMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/identity/controls/IdentifyMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAY,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wDAAwD,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,YAAY,MAAM,kDAAkD,CAAC;AAC5E,OAAO,cAAc,CAAC;AAEtB,MAAM,YAAY,GAAG,CAAC,KAMrB,EAAE,EAAE;IACJ,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3E,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IAEjC,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO;QAC3C,oBAAC,MAAM,OAAG;QACV,oBAAC,YAAY,OAAG;QAChB,oBAAC,MAAM,IAAC,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,GAAI,CAClB,CAC/B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,YAAY,GAAG;IAC3B,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,oBAAC,MAAM,IAAC,IAAI,EAAE,gBAAgB,GAAI;CACxC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import React, { useLayoutEffect, useRef, useState } from "react";
|
|
2
|
-
import { Col, Row, Button, Tooltip } from "antd";
|
|
2
|
+
import { Col, Row, Button, Tooltip, Alert } from "antd";
|
|
3
3
|
import { observe } from "@voplus/morpho-ui";
|
|
4
4
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
5
5
|
import { faListTimeline } from "@fortawesome/pro-light-svg-icons";
|
|
6
6
|
import ActivityLog from "@voplus/morpho-org/es/components/ActivityLog/ActivityLog2";
|
|
7
|
-
import CompanyProperties from "../../components/CompanyProperties";
|
|
7
|
+
import CompanyProperties from "../../components/CompanyProperties/CompanyPropertiesCard";
|
|
8
8
|
import RelatedDocument from "@voplus/morpho-document/es/controls/RelatedDocument";
|
|
9
9
|
import CompanyMemberListCard from "../../member-register/components/CompanyMemberListCard";
|
|
10
10
|
import ContactPropertiesCard from "@voplus/morpho-org/es/components/ContactProperties/ContactPropertiesCard";
|
|
11
11
|
import OfficerListCard from "../../officer-register/components/OfficerListCard";
|
|
12
12
|
import FilingRecordTimeLine from "../../../filing-record/components/FilingRecordTimeLine";
|
|
13
|
+
import dayjs from "dayjs";
|
|
13
14
|
import styles from "./index.less";
|
|
14
15
|
const Dashboard = (props) => {
|
|
15
16
|
const { corporate, membersRegisterId, officersRegisterId } = props;
|
|
@@ -21,9 +22,11 @@ const Dashboard = (props) => {
|
|
|
21
22
|
setActivitiesHeight((_a = ref.current) === null || _a === void 0 ? void 0 : _a.offsetHeight);
|
|
22
23
|
});
|
|
23
24
|
return observe(() => {
|
|
24
|
-
var _a, _b, _c, _d;
|
|
25
|
+
var _a, _b, _c, _d, _e, _f;
|
|
25
26
|
return (React.createElement("div", { className: styles["dashboard-content"], ref: ref },
|
|
26
27
|
React.createElement(RelatedDocument, null,
|
|
28
|
+
!((_a = corporate.center) === null || _a === void 0 ? void 0 : _a.id) && (React.createElement(Alert, { showIcon: true, type: "warning", className: "corporate-dashboard-alert", message: "This corporate is not in any secretary center." })),
|
|
29
|
+
expriedAliterVisible((_b = corporate === null || corporate === void 0 ? void 0 : corporate.workingFilingYear) === null || _b === void 0 ? void 0 : _b.fye) && (React.createElement(Alert, { showIcon: true, type: "warning", className: "corporate-dashboard-alert", message: "No current filing year or current filing expried." })),
|
|
27
30
|
React.createElement("div", { className: "dashboard-content-header flex items-center justify-between w-full" },
|
|
28
31
|
React.createElement("div", { className: "flex-1 min-w-0" },
|
|
29
32
|
React.createElement("div", { className: "text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:truncate" }, corporate.name)),
|
|
@@ -36,7 +39,7 @@ const Dashboard = (props) => {
|
|
|
36
39
|
React.createElement(Col, { xs: 0, sm: 0, md: 0, lg: 0, xl: visible ? 10 : 16 },
|
|
37
40
|
officersRegisterId && (React.createElement(OfficerListCard, { isFilterPresent: true, officersRegisterId: officersRegisterId, corporateId: corporate.id, style: { height: "400px" } })),
|
|
38
41
|
membersRegisterId && (React.createElement(CompanyMemberListCard, { membersRegisterId: membersRegisterId, corporateId: corporate.id, style: { height: "400px" } })),
|
|
39
|
-
((
|
|
42
|
+
((_c = corporate.latestFilingYear) === null || _c === void 0 ? void 0 : _c.id) && (React.createElement(FilingRecordTimeLine, { filingYearId: (_d = corporate.latestFilingYear) === null || _d === void 0 ? void 0 : _d.id, title: "Latest Filing Year Time Line" }))),
|
|
40
43
|
React.createElement(Col, { xs: 0, sm: 0, md: 0, lg: 0, xl: visible ? 6 : 0 },
|
|
41
44
|
React.createElement("div", { className: "activity-log-card shadow ring-black ring-opacity-5", style: { height: `${activitiesHeight - 120}px` } },
|
|
42
45
|
React.createElement(ActivityLog, { id: corporate.id }))),
|
|
@@ -45,10 +48,20 @@ const Dashboard = (props) => {
|
|
|
45
48
|
props.unitId && React.createElement(ContactPropertiesCard, { id: props.unitId }),
|
|
46
49
|
officersRegisterId && (React.createElement(OfficerListCard, { officersRegisterId: officersRegisterId, corporateId: corporate.id, style: { height: "400px" } })),
|
|
47
50
|
membersRegisterId && (React.createElement(CompanyMemberListCard, { membersRegisterId: membersRegisterId, corporateId: corporate.id, style: { height: "400px" } })),
|
|
48
|
-
((
|
|
51
|
+
((_e = corporate.latestFilingYear) === null || _e === void 0 ? void 0 : _e.id) && (React.createElement(FilingRecordTimeLine, { filingYearId: (_f = corporate.latestFilingYear) === null || _f === void 0 ? void 0 : _f.id, title: "Latest Filing Year Time Line" })),
|
|
49
52
|
visible && (React.createElement("div", { className: "activity-log-card shadow ring-black ring-opacity-5", style: { height: `${activitiesHeight - 120}px` } },
|
|
50
53
|
React.createElement(ActivityLog, { id: corporate.id }))))))));
|
|
51
54
|
});
|
|
55
|
+
function expriedAliterVisible(date) {
|
|
56
|
+
if (!date)
|
|
57
|
+
return true;
|
|
58
|
+
let totalDays, diffDate;
|
|
59
|
+
const myDate = Date.parse(dayjs(date).format("YYYY-MM-DD"));
|
|
60
|
+
const nowDate = Date.parse(dayjs(new Date()).format("YYYY-MM-DD"));
|
|
61
|
+
diffDate = nowDate - myDate;
|
|
62
|
+
totalDays = Math.floor(diffDate / (1000 * 3600 * 24));
|
|
63
|
+
return totalDays > 0;
|
|
64
|
+
}
|
|
52
65
|
function toggleActivity() {
|
|
53
66
|
setVisible(!visible);
|
|
54
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dashboard.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/pages/CompanyPage/Dashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Dashboard.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/pages/CompanyPage/Dashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,WAAW,MAAM,2DAA2D,CAAC;AACpF,OAAO,iBAAiB,MA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A,MAAA,SAAS,CAAC,gBAAgB,0CAAE,EAAE,KAAI,CAClC,oBAAC,oBAAoB,IACpB,YAAY,EAAE,MAAA,SAAS,CAAC,gBAAgB,0CAAE,EAAE,EAC5C,KAAK,EAAC,8BAA8B,GACnC,CACF;wBACA,OAAO,IAAI,CACX,6BACC,SAAS,EAAC,oDAAoD,EAC9D,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,gBAAiB,GAAG,GAAG,IAAI,EAAE;4BAEjD,oBAAC,WAAW,IAAC,EAAE,EAAE,SAAS,CAAC,EAAE,GAAI,CAC5B,CACN,CACI,CACD,CACW,CACb,CACN,CAAA;KAAA,CAAC,CAAC;IAEH,SAAS,oBAAoB,CAAC,IAAa;QAC1C,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QAEvB,IAAI,SAAS,EAAE,QAAQ,CAAC;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;QACnE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;QAC5B,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;QAEtD,OAAO,SAAS,GAAG,CAAC,CAAC;IACtB,CAAC;IAED,SAAS,cAAc;QACtB,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -25,7 +25,7 @@ const CompanyPage = (props) => {
|
|
|
25
25
|
const [state] = useState(new State());
|
|
26
26
|
const [menuKey, setMenuKey] = useState("/dashboard");
|
|
27
27
|
const [loaded, setLoaded] = useState(true);
|
|
28
|
-
const corporate = useCorporate(props.id, { includes: "registers,filing-years" });
|
|
28
|
+
const corporate = useCorporate(props.id, { includes: "registers,filing-years,center" });
|
|
29
29
|
const params = useParams();
|
|
30
30
|
const url = useResolvedPath("").pathname;
|
|
31
31
|
const layout = useLayout();
|