@voplus/morpho-csp 1.2.124 → 1.2.125

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.
Files changed (145) hide show
  1. package/es/components/Header/index.less +20 -20
  2. package/es/components/RegisteresMenuItem/index.less +10 -10
  3. package/es/data/controller/ControllerStore.d.ts +2 -1
  4. package/es/data/controller/ControllerStore.js +9 -0
  5. package/es/data/controller/ControllerStore.js.map +1 -1
  6. package/es/data/controller/types.d.ts +5 -0
  7. package/es/modules/account/components/AccountOrganizations/index.less +26 -26
  8. package/es/modules/account/components/AccountPropertiesView/index.less +10 -10
  9. package/es/modules/account/pages/AccountDefaultView/index.less +8 -8
  10. package/es/modules/corporate/clda/components/CLDADetails/index.less +5 -5
  11. package/es/modules/corporate/clda/components/CLDAItem/index.less +41 -41
  12. package/es/modules/corporate/clda/components/CLDAListView/index.less +30 -30
  13. package/es/modules/corporate/clda/components/CLDAProperties/index.less +15 -15
  14. package/es/modules/corporate/clda/components/CLDAPropertiesView/index.less +10 -10
  15. package/es/modules/corporate/clda/components/CLDAQuickViewDialog/index.less +13 -13
  16. package/es/modules/corporate/clda/components/CLDASendForm/index.less +47 -47
  17. package/es/modules/corporate/clda/components/NewCLDAForm/index.less +6 -6
  18. package/es/modules/corporate/clda/controls/CLDAStatusButton/index.less +58 -58
  19. package/es/modules/corporate/clda/controls/LegalDocumentDialog/index.less +8 -8
  20. package/es/modules/corporate/clda/controls/ModeIcon/index.less +20 -20
  21. package/es/modules/corporate/clda/pages/CLDAAddressDefaultView/index.less +14 -14
  22. package/es/modules/corporate/clda/pages/CLDAClientView/index.less +84 -84
  23. package/es/modules/corporate/clda/pages/CLDASettingsPage/index.less +59 -59
  24. package/es/modules/corporate/clda/pages/ChangeAddress2021/index.less +40 -40
  25. package/es/modules/corporate/clda/pages/SecretaryTestPage/index.less +91 -91
  26. package/es/modules/corporate/company/components/CompanyDetailsView/index.less +40 -40
  27. package/es/modules/corporate/company/components/InlineEditAddress/index.less +16 -16
  28. package/es/modules/corporate/company/controller-register/components/ControllerItem/index.less +41 -41
  29. package/es/modules/corporate/company/controller-register/components/ControllerList/index.d.ts +0 -1
  30. package/es/modules/corporate/company/controller-register/components/ControllerList/index.js +48 -32
  31. package/es/modules/corporate/company/controller-register/components/ControllerList/index.js.map +1 -1
  32. package/es/modules/corporate/company/controller-register/components/ControllerList/index.less +6 -11
  33. package/es/modules/corporate/company/controller-register/components/ControllerPropertiesView/index.less +51 -51
  34. package/es/modules/corporate/company/controller-register/components/SelectControllerForm/index.d.ts +7 -0
  35. package/es/modules/corporate/company/controller-register/components/SelectControllerForm/index.js +33 -0
  36. package/es/modules/corporate/company/controller-register/components/SelectControllerForm/index.js.map +1 -0
  37. package/es/modules/corporate/company/controller-register/components/SelectControllerForm/index.less +35 -0
  38. package/es/modules/corporate/company/controller-register/components/SelectControllerItem/index.d.ts +7 -0
  39. package/es/modules/corporate/company/controller-register/components/SelectControllerItem/index.js +42 -0
  40. package/es/modules/corporate/company/controller-register/components/SelectControllerItem/index.js.map +1 -0
  41. package/es/modules/corporate/company/controller-register/components/SelectControllerItem/index.less +38 -0
  42. package/es/modules/corporate/company/controller-register/components/SelectControllerList/index.d.ts +6 -0
  43. package/es/modules/corporate/company/controller-register/components/SelectControllerList/index.js +64 -0
  44. package/es/modules/corporate/company/controller-register/components/SelectControllerList/index.js.map +1 -0
  45. package/es/modules/corporate/company/controller-register/components/SelectControllerList/state.d.ts +11 -0
  46. package/es/modules/corporate/company/controller-register/components/SelectControllerList/state.js +47 -0
  47. package/es/modules/corporate/company/controller-register/components/SelectControllerList/state.js.map +1 -0
  48. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/index.d.ts +3 -1
  49. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/index.js +21 -13
  50. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/index.js.map +1 -1
  51. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/state.d.ts +13 -5
  52. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/state.js +37 -11
  53. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/state.js.map +1 -1
  54. package/es/modules/corporate/company/controller-register/controls/ControllerStatusLabel/index.less +24 -24
  55. package/es/modules/corporate/company/controller-register/page/ControllerDefaultView/index.less +5 -5
  56. package/es/modules/corporate/company/controls/CorporateMenu/index.less +35 -35
  57. package/es/modules/corporate/company/identity/components/ContactIdentitySelectDialog/index.less +64 -64
  58. package/es/modules/corporate/company/identity/components/IdentifyDetail/index.less +61 -61
  59. package/es/modules/corporate/company/identity/components/IdentityItem/index.less +48 -48
  60. package/es/modules/corporate/company/identity/components/NewIdentityDialog/index.less +55 -55
  61. package/es/modules/corporate/company/identity/components/NewLegalContactDialog/index.less +59 -59
  62. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/index.less +54 -54
  63. package/es/modules/corporate/company/member-register/components/CompanyMemberAvatar/index.less +7 -7
  64. package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.less +35 -35
  65. package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.less +12 -12
  66. package/es/modules/corporate/company/member-register/components/CompanyMemberPropertiesView/index.less +44 -44
  67. package/es/modules/corporate/company/member-register/components/Details/index.less +14 -14
  68. package/es/modules/corporate/company/member-register/components/MemberShareTransactions/index.less +12 -12
  69. package/es/modules/corporate/company/member-register/components/ShareTransactionsDataIcon/index.less +8 -8
  70. package/es/modules/corporate/company/member-register/page/CompanyMemberDefaultView/index.less +6 -6
  71. package/es/modules/corporate/company/officer-register/components/OfficerItem/index.less +40 -40
  72. package/es/modules/corporate/company/officer-register/components/OfficerList/index.less +12 -12
  73. package/es/modules/corporate/company/officer-register/components/OfficerPropertiesView/index.less +44 -44
  74. package/es/modules/corporate/company/officer-register/controls/OfficerStatusFilter/index.less +5 -5
  75. package/es/modules/corporate/company/officer-register/page/OfficerDefaultView/index.less +6 -6
  76. package/es/modules/corporate/company/pages/CompanyDefaultView/index.less +67 -67
  77. package/es/modules/corporate/company/share-transactions-register/components/ShareMovementsDataIcon/index.less +11 -11
  78. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItem/index.less +72 -72
  79. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionList/index.less +16 -16
  80. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionPropertiesView/index.less +89 -89
  81. package/es/modules/corporate/company/share-transactions-register/controls/TransactionTypeFilter/index.less +5 -5
  82. package/es/modules/corporate/company/share-transactions-register/pages/ShareTransactionDefaultView/index.less +89 -89
  83. package/es/modules/corporate/company/share-transactions-register/pages/ShareTransactionRegisterDefaultView/index.less +20 -20
  84. package/es/modules/corporate/components/DocumentIconList/index.less +14 -14
  85. package/es/modules/corporate/components/Statement/index.less +16 -16
  86. package/es/modules/corporate/filing-record/components/AnnualFilings/index.less +8 -8
  87. package/es/modules/corporate/filing-record/components/FilingRecordItem/index.less +12 -12
  88. package/es/modules/corporate/filing-record/components/FilingRecordQuickView/index.less +56 -56
  89. package/es/modules/corporate/filing-record/components/FilingYearTimeLine/index.less +71 -71
  90. package/es/modules/corporate/legal-generation/components/SettingDialog/index.less +14 -14
  91. package/es/modules/corporate/legal-generation/pages/CorporateLegalGeneration/index.less +72 -72
  92. package/es/modules/corporate/relationship/components/CorporateRelationshipView/index.less +5 -5
  93. package/es/modules/corporate/service/components/NewServiceDialog/index.less +27 -27
  94. package/es/modules/corporate/service/components/ServiceItem/index.less +23 -23
  95. package/es/modules/corporate/service-type/components/ServiceTypePropertiesView/index.less +48 -48
  96. package/es/modules/corporate/share-certificate/pages/ShareCertificateDefaultView/index.less +30 -30
  97. package/es/modules/corporate/share-options-register/components/ShareMovementsDataIcon/index.less +11 -11
  98. package/es/modules/corporate/share-options-register/components/ShareOptionItem/index.less +84 -84
  99. package/es/modules/corporate/share-options-register/components/ShareOptionList/index.less +22 -22
  100. package/es/modules/corporate/share-options-register/components/ShareOptionPropertiesView/index.less +89 -89
  101. package/es/modules/corporate/share-options-register/pages/ShareOptionDefaultView/index.less +89 -89
  102. package/es/modules/order/components/OrderItem/index.less +21 -21
  103. package/es/modules/order/components/OrderItems/index.less +48 -48
  104. package/es/modules/order/components/OrderPropertiesView/index.less +13 -13
  105. package/es/modules/order/controls/IncorporationStatusLabel/index.less +41 -41
  106. package/es/modules/order/controls/OrderLabel/index.less +21 -21
  107. package/es/modules/order/pages/OrderDefaultView/index.less +13 -13
  108. package/es/modules/self-registration/clda-form/ApplicationProcessing/index.less +37 -37
  109. package/es/modules/self-registration/clda-form/CompanyInfoForm/index.less +25 -25
  110. package/es/modules/self-registration/clda-form/Download/index.less +41 -41
  111. package/es/modules/self-registration/clda-form/IncorporaitonCart/index.less +26 -26
  112. package/es/modules/self-registration/clda-form/Upload/index.less +15 -15
  113. package/es/modules/self-registration/clda-form/components/CLDAFormQuickViewDialog/index.less +13 -13
  114. package/es/modules/self-registration/clda-form/components/CompanyInfo/index.less +19 -19
  115. package/es/modules/self-registration/clda-form/components/MemberInfo/index.less +201 -201
  116. package/es/modules/self-registration/clda-form/components/NewShareholderDialog/index.less +12 -12
  117. package/es/modules/self-registration/clda-form/components/ShareCapital/index.less +50 -50
  118. package/es/modules/self-registration/clda-form/incorporation/sgp/index.less +36 -36
  119. package/es/modules/self-registration/clda-form/pages/CLDAFormDefaultView/index.less +45 -45
  120. package/es/modules/self-registration/components/Card/index.less +51 -51
  121. package/es/modules/self-registration/components/CheckSection/index.less +20 -20
  122. package/es/modules/self-registration/components/MemberCard/index.less +53 -53
  123. package/es/modules/self-registration/components/StripeForm/index.less +36 -36
  124. package/es/modules/self-registration/controls/Blink/index.less +27 -27
  125. package/es/modules/self-registration/controls/Section/index.less +79 -79
  126. package/es/modules/self-registration/incorporation-clda/components/IncorporationCLDAProperties/index.less +12 -12
  127. package/es/modules/self-registration/incorporation-clda/components/NewIncorporationCLDAForm/index.less +10 -10
  128. package/es/modules/self-registration/incorporation-clda/pages/CLDAIncorporationDefaultView/index.less +20 -20
  129. package/es/modules/self-registration/incorporation-clda/pages/IncorporationCLDAClientView/TourGuide/index.less +5 -5
  130. package/es/modules/self-registration/incorporation-clda/pages/IncorporationCLDAClientView/index.less +52 -52
  131. package/es/modules/self-registration/shopping-cart/ChooseService/index.js +2 -2
  132. package/es/modules/self-registration/shopping-cart/ChooseService/index.less +12 -12
  133. package/es/modules/self-registration/shopping-cart/Payment/index.less +13 -13
  134. package/es/modules/self-registration/shopping-cart/components/Pay/index.less +14 -14
  135. package/es/modules/self-registration/shopping-cart/components/TotalCart/index.less +75 -75
  136. package/es/modules/self-registration/shopping-cart/components/styles.less +23 -23
  137. package/es/modules/self-registration/shopping-cart/pages.less +6 -6
  138. package/es/obsolete/OfficerRegisterDefaultView/index.less +23 -23
  139. package/es/obsolete/controller-register/components/ControllerInformation/ControllerPropertiesView/index.less +39 -39
  140. package/es/obsolete/controller-register/components/ControllerItem/index.less +29 -29
  141. package/es/obsolete/controller-register/components/ControllerList/index.less +12 -12
  142. package/es/obsolete/controller-register/pages/ControllerDefaultView/index.less +1 -1
  143. package/es/style/common.less +66 -66
  144. package/package.json +1 -1
  145. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/index.less +0 -5
@@ -0,0 +1,33 @@
1
+ import React, { useState } from "react";
2
+ import { Row, message, Space, Button, Modal } from "@voplus/antd";
3
+ import { observe } from "@voplus/morpho-ui";
4
+ import { useControllerStore } from "../../../../../../data/controller";
5
+ import SelectControllerList from "../SelectControllerList";
6
+ import styles from "./index.less";
7
+ const SelectControllerFormDialog = (props) => {
8
+ const store = useControllerStore();
9
+ const [ids, setIds] = useState([]);
10
+ const [loading, setLoading] = useState(false);
11
+ return observe(() => (React.createElement(Modal, { title: "Select Controller Form", className: styles["select-controller-form-dialog"], visible: true, closable: false, footer: React.createElement(Row, { justify: "end" },
12
+ React.createElement(Space, null,
13
+ React.createElement(Button, { onClick: onCancel }, "Cancel"),
14
+ React.createElement(Button, { loading: loading, type: "primary", onClick: onSubmit }, "Submit"))), onCancel: props.onCancel },
15
+ React.createElement(SelectControllerList, { parentId: props.parentId, onCheckedItem: (ids) => setIds(ids) }))));
16
+ function onCancel() {
17
+ setIds([]);
18
+ if (props.onCancel)
19
+ props.onCancel();
20
+ }
21
+ async function onSubmit() {
22
+ if (!ids.length) {
23
+ message.error("controller can't be empty");
24
+ return;
25
+ }
26
+ setLoading(true);
27
+ await store.selectController({ data: { ids: ids }, error: "message" });
28
+ setLoading(false);
29
+ onCancel();
30
+ }
31
+ };
32
+ export default SelectControllerFormDialog;
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/controller-register/components/SelectControllerForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3D,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,0BAA0B,GAAG,CAAC,KAInC,EAAE,EAAE;IACJ,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IAC7C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,KAAK,IACL,KAAK,EAAC,wBAAwB,EAC9B,SAAS,EAAE,MAAM,CAAC,+BAA+B,CAAC,EAClD,OAAO,QACP,QAAQ,EAAE,KAAK,EACf,MAAM,EACL,oBAAC,GAAG,IAAC,OAAO,EAAC,KAAK;YACjB,oBAAC,KAAK;gBACL,oBAAC,MAAM,IAAC,OAAO,EAAE,QAAQ,aAAiB;gBAC1C,oBAAC,MAAM,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,SAAS,EAAC,OAAO,EAAE,QAAQ,aAEjD,CACF,CACH,EAEP,QAAQ,EAAE,KAAK,CAAC,QAAQ;QAExB,oBAAC,oBAAoB,IAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAI,CAChF,CACR,CAAC,CAAC;IAEH,SAAS,QAAQ;QAChB,MAAM,CAAC,EAAE,CAAC,CAAC;QACX,IAAI,KAAK,CAAC,QAAQ;YAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;IAED,KAAK,UAAU,QAAQ;QACtB,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE;YAChB,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;YAC3C,OAAO;SACP;QACD,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,MAAM,KAAK,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,QAAQ,EAAE,CAAC;IACZ,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
@@ -0,0 +1,35 @@
1
+ @import "~@voplus/morpho-theme/styles/index.less";
2
+
3
+ .select-controller-form-dialog {
4
+ :global {
5
+ .ant-modal-content {
6
+ .ant-modal-body {
7
+ height: 500px;
8
+ padding: 0;
9
+ }
10
+
11
+ .ant-checkbox-group {
12
+ width: 100%;
13
+
14
+ }
15
+
16
+ .select-controller-list-view {
17
+ width: 100%;
18
+ height: 100%;
19
+
20
+ .select-controller-list-header {
21
+ display: flex;
22
+ justify-content: space-between;
23
+ align-items: center;
24
+ padding: unit((16/16), em) 20px;
25
+ box-sizing: border-box;
26
+ border-bottom: 1px solid @border-color-1;
27
+ }
28
+
29
+ .select-controller-list-content {
30
+ height: calc(100% - 55px);
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import "./index.less";
3
+ declare const SelectControllerItem: (props: {
4
+ /** id of controller */
5
+ id: string;
6
+ }) => JSX.Element;
7
+ export default SelectControllerItem;
@@ -0,0 +1,42 @@
1
+ import React from "react";
2
+ import { observe } from "@voplus/morpho-ui";
3
+ import { useController } from "../../../../../../data/controller";
4
+ import { faEnvelope, faPhone } from "@fortawesome/pro-light-svg-icons";
5
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
6
+ import { Checkbox } from "@voplus/antd";
7
+ import moment from "moment";
8
+ import "./index.less";
9
+ const SelectControllerItem = (props) => {
10
+ const { id } = props;
11
+ const controller = useController(id);
12
+ return observe(() => {
13
+ var _a, _b, _c, _d, _e, _f, _g, _h;
14
+ const phone = (_a = controller.phone) !== null && _a !== void 0 ? _a : (_b = controller.contact) === null || _b === void 0 ? void 0 : _b.phone;
15
+ const email = (_c = controller.email) !== null && _c !== void 0 ? _c : (_d = controller.contact) === null || _d === void 0 ? void 0 : _d.email;
16
+ return (React.createElement("div", { className: "select-controller-item" },
17
+ React.createElement(Checkbox, { value: (_e = controller.contact) === null || _e === void 0 ? void 0 : _e.id }),
18
+ React.createElement(React.Fragment, null,
19
+ React.createElement("div", { className: "controller-info" },
20
+ React.createElement("div", { className: "title" }, (_g = (_f = controller.identity) === null || _f === void 0 ? void 0 : _f.fullName) !== null && _g !== void 0 ? _g : (_h = controller.contact) === null || _h === void 0 ? void 0 : _h.name),
21
+ React.createElement("div", { className: "controller-contact" },
22
+ email && (React.createElement("span", null,
23
+ React.createElement(FAIcon, { icon: faEnvelope }),
24
+ email)),
25
+ phone && (React.createElement("span", { className: "margin-left-15" },
26
+ React.createElement(FAIcon, { icon: faPhone }),
27
+ phone))),
28
+ React.createElement("div", null,
29
+ controller.appointment && (React.createElement("span", { className: "margin-right-15" },
30
+ "Appointment Date: ",
31
+ moment(controller.appointment).format("YYYY-MM-DD"))),
32
+ controller.cease && (React.createElement("span", { className: "margin-right-15" },
33
+ "Cease Date: ",
34
+ moment(controller.cease).format("YYYY-MM-DD"))),
35
+ controller.confimrationDate && (React.createElement("span", { className: "margin-right-15" },
36
+ "Confimration Date: ",
37
+ moment(controller.confimrationDate).format("YYYY-MM-DD"))))),
38
+ React.createElement("span", { className: "last-notice-date" }, "last-notice-date"))));
39
+ });
40
+ };
41
+ export default SelectControllerItem;
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/controller-register/components/SelectControllerItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,cAAc,CAAC;AAEtB,MAAM,oBAAoB,GAAG,CAAC,KAG7B,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IAErB,MAAM,UAAU,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;IAErC,OAAO,OAAO,CAAC,GAAG,EAAE;;QACnB,MAAM,KAAK,GAAG,MAAA,UAAU,CAAC,KAAK,mCAAI,MAAA,UAAU,CAAC,OAAO,0CAAE,KAAK,CAAC;QAC5D,MAAM,KAAK,GAAG,MAAA,UAAU,CAAC,KAAK,mCAAI,MAAA,UAAU,CAAC,OAAO,0CAAE,KAAK,CAAC;QAE5D,OAAO,CACN,6BAAK,SAAS,EAAC,wBAAwB;YACtC,oBAAC,QAAQ,IAAC,KAAK,EAAE,MAAA,UAAU,CAAC,OAAO,0CAAE,EAAE,GAAI;YAC3C,oBAAC,KAAK,CAAC,QAAQ;gBACd,6BAAK,SAAS,EAAC,iBAAiB;oBAC/B,6BAAK,SAAS,EAAC,OAAO,IAAE,MAAA,MAAA,UAAU,CAAC,QAAQ,0CAAE,QAAQ,mCAAI,MAAA,UAAU,CAAC,OAAO,0CAAE,IAAI,CAAO;oBACxF,6BAAK,SAAS,EAAC,oBAAoB;wBACjC,KAAK,IAAI,CACT;4BACC,oBAAC,MAAM,IAAC,IAAI,EAAE,UAAU,GAAI;4BAC3B,KAAK,CACA,CACP;wBACA,KAAK,IAAI,CACT,8BAAM,SAAS,EAAC,gBAAgB;4BAC/B,oBAAC,MAAM,IAAC,IAAI,EAAE,OAAO,GAAI;4BACxB,KAAK,CACA,CACP,CACI;oBACN;wBACE,UAAU,CAAC,WAAW,IAAI,CAC1B,8BAAM,SAAS,EAAC,iBAAiB;;4BACb,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAChE,CACP;wBACA,UAAU,CAAC,KAAK,IAAI,CACpB,8BAAM,SAAS,EAAC,iBAAiB;;4BACnB,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CACpD,CACP;wBACA,UAAU,CAAC,gBAAgB,IAAI,CAC/B,8BAAM,SAAS,EAAC,iBAAiB;;4BACZ,MAAM,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CACtE,CACP,CACI,CACD;gBACN,8BAAM,SAAS,EAAC,kBAAkB,uBAAwB,CAC1C,CACZ,CACN,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,38 @@
1
+ :global {
2
+ .select-controller-item {
3
+ margin: 0 20px;
4
+ padding: 10px 0;
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: space-between;
8
+ border-bottom: 1px solid #f2f2f2;
9
+
10
+ .controller-info {
11
+ flex: 1;
12
+ margin-left: 10px;
13
+
14
+ .title {
15
+ font-weight: 500;
16
+ }
17
+
18
+ .controller-contact {
19
+ color: rgba(0, 0, 0, 0.45);
20
+
21
+ .svg-inline--fa {
22
+ margin-right: 5px;
23
+ }
24
+ }
25
+ }
26
+
27
+ .appointment-date,
28
+ .cease-date {
29
+ font-size: 13px;
30
+ line-height: 22px;
31
+ }
32
+
33
+ .last-notice-date {
34
+ color: rgba(0, 0, 0, 0.45);
35
+ font-size: 12px;
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare const SelectControllerList: (props: {
3
+ parentId: string;
4
+ onCheckedItem?: ((ids: string[]) => void) | undefined;
5
+ }) => JSX.Element;
6
+ export default SelectControllerList;
@@ -0,0 +1,64 @@
1
+ import React, { useState } from "react";
2
+ import { useControllerListEffect } from "../../../../../../data/controller";
3
+ import { useCreateListDataState } from "@voplus/morpho-ui/es/data/ListDataContext";
4
+ import { observe, useRenderOnChange } from "@voplus/morpho-ui";
5
+ import { Checkbox, Empty } from "@voplus/antd";
6
+ import { State } from "./state";
7
+ import { useAutoUpdateListData } from "@voplus/morpho-document-core";
8
+ import { FilterOptionsContext } from "@voplus/morpho-ui/es/data";
9
+ import ControllerStatusFilter from "../../controls/ControllerStatusFilter";
10
+ import FilterView from "@voplus/morpho-ui/es/controls/FilterView";
11
+ import SelectControllerItem from "../SelectControllerItem";
12
+ import Scrollbars from "react-custom-scrollbars";
13
+ const SelectControllerList = (props) => {
14
+ const { parentId } = props;
15
+ const [state] = useState(new State());
16
+ const list = useCreateListDataState({
17
+ filterDefaults: {
18
+ filters: [
19
+ { c: "ParentNodeId", o: "=", l: "And", v1: parentId },
20
+ {
21
+ c: "ConfirmationStatus",
22
+ o: "contains",
23
+ v1: JSON.stringify(["Unconfirmed", "ConfirmedController"]),
24
+ l: "And",
25
+ },
26
+ ],
27
+ },
28
+ }, [parentId]);
29
+ useAutoUpdateListData(list, (d) => d.parentId === parentId);
30
+ useRenderOnChange(() => list.filters.options);
31
+ useControllerListEffect(list, (result) => {
32
+ list.union(result);
33
+ state.controllers = result;
34
+ }, list.filters.options);
35
+ return observe(() => (React.createElement(FilterOptionsContext.Provider, { value: list.filters },
36
+ React.createElement("div", { className: "select-controller-list-view" },
37
+ React.createElement("div", { className: "select-controller-list-header" },
38
+ React.createElement(Checkbox, { onChange: onCheckAll, checked: !!state.checkAll }, "Select All"),
39
+ React.createElement(FilterView, { columns: [
40
+ React.createElement(ControllerStatusFilter, { key: "ControllerStatusFilter", defaultValue: ["Unconfirmed", "ConfirmedController"] }),
41
+ ], onFilter: onFilter })),
42
+ React.createElement("div", { className: "select-controller-list-content" },
43
+ React.createElement(Scrollbars, null,
44
+ React.createElement(Checkbox.Group, { value: state.ids, onChange: onCheck }, state.controllers.length > 0 ? (state.controllers.map((item) => React.createElement(SelectControllerItem, { key: item.id, id: item.id }))) : (React.createElement(Empty, null)))))))));
45
+ function onCheck(checkedValues) {
46
+ state.ids = checkedValues;
47
+ state.checkAll = checkedValues.length === state.controllers.length;
48
+ if (props.onCheckedItem)
49
+ props.onCheckedItem(state.ids);
50
+ }
51
+ function onCheckAll(e) {
52
+ state.checkAll = e.target.checked;
53
+ const ids = state.controllers.map((controller) => controller.id);
54
+ state.ids = e.target.checked ? ids : [];
55
+ if (props.onCheckedItem)
56
+ props.onCheckedItem(state.ids);
57
+ }
58
+ function onFilter(context) {
59
+ context.paging.Page = 1;
60
+ context.filter();
61
+ }
62
+ };
63
+ export default SelectControllerList;
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/controller-register/components/SelectControllerList/index.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,11 @@
1
+ import { IController } from "../../../../../../data/controller";
2
+ export declare class State {
3
+ /** all controllers */
4
+ controllers: IController[];
5
+ /** ids of controllers check */
6
+ ids: string[];
7
+ /** all controllers to check */
8
+ checkAll: boolean;
9
+ loading: boolean;
10
+ constructor();
11
+ }
@@ -0,0 +1,47 @@
1
+ import { __decorate } from "tslib";
2
+ import { makeObservable, observable } from "mobx";
3
+ export class State {
4
+ constructor() {
5
+ /** all controllers */
6
+ Object.defineProperty(this, "controllers", {
7
+ enumerable: true,
8
+ configurable: true,
9
+ writable: true,
10
+ value: []
11
+ });
12
+ /** ids of controllers check */
13
+ Object.defineProperty(this, "ids", {
14
+ enumerable: true,
15
+ configurable: true,
16
+ writable: true,
17
+ value: []
18
+ });
19
+ /** all controllers to check */
20
+ Object.defineProperty(this, "checkAll", {
21
+ enumerable: true,
22
+ configurable: true,
23
+ writable: true,
24
+ value: false
25
+ });
26
+ Object.defineProperty(this, "loading", {
27
+ enumerable: true,
28
+ configurable: true,
29
+ writable: true,
30
+ value: false
31
+ });
32
+ makeObservable(this);
33
+ }
34
+ }
35
+ __decorate([
36
+ observable
37
+ ], State.prototype, "controllers", void 0);
38
+ __decorate([
39
+ observable
40
+ ], State.prototype, "ids", void 0);
41
+ __decorate([
42
+ observable
43
+ ], State.prototype, "checkAll", void 0);
44
+ __decorate([
45
+ observable
46
+ ], State.prototype, "loading", void 0);
47
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/controller-register/components/SelectControllerList/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElD,MAAM,OAAO,KAAK;IAUjB;QATA,sBAAsB;QACV;;;;mBAAoC,EAAE;WAAC;QACnD,+BAA+B;QACnB;;;;mBAAuB,EAAE;WAAC;QACtC,gCAAgC;QACpB;;;;mBAAkB,KAAK;WAAC;QAExB;;;;mBAAiB,KAAK;WAAC;QAGlC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;CACD;AAXY;IAAX,UAAU;0CAAwC;AAEvC;IAAX,UAAU;kCAA2B;AAE1B;IAAX,UAAU;uCAAyB;AAExB;IAAX,UAAU;sCAAwB"}
@@ -1,3 +1,5 @@
1
1
  /// <reference types="react" />
2
- declare const ControllerStatusFilter: () => JSX.Element;
2
+ declare const ControllerStatusFilter: (props: {
3
+ defaultValue?: string[];
4
+ }) => JSX.Element;
3
5
  export default ControllerStatusFilter;
@@ -1,21 +1,29 @@
1
1
  import React from "react";
2
- import { State } from "./state";
2
+ import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
3
3
  import { observe } from "@voplus/morpho-ui";
4
4
  import { runInAction } from "mobx";
5
- import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
5
+ import { Badge } from "@voplus/antd";
6
+ import { State } from "./state";
6
7
  import classnames from "classnames";
7
- const menuList = ["Present", "Past"];
8
- const ControllerStatusFilter = () => {
9
- /** 引入父組件的 FilterOptionsContextState */
8
+ const ControllerStatusFilter = (props) => {
10
9
  const context = useFilterOptionsContext();
11
- /** 尝试从 context 取得 State, 如果没有的话context会使用第二个factory参数创建一个State. */
12
- const state = context.getFilterState("DocumentStatus", () => new State());
13
- return observe(() => (React.createElement("div", { className: "transaction-type-filter" },
14
- React.createElement("div", { className: "menu-item-title" }, "TransactionType"),
15
- menuList.map((status) => (React.createElement("div", { key: status, className: classnames("filter-menu-item", {
16
- bold: state.status === status,
17
- }), onClick: () => runInAction(() => (state.status = status)) },
18
- React.createElement("div", { className: "filter-name" }, status)))))));
10
+ const state = context.getFilterState("ControllerStatus", () => new State());
11
+ // defaultValue 为传入的预选状态
12
+ state.showDefaultValue &&
13
+ props.defaultValue &&
14
+ props.defaultValue.map((value) => state.onChangeStatus(value));
15
+ return observe(() => (React.createElement("div", null,
16
+ React.createElement("div", { className: "menu-item-title" }, "Controller Status"),
17
+ state.menus.map((item, index) => (React.createElement("div", { key: index, className: classnames("filter-menu-item", {
18
+ bold: state.status.has(item.value),
19
+ }), onClick: () => {
20
+ state.onChangeStatus(item.value);
21
+ runInAction(() => (state.showDefaultValue = false));
22
+ } },
23
+ React.createElement("div", { className: "filter-name" },
24
+ React.createElement(Badge, { color: item.color }),
25
+ item.name),
26
+ React.createElement("span", null, item.counts)))))));
19
27
  };
20
28
  export default ControllerStatusFilter;
21
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/controller-register/controls/ControllerStatusFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,MAAM,QAAQ,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAErC,MAAM,sBAAsB,GAAG,GAAG,EAAE;IACnC,uCAAuC;IACvC,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAE1C,mEAAmE;IACnE,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAE1E,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,6BAAK,SAAS,EAAC,yBAAyB;QACvC,6BAAK,SAAS,EAAC,iBAAiB,sBAAsB;QACrD,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAc,EAAE,EAAE,CAAC,CACjC,6BACC,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,UAAU,CAAC,kBAAkB,EAAE;gBACzC,IAAI,EAAE,KAAK,CAAC,MAAM,KAAK,MAAM;aAC7B,CAAC,EACF,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;YAEzD,6BAAK,SAAS,EAAC,aAAa,IAAE,MAAM,CAAO,CACtC,CACN,CAAC,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/controller-register/controls/ControllerStatusFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,MAAM,sBAAsB,GAAG,CAAC,KAAkC,EAAE,EAAE;IACrE,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAE1C,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAE5E,wBAAwB;IACxB,KAAK,CAAC,gBAAgB;QACrB,KAAK,CAAC,YAAY;QAClB,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAEhE,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB;QACC,6BAAK,SAAS,EAAC,iBAAiB,wBAAwB;QACvD,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,KAAa,EAAE,EAAE,CAAC,CAC9C,6BACC,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,UAAU,CAAC,kBAAkB,EAAE;gBACzC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;aAClC,CAAC,EACF,OAAO,EAAE,GAAG,EAAE;gBACb,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACjC,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC,CAAC;YACrD,CAAC;YAED,6BAAK,SAAS,EAAC,aAAa;gBAC3B,oBAAC,KAAK,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAI;gBAC3B,IAAI,CAAC,IAAI,CACL;YACN,kCAAO,IAAI,CAAC,MAAM,CAAQ,CACrB,CACN,CAAC,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -1,11 +1,19 @@
1
1
  import { FilterOption } from "@voplus/morpho-data";
2
- import { IFilterState } from "@voplus/morpho-ui/es/data";
3
- /** DocumentStatusFilter的 State, 实现 IFilterState 接口 */
2
+ import { IFilterState } from "@voplus/morpho-ui/es/data/IFilterState";
4
3
  export declare class State implements IFilterState {
5
- /** Status of document of filter */
6
- status: string;
4
+ /** 是否显示预选status */
5
+ showDefaultValue: boolean;
6
+ /** Status of filter */
7
+ status: Map<string, boolean>;
7
8
  constructor();
8
- /** 视乎State内容,返回正确的FilterOption[]. 在Filter时,Context 会使用此属性replace Context内FilterOption的资料。 */
9
+ /** update status */
10
+ onChangeStatus(value: string): void;
11
+ get menus(): {
12
+ name: string;
13
+ value: string;
14
+ counts: string;
15
+ color: string;
16
+ }[];
9
17
  get filters(): FilterOption[];
10
18
  reset(): void;
11
19
  }
@@ -1,35 +1,61 @@
1
1
  import { __decorate } from "tslib";
2
- import { makeAutoObservable, observable } from "mobx";
3
- /** DocumentStatusFilter的 State, 实现 IFilterState 接口 */
2
+ import { action, makeObservable, observable } from "mobx";
4
3
  export class State {
5
4
  constructor() {
6
- /** Status of document of filter */
5
+ /** 是否显示预选status */
6
+ Object.defineProperty(this, "showDefaultValue", {
7
+ enumerable: true,
8
+ configurable: true,
9
+ writable: true,
10
+ value: true
11
+ });
12
+ /** Status of filter */
7
13
  Object.defineProperty(this, "status", {
8
14
  enumerable: true,
9
15
  configurable: true,
10
16
  writable: true,
11
- value: void 0
17
+ value: new Map()
12
18
  });
13
- makeAutoObservable(this);
19
+ makeObservable(this);
20
+ }
21
+ /** update status */
22
+ onChangeStatus(value) {
23
+ this.status.has(value) ? this.status.delete(value) : this.status.set(value, true);
24
+ }
25
+ get menus() {
26
+ return [
27
+ { name: "Unconfirmed", value: "Unconfirmed", counts: "n", color: "#ffe58f" },
28
+ { name: "ConfirmedController", value: "ConfirmedController", counts: "n", color: "#18bd85" },
29
+ {
30
+ name: "ConfirmedNotController",
31
+ value: "ConfirmedNotController",
32
+ counts: "n",
33
+ color: "#ee6868",
34
+ },
35
+ ];
14
36
  }
15
- /** 视乎State内容,返回正确的FilterOption[]. 在Filter时,Context 会使用此属性replace Context内FilterOption的资料。 */
16
37
  get filters() {
17
- if (!this.status)
18
- return [];
19
38
  return [
20
39
  {
21
- c: "CeaseDate",
40
+ c: "ConfirmationStatus",
22
41
  o: "contains",
23
- v1: this.status === "Present" ? null : "",
42
+ v1: JSON.stringify(Array.from(this.status.keys())),
24
43
  l: "And",
25
44
  },
26
45
  ];
27
46
  }
28
47
  reset() {
29
- this.status = "";
48
+ this.status.clear();
49
+ this.showDefaultValue = true;
30
50
  }
31
51
  }
52
+ __decorate([
53
+ observable
54
+ ], State.prototype, "showDefaultValue", void 0);
32
55
  __decorate([
33
56
  observable
34
57
  ], State.prototype, "status", void 0);
58
+ __decorate([
59
+ action
60
+ ], State.prototype, "onChangeStatus", null);
35
61
  //# sourceMappingURL=state.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/controller-register/controls/ControllerStatusFilter/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAItD,sDAAsD;AACtD,MAAM,OAAO,KAAK;IAIjB;QAHA,mCAAmC;QACvB;;;;;WAAsB;QAGjC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,6FAA6F;IAC7F,IAAW,OAAO;QACjB,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,OAAO,EAAE,CAAC;QAC5B,OAAO;YACN;gBACC,CAAC,EAAE,WAAW;gBACd,CAAC,EAAE,UAAU;gBACb,EAAE,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;gBACzC,CAAC,EAAE,KAAK;aACQ;SACjB,CAAC;IACH,CAAC;IAEM,KAAK;QACX,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IAClB,CAAC;CACD;AAtBY;IAAX,UAAU;qCAAuB"}
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/controller-register/controls/ControllerStatusFilter/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAK1D,MAAM,OAAO,KAAK;IAMjB;QALA,mBAAmB;QACP;;;;mBAA0B,IAAI;WAAC;QAC3C,uBAAuB;QACX;;;;mBAAsC,IAAI,GAAG,EAAE;WAAC;QAG3D,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAED,oBAAoB;IAEb,cAAc,CAAC,KAAa;QAClC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACnF,CAAC;IAED,IAAW,KAAK;QACf,OAAO;YACN,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;YAC5E,EAAE,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;YAC5F;gBACC,IAAI,EAAE,wBAAwB;gBAC9B,KAAK,EAAE,wBAAwB;gBAC/B,MAAM,EAAE,GAAG;gBACX,KAAK,EAAE,SAAS;aAChB;SACD,CAAC;IACH,CAAC;IACD,IAAW,OAAO;QACjB,OAAO;YACN;gBACC,CAAC,EAAE,oBAAoB;gBACvB,CAAC,EAAE,UAAU;gBACb,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;gBAClD,CAAC,EAAE,KAAK;aACQ;SACjB,CAAC;IACH,CAAC;IACM,KAAK;QACX,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC9B,CAAC;CACD;AAxCY;IAAX,UAAU;+CAAgC;AAE/B;IAAX,UAAU;qCAAiD;AAQ5D;IADC,MAAM;2CAGN"}
@@ -1,25 +1,25 @@
1
- @import "~@voplus/morpho-theme/styles/index.less";
2
-
3
- :global {
4
- .controller-status {
5
-
6
- &.unconfirmed,
7
- &.unconfirmed:hover {
8
- border: unset;
9
- background: #ffe58f;
10
- color: white;
11
- }
12
-
13
- &.confirmed-not-controller,
14
- &.confirmed-not-controller:hover {
15
- background: @closed-color;
16
- }
17
-
18
- &.confirmed-controller,
19
- &.confirmed-controller:hover {
20
- background: @done-color;
21
- }
22
-
23
- width: 13em;
24
- }
1
+ @import "~@voplus/morpho-theme/styles/index.less";
2
+
3
+ :global {
4
+ .controller-status {
5
+
6
+ &.unconfirmed,
7
+ &.unconfirmed:hover {
8
+ border: unset;
9
+ background: #ffe58f;
10
+ color: white;
11
+ }
12
+
13
+ &.confirmed-not-controller,
14
+ &.confirmed-not-controller:hover {
15
+ background: @closed-color;
16
+ }
17
+
18
+ &.confirmed-controller,
19
+ &.confirmed-controller:hover {
20
+ background: @done-color;
21
+ }
22
+
23
+ width: 13em;
24
+ }
25
25
  }
@@ -1,6 +1,6 @@
1
- :global {
2
- .controller-default-view {
3
- padding: 0 !important;
4
- overflow: hidden;
5
- }
1
+ :global {
2
+ .controller-default-view {
3
+ padding: 0 !important;
4
+ overflow: hidden;
5
+ }
6
6
  }
@@ -1,35 +1,35 @@
1
- @import "~@voplus/morpho-theme/styles/index.less";
2
-
3
- .corporate-menu {
4
- :global {
5
- padding: 4px 0;
6
- list-style-type: none;
7
- background-color: #fff;
8
- background-clip: padding-box;
9
- border-radius: 2px;
10
- outline: none;
11
- box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),
12
- 0 9px 28px 8px rgba(0, 0, 0, 0.05);
13
-
14
- .ant-btn {
15
- display: block;
16
- width: 100%;
17
- padding: 0 12px;
18
- height: 34px;
19
- color: #666;
20
- text-align: left;
21
- &[disabled] {
22
- color: rgba(0, 0, 0, 0.25);
23
- }
24
- &:hover {
25
- background-color: @ant-menu-hover-color;
26
- }
27
- > span {
28
- margin-left: 10px;
29
- }
30
- }
31
- .delete {
32
- color: #f5222d;
33
- }
34
- }
35
- }
1
+ @import "~@voplus/morpho-theme/styles/index.less";
2
+
3
+ .corporate-menu {
4
+ :global {
5
+ padding: 4px 0;
6
+ list-style-type: none;
7
+ background-color: #fff;
8
+ background-clip: padding-box;
9
+ border-radius: 2px;
10
+ outline: none;
11
+ box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),
12
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05);
13
+
14
+ .ant-btn {
15
+ display: block;
16
+ width: 100%;
17
+ padding: 0 12px;
18
+ height: 34px;
19
+ color: #666;
20
+ text-align: left;
21
+ &[disabled] {
22
+ color: rgba(0, 0, 0, 0.25);
23
+ }
24
+ &:hover {
25
+ background-color: @ant-menu-hover-color;
26
+ }
27
+ > span {
28
+ margin-left: 10px;
29
+ }
30
+ }
31
+ .delete {
32
+ color: #f5222d;
33
+ }
34
+ }
35
+ }