@voplus/morpho-csp 4.0.26 → 4.0.28
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/interfaces.d.ts +9 -12
- package/es/data/clda-form/interfaces.js +0 -2
- package/es/data/clda-form/interfaces.js.map +1 -1
- package/es/data/clda-form/types.d.ts +8 -12
- package/es/modules/corporate/company/components/CompanyProperties/Properties.js +1 -1
- package/es/modules/corporate/company/components/CompanyProperties/Properties.js.map +1 -1
- package/es/modules/corporate/company/components/CorporateOfficerSelect/index.d.ts +2 -0
- package/es/modules/corporate/company/components/CorporateOfficerSelect/index.js +2 -2
- package/es/modules/corporate/company/components/CorporateOfficerSelect/index.js.map +1 -1
- package/es/modules/corporate/components/CorporateSelect/index.d.ts +1 -0
- package/es/modules/corporate/components/CorporateSelect/index.js +1 -1
- package/es/modules/corporate/components/CorporateSelect/index.js.map +1 -1
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeProperties/index.js +34 -46
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeProperties/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/MemberInfo/index.js +9 -9
- package/es/modules/self-registration/clda-form/components/MemberInfo/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/MemberInfo/index.less +1 -0
- package/es/modules/self-registration/clda-form/incorporation/agm/components/ContactSelect/index.d.ts +7 -0
- package/es/modules/self-registration/clda-form/incorporation/agm/components/ContactSelect/index.js +42 -0
- package/es/modules/self-registration/clda-form/incorporation/agm/components/ContactSelect/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/agm/components/ContactSelect/state.d.ts +10 -0
- package/es/modules/self-registration/clda-form/incorporation/agm/components/ContactSelect/state.js +57 -0
- package/es/modules/self-registration/clda-form/incorporation/agm/components/ContactSelect/state.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/agm/index.js +66 -88
- package/es/modules/self-registration/clda-form/incorporation/agm/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/bvi/index.less +12 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralForm.js +20 -34
- package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralForm.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.js +33 -47
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/ChangeAddress/index.d.ts +5 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/ChangeAddress/index.js +68 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/ChangeAddress/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/sgp/index.less +12 -0
- package/package.json +1 -1
- package/es/modules/corporate/company/components/InlineEditAddress/index.d.ts +0 -14
- package/es/modules/corporate/company/components/InlineEditAddress/index.js +0 -50
- package/es/modules/corporate/company/components/InlineEditAddress/index.js.map +0 -1
- package/es/modules/corporate/company/components/InlineEditAddress/index.less +0 -16
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useState } from "react";
|
|
2
2
|
import { Select } from "antd";
|
|
3
3
|
import { useCLDAForm, useCLDAFormStore } from "../../../../../../../data/clda-form";
|
|
4
4
|
import { CapitalizeFirstLetter } from "../../../../../../../data/clda-form/conversion";
|
|
5
5
|
import { State } from "./state";
|
|
6
|
-
import { observe
|
|
6
|
+
import { observe } from "@voplus/morpho-ui";
|
|
7
|
+
import FolderEdit from "@voplus/morpho-document/es/controls/FolderEdit";
|
|
7
8
|
import dayjs from "dayjs";
|
|
8
9
|
const CapitalReceiptSelect = (props) => {
|
|
9
10
|
var _a;
|
|
@@ -14,54 +15,39 @@ const CapitalReceiptSelect = (props) => {
|
|
|
14
15
|
const [contactName, setContactName] = useState((_a = state.getDefalutContact()) === null || _a === void 0 ? void 0 : _a.name);
|
|
15
16
|
const [capitalReceiptEditable, setCapitalReceiptEditable] = useState(false);
|
|
16
17
|
const [showCapitalReceiptEditIcon, setShowCapitalReceiptEditIcon] = useState(true);
|
|
17
|
-
const clickEvent = (e) => {
|
|
18
|
-
if (!e.target.className.toString())
|
|
19
|
-
return;
|
|
20
|
-
if (!e.target.className.toString().includes("ant-select")) {
|
|
21
|
-
setCapitalReceiptEditable(false);
|
|
22
|
-
setShowCapitalReceiptEditIcon(true);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
if (capitalReceiptEditable) {
|
|
27
|
-
window.addEventListener("click", clickEvent, true);
|
|
28
|
-
}
|
|
29
|
-
return () => {
|
|
30
|
-
window.removeEventListener("click", clickEvent, true);
|
|
31
|
-
};
|
|
32
|
-
}, [capitalReceiptEditable]);
|
|
33
18
|
return observe(() => {
|
|
34
19
|
var _a;
|
|
35
|
-
return (React.createElement(
|
|
36
|
-
var _a;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
setCapitalReceiptEditable(false);
|
|
58
|
-
});
|
|
59
|
-
}, defaultValue: defaultValue, filterOption: (input, option) => (option === null || option === void 0 ? void 0 : option.children.toLowerCase().indexOf(input.toLowerCase())) >= 0 }, (_a = state.getBankOpeningNewContacts()) === null || _a === void 0 ? void 0 : _a.map((item) => (React.createElement(Select.Option, { key: item.id, value: item.id }, item.name))))) : defaultValue ? (React.createElement("span", null, contactName)) : (React.createElement("span", { className: "add-info-style" }, "Select Capital Receipt Director"));
|
|
60
|
-
}, onEditIconClick: () => {
|
|
61
|
-
setCapitalReceiptEditable(true);
|
|
62
|
-
setShowCapitalReceiptEditIcon(false);
|
|
63
|
-
} }));
|
|
20
|
+
return (React.createElement(FolderEdit, { showEditIcon: showCapitalReceiptEditIcon, onEditIconClick: onEditCapitalReceipt }, capitalReceiptEditable ? (React.createElement(Select, { showSearch: true, allowClear: true, autoFocus: true, placeholder: "Select a contact", optionFilterProp: "children", onBlur: onBlurCapitalReceipt, onChange: (v) => {
|
|
21
|
+
var _a, _b, _c, _d;
|
|
22
|
+
const effectiveDate = (_b = (_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.issueShareDetails) === null || _b === void 0 ? void 0 : _b.effectiveDate;
|
|
23
|
+
let allotments = (_d = (_c = incorporation.content) === null || _c === void 0 ? void 0 : _c.issueShareDetails) === null || _d === void 0 ? void 0 : _d.allotments;
|
|
24
|
+
if (allotments === null || allotments === void 0 ? void 0 : allotments.length)
|
|
25
|
+
allotments = CapitalizeFirstLetter(allotments);
|
|
26
|
+
store
|
|
27
|
+
.edit(props.id, {
|
|
28
|
+
data: {
|
|
29
|
+
IssueShareDetails: {
|
|
30
|
+
Allotments: (allotments === null || allotments === void 0 ? void 0 : allotments.length) ? [...allotments] : [],
|
|
31
|
+
CapitalReceiptIssuerId: v,
|
|
32
|
+
EffectiveDate: effectiveDate !== null ? dayjs(effectiveDate).format("YYYY-MM-DD") : "",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
})
|
|
36
|
+
.then(() => {
|
|
37
|
+
var _a;
|
|
38
|
+
setContactName((_a = state.getDefalutContact(v)) === null || _a === void 0 ? void 0 : _a.name);
|
|
39
|
+
onBlurCapitalReceipt();
|
|
40
|
+
});
|
|
41
|
+
}, defaultValue: defaultValue, filterOption: (input, option) => (option === null || option === void 0 ? void 0 : option.children.toLowerCase().indexOf(input.toLowerCase())) >= 0 }, (_a = state.getBankOpeningNewContacts()) === null || _a === void 0 ? void 0 : _a.map((item) => (React.createElement(Select.Option, { key: item.id, value: item.id }, item.name))))) : defaultValue ? (React.createElement("span", null, contactName)) : (React.createElement("span", { className: "add-info-style" }, "Select Capital Receipt Director"))));
|
|
64
42
|
});
|
|
43
|
+
function onEditCapitalReceipt() {
|
|
44
|
+
setCapitalReceiptEditable(true);
|
|
45
|
+
setShowCapitalReceiptEditIcon(false);
|
|
46
|
+
}
|
|
47
|
+
function onBlurCapitalReceipt() {
|
|
48
|
+
setShowCapitalReceiptEditIcon(true);
|
|
49
|
+
setCapitalReceiptEditable(false);
|
|
50
|
+
}
|
|
65
51
|
};
|
|
66
52
|
export default CapitalReceiptSelect;
|
|
67
53
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,UAAU,MAAM,gDAAgD,CAAC;AACxE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,oBAAoB,GAAG,CAAC,KAA4C,EAAE,EAAE;;IAC7E,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAEnC,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IACjC,MAAM,aAAa,GAAG,WAA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AAK,CAAC,CAAC;IAClC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Col, Form, Row, Button, Space } from "antd";
|
|
3
|
+
import { observe, InlineEdit } from "@voplus/morpho-ui";
|
|
4
|
+
import { useCLDAForm, useCLDAFormStore } from "../../../../../../../data/clda-form";
|
|
5
|
+
import { runInAction } from "mobx";
|
|
6
|
+
import Address from "@voplus/morpho-org/es/components/Address";
|
|
7
|
+
const ChangeAddress = (props) => {
|
|
8
|
+
let address = {
|
|
9
|
+
line1: "",
|
|
10
|
+
line2: "",
|
|
11
|
+
city: "",
|
|
12
|
+
state: "",
|
|
13
|
+
postalCode: "",
|
|
14
|
+
country: "",
|
|
15
|
+
};
|
|
16
|
+
const incorporation = useCLDAForm(props.id);
|
|
17
|
+
const store = useCLDAFormStore();
|
|
18
|
+
return observe(() => {
|
|
19
|
+
var _a;
|
|
20
|
+
return (React.createElement(InlineEdit, { editTrigger: "both", defaultValue: ((_a = incorporation.content.newAddressDetails) === null || _a === void 0 ? void 0 : _a.newAddress) || address, onSave: (v) => store.edit(props.id, {
|
|
21
|
+
data: {
|
|
22
|
+
NewAddressDetails: {
|
|
23
|
+
NewAddress: {
|
|
24
|
+
Line1: v === null || v === void 0 ? void 0 : v.line1,
|
|
25
|
+
Line2: v === null || v === void 0 ? void 0 : v.line2,
|
|
26
|
+
City: v === null || v === void 0 ? void 0 : v.city,
|
|
27
|
+
State: v === null || v === void 0 ? void 0 : v.state,
|
|
28
|
+
PostalCode: v === null || v === void 0 ? void 0 : v.postalCode,
|
|
29
|
+
Country: v === null || v === void 0 ? void 0 : v.country,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
}), content: (p) => {
|
|
34
|
+
const s = p.store.value;
|
|
35
|
+
return (React.createElement(React.Fragment, null, (s === null || s === void 0 ? void 0 : s.city) === "" &&
|
|
36
|
+
(s === null || s === void 0 ? void 0 : s.country) === "" &&
|
|
37
|
+
(s === null || s === void 0 ? void 0 : s.line1) === "" &&
|
|
38
|
+
(s === null || s === void 0 ? void 0 : s.line2) === "" &&
|
|
39
|
+
(s === null || s === void 0 ? void 0 : s.postalCode) === "" &&
|
|
40
|
+
(s === null || s === void 0 ? void 0 : s.state) === "" ? (React.createElement("span", { className: "add-info-style" }, "Please click here to change your registration address")) : (React.createElement(React.Fragment, null,
|
|
41
|
+
React.createElement(Row, null,
|
|
42
|
+
React.createElement(Col, null, s === null || s === void 0 ? void 0 : s.line1)),
|
|
43
|
+
React.createElement(Row, null,
|
|
44
|
+
React.createElement(Col, null, s === null || s === void 0 ? void 0 : s.line2)),
|
|
45
|
+
React.createElement(Row, null,
|
|
46
|
+
React.createElement(Col, null, `${(s === null || s === void 0 ? void 0 : s.city) ? s === null || s === void 0 ? void 0 : s.city : ""} ${s === null || s === void 0 ? void 0 : s.state} ${s === null || s === void 0 ? void 0 : s.country} ${s === null || s === void 0 ? void 0 : s.postalCode}`.trim()))))));
|
|
47
|
+
}, editor: (p) => observe(() => (React.createElement(React.Fragment, null,
|
|
48
|
+
React.createElement(Row, null,
|
|
49
|
+
React.createElement(Col, { style: { width: "100%" } },
|
|
50
|
+
React.createElement(Form, null,
|
|
51
|
+
React.createElement(Address, { value: p.store.value, onChange: (v) => {
|
|
52
|
+
runInAction(() => {
|
|
53
|
+
p.store.value.city = v.city;
|
|
54
|
+
p.store.value.country = v.country;
|
|
55
|
+
p.store.value.line1 = v.line1;
|
|
56
|
+
p.store.value.line2 = v.line2;
|
|
57
|
+
p.store.value.postalCode = v.postalCode;
|
|
58
|
+
p.store.value.state = v.state;
|
|
59
|
+
});
|
|
60
|
+
} })))),
|
|
61
|
+
React.createElement("div", { style: { display: "flex", justifyContent: "end" } },
|
|
62
|
+
React.createElement(Space, null,
|
|
63
|
+
React.createElement(Button, { onClick: () => p.store.cancel() }, "Cancel"),
|
|
64
|
+
React.createElement(Button, { type: "primary", onClick: () => p.store.save({ trigger: "select" }) }, "Save")))))) }));
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
export default ChangeAddress;
|
|
68
|
+
//# 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/ChangeAddress/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,OAAO,MAAM,0CAA0C,CAAC;AAE/D,MAAM,aAAa,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC/C,IAAI,OAAO,GAAG;QACb,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,EAAE;QACT,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,EAAE;KACX,CAAC;IAEF,MAAM,aAAa,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC5C,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IAEjC,OAAO,OAAO,CAAC,GAAG,EAAE;;QACnB,OAAO,CACN,oBAAC,UAAU,IACV,WAAW,EAAC,MAAM,EAClB,YAAY,EAAE,CAAA,MAAA,aAAa,CAAC,OAAO,CAAC,iBAAiB,0CAAE,UAAU,KAAI,OAAO,EAC5E,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CACb,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,E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AAC;wCACxC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;oCAC/B,CAAC,CAAC,CAAC;gCACJ,CAAC,GACA,CACI,CACF,CACD;gBACN,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE;oBACrD,oBAAC,KAAK;wBACL,oBAAC,MAAM,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,aAAiB;wBACxD,oBAAC,MAAM,IAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,WAEhE,CACF,CACH,CACU,CACjB,CAAC,GAEF,CACF,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -4,30 +4,42 @@
|
|
|
4
4
|
max-width: 1000px;
|
|
5
5
|
padding: 20px !important;
|
|
6
6
|
margin: 0 auto;
|
|
7
|
+
|
|
7
8
|
:global {
|
|
8
9
|
.officer-list {
|
|
9
10
|
margin-bottom: 20px;
|
|
11
|
+
|
|
10
12
|
.ant-card {
|
|
11
13
|
margin-bottom: 0;
|
|
12
14
|
}
|
|
13
15
|
}
|
|
16
|
+
|
|
14
17
|
.morpho-inline-edit > .content-container > .content.clickable {
|
|
15
18
|
cursor: pointer;
|
|
16
19
|
}
|
|
20
|
+
|
|
21
|
+
.incorporation-form-submit {
|
|
22
|
+
margin-bottom: 20px;
|
|
23
|
+
}
|
|
24
|
+
|
|
17
25
|
.incorporation-form-submitted {
|
|
18
26
|
text-align: right;
|
|
19
27
|
padding: 0 20px;
|
|
20
28
|
}
|
|
29
|
+
|
|
21
30
|
.sub-title {
|
|
22
31
|
font-size: 16px;
|
|
23
32
|
color: @heading-subtitle-color;
|
|
24
33
|
font-weight: 600;
|
|
25
34
|
}
|
|
35
|
+
|
|
26
36
|
.internal-use-section {
|
|
27
37
|
margin-top: 15px;
|
|
38
|
+
|
|
28
39
|
&.secretary-list {
|
|
29
40
|
margin-top: 0;
|
|
30
41
|
}
|
|
42
|
+
|
|
31
43
|
.halvingline {
|
|
32
44
|
margin: 20px 0;
|
|
33
45
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import "./index.less";
|
|
3
|
-
import { IAddress } from "@voplus/morpho-org";
|
|
4
|
-
declare const InlineEditAddress: (props: {
|
|
5
|
-
address?: IAddress | undefined;
|
|
6
|
-
onChange?: ((address?: IAddress) => Promise<void>) | undefined;
|
|
7
|
-
/** label */
|
|
8
|
-
label?: string | undefined;
|
|
9
|
-
/** 只读 */
|
|
10
|
-
readonly?: boolean | undefined;
|
|
11
|
-
/** Edit 时 Modal 方式打开 */
|
|
12
|
-
modal?: boolean | undefined;
|
|
13
|
-
}) => JSX.Element;
|
|
14
|
-
export default InlineEditAddress;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import "./index.less";
|
|
2
|
-
import { Button, Form, Modal, Row } from "antd";
|
|
3
|
-
import React, { useEffect, useState } from "react";
|
|
4
|
-
import Address from "@voplus/morpho-org/es/components/Address";
|
|
5
|
-
import { clone } from "lodash-es";
|
|
6
|
-
import { observe } from "@voplus/morpho-ui";
|
|
7
|
-
const InlineEditAddress = (props) => {
|
|
8
|
-
const { address, readonly, label, modal, onChange } = props;
|
|
9
|
-
const [editable, setEditable] = useState(false);
|
|
10
|
-
const [loading, setLoading] = useState(false);
|
|
11
|
-
const [registeredAddress, setRegisteredAddress] = useState();
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
setRegisteredAddress(clone(address));
|
|
14
|
-
}, [address]);
|
|
15
|
-
const LabelElement = (registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.line1) || (registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.country) || (registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.city) ? (React.createElement(React.Fragment, null,
|
|
16
|
-
(registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.line1) ? (registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.line1) + ", " : registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.line1,
|
|
17
|
-
(registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.line2) ? (registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.line2) + ", " : registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.line2,
|
|
18
|
-
(registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.city) ? (registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.city) + ", " : registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.city,
|
|
19
|
-
(registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.state) ? (registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.state) + ", " : registeredAddress === null || registeredAddress === void 0 ? void 0 : registeredAddress.state, registeredAddress === null || registeredAddress === void 0 ? void 0 :
|
|
20
|
-
registeredAddress.country)) : readonly ? ("") : (React.createElement("span", { className: "add-info-style" }, "Add Address"));
|
|
21
|
-
return observe(() => (React.createElement(React.Fragment, null,
|
|
22
|
-
modal && (React.createElement(Modal, { open: editable, title: "Address", width: 480, wrapClassName: "inline-edit-address", footer: null, onOk: onOk, onCancel: cancel },
|
|
23
|
-
React.createElement(Form, null,
|
|
24
|
-
React.createElement(Address, { value: registeredAddress, onChange: (v) => setRegisteredAddress(v) })),
|
|
25
|
-
React.createElement(Row, { justify: "end" },
|
|
26
|
-
React.createElement(Button, { size: "middle", className: "margin-right-10", onClick: cancel }, "Cancel"),
|
|
27
|
-
React.createElement(Button, { size: "middle", type: "primary", loading: loading, onClick: onOk }, "Ok")))),
|
|
28
|
-
editable && !modal ? (React.createElement(React.Fragment, null,
|
|
29
|
-
React.createElement(Form, null,
|
|
30
|
-
React.createElement(Address, { value: registeredAddress, onChange: (v) => setRegisteredAddress(v) })),
|
|
31
|
-
React.createElement(Row, { justify: "end" },
|
|
32
|
-
React.createElement(Button, { size: "middle", className: "margin-right-10", onClick: cancel }, "Cancel"),
|
|
33
|
-
React.createElement(Button, { size: "middle", type: "primary", loading: loading, onClick: onOk }, "Ok")))) : (React.createElement("span", { onClick: () => setEditable(!readonly) }, label ? React.createElement(Form.Item, { label: label }, LabelElement) : LabelElement)))));
|
|
34
|
-
/** cancel edit */
|
|
35
|
-
function cancel() {
|
|
36
|
-
setEditable(false);
|
|
37
|
-
/** 恢复成更改前的Address */
|
|
38
|
-
setRegisteredAddress(clone(address));
|
|
39
|
-
}
|
|
40
|
-
/** confirm edit */
|
|
41
|
-
async function onOk() {
|
|
42
|
-
setLoading(true);
|
|
43
|
-
await (onChange === null || onChange === void 0 ? void 0 : onChange(registeredAddress).then((r) => {
|
|
44
|
-
setLoading(false);
|
|
45
|
-
setEditable(false);
|
|
46
|
-
}).catch((r) => setRegisteredAddress(clone(address))));
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
export default InlineEditAddress;
|
|
50
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/components/InlineEditAddress/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAS,MAAM,MAAM,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,OAAO,MAAM,0CAA0C,CAAC;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB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E;YACX,UAAU,CAAC,KAAK,CAAC,CAAC;YAClB,WAAW,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC,EACA,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA,CAAC;IACtD,CAAC;AACF,CAAC,CAAC;AACF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
:global {
|
|
2
|
-
.inline-edit-address,
|
|
3
|
-
.company-information {
|
|
4
|
-
.ant-col .ant-row.ant-form-item {
|
|
5
|
-
display: block;
|
|
6
|
-
.ant-col.ant-form-item-label {
|
|
7
|
-
display: inline;
|
|
8
|
-
width: 100%;
|
|
9
|
-
text-align: left;
|
|
10
|
-
> label {
|
|
11
|
-
height: auto;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|