@voplus/morpho-csp 1.2.123 → 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 (63) hide show
  1. package/es/data/clda-form/CLDAFormContent.js +4 -0
  2. package/es/data/clda-form/CLDAFormContent.js.map +1 -1
  3. package/es/data/clda-form/interfaces.d.ts +22 -2
  4. package/es/data/clda-form/types.d.ts +44 -17
  5. package/es/data/controller/ControllerStore.d.ts +2 -1
  6. package/es/data/controller/ControllerStore.js +9 -0
  7. package/es/data/controller/ControllerStore.js.map +1 -1
  8. package/es/data/controller/types.d.ts +5 -0
  9. package/es/modules/corporate/company/controller-register/components/ControllerList/index.d.ts +0 -1
  10. package/es/modules/corporate/company/controller-register/components/ControllerList/index.js +48 -32
  11. package/es/modules/corporate/company/controller-register/components/ControllerList/index.js.map +1 -1
  12. package/es/modules/corporate/company/controller-register/components/ControllerList/index.less +10 -15
  13. package/es/modules/corporate/company/controller-register/components/SelectControllerForm/index.d.ts +7 -0
  14. package/es/modules/corporate/company/controller-register/components/SelectControllerForm/index.js +33 -0
  15. package/es/modules/corporate/company/controller-register/components/SelectControllerForm/index.js.map +1 -0
  16. package/es/modules/corporate/company/controller-register/components/SelectControllerForm/index.less +35 -0
  17. package/es/modules/corporate/company/controller-register/components/SelectControllerItem/index.d.ts +7 -0
  18. package/es/modules/corporate/company/controller-register/components/SelectControllerItem/index.js +42 -0
  19. package/es/modules/corporate/company/controller-register/components/SelectControllerItem/index.js.map +1 -0
  20. package/es/modules/corporate/company/controller-register/components/SelectControllerItem/index.less +38 -0
  21. package/es/modules/corporate/company/controller-register/components/SelectControllerList/index.d.ts +6 -0
  22. package/es/modules/corporate/company/controller-register/components/SelectControllerList/index.js +64 -0
  23. package/es/modules/corporate/company/controller-register/components/SelectControllerList/index.js.map +1 -0
  24. package/es/modules/corporate/company/controller-register/components/SelectControllerList/state.d.ts +11 -0
  25. package/es/modules/corporate/company/controller-register/components/SelectControllerList/state.js +47 -0
  26. package/es/modules/corporate/company/controller-register/components/SelectControllerList/state.js.map +1 -0
  27. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/index.d.ts +3 -1
  28. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/index.js +21 -13
  29. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/index.js.map +1 -1
  30. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/state.d.ts +13 -5
  31. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/state.js +37 -11
  32. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/state.js.map +1 -1
  33. package/es/modules/self-registration/clda-form/components/BVICompanyInfo/index.d.ts +6 -0
  34. package/es/modules/self-registration/clda-form/components/BVICompanyInfo/index.js +163 -0
  35. package/es/modules/self-registration/clda-form/components/BVICompanyInfo/index.js.map +1 -0
  36. package/es/modules/self-registration/clda-form/components/BVICompanyInfo/index.less +19 -0
  37. package/es/modules/self-registration/clda-form/components/CompanyInfo/index.js +81 -87
  38. package/es/modules/self-registration/clda-form/components/CompanyInfo/index.js.map +1 -1
  39. package/es/modules/self-registration/clda-form/components/InternalUse/index.js.map +1 -1
  40. package/es/modules/self-registration/clda-form/components/ManagingDirectorList/index.js +4 -4
  41. package/es/modules/self-registration/clda-form/components/ManagingDirectorList/index.js.map +1 -1
  42. package/es/modules/self-registration/clda-form/components/ManagingDirectorList/state.d.ts +2 -1
  43. package/es/modules/self-registration/clda-form/components/ManagingDirectorList/state.js +10 -0
  44. package/es/modules/self-registration/clda-form/components/ManagingDirectorList/state.js.map +1 -1
  45. package/es/modules/self-registration/clda-form/components/NewSecretaryDialog/index.js +14 -16
  46. package/es/modules/self-registration/clda-form/components/NewSecretaryDialog/index.js.map +1 -1
  47. package/es/modules/self-registration/clda-form/components/SecretaryList/index.js +4 -4
  48. package/es/modules/self-registration/clda-form/components/SecretaryList/index.js.map +1 -1
  49. package/es/modules/self-registration/clda-form/components/SecretaryList/state.d.ts +2 -2
  50. package/es/modules/self-registration/clda-form/components/SecretaryList/state.js +3 -3
  51. package/es/modules/self-registration/clda-form/components/SecretaryList/state.js.map +1 -1
  52. package/es/modules/self-registration/clda-form/components/ShareCapital/index.d.ts +10 -4
  53. package/es/modules/self-registration/clda-form/components/ShareCapital/index.js +54 -58
  54. package/es/modules/self-registration/clda-form/components/ShareCapital/index.js.map +1 -1
  55. package/es/modules/self-registration/clda-form/incorporation/bvi/index.d.ts +4 -0
  56. package/es/modules/self-registration/clda-form/incorporation/bvi/index.js +71 -0
  57. package/es/modules/self-registration/clda-form/incorporation/bvi/index.js.map +1 -0
  58. package/es/modules/self-registration/clda-form/incorporation/bvi/index.less +36 -0
  59. package/es/modules/self-registration/clda-form/incorporation/bvi/state.d.ts +7 -0
  60. package/es/modules/self-registration/clda-form/incorporation/bvi/state.js +20 -0
  61. package/es/modules/self-registration/clda-form/incorporation/bvi/state.js.map +1 -0
  62. package/package.json +1 -1
  63. package/es/modules/corporate/company/controller-register/controls/ControllerStatusFilter/index.less +0 -5
@@ -1,11 +1,15 @@
1
1
  import React from "react";
2
2
  import IncorporationSGPForm from "../../modules/self-registration/clda-form/incorporation/sgp/index";
3
+ import IncorporationBVIForm from "../../modules/self-registration/clda-form/incorporation/bvi/index";
3
4
  /** Meta information for Incorporation Form document. */
4
5
  export class CLDAFormContent {
5
6
  getCLDAFormContent(meta, country, props) {
6
7
  if (meta === "INC" && country == "SGP") {
7
8
  return React.createElement(IncorporationSGPForm, { ...props });
8
9
  }
10
+ if (meta === "INC" && country == "VGB") {
11
+ return React.createElement(IncorporationBVIForm, { ...props });
12
+ }
9
13
  return React.createElement(React.Fragment, null);
10
14
  }
11
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CLDAFormContent.js","sourceRoot":"","sources":["../../../src/data/clda-form/CLDAFormContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,oBAAoB,MAAM,mEAAmE,CAAC;AAQrG,wDAAwD;AACxD,MAAM,OAAO,eAAe;IACpB,kBAAkB,CAAC,IAAY,EAAE,OAAe,EAAE,KAAoB;QAC5E,IAAI,IAAI,KAAK,KAAK,IAAI,OAAO,IAAI,KAAK,EAAE;YACvC,OAAO,oBAAC,oBAAoB,OAAK,KAAK,GAAI,CAAC;SAC3C;QACD,OAAO,yCAAK,CAAC;IACd,CAAC;CACD"}
1
+ {"version":3,"file":"CLDAFormContent.js","sourceRoot":"","sources":["../../../src/data/clda-form/CLDAFormContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,oBAAoB,MAAM,mEAAmE,CAAC;AACrG,OAAO,oBAAoB,MAAM,mEAAmE,CAAC;AAQrG,wDAAwD;AACxD,MAAM,OAAO,eAAe;IACpB,kBAAkB,CAAC,IAAY,EAAE,OAAe,EAAE,KAAoB;QAC5E,IAAI,IAAI,KAAK,KAAK,IAAI,OAAO,IAAI,KAAK,EAAE;YACvC,OAAO,oBAAC,oBAAoB,OAAK,KAAK,GAAI,CAAC;SAC3C;QACD,IAAI,IAAI,KAAK,KAAK,IAAI,OAAO,IAAI,KAAK,EAAE;YACvC,OAAO,oBAAC,oBAAoB,OAAK,KAAK,GAAI,CAAC;SAC3C;QACD,OAAO,yCAAK,CAAC;IACd,CAAC;CACD"}
@@ -16,7 +16,7 @@ export interface IShareholderOptions {
16
16
  shares: number;
17
17
  capital: number;
18
18
  }
19
- export interface IFormContent {
19
+ export interface IINCFormContent {
20
20
  /** name of the entity user going to incorporate 实体用户的名称 */
21
21
  legalEntityName: string;
22
22
  /** business activities of the company 公司经营活动 */
@@ -41,8 +41,28 @@ export interface IFormContent {
41
41
  /** list of members */
42
42
  members: IFormPeopleOptions[];
43
43
  }
44
+ export interface IBVIFormContent {
45
+ /** name of the entity user going to incorporate 实体用户的名称 */
46
+ legalEntityName1?: string;
47
+ legalEntityName2?: string;
48
+ legalEntityName3?: string;
49
+ /** business activities of the company 公司经营活动 */
50
+ businessActivitiy?: string;
51
+ /** paid up capital 支付资金 */
52
+ capital?: number;
53
+ /** total number of shares 股份总数 */
54
+ shares?: number;
55
+ fye?: string;
56
+ contacts?: IFormPeopleOptions[];
57
+ officerIds?: string[];
58
+ shareholders?: IShareholderOptions[];
59
+ /** registered address of the company 公司注册地址 */
60
+ tradingAddress?: IAddress;
61
+ useTradingAddressForRecord?: boolean;
62
+ recordAddress?: IAddress;
63
+ }
44
64
  export interface ICLDAForm extends IDocument {
45
- content: IFormContent;
65
+ content: IINCFormContent | IBVIFormContent;
46
66
  /** submit date */
47
67
  submitDate?: string;
48
68
  customer?: {
@@ -56,8 +56,45 @@ export declare type FormPeopleOptions = {
56
56
  }>;
57
57
  Type?: string;
58
58
  };
59
- /** 應該使用PascalCase,edit options 也不應該混用 interface, 有機會改正 - 10 Jun 2022 Alex*/
60
- export declare type EditCLDAFormOptions = {
59
+ export declare type Address = {
60
+ /** Address line 1 */
61
+ Line1: string;
62
+ /** Address line 2 */
63
+ Line2?: string;
64
+ /** City of the address*/
65
+ City?: string;
66
+ /** Province/State of the address */
67
+ State?: string;
68
+ /** Postal code of the address */
69
+ PostalCode?: string;
70
+ /** Country of the address */
71
+ Country: string;
72
+ };
73
+ export declare type BVIFormEditOptions = {
74
+ /** name of the entity user going to incorporate 实体用户的名称 */
75
+ LegalEntityName1?: string;
76
+ LegalEntityName2?: string;
77
+ LegalEntityName3?: string;
78
+ /** business activities of the company 公司经营活动 */
79
+ BusinessActivitiy?: string;
80
+ /** paid up capital 支付资金 */
81
+ Capital?: number;
82
+ /** total number of shares 股份总数 */
83
+ Shares?: number;
84
+ FYE?: string;
85
+ Contacts?: FormPeopleOptions[];
86
+ OfficerIds?: string[];
87
+ Shareholders?: {
88
+ Id: string;
89
+ Shares: number;
90
+ Capital: number;
91
+ }[];
92
+ /** registered address of the company 公司注册地址 */
93
+ TradingAddress?: Address;
94
+ UseTradingAddressForRecord?: boolean;
95
+ RecordAddress?: Address;
96
+ };
97
+ export declare type INCFormEditOptions = {
61
98
  /** name of the entity user going to incorporate 实体用户的名称 */
62
99
  LegalEntityName?: string;
63
100
  /** business activities of the company 公司经营活动 */
@@ -84,19 +121,9 @@ export declare type EditCLDAFormOptions = {
84
121
  /** list of members */
85
122
  Members?: FormPeopleOptions[];
86
123
  /** registered address of the company 公司注册地址 */
87
- Address?: {
88
- /** Address line 1 */
89
- Line1: string;
90
- /** Address line 2 */
91
- Line2?: string;
92
- /** City of the address*/
93
- City?: string;
94
- /** Province/State of the address */
95
- State?: string;
96
- /** Postal code of the address */
97
- PostalCode?: string;
98
- /** Country of the address */
99
- Country: string;
100
- };
101
- Status?: string;
124
+ Address?: Address;
102
125
  };
126
+ /** 應該使用PascalCase,edit options 也不應該混用 interface, 有機會改正 - 10 Jun 2022 Alex*/
127
+ export declare type EditCLDAFormOptions = {
128
+ Status?: string;
129
+ } & BVIFormEditOptions & INCFormEditOptions;
@@ -1,6 +1,6 @@
1
1
  import { ApiEndPoint } from "@voplus/api";
2
2
  import { CountedMap, Store } from "@voplus/morpho-data";
3
- import { CreateControllerOptions, DeleteControllerOptions, EditControllerOptions, LoadControllerOptions } from "./types";
3
+ import { CreateControllerOptions, DeleteControllerOptions, EditControllerOptions, LoadControllerOptions, SelectControllerOptions } from "./types";
4
4
  import { IController } from "./interfaces";
5
5
  import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
6
6
  /** Quotation store supply backend functions. */
@@ -11,6 +11,7 @@ export declare class ControllerStore extends Store {
11
11
  constructor(endpoint: ApiEndPoint);
12
12
  /** All currently used corporate. */
13
13
  readonly items: CountedMap<string, IController>;
14
+ selectController(options: SelectControllerOptions): Promise<IController>;
14
15
  /** Create a new Identity. */
15
16
  create(options: CreateControllerOptions): Promise<IController>;
16
17
  /** Edit an existing item on server. */
@@ -1,6 +1,7 @@
1
1
  import { RequestBuilder } from "@voplus/api";
2
2
  import { CountedMap, Store, useApplicationContext } from "@voplus/morpho-data";
3
3
  import { observable } from "mobx";
4
+ import invariant from "invariant";
4
5
  const StoreName = "ControllerStore";
5
6
  /** Quotation store supply backend functions. */
6
7
  export class ControllerStore extends Store {
@@ -27,6 +28,14 @@ export class ControllerStore extends Store {
27
28
  value: new CountedMap((key) => ({ id: key, loaded: false }), observable.map([], { deep: true }))
28
29
  });
29
30
  }
31
+ async selectController(options) {
32
+ invariant(options.data.ids, "Id cannot be empty.");
33
+ return await this.action(async () => {
34
+ const r = await this.endpoint.post(`/api/controllers/send-notice`, new RequestBuilder().json(options.data));
35
+ const t = (await r.json());
36
+ return t;
37
+ }, options);
38
+ }
30
39
  /** Create a new Identity. */
31
40
  async create(options) {
32
41
  // invariant(options.name, "Name cannot be empty.");
@@ -1 +1 @@
1
- {"version":3,"file":"ControllerStore.js","sourceRoot":"","sources":["../../../src/data/controller/ControllerStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAS/E,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,SAAS,GAAG,iBAAiB,CAAC;AAEpC,gDAAgD;AAChD,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAIzC,YAAmC,QAAqB;QACvD,KAAK,EAAE,CAAC;;;;;mBAD0B;;QAHnC,wBAAwB;QACxB;;;;mBAA+B,SAAS;WAAC;QAMzC,oCAAoC;QACpC;;;;mBAAyD,IAAI,UAAU,CACtE,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAkB,CAAA,EAC5D,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAClC;WAAC;IANF,CAAC;IAQD,6BAA6B;IACtB,KAAK,CAAC,MAAM,CAAC,OAAgC;QACnD,oDAAoD;QACpD,OAAO,MAAM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EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAC9D,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAkB,CAAC;IAC1C,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,EAAU,EAAE,OAA8B;QAC3D,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,IAAI,OAAO,CAAC,QAAQ;YAAE,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC3E,IAAI,KAAK;YAAE,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrC,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,oBAAoB,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;QACpE,OAAO,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;CACD;AAED,2BAA2B;AAC3B,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACtC,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QACjC,OAAO,CAAC,QAAQ,CAAC,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;KACnE;IACD,OAAO,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB,CAAC;AACxD,CAAC,CAAC"}
@@ -40,3 +40,8 @@ export declare type EditControllerOptions = {
40
40
  export declare type DeleteControllerOptions = {
41
41
  data?: DeleteDocumentOptions;
42
42
  } & StoreActionOptions;
43
+ export declare type SelectControllerOptions = {
44
+ data: {
45
+ ids: string[];
46
+ };
47
+ } & StoreActionOptions;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import "./index.less";
3
2
  declare const ControllerList: (props: {
4
3
  parentId: string;
5
4
  allowEdit?: boolean;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { useState } from "react";
2
2
  import { useControllerListEffect, useControllerStore, } from "../../../../../../data/controller";
3
3
  import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data/ListDataContext";
4
4
  import { State } from "./state";
@@ -7,53 +7,69 @@ import { runInAction } from "mobx";
7
7
  import { useAutoUpdateListData } from "@voplus/morpho-document-core";
8
8
  import { useDeepMemo } from "@voplus/morpho-data";
9
9
  import { useRenderOnChange } from "@voplus/morpho-ui";
10
+ import { FilterOptionsContext } from "@voplus/morpho-ui/es/data";
11
+ import { Button } from "@voplus/antd";
12
+ import FilterView from "@voplus/morpho-ui/es/controls/FilterView";
13
+ import SelectControllerForm from "../SelectControllerForm";
10
14
  import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView2";
11
15
  import NewTypeDropdown from "../../../../../../components/NewTypeDropdown";
12
16
  import ControllerItem from "../ControllerItem";
13
17
  import ControllerPropertiesView from "../ControllerPropertiesView";
18
+ import ControllerStatusFilter from "../../controls/ControllerStatusFilter";
14
19
  import UnitsSelectDialog from "@voplus/morpho-org/es/components/UnitsSelectDialog";
15
- import "./index.less";
20
+ import styles from "./index.less";
16
21
  const ControllerList = (props) => {
17
22
  const { parentId, allowEdit } = props;
23
+ const [visible, setVisible] = useState(false);
18
24
  const controllerStore = useControllerStore();
19
25
  const list = useCreateListDataState({
20
26
  filterDefaults: {
21
- filters: [{ c: "ParentNodeId", o: "=", l: "And", v1: parentId }],
27
+ filters: [
28
+ { c: "ParentNodeId", o: "=", l: "And", v1: parentId },
29
+ {
30
+ c: "ConfirmationStatus",
31
+ o: "contains",
32
+ v1: JSON.stringify(["Unconfirmed", "ConfirmedController"]),
33
+ l: "And",
34
+ },
35
+ ],
22
36
  },
23
37
  }, [parentId]);
24
38
  const state = useDeepMemo(() => new State(), [parentId]);
25
39
  useAutoUpdateListData(list, (d) => d.parentId === parentId);
26
40
  useRenderOnChange(() => list.filters.options);
27
41
  useControllerListEffect(list, (result) => list.union(result), list.filters.options);
28
- return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
29
- React.createElement(ListView, { headerProps: {
30
- viewTitle: "Controllers Register",
31
- sortable: false,
32
- addAble: allowEdit !== false,
33
- addOptions: {
34
- children: (React.createElement(NewTypeDropdown, { onSelect: state.onSelect, menus: [
35
- "Director",
36
- "Managing Director",
37
- "Nominee Director",
38
- "Secretary",
39
- "CEO",
40
- "Partner",
41
- "Owner",
42
- "Auditor",
43
- "Manager",
44
- ], style: { marginLeft: "10px" } })),
45
- },
46
- // filterViewProps: {
47
- // columns: [
48
- // <ControllerStatusFilter key="ControllerStatusFilter" />,
49
- // ],
50
- // onFilter,
51
- // },
52
- }, renderItem: ({ item, index }) => {
53
- var _a;
54
- return (React.createElement(ControllerItem, { key: item.id, id: item.id, unitId: item.contact.id, identityId: (_a = item.identity) === null || _a === void 0 ? void 0 : _a.id, index: index, className: index === 0 ? "shareTransaction-item-first" : "" }));
55
- }, propertiesView: (id) => React.createElement(ControllerPropertiesView, { id: id, allowEdit: allowEdit }), className: "controller-list-view" }),
56
- state.addAble && (React.createElement(UnitsSelectDialog, { type: "click", multiSelect: false, onSelect: onSave, onCancel: () => runInAction(() => (state.addAble = false)) })))));
42
+ const header = observe(() => (React.createElement(FilterOptionsContext.Provider, { value: list.filters },
43
+ React.createElement(React.Fragment, null,
44
+ React.createElement("div", { className: "view-title" }, "Controllers Register"),
45
+ React.createElement("div", { className: "view-header-btn" },
46
+ React.createElement(FilterView, { columns: [
47
+ React.createElement(ControllerStatusFilter, { key: "ControllerStatusFilter", defaultValue: ["Unconfirmed", "ConfirmedController"] }),
48
+ ], onFilter: onFilter }),
49
+ allowEdit !== false && (React.createElement(NewTypeDropdown, { onSelect: state.onSelect, menus: [
50
+ "Director",
51
+ "Managing Director",
52
+ "Nominee Director",
53
+ "Secretary",
54
+ "CEO",
55
+ "Partner",
56
+ "Owner",
57
+ "Auditor",
58
+ "Manager",
59
+ ], style: { marginLeft: "10px" } })),
60
+ React.createElement(Button, { className: "margin-left-10", type: "primary", size: "small", loading: state.loading, onClick: () => setVisible(true) }, "Send Notice"))))));
61
+ return observe(() => (React.createElement(React.Fragment, null,
62
+ React.createElement(ListDataContext.Provider, { value: list },
63
+ React.createElement(ListView, { headerProps: {
64
+ header: header,
65
+ sortable: false,
66
+ addAble: false,
67
+ }, renderItem: ({ item, index }) => {
68
+ var _a;
69
+ return (React.createElement(ControllerItem, { key: item.id, id: item.id, unitId: item.contact.id, identityId: (_a = item.identity) === null || _a === void 0 ? void 0 : _a.id, index: index, className: index === 0 ? "shareTransaction-item-first" : "" }));
70
+ }, propertiesView: (id) => React.createElement(ControllerPropertiesView, { id: id, allowEdit: allowEdit }), className: styles["controller-list-view"] }),
71
+ state.addAble && (React.createElement(UnitsSelectDialog, { type: "click", multiSelect: false, onSelect: onSave, onCancel: () => runInAction(() => (state.addAble = false)) }))),
72
+ visible && React.createElement(SelectControllerForm, { parentId: parentId, onCancel: () => setVisible(false) }))));
57
73
  /** 新增controllerItem */
58
74
  async function onSave(unit) {
59
75
  /** SelectLegalContactDialog 选择/新增有identity信息的unit */
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/controller-register/components/ControllerList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEN,uBAAuB,EACvB,kBAAkB,GAClB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACpG,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,qBAAqB,EAAE,MAAM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QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,GACzD,CACF,CACyB,CAC3B,CAAC,CAAC;IAEH,uBAAuB;IACvB,KAAK,UAAU,MAAM,CAAC,IAAkD;QACvE,qDAAqD;QACrD,IAAI,IAAI,EAAE;YACT,MAAM,GAAG,GAAG,MAAM,eAAe,CAAC,MAAM,CAAC;gBACxC,IAAI,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE;gBAC5E,KAAK,EAAE,SAAS;aAChB,CAAC,CAAC;YACH,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;SAClB;QACD,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,SAAS,QAAQ,CAAC,OAAY;QAC7B,OAAO,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC;QACxB,OAAO,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/controller-register/components/ControllerList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAEN,uBAAuB,EACvB,kBAAkB,GAClB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CA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EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,GACzD,CACF,CACyB;QAC1B,OAAO,IAAI,oBAAC,oBAAoB,IAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAI,CAC3E,CACjB,CAAC,CAAC;IAEH,uBAAuB;IACvB,KAAK,UAAU,MAAM,CAAC,IAAkD;QACvE,qDAAqD;QACrD,IAAI,IAAI,EAAE;YACT,MAAM,GAAG,GAAG,MAAM,eAAe,CAAC,MAAM,CAAC;gBACxC,IAAI,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE;gBAC5E,KAAK,EAAE,SAAS;aAChB,CAAC,CAAC;YACH,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;SAClB;QACD,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,SAAS,QAAQ,CAAC,OAAY;QAC7B,OAAO,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC;QACxB,OAAO,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,15 +1,10 @@
1
- @import "~@voplus/antd/es/style/themes/default.less";
2
-
3
- :global {
4
- .controller-list-view {
5
- padding: 0 !important;
6
-
7
- .list-view-header .view-title {
8
- flex: 1;
9
- }
10
-
11
- aside {
12
- border-top: 0;
13
- }
14
- }
15
- }
1
+ @import "~@voplus/antd/es/style/themes/default.less";
2
+
3
+ .controller-list-view {
4
+ :global {
5
+ .view-header-btn {
6
+ display: flex;
7
+ align-items: center;
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare const SelectControllerFormDialog: (props: {
3
+ parentId: string;
4
+ allowEdit?: boolean | undefined;
5
+ onCancel?: (() => void) | undefined;
6
+ }) => JSX.Element;
7
+ export default SelectControllerFormDialog;
@@ -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,E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AQ;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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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