@voplus/morpho-csp 4.0.20 → 4.0.21
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/modules/self-registration/clda-form/incorporation/{components → appoint-representative/components}/NewOfficerDetailItem/index.d.ts +1 -1
- package/es/modules/self-registration/clda-form/incorporation/{components → appoint-representative/components}/NewOfficerDetailItem/index.js +1 -1
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailItem/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/{components → appoint-representative/components}/NewOfficerDetailItem/state.d.ts +1 -1
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailItem/state.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/{components → appoint-representative/components}/NewOfficerDetailList/index.d.ts +1 -1
- package/es/modules/self-registration/clda-form/incorporation/{components → appoint-representative/components}/NewOfficerDetailList/index.js +2 -2
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailList/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/index.js +1 -1
- 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/components/AddTransferDialog/index.js +1 -7
- 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 +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.js +11 -47
- 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/AllotmentItem/index.less +5 -81
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.d.ts +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.js +1 -1
- 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/NewOfficerDetailList/index.d.ts +8 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/NewOfficerDetailList/index.js +36 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/NewOfficerDetailList/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/{CompanyGeneralOfficerInfo → OfficerDetailItem}/index.d.ts +2 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.js +93 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.less +55 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/RemoveOfficerDetailList/index.d.ts +8 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/RemoveOfficerDetailList/index.js +36 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/RemoveOfficerDetailList/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.d.ts +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.js +9 -43
- 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/TransferItem/index.less +0 -69
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.d.ts +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.js +1 -1
- 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 +17 -66
- package/es/modules/self-registration/clda-form/incorporation/company-general/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/components/FormContactEditor/index.d.ts +21 -0
- package/es/modules/self-registration/clda-form/incorporation/components/FormContactEditor/index.js +123 -0
- package/es/modules/self-registration/clda-form/incorporation/components/FormContactEditor/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/components/FormContactEditor/index.less +100 -0
- package/package.json +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CompanyGeneralOfficerInfo/index.js +0 -125
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CompanyGeneralOfficerInfo/index.js.map +0 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CompanyGeneralOfficerInfo/index.less +0 -131
- package/es/modules/self-registration/clda-form/incorporation/components/NewOfficerDetailItem/index.js.map +0 -1
- package/es/modules/self-registration/clda-form/incorporation/components/NewOfficerDetailItem/state.js.map +0 -1
- package/es/modules/self-registration/clda-form/incorporation/components/NewOfficerDetailList/index.js.map +0 -1
- /package/es/modules/self-registration/clda-form/incorporation/{components → appoint-representative/components}/NewOfficerDetailItem/state.js +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Button, Divider, Form, Row, Select } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { faTrashAlt, faPenToSquare } from "@fortawesome/pro-light-svg-icons";
|
|
5
|
+
import { clone } from "lodash-es";
|
|
6
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
7
|
+
import { useCLDAForm, useCLDAFormStore, } from "../../../../../../../data/clda-form";
|
|
8
|
+
import { changeName } from "../../../../../../../data/clda-form/conversion";
|
|
9
|
+
import { useIncorporationFormContext } from "../../../context";
|
|
10
|
+
import FormContactEditor from "../../../components/FormContactEditor";
|
|
11
|
+
import styles from "./index.less";
|
|
12
|
+
const CompanyGeneralOfficerInfo = (props) => {
|
|
13
|
+
const { formId, officer, contacts, isOnlyInternalUse } = props;
|
|
14
|
+
const [editable, setEditable] = useState(false);
|
|
15
|
+
const store = useCLDAFormStore();
|
|
16
|
+
const context = useIncorporationFormContext();
|
|
17
|
+
const incorporation = useCLDAForm(props.formId);
|
|
18
|
+
// 用于保存修改之后的contact数据
|
|
19
|
+
let contactDate;
|
|
20
|
+
return observe(() => (React.createElement(React.Fragment, null,
|
|
21
|
+
React.createElement("div", { className: styles["company-general-officer-info"] },
|
|
22
|
+
React.createElement("div", { className: "company-general-officer-header" },
|
|
23
|
+
React.createElement("div", { className: "officer-name" }, contacts === null || contacts === void 0 ? void 0 : contacts.name),
|
|
24
|
+
(context ? context.editable : true) && (React.createElement("div", { className: "action-button" },
|
|
25
|
+
contacts.idType === "NewId" && (React.createElement("span", { className: "edit-icon", onClick: () => setEditable(!editable) },
|
|
26
|
+
React.createElement(FontAwesomeIcon, { icon: faPenToSquare }))),
|
|
27
|
+
React.createElement("span", { className: "delete-icon", onClick: props.onDeleteClick },
|
|
28
|
+
React.createElement(FontAwesomeIcon, { icon: faTrashAlt }))))),
|
|
29
|
+
React.createElement(Form, { layout: "horizontal", className: "new-officer-position" },
|
|
30
|
+
React.createElement(Form.Item, { label: "Position" },
|
|
31
|
+
React.createElement(Select, { mode: "tags", style: { width: "100%" }, placeholder: "Tags Mode", defaultValue: officer.positions, onChange: (value) => onChangePosition(value), options: [
|
|
32
|
+
{
|
|
33
|
+
value: "Director",
|
|
34
|
+
label: "Director",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
value: "Secretary",
|
|
38
|
+
label: "Secretary",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
value: "Auditor",
|
|
42
|
+
label: "Auditor",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
value: "Chief Executive Officer",
|
|
46
|
+
label: "Chief Executive Officer",
|
|
47
|
+
},
|
|
48
|
+
] }))),
|
|
49
|
+
contacts.idType === "NewId" && (React.createElement(FormContactEditor, { header: false, editable: editable, contact: contacts, isOnlyInternalUse: isOnlyInternalUse, onChange: (c) => (contactDate = c) })),
|
|
50
|
+
editable && (React.createElement(Row, { justify: "end" },
|
|
51
|
+
React.createElement(Button, { onClick: () => {
|
|
52
|
+
var _a;
|
|
53
|
+
setEditable(false);
|
|
54
|
+
(_a = props.onReload) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
55
|
+
} }, "Cancel"),
|
|
56
|
+
React.createElement(Button, { type: "primary", style: { marginLeft: "1rem" }, onClick: onSave }, "Save"))),
|
|
57
|
+
props.officerLength > 1 && React.createElement(Divider, { className: "halvingline" })))));
|
|
58
|
+
async function onChangePosition(position) {
|
|
59
|
+
var _a, _b, _c, _d, _e, _f;
|
|
60
|
+
officer.positions = position;
|
|
61
|
+
if (props.editOption === "NewOfficerAppointments") {
|
|
62
|
+
const officers = (_c = clone((_b = (_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.newOfficerAppointments) === null || _b === void 0 ? void 0 : _b.officers)) !== null && _c !== void 0 ? _c : [];
|
|
63
|
+
const number = officers.findIndex((i) => i.officerId === props.officer.officerId);
|
|
64
|
+
officers[number] = officer;
|
|
65
|
+
await store.edit(formId, {
|
|
66
|
+
data: { NewOfficerAppointments: { Officers: changeName(officers) } },
|
|
67
|
+
error: "message",
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (props.editOption === "RemoveOfficerDetails") {
|
|
71
|
+
const removeOfficers = (_f = clone((_e = (_d = incorporation.content) === null || _d === void 0 ? void 0 : _d.removeOfficerDetails) === null || _e === void 0 ? void 0 : _e.officers)) !== null && _f !== void 0 ? _f : [];
|
|
72
|
+
const number = removeOfficers.findIndex((i) => i.officerId === props.officer.officerId);
|
|
73
|
+
removeOfficers[number] = officer;
|
|
74
|
+
await store.edit(formId, {
|
|
75
|
+
data: { RemoveOfficerDetails: { Officers: changeName(removeOfficers) } },
|
|
76
|
+
error: "message",
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
async function onSave() {
|
|
81
|
+
var _a, _b;
|
|
82
|
+
const officerContacts = (_b = clone((_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.contacts)) !== null && _b !== void 0 ? _b : [];
|
|
83
|
+
const number = officerContacts.findIndex((i) => i.id === props.officer.officerId);
|
|
84
|
+
officerContacts[number] = contactDate;
|
|
85
|
+
await store.edit(formId, {
|
|
86
|
+
data: { Contacts: changeName(officerContacts) },
|
|
87
|
+
error: "message",
|
|
88
|
+
});
|
|
89
|
+
setEditable(false);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
export default CompanyGeneralOfficerInfo;
|
|
93
|
+
//# 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/OfficerDetailItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAGN,WAAW,EACX,gBAAgB,GAChB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AACtE,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,yBAAyB,GAAG,CAAC,KAUlC,EAAE,EAAE;IACJ,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAC;IAE/D,MAAM,CAAC,QAAQ,EAAE,WAAW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MAAM,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAClF,eAAe,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC;QAEtC,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE;YACxB,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,eAAe,CAAC,EAAE;YAC/C,KAAK,EAAE,SAAS;SAChB,CAAC,CAAC;QAEH,WAAW,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
+
|
|
3
|
+
.company-general-officer-info {
|
|
4
|
+
:global {
|
|
5
|
+
.company-general-officer-header {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
|
|
10
|
+
.officer-name {
|
|
11
|
+
color: rgba(0, 0, 0, 0.85);
|
|
12
|
+
font-weight: bold;
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.action-button {
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
|
|
19
|
+
> span {
|
|
20
|
+
margin-left: 6px;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.delete-icon {
|
|
25
|
+
&:hover {
|
|
26
|
+
color: @delete-color;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.edit-icon {
|
|
31
|
+
&:hover {
|
|
32
|
+
color: @primary-color;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.new-officer-position {
|
|
39
|
+
padding-top: 25px;
|
|
40
|
+
padding-right: 3em;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.placeholder {
|
|
44
|
+
color: #00000040;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.halvingline {
|
|
48
|
+
margin-bottom: 40px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ant-alert-warning {
|
|
52
|
+
margin-top: 10px;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import { Modal } from "antd";
|
|
4
|
+
import { changeName } from "../../../../../../../data/clda-form/conversion";
|
|
5
|
+
import { clone } from "lodash-es";
|
|
6
|
+
import { useCLDAForm, useCLDAFormStore } from "../../../../../../../data/clda-form";
|
|
7
|
+
import OfficerDetailItem from "../OfficerDetailItem";
|
|
8
|
+
const RemoveOfficerDetailList = (props) => {
|
|
9
|
+
const store = useCLDAFormStore();
|
|
10
|
+
const incorporation = useCLDAForm(props.id, { reload: true });
|
|
11
|
+
return observe(() => {
|
|
12
|
+
var _a, _b, _c;
|
|
13
|
+
return (React.createElement("div", null, ((_b = (_a = incorporation.content.removeOfficerDetails) === null || _a === void 0 ? void 0 : _a.officers) === null || _b === void 0 ? void 0 : _b.length)
|
|
14
|
+
? (_c = incorporation.content.removeOfficerDetails) === null || _c === void 0 ? void 0 : _c.officers.map((r, i) => {
|
|
15
|
+
var _a, _b, _c;
|
|
16
|
+
return (React.createElement(OfficerDetailItem, { key: r.officerId, formId: props.id, editOption: "RemoveOfficerDetails", officer: r, isOnlyInternalUse: props.isOnlyInternalUse, contacts: (_a = incorporation.content.contacts) === null || _a === void 0 ? void 0 : _a.filter((c) => c.id === r.officerId)[0], officerLength: (_c = (_b = incorporation.content.removeOfficerDetails) === null || _b === void 0 ? void 0 : _b.officers) === null || _c === void 0 ? void 0 : _c.length, onReload: props.onReload, onDeleteClick: () => deleteRemoveOfficer(i) }));
|
|
17
|
+
})
|
|
18
|
+
: null));
|
|
19
|
+
});
|
|
20
|
+
function deleteRemoveOfficer(index) {
|
|
21
|
+
return Modal.confirm({
|
|
22
|
+
title: "Do you want to delete this item?",
|
|
23
|
+
async onOk() {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
const removeOfficers = clone((_b = (_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.removeOfficerDetails) === null || _b === void 0 ? void 0 : _b.officers);
|
|
26
|
+
removeOfficers.splice(index, 1);
|
|
27
|
+
await store.edit(props.id, {
|
|
28
|
+
data: { RemoveOfficerDetails: { Officers: changeName(removeOfficers) } },
|
|
29
|
+
error: "message",
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export default RemoveOfficerDetailList;
|
|
36
|
+
//# 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/RemoveOfficerDetailList/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,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAErD,MAAM,uBAAuB,GAAG,CAAC,KAKhC,EAAE,EAAE;IACJ,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IACjC,MAAM,aAAa,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CA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K,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE;oBAC1B,IAAI,EAAE,EAAE,oBAAoB,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,cAAc,CAAC,EAAE,EAAE;oBACxE,KAAK,EAAE,SAAS;iBAChB,CAAC,CAAC;YACJ,CAAC;SACD,CAAC,CAAC;IACJ,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -4,6 +4,7 @@ declare const TransferItem: (props: {
|
|
|
4
4
|
transfer: ITransfer;
|
|
5
5
|
contact: IFormPeopleOptions;
|
|
6
6
|
contacts: IFormPeopleOptions[];
|
|
7
|
+
isOnlyInternalUse?: boolean | undefined;
|
|
7
8
|
transferLength?: number | undefined;
|
|
8
9
|
onReload?: (() => void) | undefined;
|
|
9
10
|
onSave?: ((transfer: ITransfer, contact?: IFormPeopleOptions) => void) | undefined;
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { Button,
|
|
3
|
-
import { UserOutlined } from "@ant-design/icons";
|
|
2
|
+
import { Button, Divider, Row, Select, InputNumber } from "antd";
|
|
4
3
|
import { observe } from "@voplus/morpho-ui";
|
|
5
|
-
import {
|
|
4
|
+
import { faTrashAlt, faPenToSquare } from "@fortawesome/pro-light-svg-icons";
|
|
6
5
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
7
6
|
import { ColumnItem, ColumnItemCol } from "@voplus/morpho-ui/es/controls/ColumnItem";
|
|
8
7
|
import { useIncorporationFormContext } from "../../../context";
|
|
9
|
-
import
|
|
10
|
-
import Address from "@voplus/morpho-org/es/components/Address";
|
|
11
|
-
import moment from "moment";
|
|
8
|
+
import FormContactEditor from "../../../components/FormContactEditor";
|
|
12
9
|
import styles from "./index.less";
|
|
13
10
|
const TransferItem = (props) => {
|
|
14
|
-
const { transfer, contact, contacts } = props;
|
|
11
|
+
const { transfer, contact, contacts, isOnlyInternalUse } = props;
|
|
15
12
|
const [editable, setEditable] = useState(false);
|
|
16
13
|
const context = useIncorporationFormContext();
|
|
17
14
|
const transferor = contacts === null || contacts === void 0 ? void 0 : contacts.filter((c) => c.id === transfer.transforId)[0];
|
|
18
15
|
const existingContacts = contacts === null || contacts === void 0 ? void 0 : contacts.filter((c) => c.idType === "ExistingContactId");
|
|
16
|
+
// 用于保存修改之后的contact数据
|
|
17
|
+
let contactDate;
|
|
19
18
|
return observe(() => {
|
|
20
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
21
19
|
return (React.createElement(React.Fragment, null,
|
|
22
20
|
React.createElement("div", { className: styles["company-general-transfer-info"] },
|
|
23
21
|
React.createElement("div", { className: "company-general-transfer-header" },
|
|
@@ -43,40 +41,8 @@ const TransferItem = (props) => {
|
|
|
43
41
|
React.createElement(ColumnItemCol, { span: 4, title: "Shares" }, editable ? (React.createElement(InputNumber, { placeholder: "please input Share", value: transfer.shares, style: { width: "100%" }, onChange: (value) => (transfer.shares = value) })) : (React.createElement("span", null, transfer.shares))),
|
|
44
42
|
React.createElement(ColumnItemCol, { span: 4, title: "Considersion" }, editable ? (React.createElement(InputNumber, { placeholder: "please input Considersion", style: { width: "100%" }, value: transfer.consideration, onChange: (value) => (transfer.consideration = value) })) : (React.createElement("span", null, transfer.consideration))))),
|
|
45
43
|
React.createElement("div", { className: "company-general-transfer-title" }, "Transferee"),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
React.createElement("div", { className: "basic-info" },
|
|
49
|
-
React.createElement(Input, { disabled: !editable, bordered: editable, value: contact === null || contact === void 0 ? void 0 : contact.email, placeholder: "Please enter the email", prefix: React.createElement(FontAwesomeIcon, { icon: faEnvelope }), onChange: (e) => (contact.email = e.target.value) }),
|
|
50
|
-
React.createElement(Input, { disabled: !editable, bordered: editable, value: contact === null || contact === void 0 ? void 0 : contact.phone, placeholder: "Please enter the phone", prefix: React.createElement(FontAwesomeIcon, { icon: faPhone }), onChange: (e) => (contact.phone = e.target.value) })),
|
|
51
|
-
React.createElement("div", { className: "company-general-transfer-info-content" },
|
|
52
|
-
React.createElement("div", { className: "company-general-transfer-info-item" },
|
|
53
|
-
React.createElement("div", { className: "company-general-transfer-item-name" },
|
|
54
|
-
React.createElement(FontAwesomeIcon, { icon: faMapMarkerAlt }),
|
|
55
|
-
"Address:"),
|
|
56
|
-
editable ? (React.createElement(Form, { layout: "horizontal" },
|
|
57
|
-
React.createElement(Address, { value: contact.address, required: ["line1", "city", "postalCode", "country"], onChange: (v) => (contact.address = v) }))) : (React.createElement(React.Fragment, null,
|
|
58
|
-
React.createElement(Row, null,
|
|
59
|
-
React.createElement(Col, null, (_a = contact === null || contact === void 0 ? void 0 : contact.address) === null || _a === void 0 ? void 0 : _a.line1)),
|
|
60
|
-
React.createElement(Row, null,
|
|
61
|
-
React.createElement(Col, null, (_b = contact === null || contact === void 0 ? void 0 : contact.address) === null || _b === void 0 ? void 0 : _b.line2)),
|
|
62
|
-
React.createElement(Row, null,
|
|
63
|
-
React.createElement(Col, null, `${((_c = contact === null || contact === void 0 ? void 0 : contact.address) === null || _c === void 0 ? void 0 : _c.city) ? (_d = contact.address) === null || _d === void 0 ? void 0 : _d.city : ""} ${(_e = contact === null || contact === void 0 ? void 0 : contact.address) === null || _e === void 0 ? void 0 : _e.state} ${(_f = contact === null || contact === void 0 ? void 0 : contact.address) === null || _f === void 0 ? void 0 : _f.country} ${(_g = contact === null || contact === void 0 ? void 0 : contact.address) === null || _g === void 0 ? void 0 : _g.postalCode}`.trim()))))),
|
|
64
|
-
React.createElement("div", { className: "company-general-transfer-info-item" },
|
|
65
|
-
React.createElement("div", { className: "company-general-transfer-item-name" },
|
|
66
|
-
React.createElement(FontAwesomeIcon, { icon: faAddressCard }),
|
|
67
|
-
"Identify Info:"),
|
|
68
|
-
editable ? (React.createElement(IdentityChange, { value: contact === null || contact === void 0 ? void 0 : contact.identity, onChange: (v) => (contact.identity = v) })) : (React.createElement(React.Fragment, null,
|
|
69
|
-
React.createElement(Row, null,
|
|
70
|
-
React.createElement(Col, null, (_h = contact === null || contact === void 0 ? void 0 : contact.identity) === null || _h === void 0 ? void 0 : _h.country)),
|
|
71
|
-
React.createElement(Row, null,
|
|
72
|
-
React.createElement(Col, null, (_j = contact === null || contact === void 0 ? void 0 : contact.identity) === null || _j === void 0 ? void 0 : _j.type)),
|
|
73
|
-
React.createElement(Row, null,
|
|
74
|
-
React.createElement(Col, null, (_k = contact === null || contact === void 0 ? void 0 : contact.identity) === null || _k === void 0 ? void 0 : _k.number)),
|
|
75
|
-
React.createElement(Row, null,
|
|
76
|
-
React.createElement(Col, null,
|
|
77
|
-
"Expiry:",
|
|
78
|
-
((_l = contact === null || contact === void 0 ? void 0 : contact.identity) === null || _l === void 0 ? void 0 : _l.expiryDate) &&
|
|
79
|
-
moment(contact.identity.expiryDate).format("YYYY-MM-DD"))))))))) : (React.createElement("div", { className: "company-general-transferee" }, editable ? (React.createElement(Select, { showSearch: true, style: { width: "100%", marginBottom: "20px" }, defaultValue: contact === null || contact === void 0 ? void 0 : contact.name, placeholder: "Select a contact", optionFilterProp: "children", onChange: (transferee) => (transfer.transfeeId = transferee), filterOption: (input, option) => (option === null || option === void 0 ? void 0 : option.children.toLowerCase().indexOf(input.toLowerCase())) >= 0 }, contacts === null || contacts === void 0 ? void 0 : contacts.map((item) => (React.createElement(Select.Option, { key: item.id, value: item.id }, item.name))))) : (React.createElement("span", { className: "company-general-transferee-name" }, contact === null || contact === void 0 ? void 0 : contact.name)))),
|
|
44
|
+
React.createElement("div", { className: "company-general-transferee" }, editable ? (React.createElement(Select, { showSearch: true, style: { width: "100%", marginBottom: "20px" }, defaultValue: contact === null || contact === void 0 ? void 0 : contact.name, placeholder: "Select a contact", optionFilterProp: "children", onChange: (transferee) => (transfer.transfeeId = transferee), filterOption: (input, option) => (option === null || option === void 0 ? void 0 : option.children.toLowerCase().indexOf(input.toLowerCase())) >= 0 }, contacts === null || contacts === void 0 ? void 0 : contacts.map((item) => (React.createElement(Select.Option, { key: item.id, value: item.id }, item.name))))) : (React.createElement("span", { className: "company-general-transferee-name" }, contact === null || contact === void 0 ? void 0 : contact.name))),
|
|
45
|
+
contact.idType === "NewId" && (React.createElement(FormContactEditor, { header: false, editable: editable, contact: contact, isOnlyInternalUse: isOnlyInternalUse, onChange: (c) => (contactDate = c) })),
|
|
80
46
|
editable && (React.createElement(Row, { justify: "end" },
|
|
81
47
|
React.createElement(Button, { onClick: () => {
|
|
82
48
|
var _a;
|
|
@@ -89,7 +55,7 @@ const TransferItem = (props) => {
|
|
|
89
55
|
async function onSave() {
|
|
90
56
|
var _a;
|
|
91
57
|
setEditable(false);
|
|
92
|
-
(_a = props.onSave) === null || _a === void 0 ? void 0 : _a.call(props, transfer,
|
|
58
|
+
(_a = props.onSave) === null || _a === void 0 ? void 0 : _a.call(props, transfer, contactDate);
|
|
93
59
|
}
|
|
94
60
|
};
|
|
95
61
|
export default TransferItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/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,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;
|
|
77
|
-
border-radius: 8px;
|
|
78
|
-
margin-right: 3em;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.ant-input-affix-wrapper-disabled {
|
|
82
|
-
color: rgba(0, 0, 0, 0.85);
|
|
83
|
-
cursor: auto;
|
|
84
|
-
padding: 4px 0;
|
|
85
|
-
|
|
86
|
-
.ant-input[disabled] {
|
|
87
|
-
color: rgba(0, 0, 0, 0.85);
|
|
88
|
-
cursor: auto;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.basic-val {
|
|
93
|
-
font-size: 14px;
|
|
94
|
-
font-weight: 400;
|
|
95
|
-
color: rgba(0, 0, 0, 0.45);
|
|
96
|
-
margin-right: 15px;
|
|
97
|
-
|
|
98
|
-
.svg-inline--fa {
|
|
99
|
-
margin-right: 5px;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.company-general-transfer-info-content {
|
|
105
|
-
display: flex;
|
|
106
|
-
flex-direction: column;
|
|
107
|
-
|
|
108
|
-
>div:nth-child(2) {
|
|
109
|
-
margin-bottom: 10px;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.company-general-transfer-info-item {
|
|
113
|
-
flex: 1;
|
|
114
|
-
position: relative;
|
|
115
|
-
padding-right: 3em;
|
|
116
|
-
|
|
117
|
-
.buttons {
|
|
118
|
-
position: absolute;
|
|
119
|
-
right: 30px;
|
|
120
|
-
top: 0;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.company-general-transfer-item-name {
|
|
124
|
-
padding-bottom: 16px;
|
|
125
|
-
font-size: 16px;
|
|
126
|
-
font-weight: bold;
|
|
127
|
-
|
|
128
|
-
svg {
|
|
129
|
-
margin-right: 5px;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.morpho-inline-edit {
|
|
134
|
-
width: 80%;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
70
|
.ant-alert-warning {
|
|
140
71
|
margin-top: 10px;
|
|
141
72
|
}
|
|
@@ -13,7 +13,7 @@ const TransferList = (props) => {
|
|
|
13
13
|
return (React.createElement("div", null, ((_b = (_a = incorporation.content.transferDetails) === null || _a === void 0 ? void 0 : _a.transfers) === null || _b === void 0 ? void 0 : _b.length)
|
|
14
14
|
? (_c = incorporation.content.transferDetails) === null || _c === void 0 ? void 0 : _c.transfers.map((t, i) => {
|
|
15
15
|
var _a, _b, _c;
|
|
16
|
-
return (React.createElement(TransferItem, { key: t.key, transfer: t, contact: (_a = incorporation.content.contacts) === null || _a === void 0 ? void 0 : _a.filter((c) => c.id === t.transfeeId)[0], contacts: incorporation.content.contacts, transferLength: (_c = (_b = incorporation.content.transferDetails) === null || _b === void 0 ? void 0 : _b.transfers) === null || _c === void 0 ? void 0 : _c.length, onReload: props.onReload, onSave: onSave, onDeleteClick: () => deleteTransfer(i) }));
|
|
16
|
+
return (React.createElement(TransferItem, { key: t.key, transfer: t, isOnlyInternalUse: props.isOnlyInternalUse, contact: (_a = incorporation.content.contacts) === null || _a === void 0 ? void 0 : _a.filter((c) => c.id === t.transfeeId)[0], contacts: incorporation.content.contacts, transferLength: (_c = (_b = incorporation.content.transferDetails) === null || _b === void 0 ? void 0 : _b.transfers) === null || _c === void 0 ? void 0 : _c.length, onReload: props.onReload, onSave: onSave, onDeleteClick: () => deleteTransfer(i) }));
|
|
17
17
|
})
|
|
18
18
|
: null));
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/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,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EACN,WAAW,EACX,gBAAgB,GAGhB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,MAAM,YAAY,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/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,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EACN,WAAW,EACX,gBAAgB,GAGhB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,MAAM,YAAY,GAAG,CAAC,KAKrB,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,OAAO,OAAO,CAAC,GAAG,EAAE;;QACnB,OAAO,CACN,iCACE,CAAA,MAAA,MAAA,aAAa,CAAC,OAAO,CAAC,eAAe,0CAAE,SAAS,0CAAE,MAAM;YACxD,CAAC,CAAC,MAAA,aAAa,CAAC,OAAO,CAAC,eAAe,0CAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;;gBAAC,OAAA,CAC/D,oBAAC,YAAY,IACZ,GAAG,EAAE,CAAC,CAAC,GAAG,EACV,QAAQ,EAAE,CAAC,EACX,iBAAiB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|
3
3
|
import { useCLDAForm, useCLDAFormStore } from "../../../../../data/clda-form";
|
|
4
4
|
import { IncorporationFormContext, State } from "../context";
|
|
5
5
|
import { ValidationCollections, ValidationCollectionsContext } from "@voplus/morpho-data";
|
|
6
6
|
import { observe, InlineEdit } from "@voplus/morpho-ui";
|
|
7
7
|
import { changeName } from "../../../../../data/clda-form/conversion";
|
|
8
|
-
import { clone } from "lodash-es";
|
|
9
8
|
import DateInputEditor from "@voplus/morpho-ui/es/controls/InlineEdit/editors/DateInputEditor";
|
|
10
9
|
import CorporateSelect from "../../../../corporate/components/CorporateSelect";
|
|
11
10
|
import AddRemoveOfficerDialog from "./components/AddRemoveOfficerDialog";
|
|
@@ -13,10 +12,11 @@ import AddOfficerDialog from "./components/AddOfficerDialog";
|
|
|
13
12
|
import AddTransferDialog from "./components/AddTransferDialog";
|
|
14
13
|
import AddAllotmentDialog from "./components/AddAllotmentDialog";
|
|
15
14
|
import AddDivideDialog from "./components/AddDivideDialog";
|
|
16
|
-
import
|
|
15
|
+
import RemoveOfficerDetailList from "./components/RemoveOfficerDetailList";
|
|
17
16
|
import DivideColumnList from "./components/DivideColumnList";
|
|
18
17
|
import TransferList from "./components/TransferList";
|
|
19
18
|
import AllotmentList from "./components/AllotmentList";
|
|
19
|
+
import NewOfficerDetailList from "./components/NewOfficerDetailList";
|
|
20
20
|
import Section from "../../../controls/Section";
|
|
21
21
|
import classnames from "classnames";
|
|
22
22
|
import dayjs from "dayjs";
|
|
@@ -25,9 +25,7 @@ const CompanyGeneralForm = (props) => {
|
|
|
25
25
|
const [state] = useState(new State());
|
|
26
26
|
const [validations] = useState(new ValidationCollections());
|
|
27
27
|
const [consolidateDivide, setConsolidateDivide] = useState("Consolidate");
|
|
28
|
-
const [
|
|
29
|
-
const [loadedAllotment, setLoadedAllotment] = useState(true);
|
|
30
|
-
const [loadedDivide, setLoadedDivide] = useState(true);
|
|
28
|
+
const [loaded, setLoaded] = useState(true);
|
|
31
29
|
const [addOfficerVisible, setAddOfficerVisible] = useState(false);
|
|
32
30
|
const [addRemoveOfficerVisible, setAddRemoveOfficerVisible] = useState(false);
|
|
33
31
|
const [addTransferVisible, setAddTransferVisible] = useState(false);
|
|
@@ -64,7 +62,7 @@ const CompanyGeneralForm = (props) => {
|
|
|
64
62
|
},
|
|
65
63
|
];
|
|
66
64
|
const content = observe(() => {
|
|
67
|
-
var _a, _b, _c
|
|
65
|
+
var _a, _b, _c;
|
|
68
66
|
return (React.createElement("div", { className: classnames("incorporation-form-view", styles["company-general-from-review"]) },
|
|
69
67
|
React.createElement(Spin, { spinning: !incorporation.loaded }, incorporation.loaded && (React.createElement(ValidationCollectionsContext.Provider, { value: validations },
|
|
70
68
|
React.createElement(Section, { title: "Document Details" },
|
|
@@ -103,41 +101,21 @@ const CompanyGeneralForm = (props) => {
|
|
|
103
101
|
} },
|
|
104
102
|
React.createElement(Button, { type: "primary" }, "Add Item"))) },
|
|
105
103
|
addDivide.visible && (React.createElement(AddDivideDialog, { id: props.id, type: addDivide.type, onCancel: () => setAddDivide({ visible: false, type: "Consolidate" }) })),
|
|
106
|
-
|
|
107
|
-
setLoadedDivide(false);
|
|
108
|
-
setTimeout(() => {
|
|
109
|
-
setLoadedDivide(true);
|
|
110
|
-
}, 100);
|
|
111
|
-
} }))),
|
|
104
|
+
loaded && React.createElement(DivideColumnList, { id: props.id, onReload: onReload })),
|
|
112
105
|
React.createElement(Section, { title: React.createElement("div", { className: "section-header" },
|
|
113
106
|
React.createElement("div", null, "New Officer Appointment Details"),
|
|
114
107
|
React.createElement(Button, { type: "primary", onClick: () => setAddOfficerVisible(true) }, "Add Item")) },
|
|
115
|
-
React.createElement(
|
|
116
|
-
? (_d = incorporation.content.newOfficerAppointments) === null || _d === void 0 ? void 0 : _d.officers.map((o, i) => {
|
|
117
|
-
var _a, _b, _c;
|
|
118
|
-
return (React.createElement(CompanyGeneralOfficerInfo, { key: o.officerId, formId: props.id, officer: o, editOption: "NewOfficerAppointments", contacts: (_a = incorporation.content.contacts) === null || _a === void 0 ? void 0 : _a.filter((c) => c.id === o.officerId)[0], officerLength: (_c = (_b = incorporation.content.newOfficerAppointments) === null || _b === void 0 ? void 0 : _b.officers) === null || _c === void 0 ? void 0 : _c.length, onDeleteClick: () => deleteOfficer(i) }));
|
|
119
|
-
})
|
|
120
|
-
: null),
|
|
108
|
+
loaded && (React.createElement(NewOfficerDetailList, { id: props.id, isOnlyInternalUse: props.type === "draftView", onReload: onReload })),
|
|
121
109
|
addOfficerVisible && (React.createElement(AddOfficerDialog, { id: props.id, visible: true, onCancel: () => setAddOfficerVisible(false) }))),
|
|
122
110
|
React.createElement(Section, { title: React.createElement("div", { className: "section-header" },
|
|
123
111
|
React.createElement("div", null, "Remove Officer Details"),
|
|
124
112
|
React.createElement(Button, { type: "primary", onClick: () => setAddRemoveOfficerVisible(true) }, "Add Item")) },
|
|
125
|
-
React.createElement(
|
|
126
|
-
? (_g = incorporation.content.removeOfficerDetails) === null || _g === void 0 ? void 0 : _g.officers.map((r, i) => {
|
|
127
|
-
var _a, _b, _c;
|
|
128
|
-
return (React.createElement(CompanyGeneralOfficerInfo, { key: r.officerId, formId: props.id, editOption: "RemoveOfficerDetails", officer: r, contacts: (_a = incorporation.content.contacts) === null || _a === void 0 ? void 0 : _a.filter((c) => c.id === r.officerId)[0], officerLength: (_c = (_b = incorporation.content.removeOfficerDetails) === null || _b === void 0 ? void 0 : _b.officers) === null || _c === void 0 ? void 0 : _c.length, onDeleteClick: () => deleteRemoveOfficer(i) }));
|
|
129
|
-
})
|
|
130
|
-
: null),
|
|
113
|
+
loaded && (React.createElement(RemoveOfficerDetailList, { id: props.id, isOnlyInternalUse: props.type === "draftView", onReload: onReload })),
|
|
131
114
|
addRemoveOfficerVisible && (React.createElement(AddRemoveOfficerDialog, { id: props.id, visible: true, onCancel: () => setAddRemoveOfficerVisible(false) }))),
|
|
132
115
|
React.createElement(Section, { title: React.createElement("div", { className: "section-header" },
|
|
133
116
|
React.createElement("div", null, "Transfer Details"),
|
|
134
117
|
React.createElement(Button, { type: "primary", onClick: () => setAddTransferVisible(true) }, "Add Item")) },
|
|
135
|
-
|
|
136
|
-
setLoadedTransfer(false);
|
|
137
|
-
setTimeout(() => {
|
|
138
|
-
setLoadedTransfer(true);
|
|
139
|
-
}, 100);
|
|
140
|
-
} })),
|
|
118
|
+
loaded && (React.createElement(TransferList, { id: props.id, isOnlyInternalUse: props.type === "draftView", onReload: onReload })),
|
|
141
119
|
addTransferVisible && (React.createElement(AddTransferDialog, { id: props.id, onCancel: () => setAddTransferVisible(false) }))),
|
|
142
120
|
React.createElement(Section, { title: React.createElement("div", { className: "section-header" },
|
|
143
121
|
React.createElement("div", null, "Issue Shares"),
|
|
@@ -146,8 +124,8 @@ const CompanyGeneralForm = (props) => {
|
|
|
146
124
|
React.createElement("div", { className: "issue-shares-title" }, "General"),
|
|
147
125
|
React.createElement(Form, { layout: "horizontal", labelAlign: "left", labelCol: { span: 6 } },
|
|
148
126
|
React.createElement(Form.Item, { label: "Effective Date", name: "EffectiveDate" },
|
|
149
|
-
React.createElement(InlineEdit, { defaultValue: dayjs(((
|
|
150
|
-
? (
|
|
127
|
+
React.createElement(InlineEdit, { defaultValue: dayjs(((_b = incorporation.content.issueShareDetails) === null || _b === void 0 ? void 0 : _b.effectiveDate) !== ""
|
|
128
|
+
? (_c = incorporation.content.issueShareDetails) === null || _c === void 0 ? void 0 : _c.effectiveDate
|
|
151
129
|
: undefined), content: (v) => {
|
|
152
130
|
var _a, _b;
|
|
153
131
|
return ((_a = incorporation.content.issueShareDetails) === null || _a === void 0 ? void 0 : _a.effectiveDate) ? (React.createElement("span", null, dayjs((_b = incorporation.content.issueShareDetails) === null || _b === void 0 ? void 0 : _b.effectiveDate).format("YYYY-MM-DD"))) : (React.createElement("span", { className: "add-info-style" }, "Add Effective Date"));
|
|
@@ -170,42 +148,15 @@ const CompanyGeneralForm = (props) => {
|
|
|
170
148
|
} })))),
|
|
171
149
|
React.createElement("div", { className: "company-general-issue-shares" },
|
|
172
150
|
React.createElement("div", { className: "issue-shares-title" }, "Allotments"),
|
|
173
|
-
|
|
174
|
-
setLoadedAllotment(false);
|
|
175
|
-
setTimeout(() => {
|
|
176
|
-
setLoadedAllotment(true);
|
|
177
|
-
}, 100);
|
|
178
|
-
} })),
|
|
151
|
+
loaded && (React.createElement(AllotmentList, { id: props.id, isOnlyInternalUse: props.type === "draftView", onReload: onReload })),
|
|
179
152
|
addAllotmentVisible && (React.createElement(AddAllotmentDialog, { id: props.id, onCancel: () => setAddAllotmentVisible(false) })))))))));
|
|
180
153
|
});
|
|
181
154
|
return observe(() => (React.createElement(IncorporationFormContext.Provider, { value: state }, content)));
|
|
182
|
-
function
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
const officers = clone((_b = (_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.newOfficerAppointments) === null || _b === void 0 ? void 0 : _b.officers);
|
|
188
|
-
officers.splice(index, 1);
|
|
189
|
-
await store.edit(props.id, {
|
|
190
|
-
data: { NewOfficerAppointments: { Officers: changeName(officers) } },
|
|
191
|
-
error: "message",
|
|
192
|
-
});
|
|
193
|
-
},
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
function deleteRemoveOfficer(index) {
|
|
197
|
-
return Modal.confirm({
|
|
198
|
-
title: "Do you want to delete this item?",
|
|
199
|
-
async onOk() {
|
|
200
|
-
var _a, _b;
|
|
201
|
-
const removeOfficers = clone((_b = (_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.removeOfficerDetails) === null || _b === void 0 ? void 0 : _b.officers);
|
|
202
|
-
removeOfficers.splice(index, 1);
|
|
203
|
-
await store.edit(props.id, {
|
|
204
|
-
data: { RemoveOfficerDetails: { Officers: changeName(removeOfficers) } },
|
|
205
|
-
error: "message",
|
|
206
|
-
});
|
|
207
|
-
},
|
|
208
|
-
});
|
|
155
|
+
function onReload() {
|
|
156
|
+
setLoaded(false);
|
|
157
|
+
setTimeout(() => {
|
|
158
|
+
setLoaded(true);
|
|
159
|
+
}, 100);
|
|
209
160
|
}
|
|
210
161
|
};
|
|
211
162
|
export default CompanyGeneralForm;
|