@voplus/morpho-csp 4.0.24 → 4.0.25
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/clda-form/conversion.d.ts +1 -1
- package/es/data/clda-form/conversion.js +3 -2
- package/es/data/clda-form/conversion.js.map +1 -1
- package/es/data/clda-form/interfaces.d.ts +12 -0
- package/es/data/clda-form/interfaces.js +2 -0
- package/es/data/clda-form/interfaces.js.map +1 -1
- package/es/data/clda-form/types.d.ts +12 -0
- package/es/modules/self-registration/clda-form/components/MemberInfo/index.js +3 -3
- package/es/modules/self-registration/clda-form/components/MemberInfo/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/NewDirectorDialog/index.js +2 -2
- package/es/modules/self-registration/clda-form/components/NewDirectorDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/NewSecretaryDialog/index.js +2 -2
- package/es/modules/self-registration/clda-form/components/NewSecretaryDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/NewShareholderDialog/index.js +4 -4
- package/es/modules/self-registration/clda-form/components/NewShareholderDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/ShareholderList/index.js +2 -2
- package/es/modules/self-registration/clda-form/components/ShareholderList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailList/index.js +3 -3
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/index.js +3 -3
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralContext.d.ts +13 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralContext.js +74 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralContext.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralForm.d.ts +4 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralForm.js +174 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralForm.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/index.js +7 -5
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/index.d.ts +7 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/index.js +117 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/index.less +16 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/state.d.ts +17 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/state.js +46 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/state.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.js +2 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddOfficerDialog/index.js +3 -3
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddOfficerDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.js +3 -3
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.js +3 -3
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.d.ts +0 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.js +11 -4
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.d.ts +0 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.js +6 -6
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.d.ts +9 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.js +38 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.less +45 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningItem/index.d.ts +11 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningItem/index.js +49 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningItem/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningItem/index.less +50 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.d.ts +6 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.js +81 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.less +12 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/state.d.ts +9 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/state.js +53 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/state.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.d.ts +6 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.js +66 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/state.d.ts +9 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/state.js +46 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/state.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/DivideColumnItem/index.d.ts +0 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/DivideColumnItem/index.js +9 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/DivideColumnItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/DivideColumnList/index.d.ts +0 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/DivideColumnList/index.js +4 -4
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/DivideColumnList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/NewOfficerDetailList/index.d.ts +0 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/NewOfficerDetailList/index.js +11 -3
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/NewOfficerDetailList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.d.ts +0 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.js +8 -6
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/RemoveOfficerDetailList/index.d.ts +0 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/RemoveOfficerDetailList/index.js +11 -3
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/RemoveOfficerDetailList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.d.ts +0 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.js +11 -4
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.d.ts +0 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.js +6 -6
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/index.js +7 -159
- package/es/modules/self-registration/clda-form/incorporation/company-general/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
2
|
import { Form, Modal, Select, message } from "antd";
|
|
3
3
|
import { useCLDAForm, useCLDAFormStore } from "../../../../../../../data/clda-form";
|
|
4
|
-
import {
|
|
4
|
+
import { CapitalizeFirstLetter } from "../../../../../../../data/clda-form/conversion";
|
|
5
5
|
import { clone } from "lodash-es";
|
|
6
6
|
import { observe } from "@voplus/morpho-ui";
|
|
7
7
|
import { v4 as uuid } from "uuid";
|
|
@@ -83,7 +83,7 @@ const AddRemoveOfficerDialog = (props) => {
|
|
|
83
83
|
};
|
|
84
84
|
const officers = data ? [...data, officer] : [officer];
|
|
85
85
|
await store.edit(id, {
|
|
86
|
-
data: { Contacts:
|
|
86
|
+
data: { Contacts: CapitalizeFirstLetter(officers) },
|
|
87
87
|
error: "message",
|
|
88
88
|
});
|
|
89
89
|
setContactId(officer.id);
|
|
@@ -99,7 +99,7 @@ const AddRemoveOfficerDialog = (props) => {
|
|
|
99
99
|
else {
|
|
100
100
|
let officers = (_b = (_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.removeOfficerDetails) === null || _b === void 0 ? void 0 : _b.officers;
|
|
101
101
|
if (officers === null || officers === void 0 ? void 0 : officers.length)
|
|
102
|
-
officers =
|
|
102
|
+
officers = CapitalizeFirstLetter(officers);
|
|
103
103
|
store.edit(id, {
|
|
104
104
|
data: {
|
|
105
105
|
RemoveOfficerDetails: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,qBAAqB,MAAM,+EAA+E,CAAC;AAClH,OAAO,cAAc,CAAC;AAEtB,MAAM,sBAAsB,GAAG,CAAC,KAA8D,EAAE,EAAE;;IACjG,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACxC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,Q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AC,EAAE,CAAC,CAAC;SACzB;QAED,aAAa,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;IAED,SAAS,KAAK;;QACb,IAAI,CAAC,SAAS,EAAE;YACf,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;YAC3C,OAAM;SACN;aAAM;YACN,IAAI,QAAQ,GAAG,MAAA,MAAA,aAAa,CAAC,OAAO,0CAAE,oBAAoB,0CAAE,QAAQ,CAAC;YACrE,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM;gBAAE,QAAQ,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;YAEjE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE;gBACd,IAAI,EAAE;oBACL,oBAAoB,EAAE;wBACrB,QAAQ,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM;4BACzB,CAAC,CAAC;gCACA,GAAG,QAAQ;gCACX;oCACC,SAAS,EAAE,SAAS;oCACpB,SAAS,EAAE,SAAS;iCACpB;6BACA;4BACH,CAAC,CAAC;gCACA;oCACC,SAAS,EAAE,SAAS;oCACpB,SAAS,EAAE,SAAS;iCACpB;6BACA;qBACJ;iBACD;gBACD,KAAK,EAAE,SAAS;aAChB,CAAC,CAAC;SACH;QACD,MAAA,KAAK,CAAC,QAAQ,qDAAI,CAAC;IACpB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { Form, Modal, Select, InputNumber, message } from "antd";
|
|
3
3
|
import { useCLDAForm, useCLDAFormStore } from "../../../../../../../data/clda-form";
|
|
4
|
-
import {
|
|
4
|
+
import { CapitalizeFirstLetter } from "../../../../../../../data/clda-form/conversion";
|
|
5
5
|
import { clone } from "lodash-es";
|
|
6
6
|
import { State } from "./state";
|
|
7
7
|
import { observe, useAutorunEffect } from "@voplus/morpho-ui";
|
|
@@ -74,7 +74,7 @@ const AddTransferDialog = (props) => {
|
|
|
74
74
|
};
|
|
75
75
|
const officers = data ? [...data, officer] : [officer];
|
|
76
76
|
await store.edit(id, {
|
|
77
|
-
data: { Contacts:
|
|
77
|
+
data: { Contacts: CapitalizeFirstLetter(officers) },
|
|
78
78
|
error: "message",
|
|
79
79
|
});
|
|
80
80
|
}
|
|
@@ -90,7 +90,7 @@ const AddTransferDialog = (props) => {
|
|
|
90
90
|
}
|
|
91
91
|
let transfers = (_b = (_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.transferDetails) === null || _b === void 0 ? void 0 : _b.transfers;
|
|
92
92
|
if (transfers === null || transfers === void 0 ? void 0 : transfers.length)
|
|
93
|
-
transfers =
|
|
93
|
+
transfers = CapitalizeFirstLetter(transfers);
|
|
94
94
|
await store.edit(id, {
|
|
95
95
|
data: {
|
|
96
96
|
TransferDetails: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACjE,OAAO,EA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IAAI,EAAE;oBACL,eAAe,EAAE;wBAChB,SAAS,EAAE,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM,EAAC,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;qBAC5E;iBACD;gBACD,KAAK,EAAE,SAAS;aAChB,CAAC,CAAC;YAEH,QAAQ,EAAE,CAAC;SACX;QAAC,OAAO,KAAK,EAAE,GAAE;IACnB,CAAC;IAED,SAAS,QAAQ;;QAChB,MAAA,KAAK,CAAC,QAAQ,qDAAI,CAAC;QACnB,QAAQ,CAAC,WAAW,EAAE,CAAC;QACvB,KAAK,CAAC,MAAM,GAAG;YACd,UAAU,EAAE,EAAE;YACd,UAAU,EAAE,EAAE;YACd,UAAU,EAAE,EAAE;YACd,MAAM,EAAE,CAAC;YACT,aAAa,EAAE,CAAC;SAChB,CAAC;IACH,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -4,9 +4,7 @@ declare const AllotmentItem: (props: {
|
|
|
4
4
|
allotment: IAllotment;
|
|
5
5
|
contact: IFormPeopleOptions;
|
|
6
6
|
contacts: IFormPeopleOptions[];
|
|
7
|
-
isOnlyInternalUse?: boolean | undefined;
|
|
8
7
|
allotmentLength?: number | undefined;
|
|
9
|
-
onReload?: (() => void) | undefined;
|
|
10
8
|
onSave?: ((allotment: IAllotment, contact?: IFormPeopleOptions) => void) | undefined;
|
|
11
9
|
onDeleteClick?: (() => void) | undefined;
|
|
12
10
|
}) => JSX.Element;
|
|
@@ -5,13 +5,15 @@ import { faTrashAlt, faPenToSquare } from "@fortawesome/pro-light-svg-icons";
|
|
|
5
5
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
6
6
|
import { ColumnItem, ColumnItemCol } from "@voplus/morpho-ui/es/controls/ColumnItem";
|
|
7
7
|
import { useIncorporationFormContext } from "../../../context";
|
|
8
|
+
import { useCompanyGeneralContext } from "../../CompanyGeneralContext";
|
|
8
9
|
import FormContactEditor from "../../../components/FormContactEditor";
|
|
9
10
|
import CurrencySelect from "@voplus/morpho-ui/es/controls/CurrencySelect";
|
|
10
11
|
import styles from "./index.less";
|
|
11
12
|
const AllotmentItem = (props) => {
|
|
12
|
-
const { allotment, contact, contacts
|
|
13
|
+
const { allotment, contact, contacts } = props;
|
|
13
14
|
const [editable, setEditable] = useState(false);
|
|
14
15
|
const context = useIncorporationFormContext();
|
|
16
|
+
const companyGeneralContext = useCompanyGeneralContext();
|
|
15
17
|
// 用于保存修改之后的contact数据
|
|
16
18
|
let contactDate;
|
|
17
19
|
return observe(() => {
|
|
@@ -40,16 +42,21 @@ const AllotmentItem = (props) => {
|
|
|
40
42
|
] })) : (React.createElement("span", null, allotment.shareClass))),
|
|
41
43
|
React.createElement(ColumnItemCol, { span: 4, title: "Shares" }, editable ? (React.createElement(InputNumber, { placeholder: "please input Share", value: allotment.shares, style: { width: "100%" }, onChange: (value) => (allotment.shares = value) })) : (React.createElement("span", null, allotment.shares))),
|
|
42
44
|
React.createElement(ColumnItemCol, { span: 4, title: "Considersion" }, editable ? (React.createElement(InputNumber, { placeholder: "please input Considersion", style: { width: "100%" }, value: allotment.consideration, onChange: (value) => (allotment.consideration = value) })) : (React.createElement("span", null, allotment.consideration))))),
|
|
43
|
-
contact.idType === "NewId" && (React.createElement(FormContactEditor, { header: false, editable: editable, contact: contact, isOnlyInternalUse: isOnlyInternalUse, onChange: (c) => (contactDate = c) })),
|
|
45
|
+
contact.idType === "NewId" && (React.createElement(FormContactEditor, { header: false, editable: editable, contact: contact, isOnlyInternalUse: companyGeneralContext.isOnlyInternalUse, onChange: (c) => (contactDate = c) })),
|
|
44
46
|
editable && (React.createElement(Row, { justify: "end" },
|
|
45
47
|
React.createElement(Button, { onClick: () => {
|
|
46
|
-
var _a;
|
|
47
48
|
setEditable(false);
|
|
48
|
-
|
|
49
|
+
onReload();
|
|
49
50
|
} }, "Cancel"),
|
|
50
51
|
React.createElement(Button, { type: "primary", style: { marginLeft: "1rem" }, onClick: onSave }, "Save"))),
|
|
51
52
|
props.allotmentLength > 1 && React.createElement(Divider, { className: "halvingline" }))));
|
|
52
53
|
});
|
|
54
|
+
function onReload() {
|
|
55
|
+
companyGeneralContext.loadIssueList = false;
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
companyGeneralContext.loadIssueList = true;
|
|
58
|
+
}, 100);
|
|
59
|
+
}
|
|
53
60
|
async function onSave() {
|
|
54
61
|
var _a;
|
|
55
62
|
setEditable(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AACtE,OAAO,cAAc,MAAM,8CAA8C,CAAC;AAC1E,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,aAAa,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KA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,CAAC;wBACZ,CAAC,aAGO;oBACT,oBAAC,MAAM,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,WAE5D,CACJ,CACN;gBACA,KAAK,CAAC,eAAgB,GAAG,CAAC,IAAI,oBAAC,OAAO,IAAC,SAAS,EAAC,aAAa,GAAG,CAC7D,CACU,CACjB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,SAAS,QAAQ;QAChB,qBAAqB,CAAC,aAAa,GAAG,KAAK,CAAC;QAC5C,UAAU,CAAC,GAAG,EAAE;YACf,qBAAqB,CAAC,aAAa,GAAG,IAAI,CAAC;QAC5C,CAAC,EAAE,GAAG,CAAC,CAAC;IACT,CAAC;IAED,KAAK,UAAU,MAAM;;QACpB,WAAW,CAAC,KAAK,CAAC,CAAC;QAEnB,MAAA,KAAK,CAAC,MAAM,sDAAG,SAAS,EAAE,WAAW,CAAC,CAAC;IACxC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { observe } from "@voplus/morpho-ui";
|
|
3
3
|
import { Modal } from "antd";
|
|
4
|
-
import {
|
|
4
|
+
import { CapitalizeFirstLetter } from "../../../../../../../data/clda-form/conversion";
|
|
5
5
|
import { clone } from "lodash-es";
|
|
6
6
|
import { useCLDAForm, useCLDAFormStore, } from "../../../../../../../data/clda-form";
|
|
7
7
|
import AllotmentItem from "../AllotmentItem";
|
|
@@ -16,7 +16,7 @@ const AllotmentList = (props) => {
|
|
|
16
16
|
return (React.createElement("div", null, ((_b = (_a = incorporation.content.issueShareDetails) === null || _a === void 0 ? void 0 : _a.allotments) === null || _b === void 0 ? void 0 : _b.length)
|
|
17
17
|
? (_c = incorporation.content.issueShareDetails) === null || _c === void 0 ? void 0 : _c.allotments.map((a, i) => {
|
|
18
18
|
var _a, _b, _c;
|
|
19
|
-
return (React.createElement(AllotmentItem, { key: a.key, allotment: a,
|
|
19
|
+
return (React.createElement(AllotmentItem, { key: a.key, allotment: a, contact: (_a = incorporation.content.contacts) === null || _a === void 0 ? void 0 : _a.filter((c) => c.id === a.shareholderId)[0], contacts: incorporation.content.contacts, allotmentLength: (_c = (_b = incorporation.content.issueShareDetails) === null || _b === void 0 ? void 0 : _b.allotments) === null || _c === void 0 ? void 0 : _c.length, onSave: onSave, onDeleteClick: () => deleteTransfer(i) }));
|
|
20
20
|
})
|
|
21
21
|
: null));
|
|
22
22
|
});
|
|
@@ -30,7 +30,7 @@ const AllotmentList = (props) => {
|
|
|
30
30
|
await store.edit(props.id, {
|
|
31
31
|
data: {
|
|
32
32
|
IssueShareDetails: {
|
|
33
|
-
Allotments:
|
|
33
|
+
Allotments: CapitalizeFirstLetter(allotments),
|
|
34
34
|
EffectiveDate: effectiveDate !== null ? dayjs(effectiveDate).format("YYYY-MM-DD") : "",
|
|
35
35
|
},
|
|
36
36
|
},
|
|
@@ -50,9 +50,9 @@ const AllotmentList = (props) => {
|
|
|
50
50
|
allotmentContacts[index] = contact;
|
|
51
51
|
await store.edit(props.id, {
|
|
52
52
|
data: {
|
|
53
|
-
Contacts:
|
|
53
|
+
Contacts: CapitalizeFirstLetter(allotmentContacts),
|
|
54
54
|
IssueShareDetails: {
|
|
55
|
-
Allotments:
|
|
55
|
+
Allotments: CapitalizeFirstLetter(allotments),
|
|
56
56
|
EffectiveDate: effectiveDate !== null ? dayjs(effectiveDate).format("YYYY-MM-DD") : "",
|
|
57
57
|
},
|
|
58
58
|
},
|
|
@@ -63,7 +63,7 @@ const AllotmentList = (props) => {
|
|
|
63
63
|
await store.edit(props.id, {
|
|
64
64
|
data: {
|
|
65
65
|
IssueShareDetails: {
|
|
66
|
-
Allotments:
|
|
66
|
+
Allotments: CapitalizeFirstLetter(allotments),
|
|
67
67
|
EffectiveDate: effectiveDate !== null ? dayjs(effectiveDate).format("YYYY-MM-DD") : "",
|
|
68
68
|
},
|
|
69
69
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EACN,WAAW,EACX,gBAAgB,GAGhB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,aAAa,GAAG,CAAC,KAGtB,EAAE,EAAE;;IACJ,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IACjC,MAAM,aAAa,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAE9D,MAAM,aAAa,GAAG,MAAA,MAAA,aAAa,CAAC,OAAO,0CAAE,iBAAiB,0CAAE,aAAa,CAAC;IAE9E,OAAO,OAAO,CAAC,GAAG,EAAE;;QACnB,OAAO,CACN,iCACE,CAAA,MAAA,MAAA,aAAa,CAAC,OAAO,CAAC,iBAAiB,0CAAE,UAAU,0CAAE,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;iBACD;gBACD,KAAK,EAAE,SAAS;aAChB,CAAC,CAAC;SACH;aAAM;YACN,MAAM,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE;gBAC1B,IAAI,EAAE;oBACL,iBAAiB,EAAE;wBAClB,UAAU,EAAE,qBAAqB,CAAC,UAAU,CAAC;wBAC7C,aAAa,EAAE,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE;qBACtF;iBACD;gBACD,KAAK,EAAE,SAAS;aAChB,CAAC,CAAC;SACH;IACF,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IFormPeopleOptions } from "../../../../../../../data/clda-form";
|
|
3
|
+
declare const BankOpeningContactItem: (props: {
|
|
4
|
+
contact: IFormPeopleOptions;
|
|
5
|
+
contactLength?: number | undefined;
|
|
6
|
+
onReload?: (() => void) | undefined;
|
|
7
|
+
onSave?: ((contact: IFormPeopleOptions) => void) | undefined;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export default BankOpeningContactItem;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Button, Divider, Row } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { faPenToSquare } from "@fortawesome/pro-light-svg-icons";
|
|
5
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
6
|
+
import { useIncorporationFormContext } from "../../../context";
|
|
7
|
+
import { useCompanyGeneralContext } from "../../CompanyGeneralContext";
|
|
8
|
+
import FormContactEditor from "../../../components/FormContactEditor";
|
|
9
|
+
import styles from "./index.less";
|
|
10
|
+
const BankOpeningContactItem = (props) => {
|
|
11
|
+
const { contact } = props;
|
|
12
|
+
const [editable, setEditable] = useState(false);
|
|
13
|
+
const context = useIncorporationFormContext();
|
|
14
|
+
const companyGeneralContext = useCompanyGeneralContext();
|
|
15
|
+
// 用于保存修改之后的contact数据
|
|
16
|
+
let contactDate;
|
|
17
|
+
return observe(() => (React.createElement(React.Fragment, null,
|
|
18
|
+
React.createElement("div", { className: styles["bank-opening-contact-item"] },
|
|
19
|
+
React.createElement("div", { className: "bank-opening-header" }, (context ? context.editable : true) && (React.createElement("div", { className: "action-button" },
|
|
20
|
+
React.createElement("span", { className: "edit-icon", onClick: () => setEditable(!editable) },
|
|
21
|
+
React.createElement(FontAwesomeIcon, { icon: faPenToSquare }))))),
|
|
22
|
+
React.createElement(FormContactEditor, { editable: editable, contact: contact, isOnlyInternalUse: companyGeneralContext.isOnlyInternalUse, onChange: (c) => (contactDate = c) }),
|
|
23
|
+
editable && (React.createElement(Row, { justify: "end" },
|
|
24
|
+
React.createElement(Button, { onClick: () => {
|
|
25
|
+
var _a;
|
|
26
|
+
setEditable(false);
|
|
27
|
+
(_a = props.onReload) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
28
|
+
} }, "Cancel"),
|
|
29
|
+
React.createElement(Button, { type: "primary", style: { marginLeft: "1rem" }, onClick: onSave }, "Save"))),
|
|
30
|
+
props.contactLength > 1 && React.createElement(Divider, { className: "halvingline" })))));
|
|
31
|
+
async function onSave() {
|
|
32
|
+
var _a;
|
|
33
|
+
setEditable(false);
|
|
34
|
+
(_a = props.onSave) === null || _a === void 0 ? void 0 : _a.call(props, contactDate);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export default BankOpeningContactItem;
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CA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,EAClB,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAE,qBAAqB,CAAC,iBAAiB,EAC1D,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,GACjC;YAED,QAAQ,IAAI,CACZ,oBAAC,GAAG,IAAC,OAAO,EAAC,KAAK;gBACjB,oBAAC,MAAM,IACN,OAAO,EAAE,GAAG,EAAE;;wBACb,WAAW,CAAC,KAAK,CAAC,CAAC;wBACnB,MAAA,KAAK,CAAC,QAAQ,qDAAI,CAAC;oBACpB,CAAC,aAGO;gBACT,oBAAC,MAAM,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,WAE5D,CACJ,CACN;YACA,KAAK,CAAC,aAAc,GAAG,CAAC,IAAI,oBAAC,OAAO,IAAC,SAAS,EAAC,aAAa,GAAG,CAC3D,CACU,CACjB,CAAC,CAAC;IAEH,KAAK,UAAU,MAAM;;QACpB,WAAW,CAAC,KAAK,CAAC,CAAC;QACnB,MAAA,KAAK,CAAC,MAAM,sDAAG,WAAW,CAAC,CAAC;IAC7B,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
+
|
|
3
|
+
.bank-opening-contact-item {
|
|
4
|
+
:global {
|
|
5
|
+
.bank-opening-header {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: end;
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
.action-button {
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
|
|
14
|
+
> span {
|
|
15
|
+
margin-left: 6px;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.delete-icon {
|
|
20
|
+
&:hover {
|
|
21
|
+
color: @delete-color;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.edit-icon {
|
|
26
|
+
&:hover {
|
|
27
|
+
color: @primary-color;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.placeholder {
|
|
34
|
+
color: #00000040;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.halvingline {
|
|
38
|
+
margin-bottom: 40px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ant-alert-warning {
|
|
42
|
+
margin-top: 10px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IFormPeopleOptions } from "../../../../../../../data/clda-form";
|
|
3
|
+
import { IBankOpening } from "../../../../../../../data/clda-form";
|
|
4
|
+
declare const BankOpeningColumnItem: (props: {
|
|
5
|
+
contacts: IFormPeopleOptions[];
|
|
6
|
+
bankOpening: IBankOpening;
|
|
7
|
+
bankOpeningLength?: number | undefined;
|
|
8
|
+
onSave?: ((bankOpening: IBankOpening) => void) | undefined;
|
|
9
|
+
onDeleteClick?: (() => void) | undefined;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export default BankOpeningColumnItem;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Button, Divider, Row, Select, Input } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { faTrashAlt, faPenToSquare } from "@fortawesome/pro-light-svg-icons";
|
|
5
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
6
|
+
import { ColumnItem, ColumnItemCol } from "@voplus/morpho-ui/es/controls/ColumnItem";
|
|
7
|
+
import CurrencySelect from "@voplus/morpho-ui/es/controls/CurrencySelect";
|
|
8
|
+
import styles from "./index.less";
|
|
9
|
+
const BankOpeningColumnItem = (props) => {
|
|
10
|
+
const { bankOpening } = props;
|
|
11
|
+
const [editable, setEditable] = useState(false);
|
|
12
|
+
const authorisedSignatory = props.contacts.filter((c) => { var _a; return (_a = bankOpening.authorisedSignatoryId) === null || _a === void 0 ? void 0 : _a.some((b) => c.id === b); });
|
|
13
|
+
return observe(() => {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
return (React.createElement("div", { className: styles["bank-opening-column-item"] },
|
|
16
|
+
React.createElement("div", { className: "bank-opening-column-item-header" },
|
|
17
|
+
React.createElement("div", { className: "action-button" },
|
|
18
|
+
React.createElement("span", { className: "edit-icon", onClick: () => setEditable(!editable) },
|
|
19
|
+
React.createElement(FontAwesomeIcon, { icon: faPenToSquare })),
|
|
20
|
+
React.createElement("span", { className: "delete-icon", onClick: props.onDeleteClick },
|
|
21
|
+
React.createElement(FontAwesomeIcon, { icon: faTrashAlt })))),
|
|
22
|
+
React.createElement("div", { className: "bank-opening-column-item-content" },
|
|
23
|
+
React.createElement(ColumnItem, null,
|
|
24
|
+
React.createElement(ColumnItemCol, { span: 7, title: "Authorised Signatory" }, editable ? (React.createElement(Select, { showSearch: true, mode: "multiple", placeholder: "Select contact", optionFilterProp: "children", style: { width: "100%" }, defaultValue: bankOpening.authorisedSignatoryId, onChange: (value) => (bankOpening.authorisedSignatoryId = value), popupClassName: "add-bank-opening-select-contact", filterOption: (input, option) => (option === null || option === void 0 ? void 0 : option.children.toLowerCase().indexOf(input.toLowerCase())) >= 0 }, (_a = props.contacts) === null || _a === void 0 ? void 0 : _a.map((item) => (React.createElement(Select.Option, { key: item.id, value: item.id }, item.name))))) : (authorisedSignatory === null || authorisedSignatory === void 0 ? void 0 : authorisedSignatory.map((a) => React.createElement("span", { className: "margin-right-5" }, a.name)))),
|
|
25
|
+
React.createElement(ColumnItemCol, { span: 6, title: "Bank" }, editable ? (React.createElement(Input, { placeholder: "please input Bank", style: { width: "100%" }, defaultValue: bankOpening.bank, onChange: (e) => (bankOpening.bank = e.target.value) })) : (React.createElement("div", { className: "column-item-value" }, bankOpening.bank))),
|
|
26
|
+
React.createElement(ColumnItemCol, { span: 8, title: "Account Types" }, editable ? (React.createElement(Select, { mode: "tags", placeholder: "Select Account Type", optionFilterProp: "children", style: { width: "100%" }, defaultValue: bankOpening.accountTypes, onChange: (value) => (bankOpening.accountTypes = value), filterOption: (input, option) => { var _a; return ((_a = option === null || option === void 0 ? void 0 : option.label) !== null && _a !== void 0 ? _a : "").toLowerCase().includes(input.toLowerCase()); }, options: [
|
|
27
|
+
{
|
|
28
|
+
value: "Current Account",
|
|
29
|
+
label: "Current Account",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: "Saving Account",
|
|
33
|
+
label: "Saving Account",
|
|
34
|
+
},
|
|
35
|
+
] })) : ((_b = bankOpening.accountTypes) === null || _b === void 0 ? void 0 : _b.map((t) => React.createElement("span", { className: "margin-right-5" }, t)))),
|
|
36
|
+
React.createElement(ColumnItemCol, { span: 3, title: "Currency" }, editable ? (React.createElement(CurrencySelect, { placeholder: "Select Share Currency", currency: bankOpening.currency, onChange: (value) => (bankOpening.currency = value) })) : (React.createElement("div", { className: "column-item-value" }, bankOpening.currency))))),
|
|
37
|
+
editable && (React.createElement(Row, { justify: "end", style: { marginTop: "10px" } },
|
|
38
|
+
React.createElement(Button, { onClick: () => setEditable(false) }, "Cancel"),
|
|
39
|
+
React.createElement(Button, { type: "primary", style: { marginLeft: "1rem" }, onClick: onSave }, "Save"))),
|
|
40
|
+
props.bankOpeningLength > 1 && React.createElement(Divider, null)));
|
|
41
|
+
});
|
|
42
|
+
async function onSave() {
|
|
43
|
+
var _a;
|
|
44
|
+
setEditable(false);
|
|
45
|
+
(_a = props.onSave) === null || _a === void 0 ? void 0 : _a.call(props, bankOpening);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export default BankOpeningColumnItem;
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,cAAc,MAAM,8CAA8C,CAAC;AAC1E,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,qBAAqB,GAAG,CAAC,KAM9B,EAAE,EAAE;IACJ,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,MAAM,mBAAmB,GAAyB,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,WAC7E,OAAA,MAAA,WAAW,CAAC,qBAAqB,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA,EAAA,CAC1D,CAAC;IAEF,OAAO,OAAO,CAAC,GAAG,EAAE;;QACnB,OAAO,CACN,6BAAK,SAAS,EAAE,MAAM,CAAC,0BAA0B,CAAC;YACjD,6BAAK,SAAS,EAAC,iCAAiC;gBAC/C,6BAAK,SAAS,EAAC,eAAe;oBAC7B,8BAAM,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,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1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
+
|
|
3
|
+
.bank-opening-column-item {
|
|
4
|
+
margin-bottom: 20px;
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
:global {
|
|
8
|
+
.bank-opening-column-item-header {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: end;
|
|
12
|
+
|
|
13
|
+
.action-button {
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
|
|
16
|
+
>span {
|
|
17
|
+
margin-left: 6px;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.delete-icon {
|
|
22
|
+
&:hover {
|
|
23
|
+
color: @delete-color;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.edit-icon {
|
|
28
|
+
&:hover {
|
|
29
|
+
color: @primary-color;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.column-item-value {
|
|
36
|
+
height: 30px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.custom-column-item___yTecf {
|
|
40
|
+
border-bottom: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.column-item-content {
|
|
44
|
+
& > div:nth-child(2) {
|
|
45
|
+
width: 100%;
|
|
46
|
+
padding-right: 20px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import { Modal } from "antd";
|
|
4
|
+
import { CapitalizeFirstLetter } from "../../../../../../../data/clda-form/conversion";
|
|
5
|
+
import { useCompanyGeneralContext } from "../../CompanyGeneralContext";
|
|
6
|
+
import { clone } from "lodash-es";
|
|
7
|
+
import { useCLDAForm, useCLDAFormStore, } from "../../../../../../../data/clda-form";
|
|
8
|
+
import { State } from "./state";
|
|
9
|
+
import BankOpeningItem from "../BankOpeningItem";
|
|
10
|
+
import BankOpeningContactItem from "../BankOpeningContactItem";
|
|
11
|
+
import styles from "./index.less";
|
|
12
|
+
const BankOpeningColumnList = (props) => {
|
|
13
|
+
const store = useCLDAFormStore();
|
|
14
|
+
const incorporation = useCLDAForm(props.id, { reload: true });
|
|
15
|
+
const companyGeneralContext = useCompanyGeneralContext();
|
|
16
|
+
const [state] = useState(new State(incorporation));
|
|
17
|
+
return observe(() => {
|
|
18
|
+
var _a, _b, _c, _d, _e;
|
|
19
|
+
return (React.createElement("div", { className: styles["bank-opening-list"] },
|
|
20
|
+
React.createElement("div", { className: "bank-opening-column-list" }, ((_c = (_b = (_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.bankOpeningDetails) === null || _b === void 0 ? void 0 : _b.bankOpenings) === null || _c === void 0 ? void 0 : _c.length)
|
|
21
|
+
? (_e = (_d = incorporation.content) === null || _d === void 0 ? void 0 : _d.bankOpeningDetails) === null || _e === void 0 ? void 0 : _e.bankOpenings.map((d, i) => {
|
|
22
|
+
var _a, _b, _c;
|
|
23
|
+
return (React.createElement(BankOpeningItem, { key: d.key, contacts: incorporation.content.contacts, bankOpening: d, bankOpeningLength: (_c = (_b = (_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.bankOpeningDetails) === null || _b === void 0 ? void 0 : _b.bankOpenings) === null || _c === void 0 ? void 0 : _c.length, onSave: onSave, onDeleteClick: () => deleteBankOpening(i) }));
|
|
24
|
+
})
|
|
25
|
+
: null),
|
|
26
|
+
state.getBankOpeningNewContacts().length ? (React.createElement("div", { className: "bank-opening-contact" },
|
|
27
|
+
React.createElement("div", { className: "bank-opening-contact-title" }, "New Authorised Signatory"),
|
|
28
|
+
state.getBankOpeningNewContacts().map((c) => {
|
|
29
|
+
var _a;
|
|
30
|
+
return (React.createElement(BankOpeningContactItem, { contact: c, contactLength: (_a = state.getBankOpeningNewContacts()) === null || _a === void 0 ? void 0 : _a.length, onSave: onEditContact, onReload: onReload }));
|
|
31
|
+
}))) : null));
|
|
32
|
+
});
|
|
33
|
+
function onReload() {
|
|
34
|
+
companyGeneralContext.loadBankOpeningList = false;
|
|
35
|
+
setTimeout(() => {
|
|
36
|
+
companyGeneralContext.loadBankOpeningList = true;
|
|
37
|
+
}, 100);
|
|
38
|
+
}
|
|
39
|
+
function deleteBankOpening(index) {
|
|
40
|
+
return Modal.confirm({
|
|
41
|
+
title: "Do you want to delete this item?",
|
|
42
|
+
async onOk() {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
let bankOpenings = clone((_b = (_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.bankOpeningDetails) === null || _b === void 0 ? void 0 : _b.bankOpenings);
|
|
45
|
+
bankOpenings.splice(index, 1);
|
|
46
|
+
await store
|
|
47
|
+
.edit(props.id, {
|
|
48
|
+
data: { BankOpeningDetails: { BankOpenings: CapitalizeFirstLetter(bankOpenings) } },
|
|
49
|
+
error: "message",
|
|
50
|
+
})
|
|
51
|
+
.then(() => onReload());
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
async function onSave(bankOpening) {
|
|
56
|
+
var _a, _b, _c;
|
|
57
|
+
const bankOpenings = (_c = clone((_b = (_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.bankOpeningDetails) === null || _b === void 0 ? void 0 : _b.bankOpenings)) !== null && _c !== void 0 ? _c : [];
|
|
58
|
+
const no = bankOpenings === null || bankOpenings === void 0 ? void 0 : bankOpenings.findIndex((i) => i.key === bankOpening.key);
|
|
59
|
+
bankOpenings[no] = bankOpening;
|
|
60
|
+
await store
|
|
61
|
+
.edit(props.id, {
|
|
62
|
+
data: { BankOpeningDetails: { BankOpenings: CapitalizeFirstLetter(bankOpenings) } },
|
|
63
|
+
error: "message",
|
|
64
|
+
})
|
|
65
|
+
.then(() => onReload());
|
|
66
|
+
}
|
|
67
|
+
async function onEditContact(contact) {
|
|
68
|
+
var _a, _b;
|
|
69
|
+
const bankOpeningContacts = (_b = clone((_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.contacts)) !== null && _b !== void 0 ? _b : [];
|
|
70
|
+
const index = bankOpeningContacts.findIndex((i) => i.id === (contact === null || contact === void 0 ? void 0 : contact.id));
|
|
71
|
+
bankOpeningContacts[index] = contact;
|
|
72
|
+
await store.edit(props.id, {
|
|
73
|
+
data: {
|
|
74
|
+
Contacts: CapitalizeFirstLetter(bankOpeningContacts),
|
|
75
|
+
},
|
|
76
|
+
error: "message",
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
export default BankOpeningColumnList;
|
|
81
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EACN,WAAW,EACX,gBAAgB,GAGhB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,sBAAsB,MAAM,2BAA2B,CAAC;AAC/D,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,qBAAqB,GAAG,CAAC,KAG9B,EAAE,EAAE;IACJ,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IACjC,MAA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