@voplus/morpho-csp 1.2.65 → 1.2.67
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/incorporation-form/interfaces.d.ts +13 -2
- package/es/data/incorporation-form/types.d.ts +5 -1
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step2.js +3 -3
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step2.js.map +1 -1
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/index.d.ts +1 -0
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/index.js +8 -2
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/index.js.map +1 -1
- package/es/modules/self-registration/controls/Tips/BusinessNameTip.js +1 -1
- package/es/modules/self-registration/controls/Tips/BusinessNameTip.js.map +1 -1
- package/es/modules/self-registration/controls/Tips/FYETip.js +5 -3
- package/es/modules/self-registration/controls/Tips/FYETip.js.map +1 -1
- package/es/modules/self-registration/controls/Tips/RegisteredAddressTip.js +1 -1
- package/es/modules/self-registration/controls/Tips/RegisteredAddressTip.js.map +1 -1
- package/es/modules/self-registration/incorporation-clda/components/DetailsStep/index.js +13 -7
- package/es/modules/self-registration/incorporation-clda/components/DetailsStep/index.js.map +1 -1
- package/es/modules/self-registration/incorporation-clda/components/StartStep/index.js +6 -2
- package/es/modules/self-registration/incorporation-clda/components/StartStep/index.js.map +1 -1
- package/es/modules/self-registration/incorporation-clda/pages/IncorporationCLDAClientView/TourGuide/index.js +9 -3
- package/es/modules/self-registration/incorporation-clda/pages/IncorporationCLDAClientView/TourGuide/index.js.map +1 -1
- package/es/modules/self-registration/incorporation-clda/pages/IncorporationCLDAClientView/index.js +5 -5
- package/es/modules/self-registration/incorporation-clda/pages/IncorporationCLDAClientView/index.js.map +1 -1
- package/es/modules/self-registration/incorporation-form/components/CompanyInfo/index.js +6 -3
- package/es/modules/self-registration/incorporation-form/components/CompanyInfo/index.js.map +1 -1
- package/es/modules/self-registration/incorporation-form/components/CompanyInfo/index.less +4 -0
- package/es/modules/self-registration/incorporation-form/components/IncorporationFormConfirmationDialog/index.d.ts +7 -0
- package/es/modules/self-registration/incorporation-form/components/IncorporationFormConfirmationDialog/index.js +18 -0
- package/es/modules/self-registration/incorporation-form/components/IncorporationFormConfirmationDialog/index.js.map +1 -0
- package/es/modules/self-registration/incorporation-form/components/IncorporationFormReview/index.d.ts +1 -0
- package/es/modules/self-registration/incorporation-form/components/IncorporationFormReview/index.js +28 -22
- package/es/modules/self-registration/incorporation-form/components/IncorporationFormReview/index.js.map +1 -1
- package/es/modules/self-registration/incorporation-form/components/IncorporationFormReview/index.less +8 -0
- package/es/modules/self-registration/incorporation-form/components/MemberInfo/index.d.ts +7 -9
- package/es/modules/self-registration/incorporation-form/components/MemberInfo/index.js +72 -126
- package/es/modules/self-registration/incorporation-form/components/MemberInfo/index.js.map +1 -1
- package/es/modules/self-registration/incorporation-form/components/MemberInfo/index.less +20 -3
- package/es/modules/self-registration/incorporation-form/components/NewDirectorDialog/index.d.ts +7 -0
- package/es/modules/self-registration/incorporation-form/components/NewDirectorDialog/index.js +84 -0
- package/es/modules/self-registration/incorporation-form/components/NewDirectorDialog/index.js.map +1 -0
- package/es/modules/self-registration/incorporation-form/components/NewShareholderDialog/index.d.ts +8 -0
- package/es/modules/self-registration/incorporation-form/components/NewShareholderDialog/index.js +92 -0
- package/es/modules/self-registration/incorporation-form/components/NewShareholderDialog/index.js.map +1 -0
- package/es/modules/self-registration/incorporation-form/components/NewShareholderDialog/index.less +7 -0
- package/es/modules/self-registration/incorporation-form/components/OfficerList/index.js +13 -44
- package/es/modules/self-registration/incorporation-form/components/OfficerList/index.js.map +1 -1
- package/es/modules/self-registration/incorporation-form/components/ShareCapital/index.js +5 -3
- package/es/modules/self-registration/incorporation-form/components/ShareCapital/index.js.map +1 -1
- package/es/modules/self-registration/incorporation-form/components/ShareholderList/index.js +15 -46
- package/es/modules/self-registration/incorporation-form/components/ShareholderList/index.js.map +1 -1
- package/es/modules/self-registration/incorporation-form/pages/IncoprorationFormClientView/index.js +13 -4
- package/es/modules/self-registration/incorporation-form/pages/IncoprorationFormClientView/index.js.map +1 -1
- package/es/modules/self-registration/incorporation-form/pages/IncoprorationFormClientView/state.d.ts +7 -0
- package/es/modules/self-registration/incorporation-form/pages/IncoprorationFormClientView/state.js +20 -0
- package/es/modules/self-registration/incorporation-form/pages/IncoprorationFormClientView/state.js.map +1 -0
- package/package.json +1 -1
package/es/modules/self-registration/incorporation-form/components/IncorporationFormReview/index.js
CHANGED
|
@@ -1,53 +1,59 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Button, Spin } from "@voplus/antd";
|
|
2
2
|
import React, { useState } from "react";
|
|
3
3
|
import { ValidationCollections, ValidationCollectionsContext } from "@voplus/morpho-data";
|
|
4
4
|
import { useIncorporationForm, useIncorporationFormStore, } from "../../../../../data/incorporation-form";
|
|
5
5
|
import { CompanyInfo } from "../CompanyInfo";
|
|
6
6
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
7
|
+
import NavigateButtonsBar from "@voplus/morpho-ui/es/controls/NavigateButtonsBar";
|
|
7
8
|
import OfficerList from "../OfficerList";
|
|
8
9
|
import { Scrollbars } from "react-custom-scrollbars";
|
|
9
10
|
import Section from "../../../controls/Section";
|
|
10
11
|
import ShareCapital from "../ShareCapital";
|
|
11
12
|
import ShareholderList from "../ShareholderList";
|
|
12
13
|
import classnames from "classnames";
|
|
13
|
-
import { faInfo } from "@fortawesome/pro-light-svg-icons";
|
|
14
|
+
import { faInfo, faInfoCircle } from "@fortawesome/pro-light-svg-icons";
|
|
14
15
|
import { observe } from "@voplus/morpho-ui";
|
|
15
16
|
import styles from "./index.less";
|
|
17
|
+
import IncorporationFormConfirmationDialog from "../IncorporationFormConfirmationDialog";
|
|
16
18
|
const IncorporationFormReview = (props) => {
|
|
17
19
|
const [submitting, setSubmitting] = useState(false);
|
|
18
20
|
const [validations] = useState(new ValidationCollections());
|
|
19
21
|
const store = useIncorporationFormStore();
|
|
20
|
-
const incorporation = useIncorporationForm(props.id
|
|
21
|
-
return observe(() => (React.createElement("div", { className: classnames("incorporation-form-view", styles["incorporation-from-review"]) },
|
|
22
|
+
const incorporation = useIncorporationForm(props.id);
|
|
23
|
+
return observe(() => (React.createElement("div", { className: classnames("incorporation-form-view", props.className, styles["incorporation-from-review"]) },
|
|
22
24
|
React.createElement(Scrollbars, { autoHide: true },
|
|
23
25
|
React.createElement(Spin, { spinning: !incorporation.loaded }, incorporation.loaded && (React.createElement(ValidationCollectionsContext.Provider, { value: validations },
|
|
24
26
|
React.createElement(Section, { title: React.createElement(React.Fragment, null,
|
|
25
27
|
React.createElement(FontAwesomeIcon, { icon: faInfo }),
|
|
26
28
|
" Review and Complete Details") },
|
|
27
29
|
React.createElement("div", { style: { fontSize: "16px" } },
|
|
30
|
+
React.createElement("p", null, "Hi, you are at the Incorporation form filling page. It will take you up to 10-15 minutes to fill up."),
|
|
31
|
+
React.createElement("p", null, "All the below *fields are mandatory to fill."),
|
|
28
32
|
React.createElement("p", null,
|
|
29
|
-
"You
|
|
30
|
-
" "
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
React.createElement("li", null, "1 Local Director"),
|
|
35
|
-
React.createElement("li", null, "1 Local Address"),
|
|
36
|
-
React.createElement("li", null, "Minimal 1 Share & S$1 Capital"),
|
|
37
|
-
React.createElement("li", null, "Verification of identification and address proof\u00A0for each shareholder and officer of the company")))),
|
|
33
|
+
"You may scroll over the",
|
|
34
|
+
React.createElement("span", { style: { fontSize: "1.2em", color: "#2a82db", margin: "0 5px" } },
|
|
35
|
+
React.createElement(FontAwesomeIcon, { icon: faInfoCircle, size: "sm" })),
|
|
36
|
+
"icon near each heading to see more details."),
|
|
37
|
+
React.createElement("p", null, "It is an AUTO SAVE form and you can close the form and re-edit it later."))),
|
|
38
38
|
React.createElement(CompanyInfo, { id: props.id }),
|
|
39
39
|
React.createElement(ShareCapital, { id: props.id }),
|
|
40
40
|
React.createElement(ShareholderList, { isShowDetails: true, id: props.id }),
|
|
41
|
-
React.createElement(OfficerList, { isShowDetails: true, id: props.id })))))
|
|
41
|
+
React.createElement(OfficerList, { isShowDetails: true, id: props.id }))))),
|
|
42
|
+
incorporation.status === "Draft" && (React.createElement(NavigateButtonsBar, null,
|
|
43
|
+
React.createElement(Button, { className: "incorporation-form-submit", disabled: validations.hasError, type: "primary", onClick: () => submit() }, "Submit"))),
|
|
44
|
+
incorporation.submitDate && (React.createElement("div", { className: "incorporation-form-submitted" },
|
|
45
|
+
"Submitted on ",
|
|
46
|
+
incorporation.submitDate)),
|
|
47
|
+
submitting && (React.createElement(IncorporationFormConfirmationDialog, { id: props.id, visible: true, onCancel: () => setSubmitting(false) })))));
|
|
42
48
|
async function submit() {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
catch (err) {
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
setSubmitting(false);
|
|
49
|
+
setSubmitting(true);
|
|
50
|
+
// try {
|
|
51
|
+
// setSubmitting(true);
|
|
52
|
+
// // await store.validate(props.id);
|
|
53
|
+
// } catch (err) {
|
|
54
|
+
// Modal.error({ title: "Error", content: err.toString() });
|
|
55
|
+
// }
|
|
56
|
+
// setSubmitting(false);
|
|
51
57
|
}
|
|
52
58
|
};
|
|
53
59
|
export default IncorporationFormReview;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/self-registration/incorporation-form/components/IncorporationFormReview/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/self-registration/incorporation-form/components/IncorporationFormReview/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAS,IAAI,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,OAAO,C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AAU,IAAI,CACd,oBAAC,mCAAmC,IACnC,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,GACnC,CACF,CACI,CACN,CAAC,CAAC;IAEH,KAAK,UAAU,MAAM;QACpB,aAAa,CAAC,IAAI,CAAC,CAAC;QACpB,QAAQ;QACR,wBAAwB;QACxB,sCAAsC;QACtC,kBAAkB;QAClB,6DAA6D;QAC7D,IAAI;QACJ,wBAAwB;IACzB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -9,5 +9,13 @@
|
|
|
9
9
|
.morpho-inline-edit > .content-container > .content.clickable {
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
}
|
|
12
|
+
.incorporation-form-submit{
|
|
13
|
+
margin-top: 20px;
|
|
14
|
+
}
|
|
15
|
+
.incorporation-form-submitted{
|
|
16
|
+
text-align: right;
|
|
17
|
+
margin-top: 20px;
|
|
18
|
+
padding: 0 20px;
|
|
19
|
+
}
|
|
12
20
|
}
|
|
13
21
|
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IFormPeopleOptions } from "../../../../../data/incorporation-form";
|
|
3
3
|
declare const MemberInfo: (props: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
isShowDetails?: boolean | undefined;
|
|
4
|
+
/** IncorporationForm id */
|
|
5
|
+
formId: string;
|
|
6
|
+
memberId: string;
|
|
7
|
+
contacts: IFormPeopleOptions;
|
|
9
8
|
/** members or officers of index */
|
|
10
|
-
memberIndex?: number
|
|
9
|
+
memberIndex?: number;
|
|
11
10
|
/** members or officers of length */
|
|
12
|
-
memberLength?: number
|
|
13
|
-
onDeleteClick?: (
|
|
14
|
-
onEditClick?: ((option?: IFormPeopleOptions | undefined, index?: number | undefined) => Promise<void> | void) | undefined;
|
|
11
|
+
memberLength?: number;
|
|
12
|
+
onDeleteClick?: () => void;
|
|
15
13
|
}) => JSX.Element;
|
|
16
14
|
export default MemberInfo;
|
|
@@ -1,154 +1,100 @@
|
|
|
1
|
-
import { Alert, Button, Col, Divider, Form,
|
|
2
|
-
import {
|
|
1
|
+
import { Alert, Button, Col, Divider, Form, Row, Input } from "@voplus/antd";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
3
|
import { useValidates } from "@voplus/morpho-data";
|
|
4
|
-
import { faAddressCard, faEnvelope, faMapMarkerAlt, faPhone, faTrashAlt, } from "@fortawesome/pro-light-svg-icons";
|
|
4
|
+
import { faAddressCard, faEnvelope, faMapMarkerAlt, faPhone, faTrashAlt, faPenToSquare, } from "@fortawesome/pro-light-svg-icons";
|
|
5
5
|
import moment from "moment";
|
|
6
|
+
import { clone } from "lodash-es";
|
|
6
7
|
import Address from "@voplus/morpho-org/es/components/Address";
|
|
7
|
-
import Blink from "../../../controls/Blink";
|
|
8
|
-
import Card from "@voplus/morpho-ui/es/controls/Card";
|
|
9
8
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
9
|
+
import { useIncorporationForm, useIncorporationFormStore, } from "../../../../../data/incorporation-form";
|
|
10
10
|
import IdentityChange from "../../../../corporate/company/identity/components/IdentityChange";
|
|
11
|
-
import React from "react";
|
|
11
|
+
import React, { useState } from "react";
|
|
12
12
|
import classnames from "classnames";
|
|
13
|
-
import { faExclamationCircle } from "@fortawesome/free-solid-svg-icons";
|
|
14
|
-
import { runInAction } from "mobx";
|
|
15
13
|
import styles from "./index.less";
|
|
16
14
|
import { useLayout } from "@voplus/morpho-data";
|
|
15
|
+
import { useIncoprorationFormClientViewContext } from "../../pages/IncoprorationFormClientView/state";
|
|
17
16
|
const MemberInfo = (props) => {
|
|
18
|
-
const {
|
|
19
|
-
const isShareholder = roles === "Shareholder";
|
|
17
|
+
const { formId, memberId, contacts } = props;
|
|
20
18
|
const layout = useLayout();
|
|
19
|
+
const [editable, setEditable] = useState(false);
|
|
21
20
|
const validates = useValidates((c) => checkError(c));
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
React.createElement("
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
React.createElement(FontAwesomeIcon, { icon:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var _a;
|
|
49
|
-
runInAction(() => (member.email = value));
|
|
50
|
-
(_a = props.onEditClick) === null || _a === void 0 ? void 0 : _a.call(props, member, props.memberIndex);
|
|
51
|
-
} }),
|
|
52
|
-
React.createElement(InlineEdit, { defaultValue: member === null || member === void 0 ? void 0 : member.phone, content: (v) => (React.createElement("div", null, (member === null || member === void 0 ? void 0 : member.phone) ? (React.createElement("span", { className: "basic-val" },
|
|
53
|
-
React.createElement(FontAwesomeIcon, { icon: faPhone }), member === null || member === void 0 ? void 0 :
|
|
54
|
-
member.phone)) : (React.createElement("span", { className: "placeholder basic-val" },
|
|
55
|
-
React.createElement(FontAwesomeIcon, { icon: faPhone }),
|
|
56
|
-
"Please click here to enter the phone")))), onSave: (value) => {
|
|
57
|
-
var _a;
|
|
58
|
-
runInAction(() => (member.phone = value));
|
|
59
|
-
(_a = props.onEditClick) === null || _a === void 0 ? void 0 : _a.call(props, member, props.memberIndex);
|
|
60
|
-
} }))),
|
|
61
|
-
React.createElement("div", { className: "action-button" },
|
|
62
|
-
React.createElement("span", { onClick: props.onDeleteClick },
|
|
63
|
-
React.createElement(FontAwesomeIcon, { icon: faTrashAlt })))),
|
|
64
|
-
React.createElement("div", { className: "member-info-content" },
|
|
65
|
-
React.createElement("div", { className: "member-info-item" },
|
|
66
|
-
React.createElement("div", { className: "member-item-name" },
|
|
67
|
-
React.createElement(FontAwesomeIcon, { icon: faMapMarkerAlt }),
|
|
68
|
-
"Address:"),
|
|
69
|
-
React.createElement(InlineEdit, { editTrigger: "both", defaultValue: member.address, onSave: (v) => {
|
|
70
|
-
var _a;
|
|
71
|
-
runInAction(() => (member.address = v));
|
|
72
|
-
(_a = props.onEditClick) === null || _a === void 0 ? void 0 : _a.call(props, member, props.memberIndex);
|
|
73
|
-
}, content: (p) => {
|
|
74
|
-
const s = p.store.value;
|
|
75
|
-
return (React.createElement(React.Fragment, null, (s === null || s === void 0 ? void 0 : s.city) === "" &&
|
|
76
|
-
(s === null || s === void 0 ? void 0 : s.country) === "" &&
|
|
77
|
-
s.line1 === "" &&
|
|
78
|
-
s.line2 === "" &&
|
|
79
|
-
s.postalCode === "" &&
|
|
80
|
-
s.state === "" ? (React.createElement("span", { className: "placeholder" }, "Please click here to enter the address")) : (React.createElement(React.Fragment, null,
|
|
21
|
+
const store = useIncorporationFormStore();
|
|
22
|
+
const context = useIncoprorationFormClientViewContext();
|
|
23
|
+
const incorporation = useIncorporationForm(props.formId);
|
|
24
|
+
return observe(() => {
|
|
25
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
26
|
+
return (React.createElement(React.Fragment, null,
|
|
27
|
+
React.createElement("div", { className: styles["member-info"] },
|
|
28
|
+
React.createElement("div", { className: classnames({ "member-info-mobile": layout.ui.mobile }) },
|
|
29
|
+
React.createElement("div", { className: "member-title" },
|
|
30
|
+
React.createElement("div", { className: "member-title-info" },
|
|
31
|
+
React.createElement("span", { className: "member-name" }, contacts === null || contacts === void 0 ? void 0 : contacts.name),
|
|
32
|
+
React.createElement("div", { className: "basic-info" },
|
|
33
|
+
React.createElement(Input, { disabled: !editable, bordered: editable, value: contacts === null || contacts === void 0 ? void 0 : contacts.email, placeholder: "Please enter the email", prefix: React.createElement(FontAwesomeIcon, { icon: faEnvelope }), onChange: (e) => (contacts.email = e.target.value) }),
|
|
34
|
+
React.createElement(Input, { disabled: !editable, bordered: editable, value: contacts === null || contacts === void 0 ? void 0 : contacts.phone, placeholder: "Please enter the phone", prefix: React.createElement(FontAwesomeIcon, { icon: faPhone }), onChange: (e) => (contacts.phone = e.target.value) }))),
|
|
35
|
+
(context ? context.editable : true) && (React.createElement("div", { className: "action-button" },
|
|
36
|
+
React.createElement("span", { className: "edit-icon", onClick: () => setEditable(!editable) },
|
|
37
|
+
React.createElement(FontAwesomeIcon, { icon: faPenToSquare })),
|
|
38
|
+
React.createElement("span", { className: "delete-icon", onClick: props.onDeleteClick },
|
|
39
|
+
React.createElement(FontAwesomeIcon, { icon: faTrashAlt }))))),
|
|
40
|
+
React.createElement("div", { className: "member-info-content" },
|
|
41
|
+
React.createElement("div", { className: "member-info-item" },
|
|
42
|
+
React.createElement("div", { className: "member-item-name" },
|
|
43
|
+
React.createElement(FontAwesomeIcon, { icon: faMapMarkerAlt }),
|
|
44
|
+
"Address:"),
|
|
45
|
+
editable ? (React.createElement(Form, { layout: "horizontal" },
|
|
46
|
+
React.createElement(Address, { value: contacts.address, onChange: (v) => (contacts.address = v) }))) : (React.createElement(React.Fragment, null,
|
|
81
47
|
React.createElement(Row, null,
|
|
82
|
-
React.createElement(Col, null,
|
|
48
|
+
React.createElement(Col, null, (_a = contacts === null || contacts === void 0 ? void 0 : contacts.address) === null || _a === void 0 ? void 0 : _a.line1)),
|
|
83
49
|
React.createElement(Row, null,
|
|
84
|
-
React.createElement(Col, null,
|
|
50
|
+
React.createElement(Col, null, (_b = contacts === null || contacts === void 0 ? void 0 : contacts.address) === null || _b === void 0 ? void 0 : _b.line2)),
|
|
85
51
|
React.createElement(Row, null,
|
|
86
|
-
React.createElement(Col, null, `${(
|
|
87
|
-
|
|
88
|
-
React.createElement(
|
|
89
|
-
React.createElement(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
p.store.value.country = v.country;
|
|
93
|
-
p.store.value.line1 = v.line1;
|
|
94
|
-
p.store.value.line2 = v.line2;
|
|
95
|
-
p.store.value.postalCode = v.postalCode;
|
|
96
|
-
p.store.value.state = v.state;
|
|
97
|
-
});
|
|
98
|
-
} })),
|
|
99
|
-
React.createElement(Row, null,
|
|
100
|
-
React.createElement(Button, { onClick: () => p.store.save({ trigger: "select" }) }, "Save"),
|
|
101
|
-
React.createElement(Button, { onClick: () => p.store.cancel(), style: { marginLeft: "1rem" } }, "Cancel"))))) })),
|
|
102
|
-
React.createElement("div", { className: "member-info-item" },
|
|
103
|
-
React.createElement("div", { className: "member-item-name" },
|
|
104
|
-
React.createElement(FontAwesomeIcon, { icon: faAddressCard }),
|
|
105
|
-
"Identify Info:"),
|
|
106
|
-
React.createElement(InlineEdit, { editTrigger: "both", defaultValue: member.identity, onSave: (v) => {
|
|
107
|
-
var _a;
|
|
108
|
-
runInAction(() => (member.identity = v));
|
|
109
|
-
(_a = props.onEditClick) === null || _a === void 0 ? void 0 : _a.call(props, member, props.memberIndex);
|
|
110
|
-
}, content: (p) => {
|
|
111
|
-
const s = p.store.value;
|
|
112
|
-
return (React.createElement(React.Fragment, null, (s === null || s === void 0 ? void 0 : s.country) === "" &&
|
|
113
|
-
(s === null || s === void 0 ? void 0 : s.number) === null &&
|
|
114
|
-
(s === null || s === void 0 ? void 0 : s.type) === "" &&
|
|
115
|
-
(s === null || s === void 0 ? void 0 : s.expiryDate) === undefined ? (React.createElement("span", { className: "placeholder" }, "Please click here to enter the identify info")) : (React.createElement(React.Fragment, null,
|
|
52
|
+
React.createElement(Col, null, `${((_c = contacts === null || contacts === void 0 ? void 0 : contacts.address) === null || _c === void 0 ? void 0 : _c.city) ? (_d = contacts.address) === null || _d === void 0 ? void 0 : _d.city : ""} ${(_e = contacts === null || contacts === void 0 ? void 0 : contacts.address) === null || _e === void 0 ? void 0 : _e.state} ${(_f = contacts === null || contacts === void 0 ? void 0 : contacts.address) === null || _f === void 0 ? void 0 : _f.country} ${(_g = contacts === null || contacts === void 0 ? void 0 : contacts.address) === null || _g === void 0 ? void 0 : _g.postalCode}`.trim()))))),
|
|
53
|
+
React.createElement("div", { className: "member-info-item" },
|
|
54
|
+
React.createElement("div", { className: "member-item-name" },
|
|
55
|
+
React.createElement(FontAwesomeIcon, { icon: faAddressCard }),
|
|
56
|
+
"Identify Info:"),
|
|
57
|
+
editable ? (React.createElement(IdentityChange, { value: contacts === null || contacts === void 0 ? void 0 : contacts.identity, onChange: (v) => (contacts.identity = v) })) : (React.createElement(React.Fragment, null,
|
|
116
58
|
React.createElement(Row, null,
|
|
117
|
-
React.createElement(Col, null,
|
|
59
|
+
React.createElement(Col, null, (_h = contacts === null || contacts === void 0 ? void 0 : contacts.identity) === null || _h === void 0 ? void 0 : _h.country)),
|
|
118
60
|
React.createElement(Row, null,
|
|
119
|
-
React.createElement(Col, null,
|
|
61
|
+
React.createElement(Col, null, (_j = contacts === null || contacts === void 0 ? void 0 : contacts.identity) === null || _j === void 0 ? void 0 : _j.type)),
|
|
120
62
|
React.createElement(Row, null,
|
|
121
|
-
React.createElement(Col, null,
|
|
63
|
+
React.createElement(Col, null, (_k = contacts === null || contacts === void 0 ? void 0 : contacts.identity) === null || _k === void 0 ? void 0 : _k.number)),
|
|
122
64
|
React.createElement(Row, null,
|
|
123
65
|
React.createElement(Col, null,
|
|
124
|
-
"Expiry:
|
|
125
|
-
(
|
|
126
|
-
|
|
127
|
-
React.createElement(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
});
|
|
134
|
-
} }),
|
|
135
|
-
React.createElement(Row, null,
|
|
136
|
-
React.createElement(Button, { onClick: () => p.store.save({ trigger: "select" }) }, "Save"),
|
|
137
|
-
React.createElement(Button, { onClick: () => p.store.cancel(), style: { marginLeft: "1rem" } }, "Cancel"))))) }))),
|
|
138
|
-
validates.hasError && (React.createElement(Alert, { message: React.createElement(React.Fragment, null, errorTip(validates.errors)), showIcon: true, type: "warning" }))),
|
|
139
|
-
props.memberLength > 1 && React.createElement(Divider, { className: "halvingline" }))))));
|
|
66
|
+
"Expiry:",
|
|
67
|
+
((_l = contacts === null || contacts === void 0 ? void 0 : contacts.identity) === null || _l === void 0 ? void 0 : _l.expiryDate) &&
|
|
68
|
+
moment(contacts.identity.expiryDate).format("YYYY-MM-DD"))))),
|
|
69
|
+
editable && (React.createElement(Row, { justify: "end" },
|
|
70
|
+
React.createElement(Button, { onClick: () => setEditable(false) }, "Cancel"),
|
|
71
|
+
React.createElement(Button, { type: "primary", style: { marginLeft: "1rem" }, onClick: onSave }, "Save"))))),
|
|
72
|
+
validates.hasError && (React.createElement(Alert, { message: React.createElement(React.Fragment, null, errorTip(validates.errors)), showIcon: true, type: "warning" }))),
|
|
73
|
+
props.memberLength > 1 && React.createElement(Divider, { className: "halvingline" }))));
|
|
74
|
+
});
|
|
140
75
|
function checkError(c) {
|
|
141
|
-
c.validate(() => { var _a; return ((_a =
|
|
76
|
+
c.validate(() => { var _a; return ((_a = contacts === null || contacts === void 0 ? void 0 : contacts.address) === null || _a === void 0 ? void 0 : _a.line1) && (contacts === null || contacts === void 0 ? void 0 : contacts.address.city) && contacts.address.country; }, "Please input address.");
|
|
142
77
|
// c.validate(() => unit.type !== "Organization" && unit.nationality, "Please input nationality.");
|
|
143
|
-
c.validate(() =>
|
|
144
|
-
c.validate(() =>
|
|
145
|
-
c.validate(() => { var _a, _b, _c; return ((_a =
|
|
78
|
+
c.validate(() => contacts === null || contacts === void 0 ? void 0 : contacts.email, "Please input email.");
|
|
79
|
+
c.validate(() => contacts === null || contacts === void 0 ? void 0 : contacts.phone, "Please input phone.");
|
|
80
|
+
c.validate(() => { var _a, _b, _c; return ((_a = contacts === null || contacts === void 0 ? void 0 : contacts.identity) === null || _a === void 0 ? void 0 : _a.number) && ((_b = contacts === null || contacts === void 0 ? void 0 : contacts.identity) === null || _b === void 0 ? void 0 : _b.type) && ((_c = contacts.identity) === null || _c === void 0 ? void 0 : _c.country); }, "Please input identity details.");
|
|
146
81
|
// if (isShareholder) {
|
|
147
|
-
// c.validate(() => props.
|
|
148
|
-
// c.validate(() => props.
|
|
82
|
+
// c.validate(() => props.contacts.shares! > 0, "Please input number of shares.");
|
|
83
|
+
// c.validate(() => props.contacts.capital! > 0, "Please input subscription amount (capital).");
|
|
149
84
|
// }
|
|
150
85
|
return c;
|
|
151
86
|
}
|
|
87
|
+
async function onSave() {
|
|
88
|
+
var _a, _b;
|
|
89
|
+
const officers = (_b = clone((_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.contacts)) !== null && _b !== void 0 ? _b : [];
|
|
90
|
+
const index = officers.findIndex((i) => i.id === memberId);
|
|
91
|
+
officers[index] = contacts;
|
|
92
|
+
await store.edit(formId, {
|
|
93
|
+
data: { contacts: officers },
|
|
94
|
+
error: "message",
|
|
95
|
+
});
|
|
96
|
+
setEditable(false);
|
|
97
|
+
}
|
|
152
98
|
function errorTip(errors) {
|
|
153
99
|
return (React.createElement("div", null, errors.map((item, index) => {
|
|
154
100
|
return (React.createElement("span", { key: index, style: { marginRight: "10px" } }, item));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/self-registration/incorporation-form/components/MemberInfo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/self-registration/incorporation-form/components/MemberInfo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAW,GAAG,EAAE,KAAK,EAAS,MAAM,cAAc,CAAC;AAC7F,OAAO,EAAc,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAwB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EACN,aAAa,EACb,UAAU,EACV,cAAc,EACd,OAAO,EACP,UAAU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
|
+
cursor: auto;
|
|
28
|
+
padding: 4px 0;
|
|
29
|
+
.ant-input[disabled]{
|
|
30
|
+
cursor: auto;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
22
33
|
.basic-val {
|
|
23
34
|
font-size: 14px;
|
|
24
35
|
font-weight: 400;
|
|
@@ -36,11 +47,17 @@
|
|
|
36
47
|
|
|
37
48
|
> span {
|
|
38
49
|
margin-left: 6px;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
}
|
|
52
|
+
.delete-icon{
|
|
39
53
|
color: lightgray;
|
|
40
|
-
|
|
41
54
|
&:hover {
|
|
42
55
|
color: @delete-color;
|
|
43
|
-
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
.edit-icon{
|
|
59
|
+
&:hover {
|
|
60
|
+
color: @primary-color;
|
|
44
61
|
}
|
|
45
62
|
}
|
|
46
63
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React, { useState, useEffect } from "react";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import { Modal, Form, Select, message } from "@voplus/antd";
|
|
4
|
+
import { clone } from "lodash-es";
|
|
5
|
+
import { useIncorporationForm, useIncorporationFormStore, } from "../../../../../data/incorporation-form";
|
|
6
|
+
import NewLegalContactDialog from "../../../../corporate/company/identity/components/NewLegalContactDialog";
|
|
7
|
+
import { v4 as uuid } from "uuid";
|
|
8
|
+
const NewDirectorDialog = (props) => {
|
|
9
|
+
const { id, visible, onCancel } = props;
|
|
10
|
+
const [showDialog, setShowDialog] = useState(false);
|
|
11
|
+
const [contactId, setContactId] = useState();
|
|
12
|
+
const store = useIncorporationFormStore();
|
|
13
|
+
const incorporation = useIncorporationForm(id);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
var _a;
|
|
16
|
+
setShowDialog(((_a = incorporation.content.contacts) === null || _a === void 0 ? void 0 : _a.length) ? false : true);
|
|
17
|
+
}, [incorporation.content.contacts]);
|
|
18
|
+
return observe(() => {
|
|
19
|
+
var _a;
|
|
20
|
+
return (React.createElement(Modal, { width: 500, title: "New Director", okText: "Add", onOk: onAdd, onCancel: onCancel, visible: visible },
|
|
21
|
+
React.createElement(Form, { labelCol: { span: 4 }, labelAlign: "left" },
|
|
22
|
+
React.createElement(Form.Item, { label: "Contact" },
|
|
23
|
+
React.createElement(Select, { showSearch: true, placeholder: "Select a contact", optionFilterProp: "children", value: contactId, onChange: onChange, filterOption: (input, option) => (option === null || option === void 0 ? void 0 : option.children.toLowerCase().indexOf(input.toLowerCase())) >= 0 },
|
|
24
|
+
React.createElement(Select.Option, { value: "new" }, "New Contact"), (_a = incorporation.content.contacts) === null || _a === void 0 ? void 0 :
|
|
25
|
+
_a.map((item) => {
|
|
26
|
+
var _a;
|
|
27
|
+
return (React.createElement(Select.Option, { key: item.id, value: item.id, disabled: (_a = incorporation.content.officerIds) === null || _a === void 0 ? void 0 : _a.includes(item.id) }, item.name));
|
|
28
|
+
})))),
|
|
29
|
+
showDialog && React.createElement(NewLegalContactDialog, { visible: true, type: "Person", updateVisible: onSave })));
|
|
30
|
+
});
|
|
31
|
+
function onChange(value) {
|
|
32
|
+
if (value.includes("new")) {
|
|
33
|
+
setShowDialog(true);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
setContactId(value);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function onAdd() {
|
|
40
|
+
var _a;
|
|
41
|
+
if (!contactId) {
|
|
42
|
+
return message.warn("Please select contacts!");
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
store.edit(id, {
|
|
46
|
+
data: {
|
|
47
|
+
officerIds: incorporation.content.officerIds
|
|
48
|
+
? [...incorporation.content.officerIds, contactId]
|
|
49
|
+
: [contactId],
|
|
50
|
+
},
|
|
51
|
+
error: "message",
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return (_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
55
|
+
}
|
|
56
|
+
/** 新增director Item */
|
|
57
|
+
async function onSave(info) {
|
|
58
|
+
/** SelectLegalContactDialog 选择/新增有identity信息的unit */
|
|
59
|
+
if (info) {
|
|
60
|
+
const data = clone(incorporation.content.contacts);
|
|
61
|
+
const officer = {
|
|
62
|
+
id: uuid(),
|
|
63
|
+
name: info.FullName,
|
|
64
|
+
email: info.Email,
|
|
65
|
+
phone: info.Phone,
|
|
66
|
+
address: info.Address,
|
|
67
|
+
identity: {
|
|
68
|
+
number: info.Number,
|
|
69
|
+
country: info.Country,
|
|
70
|
+
expiryDate: info.ExpiryDate,
|
|
71
|
+
type: info.Type,
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
const officers = data ? [...data, officer] : [officer];
|
|
75
|
+
await store.edit(id, {
|
|
76
|
+
data: { contacts: officers },
|
|
77
|
+
error: "message",
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
setShowDialog(false);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
export default NewDirectorDialog;
|
|
84
|
+
//# sourceMappingURL=index.js.map
|
package/es/modules/self-registration/incorporation-form/components/NewDirectorDialog/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/self-registration/incorporation-form/components/NewDirectorDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAe,OAAO,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EACN,oBAAoB,EACpB,yBAAyB,GACzB,MAAM,wCAAwC,CAAC;AAChD,OAAO,qBAAqB,MAAM,yEAAyE,CAAC;AAC5G,OAAO,EAAE,EAAE,IAAI,IAA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