@voplus/morpho-csp 1.0.0-dev002 → 1.0.0-dev004
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/components/CurrencyView/state.js +18 -22
- package/es/components/CurrencyView/state.js.map +1 -1
- package/es/data/corporate/CorporateStore.d.ts +24 -0
- package/es/data/corporate/CorporateStore.js +43 -0
- package/es/data/corporate/CorporateStore.js.map +1 -0
- package/es/data/corporate/hooks.d.ts +10 -0
- package/es/data/corporate/hooks.js +14 -0
- package/es/data/corporate/hooks.js.map +1 -0
- package/es/data/corporate/index.d.ts +4 -0
- package/es/data/corporate/index.js +5 -0
- package/es/data/corporate/index.js.map +1 -0
- package/es/data/corporate/interfaces.d.ts +26 -0
- package/es/data/corporate/interfaces.js +1 -0
- package/es/data/corporate/interfaces.js.map +1 -0
- package/es/data/corporate/types.d.ts +11 -0
- package/es/data/corporate/types.js +1 -0
- package/es/data/corporate/types.js.map +1 -0
- package/es/data/shareTransaction/ShareTransactionStore.d.ts +1 -1
- package/es/data/shareTransaction/ShareTransactionStore.js +1 -1
- package/es/data/shareTransaction/ShareTransactionStore.js.map +1 -1
- package/es/data/shareTransaction/hooks.d.ts +1 -1
- package/es/data/shareTransaction/hooks.js +1 -1
- package/es/data/shareTransaction/hooks.js.map +1 -1
- package/es/data/shareTransaction/interfaces/IShareTransaction.d.ts +1 -3
- package/es/data/shareTransaction/metas.js +5 -9
- package/es/data/shareTransaction/metas.js.map +1 -1
- package/es/data/shareTransaction/types/ShareTransactionCreateOptions.d.ts +1 -1
- package/es/data/shareTransaction/types/ShareTransactionEditOptions.d.ts +1 -3
- package/es/modules/corporate/CorporateDefaultView/index.d.ts +3 -0
- package/es/modules/corporate/CorporateDefaultView/index.js +18 -0
- package/es/modules/corporate/CorporateDefaultView/index.js.map +1 -0
- package/es/modules/corporate/DocumentIconList/index.d.ts +7 -0
- package/es/modules/corporate/DocumentIconList/index.js +32 -0
- package/es/modules/corporate/DocumentIconList/index.js.map +1 -0
- package/es/modules/corporate/DocumentIconList/index.less +14 -0
- package/es/modules/corporate/company/CompanyDefaultView/index.d.ts +7 -0
- package/es/modules/corporate/company/CompanyDefaultView/index.js +43 -0
- package/es/modules/corporate/company/CompanyDefaultView/index.js.map +1 -0
- package/es/modules/corporate/company/CompanyDefaultView/index.less +25 -0
- package/es/modules/corporate/company/CompanyDetailsView/index.d.ts +6 -0
- package/es/modules/corporate/company/CompanyDetailsView/index.js +91 -0
- package/es/modules/corporate/company/CompanyDetailsView/index.js.map +1 -0
- package/es/modules/corporate/company/CompanyDetailsView/index.less +36 -0
- package/es/modules/corporate/company/CompanyDetailsView/state.d.ts +20 -0
- package/es/modules/corporate/company/CompanyDetailsView/state.js +40 -0
- package/es/modules/corporate/company/CompanyDetailsView/state.js.map +1 -0
- package/es/modules/corporate/company/Identity/IdentifyDetail/index.d.ts +6 -0
- package/es/modules/corporate/company/Identity/IdentifyDetail/index.js +31 -0
- package/es/modules/corporate/company/Identity/IdentifyDetail/index.js.map +1 -0
- package/es/modules/corporate/company/Identity/IdentifyDetail/index.less +22 -0
- package/es/modules/corporate/company/Identity/IdentityInformation/index.d.ts +5 -0
- package/es/modules/corporate/company/Identity/IdentityInformation/index.js +59 -0
- package/es/modules/corporate/company/Identity/IdentityInformation/index.js.map +1 -0
- package/es/modules/corporate/company/Identity/IdentityInformation/state.d.ts +15 -0
- package/es/modules/corporate/company/Identity/IdentityInformation/state.js +38 -0
- package/es/modules/corporate/company/Identity/IdentityInformation/state.js.map +1 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page1.d.ts +3 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page1.js +36 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page1.js.map +1 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page2.d.ts +3 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page2.js +16 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page2.js.map +1 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page3.d.ts +3 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page3.js +32 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page3.js.map +1 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page4.d.ts +3 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page4.js +32 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page4.js.map +1 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page5.d.ts +3 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page5.js +33 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page5.js.map +1 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/index.d.ts +7 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/index.js +65 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/index.js.map +1 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/index.less +55 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/state.d.ts +37 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/state.js +71 -0
- package/es/modules/corporate/company/Identity/SelectLegalContactDialog/state.js.map +1 -0
- package/es/modules/corporate/company/Identity/data/IdentityStore.d.ts +23 -0
- package/es/modules/corporate/company/Identity/data/IdentityStore.js +55 -0
- package/es/modules/corporate/company/Identity/data/IdentityStore.js.map +1 -0
- package/es/modules/corporate/company/Identity/data/hooks.d.ts +13 -0
- package/es/modules/corporate/company/Identity/data/hooks.js +31 -0
- package/es/modules/corporate/company/Identity/data/hooks.js.map +1 -0
- package/es/modules/corporate/company/Identity/data/index.d.ts +4 -0
- package/es/modules/corporate/company/Identity/data/index.js +5 -0
- package/es/modules/corporate/company/Identity/data/index.js.map +1 -0
- package/es/modules/corporate/company/Identity/data/interfaces.d.ts +17 -0
- package/es/modules/corporate/company/Identity/data/interfaces.js +1 -0
- package/es/modules/corporate/company/Identity/data/interfaces.js.map +1 -0
- package/es/modules/corporate/company/Identity/data/types.d.ts +16 -0
- package/es/modules/corporate/company/Identity/data/types.js +1 -0
- package/es/modules/corporate/company/Identity/data/types.js.map +1 -0
- package/es/modules/corporate/company/Officer/ContactInformation/index.d.ts +6 -0
- package/es/modules/corporate/company/Officer/ContactInformation/index.js +54 -0
- package/es/modules/corporate/company/Officer/ContactInformation/index.js.map +1 -0
- package/es/modules/corporate/company/Officer/ContactInformation/state.d.ts +20 -0
- package/es/modules/corporate/company/Officer/ContactInformation/state.js +30 -0
- package/es/modules/corporate/company/Officer/ContactInformation/state.js.map +1 -0
- package/es/modules/corporate/company/Officer/OfficerDefaultView/index.d.ts +6 -0
- package/es/modules/corporate/company/Officer/OfficerDefaultView/index.js +33 -0
- package/es/modules/corporate/company/Officer/OfficerDefaultView/index.js.map +1 -0
- package/es/modules/corporate/company/Officer/OfficerDefaultView/index.less +48 -0
- package/es/modules/corporate/company/Officer/OfficerInformation/index.d.ts +3 -0
- package/es/modules/corporate/company/Officer/OfficerInformation/index.js +15 -0
- package/es/modules/corporate/company/Officer/OfficerInformation/index.js.map +1 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerList/index.d.ts +7 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerList/index.js +83 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerList/index.js.map +1 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerList/index.less +15 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerList/state.d.ts +7 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerList/state.js +23 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerList/state.js.map +1 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerRegisterDefaultView/index.d.ts +6 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerRegisterDefaultView/index.js +51 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerRegisterDefaultView/index.js.map +1 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerRegisterDefaultView/index.less +20 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/index.d.ts +3 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/index.js +20 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/index.js.map +1 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/index.less +5 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/state.d.ts +10 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/state.js +25 -0
- package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/state.js.map +1 -0
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionDefaultView/index.js +4 -8
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionDefaultView/index.js.map +1 -1
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItem/index.js +14 -10
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItem/index.js.map +1 -1
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItem/index.less +2 -2
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/TableDataContext.js +51 -55
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/TableDataContext.js.map +1 -1
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/index.js +2 -2
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/index.js.map +1 -1
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionList/index.js +17 -21
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionList/index.js.map +1 -1
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionList/state.js +19 -23
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionList/state.js.map +1 -1
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionRegisterDefaultView/index.js +13 -12
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionRegisterDefaultView/index.js.map +1 -1
- package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionRegisterDefaultView/index.less +2 -6
- package/es/modules/legalEntity/shareTransactionsRegister/ShareholderSelector/index.js +4 -2
- package/es/modules/legalEntity/shareTransactionsRegister/ShareholderSelector/index.js.map +1 -1
- package/es/modules/legalEntity/shareTransactionsRegister/ShareholderSelector/state.js +15 -19
- package/es/modules/legalEntity/shareTransactionsRegister/ShareholderSelector/state.js.map +1 -1
- package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeDropdown/index.js +2 -2
- package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeDropdown/index.js.map +1 -1
- package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/index.js +8 -14
- package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/index.js.map +1 -1
- package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/state.d.ts +10 -0
- package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/state.js +34 -0
- package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/state.js.map +1 -0
- package/es/routes.d.ts +6 -0
- package/es/routes.js +14 -1
- package/es/routes.js.map +1 -1
- package/es/style/common.less +6 -0
- package/package.json +14 -25
- package/es/data/metas.d.ts +0 -0
- package/es/data/metas.js +0 -1
- package/es/data/metas.js.map +0 -1
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { observable } from "mobx";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.dateEdit = false;
|
|
12
|
-
}
|
|
3
|
+
export class State {
|
|
4
|
+
constructor() {
|
|
5
|
+
/** EDit To of the quotation. */
|
|
6
|
+
this.contactEdit = false;
|
|
7
|
+
/** EDit To of the quotation. */
|
|
8
|
+
this.currencyEdit = false;
|
|
9
|
+
/** Edit Date of the quotation. */
|
|
10
|
+
this.dateEdit = false;
|
|
13
11
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
})();
|
|
25
|
-
export { State };
|
|
12
|
+
}
|
|
13
|
+
__decorate([
|
|
14
|
+
observable
|
|
15
|
+
], State.prototype, "contactEdit", void 0);
|
|
16
|
+
__decorate([
|
|
17
|
+
observable
|
|
18
|
+
], State.prototype, "currencyEdit", void 0);
|
|
19
|
+
__decorate([
|
|
20
|
+
observable
|
|
21
|
+
], State.prototype, "dateEdit", void 0);
|
|
26
22
|
export const currencyList = [
|
|
27
23
|
"AFN",
|
|
28
24
|
"EUR",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/CurrencyView/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/CurrencyView/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,OAAO,KAAK;IAAlB;QACC,gCAAgC;QACb,gBAAW,GAAG,KAAK,CAAC;QACvC,gCAAgC;QACb,iBAAY,GAAG,KAAK,CAAC;QACxC,kCAAkC;QACf,aAAQ,GAAG,KAAK,CAAC;IACrC,CAAC;CAAA;AALY;IAAX,UAAU;0CAA4B;AAE3B;IAAX,UAAU;2CAA6B;AAE5B;IAAX,UAAU;uCAAyB;AAGrC,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;CACL,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ApiEndPoint } from "@voplus/api";
|
|
2
|
+
import { Store } from "@voplus/morpho-data";
|
|
3
|
+
import { ICorporate } from "./interfaces";
|
|
4
|
+
import { ICorporateEditOptions } from "./types";
|
|
5
|
+
import { LoadDocumentOptions } from "@voplus/morpho-document-core";
|
|
6
|
+
/** Corporate store supply backend functions. */
|
|
7
|
+
export declare class CorporateStore extends Store {
|
|
8
|
+
readonly endpoint: ApiEndPoint;
|
|
9
|
+
/** Name of the store */
|
|
10
|
+
readonly name: string;
|
|
11
|
+
constructor(endpoint: ApiEndPoint);
|
|
12
|
+
/** Load a corporate from server.
|
|
13
|
+
* @param {string} id - id of the corporate or unit.
|
|
14
|
+
* @param {LoadDocumentOptions} options - Optional load options.
|
|
15
|
+
* 如果从unit 目录下打开使用 /api/units/{unitid}/corporate api,其它情况使用/api/corporates/{id}
|
|
16
|
+
*/
|
|
17
|
+
load(id: string, options: LoadDocumentOptions & {
|
|
18
|
+
unit?: boolean;
|
|
19
|
+
}): Promise<ICorporate>;
|
|
20
|
+
/** Edit an existing item on server. */
|
|
21
|
+
edit(id: string, options: ICorporateEditOptions): Promise<any>;
|
|
22
|
+
}
|
|
23
|
+
/** 响应钩子检索 CorporateStore */
|
|
24
|
+
export declare const useCorporateStore: () => CorporateStore;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { RequestBuilder } from "@voplus/api";
|
|
2
|
+
import { Store, useApplicationContext } from "@voplus/morpho-data";
|
|
3
|
+
const StoreName = "CorporateStore";
|
|
4
|
+
/** Corporate store supply backend functions. */
|
|
5
|
+
export class CorporateStore extends Store {
|
|
6
|
+
constructor(endpoint) {
|
|
7
|
+
super();
|
|
8
|
+
this.endpoint = endpoint;
|
|
9
|
+
/** Name of the store */
|
|
10
|
+
this.name = StoreName;
|
|
11
|
+
}
|
|
12
|
+
/** Load a corporate from server.
|
|
13
|
+
* @param {string} id - id of the corporate or unit.
|
|
14
|
+
* @param {LoadDocumentOptions} options - Optional load options.
|
|
15
|
+
* 如果从unit 目录下打开使用 /api/units/{unitid}/corporate api,其它情况使用/api/corporates/{id}
|
|
16
|
+
*/
|
|
17
|
+
async load(id, options) {
|
|
18
|
+
let query = "";
|
|
19
|
+
if (options.includes)
|
|
20
|
+
query = query.concat(`includes=${options.includes}`);
|
|
21
|
+
if (query)
|
|
22
|
+
query = "?".concat(query);
|
|
23
|
+
const path = options.unit
|
|
24
|
+
? `/api/units/${id}/corporate${query}`
|
|
25
|
+
: `/api/corporates/${id}${query}`;
|
|
26
|
+
const r = await this.endpoint.get(path);
|
|
27
|
+
return await r.json();
|
|
28
|
+
}
|
|
29
|
+
/** Edit an existing item on server. */
|
|
30
|
+
async edit(id, options) {
|
|
31
|
+
const r = await this.endpoint.post(`/api/corporate/${id}/info`, new RequestBuilder().json(options));
|
|
32
|
+
return await r.json();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** 响应钩子检索 CorporateStore */
|
|
36
|
+
export const useCorporateStore = () => {
|
|
37
|
+
const context = useApplicationContext();
|
|
38
|
+
if (!context.getStore(StoreName)) {
|
|
39
|
+
context.addStore(new CorporateStore(context.api.currentEndPoint));
|
|
40
|
+
}
|
|
41
|
+
return context.getStore(StoreName);
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=CorporateStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CorporateStore.js","sourceRoot":"","sources":["../../../src/data/corporate/CorporateStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAMnE,MAAM,SAAS,GAAG,gBAAgB,CAAC;AAEnC,gDAAgD;AAChD,MAAM,OAAO,cAAe,SAAQ,KAAK;IAIxC,YAAmC,QAAqB;QACvD,KAAK,EAAE,CAAC;QAD0B,aAAQ,GAAR,QAAQ,CAAa;QAHxD,wBAAwB;QACR,SAAI,GAAW,SAAS,CAAC;IAIzC,CAAC;IAED;;;;OAIG;IAEI,KAAK,CAAC,IAAI,CAChB,EAAU,EACV,OAAiD;QAEjD,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,IAAI,GAAG,OAAO,CAAC,IAAI;YACxB,CAAC,CAAC,cAAc,EAAE,aAAa,KAAK,EAAE;YACtC,CAAC,CAAC,mBAAmB,EAAE,GAAG,KAAK,EAAE,CAAC;QACnC,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxC,OAAO,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;IAED,uCAAuC;IAChC,KAAK,CAAC,IAAI,CAAC,EAAU,EAAE,OAA8B;QAC3D,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CACjC,kBAAkB,EAAE,OAAO,EAC3B,IAAI,cAAc,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAClC,CAAC;QAEF,OAAO,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;CACD;AAED,4BAA4B;AAC5B,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACrC,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QACjC,OAAO,CAAC,QAAQ,CAAC,IAAI,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;KAClE;IACD,OAAO,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoB,CAAC;AACvD,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICorporate } from "./interfaces";
|
|
2
|
+
/** React hook to retrieve a quotation
|
|
3
|
+
* @param {string} id - id of the quotation
|
|
4
|
+
* @param {LoadDocumentOptions} options - options
|
|
5
|
+
*/
|
|
6
|
+
export declare const useCorporate: (id: string, options?: ({
|
|
7
|
+
includes?: string | undefined;
|
|
8
|
+
} & import("@voplus/morpho-data").LoadOptions<import("@voplus/morpho-document-core").IDocument> & {
|
|
9
|
+
unit?: boolean | undefined;
|
|
10
|
+
}) | undefined) => ICorporate;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useDocumentStore } from "@voplus/morpho-document-core";
|
|
2
|
+
import { useCorporateStore } from "./CorporateStore";
|
|
3
|
+
import { useLoadCountedMapItem } from "@voplus/morpho-data";
|
|
4
|
+
/** React hook to retrieve a quotation
|
|
5
|
+
* @param {string} id - id of the quotation
|
|
6
|
+
* @param {LoadDocumentOptions} options - options
|
|
7
|
+
*/
|
|
8
|
+
export const useCorporate = (id, options) => {
|
|
9
|
+
options = options ? options : {};
|
|
10
|
+
const store = useCorporateStore();
|
|
11
|
+
const documents = useDocumentStore();
|
|
12
|
+
return useLoadCountedMapItem(id, documents.items, () => store.load(id, options), options);
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/data/corporate/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAU,EAAE,OAAkD,EAAE,EAAE;IAC9F,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA0B,CAAC;IAC1D,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC;IAClC,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IAErC,OAAO,qBAAqB,CAC3B,EAAE,EACF,SAAS,CAAC,KAAK,EACf,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,OAAQ,CAAC,EAC9B,OAAO,CACO,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data/corporate/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IAddress } from "@voplus/morpho-org";
|
|
2
|
+
import { IDocument } from "@voplus/morpho-document-core";
|
|
3
|
+
export interface ICorporate extends IDocument {
|
|
4
|
+
/** id of corporate */
|
|
5
|
+
id: string;
|
|
6
|
+
/** name of unit */
|
|
7
|
+
name: string;
|
|
8
|
+
/** */
|
|
9
|
+
jurisdiction: string;
|
|
10
|
+
/** type of corporate */
|
|
11
|
+
corporateType: string;
|
|
12
|
+
/** */
|
|
13
|
+
liabilityType: string;
|
|
14
|
+
/** id of registration of company */
|
|
15
|
+
registersId: string;
|
|
16
|
+
/** number of registration of company */
|
|
17
|
+
registrationNumber: number;
|
|
18
|
+
/** date of registration of company */
|
|
19
|
+
registrationDate: Date;
|
|
20
|
+
/** address of registration of company */
|
|
21
|
+
registeredAddress: IAddress;
|
|
22
|
+
/** */
|
|
23
|
+
allowedJurisdictions: string[];
|
|
24
|
+
/** 客户查看时不可编辑 */
|
|
25
|
+
allowEdit: boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=interfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/data/corporate/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IAddress } from "@voplus/morpho-org";
|
|
2
|
+
export declare type ICorporateEditOptions = {
|
|
3
|
+
/** Number of Registration */
|
|
4
|
+
RegistrationNumber: number | string;
|
|
5
|
+
/** Jurisdiction of Company */
|
|
6
|
+
Jurisdiction: string;
|
|
7
|
+
/** Address of Registration Company */
|
|
8
|
+
RegisteredAddress: IAddress;
|
|
9
|
+
/** Date of Registration */
|
|
10
|
+
RegistrationDate: Date;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/data/corporate/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DocumentStore, DocumentTypeStore, LoadDocumentListOptions, LoadDocumentOptions } from "@voplus/morpho-document";
|
|
1
|
+
import { DocumentStore, DocumentTypeStore, LoadDocumentListOptions, LoadDocumentOptions } from "@voplus/morpho-document-core";
|
|
2
2
|
import { ShareTransactionCreateOptions, ShareTransactionEditOptions } from "./types";
|
|
3
3
|
import { ApiEndPoint } from "@voplus/api";
|
|
4
4
|
import { IShareTransaction } from "./interfaces";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DocumentTypeStore, useDocumentStore } from "@voplus/morpho-document";
|
|
1
|
+
import { DocumentTypeStore, useDocumentStore } from "@voplus/morpho-document-core";
|
|
2
2
|
import { useStore } from "@voplus/morpho-data";
|
|
3
3
|
const StoreName = "ShareTransactionStore";
|
|
4
4
|
/** Quotation store supply backend functions. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareTransactionStore.js","sourceRoot":"","sources":["../../../src/data/shareTransaction/ShareTransactionStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EAGjB,gBAAgB,EAChB,MAAM,
|
|
1
|
+
{"version":3,"file":"ShareTransactionStore.js","sourceRoot":"","sources":["../../../src/data/shareTransaction/ShareTransactionStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EAGjB,gBAAgB,EAChB,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,SAAS,GAAG,uBAAuB,CAAC;AAE1C,gDAAgD;AAChD,MAAM,OAAO,qBAAsB,SAAQ,iBAO1C;IAIA,YAAmB,QAAqB,EAAE,SAAwB;QACjE,KAAK,CAAC,QAAQ,EAAE,yBAAyB,EAAE,SAAS,CAAC,CAAC;QAJvD,wBAAwB;QACR,SAAI,GAAW,SAAS,CAAC;IAIzC,CAAC;CACD;AAED,mCAAmC;AACnC,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,EAAE;IAC5C,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,OAAO,QAAQ,CACd,SAAS,EACT,OAAO,CAAC,EAAE,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,SAAS,CAAC,CAC5E,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IShareTransaction } from ".";
|
|
2
|
-
import { LoadDocumentListOptions, LoadDocumentOptions } from "@voplus/morpho-document";
|
|
2
|
+
import { LoadDocumentListOptions, LoadDocumentOptions } from "@voplus/morpho-document-core";
|
|
3
3
|
import { ListDataContextState } from "@voplus/morpho-ui/es/data";
|
|
4
4
|
/** React hook to retrieve a quotation
|
|
5
5
|
* @param {string} id - id of the quotation
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useShareTransactionStore } from ".";
|
|
2
|
-
import { useDocumentListLoaderEffect, useDocumentStore } from "@voplus/morpho-document";
|
|
2
|
+
import { useDocumentListLoaderEffect, useDocumentStore } from "@voplus/morpho-document-core";
|
|
3
3
|
import { useLoadCountedMapItem } from "@voplus/morpho-data";
|
|
4
4
|
/** React hook to retrieve a quotation
|
|
5
5
|
* @param {string} id - id of the quotation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/data/shareTransaction/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAChE,OAAO,EAGN,2BAA2B,EAC3B,gBAAgB,EAChB,MAAM,
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/data/shareTransaction/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAChE,OAAO,EAGN,2BAA2B,EAC3B,gBAAgB,EAChB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAU,EAAE,OAA6B,EAAE,EAAE;IAChF,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA0B,CAAC;IAC1D,MAAM,KAAK,GAAG,wBAAwB,EAAE,CAAC;IACzC,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IAErC,OAAO,qBAAqB,CAC3B,EAAE,EACF,SAAS,CAAC,KAAK,EACf,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,OAAQ,CAAC,EAC9B,OAAO,CACc,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC5C,IAAsC,EACtC,MAA6B,EAC7B,OAAiC,EAChC,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA8B,CAAC;IACjE,MAAM,KAAK,GAAG,wBAAwB,EAAE,CAAC;IAEzC,mFAAmF;IACnF,OAAO,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AACzF,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDocument } from "@voplus/morpho-document";
|
|
1
|
+
import { IDocument } from "@voplus/morpho-document-core";
|
|
2
2
|
import { IShareTransactionLine } from "./IShareTransactionLine";
|
|
3
3
|
import { ShareTransactionType } from "../types/ShareTransactionType";
|
|
4
4
|
export interface IShareTransaction extends IDocument {
|
|
@@ -11,8 +11,6 @@ export interface IShareTransaction extends IDocument {
|
|
|
11
11
|
number: string;
|
|
12
12
|
/** Currency of the quotation */
|
|
13
13
|
currency: string;
|
|
14
|
-
/** Date of the quotation */
|
|
15
|
-
date?: Date;
|
|
16
14
|
/** */
|
|
17
15
|
transactionType: ShareTransactionType;
|
|
18
16
|
/** Lines of the quotation. */
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { DefaultDocumentTypeMeta } from "@voplus/morpho-document";
|
|
2
2
|
/** Meta information for Meeting document. */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return ShareTransactionTypeMeta.TypeName;
|
|
7
|
-
}
|
|
3
|
+
export class ShareTransactionTypeMeta extends DefaultDocumentTypeMeta {
|
|
4
|
+
get name() {
|
|
5
|
+
return ShareTransactionTypeMeta.TypeName;
|
|
8
6
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})();
|
|
12
|
-
export { ShareTransactionTypeMeta };
|
|
7
|
+
}
|
|
8
|
+
ShareTransactionTypeMeta.TypeName = "ShareTransaction";
|
|
13
9
|
//# sourceMappingURL=metas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metas.js","sourceRoot":"","sources":["../../../src/data/shareTransaction/metas.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE,6CAA6C;AAC7C
|
|
1
|
+
{"version":3,"file":"metas.js","sourceRoot":"","sources":["../../../src/data/shareTransaction/metas.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE,6CAA6C;AAC7C,MAAM,OAAO,wBAAyB,SAAQ,uBAAuB;IAGpE,IAAW,IAAI;QACd,OAAO,wBAAwB,CAAC,QAAQ,CAAC;IAC1C,CAAC;;AAJa,iCAAQ,GAAG,kBAAkB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateDocumentOptions } from "@voplus/morpho-document
|
|
1
|
+
import { CreateDocumentOptions } from "@voplus/morpho-document-core";
|
|
2
2
|
import { ShareTransactionType } from "./ShareTransactionType";
|
|
3
3
|
export declare type ShareTransactionCreateOptions = {
|
|
4
4
|
ParentId: string;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { EditDocumentOptions } from "@voplus/morpho-document
|
|
1
|
+
import { EditDocumentOptions } from "@voplus/morpho-document-core";
|
|
2
2
|
import { ShareLineCreateOptions } from "./ShareLineCreateOptions";
|
|
3
3
|
export declare type ShareTransactionEditOptions = {
|
|
4
4
|
/** Currency of the ShareTransaction */
|
|
5
5
|
Currency?: string;
|
|
6
|
-
/** DateTime of the ShareTransaction. */
|
|
7
|
-
Date?: Date;
|
|
8
6
|
/** Array of lines to be updated */
|
|
9
7
|
Lines?: ShareLineCreateOptions[];
|
|
10
8
|
} & EditDocumentOptions;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import CompanyDefaultView from "../company/CompanyDefaultView";
|
|
2
|
+
import { LoadingOutlined } from "@ant-design/icons";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Spin } from "@voplus/antd";
|
|
5
|
+
import { useCorporate } from "../../../data/corporate";
|
|
6
|
+
import { useObserver } from "mobx-react-lite";
|
|
7
|
+
import { useRouteMatch } from "react-router";
|
|
8
|
+
const CorporateDefaultView = () => {
|
|
9
|
+
const match = useRouteMatch();
|
|
10
|
+
const id = match.params.id;
|
|
11
|
+
const unitId = match.params.unitId;
|
|
12
|
+
const corporate = useCorporate(unitId || id, { reload: true, unit: !!unitId });
|
|
13
|
+
console.log(corporate, "corporate");
|
|
14
|
+
return useObserver(() => (React.createElement(React.Fragment, null, corporate.loading ? (React.createElement("div", { style: { textAlign: "center" } },
|
|
15
|
+
React.createElement(Spin, { indicator: React.createElement(LoadingOutlined, { style: { fontSize: 24 }, spin: true }) }))) : (React.createElement(CompanyDefaultView, { corporate: corporate })))));
|
|
16
|
+
};
|
|
17
|
+
export default CorporateDefaultView;
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/corporate/CorporateDefaultView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACjC,MAAM,KAAK,GAAG,aAAa,EAAmC,CAAC;IAC/D,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;IAEnC,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC/E,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IAEpC,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,oBAAC,KAAK,CAAC,QAAQ,QACb,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CACpB,6BAAK,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE;QAClC,oBAAC,IAAI,IAAC,SAAS,EAAE,oBAAC,eAAe,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,SAAG,GAAI,CACjE,CACN,CAAC,CAAC,CAAC,CACH,oBAAC,kBAAkB,IAAC,SAAS,EAAE,SAAS,GAAI,CAC5C,CACe,CACjB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import "./index.less";
|
|
2
|
+
import { Empty, Spin } from "@voplus/antd";
|
|
3
|
+
import { useDocumentListEffect } from "@voplus/morpho-document-core";
|
|
4
|
+
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
|
5
|
+
import DocumentIcon from "@voplus/morpho-document/es/pages/VSubmit/components/DocumentIcon";
|
|
6
|
+
import { LoadingOutlined } from "@ant-design/icons";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import Scrollbars from "react-custom-scrollbars";
|
|
9
|
+
import { useObserver } from "mobx-react-lite";
|
|
10
|
+
const DocumentIconList = (props) => {
|
|
11
|
+
const { id, scroll } = props;
|
|
12
|
+
const list = useCreateListDataState({
|
|
13
|
+
filterDefaults: {
|
|
14
|
+
includes: "tags,path",
|
|
15
|
+
// page: { Page: 1, PageSize: 100 },
|
|
16
|
+
filters: [{ c: "ParentNodeId", o: "=", l: "And", v1: id }]
|
|
17
|
+
}
|
|
18
|
+
}, [id]);
|
|
19
|
+
/** 把ListDataState传给useDocumentListEffect,使之可以自動更新loading, hasmore. */
|
|
20
|
+
useDocumentListEffect(list, result => list.union(result), list.filters.options);
|
|
21
|
+
const ListView = useObserver(() => (React.createElement(React.Fragment, null,
|
|
22
|
+
!list.isEmpty && (React.createElement("div", { className: "document-icon-view_list" }, list.data.map(i => (React.createElement(DocumentIcon, { id: i.id, key: i.id }))))),
|
|
23
|
+
list.loading && (React.createElement("div", { className: "document-icon-list_loading" },
|
|
24
|
+
React.createElement(Spin, { tip: "Loading...", indicator: React.createElement(LoadingOutlined, null) }))),
|
|
25
|
+
list.isEmpty && !list.loading && React.createElement(Empty, { className: "document-icon-list_empty" }))));
|
|
26
|
+
return useObserver(() => (React.createElement(ListDataContext.Provider, { value: list }, scroll !== false ? React.createElement(Scrollbars, { autoHide: true }, ListView) : ListView)));
|
|
27
|
+
function loadMore() {
|
|
28
|
+
list.triggerNextPage();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export default DocumentIconList;
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/corporate/DocumentIconList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAGN,qBAAqB,EACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEpF,OAAO,YAAY,MAAM,kEAAkE,CAAC;AAE5F,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAIjD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,gBAAgB,GAAG,CAAC,KAAuC,EAAE,EAAE;IACpE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAE7B,MAAM,IAAI,GAAG,sBAAsB,CAClC;QACC,cAAc,EAAE;YACf,QAAQ,EAAE,WAAW;YACrB,oCAAoC;YACpC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;SAC1D;KACD,EACD,CAAC,EAAE,CAAC,CACJ,CAAC;IAEF,sEAAsE;IACtE,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAEhF,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,CAClC,oBAAC,KAAK,CAAC,QAAQ;QACb,CAAC,IAAI,CAAC,OAAO,IAAI,CACjB,6BAAK,SAAS,EAAC,yBAAyB,IACtC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CACnB,oBAAC,YAAY,IAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAI,CACrC,CAAC,CACG,CACN;QACA,IAAI,CAAC,OAAO,IAAI,CAChB,6BAAK,SAAS,EAAC,4BAA4B;YAC1C,oBAAC,IAAI,IAAC,GAAG,EAAC,YAAY,EAAC,SAAS,EAAE,oBAAC,eAAe,OAAG,GAAI,CACpD,CACN;QACA,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,oBAAC,KAAK,IAAC,SAAS,EAAC,0BAA0B,GAAG,CAChE,CACjB,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,oBAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,IACnC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,oBAAC,UAAU,IAAC,QAAQ,UAAE,QAAQ,CAAc,CAAC,CAAC,CAAC,QAAQ,CACjD,CAC3B,CAAC,CAAC;IACH,SAAS,QAAQ;QAChB,IAAI,CAAC,eAAe,EAAE,CAAC;IACxB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
:global {
|
|
2
|
+
.document-icon-view_list {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
padding: 0.75rem;
|
|
6
|
+
margin: 1rem 1.25rem;
|
|
7
|
+
background-color: #fff;
|
|
8
|
+
}
|
|
9
|
+
.document-icon-list_loading,
|
|
10
|
+
.document-icon-list_empty {
|
|
11
|
+
padding: 20px 0;
|
|
12
|
+
text-align: center;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "./index.less";
|
|
2
|
+
import { useDocumentListEffect } from "@voplus/morpho-document-core";
|
|
3
|
+
import React, { useState } from "react";
|
|
4
|
+
import CompanyDetailsView from "../CompanyDetailsView";
|
|
5
|
+
import DocumentIconList from "../../DocumentIconList";
|
|
6
|
+
import MainContent from "@voplus/morpho-ui/es/components/layout/MainContent";
|
|
7
|
+
import { Menu } from "@voplus/antd";
|
|
8
|
+
import OfficerDefaultView from "../Officer/OfficerDefaultView";
|
|
9
|
+
import OfficerRegisterDefaultView from "../OfficerRegister/OfficerRegisterDefaultView";
|
|
10
|
+
import Scrollbars from "react-custom-scrollbars";
|
|
11
|
+
import { useObserver } from "mobx-react-lite";
|
|
12
|
+
import { useTabItem } from "@voplus/morpho-data";
|
|
13
|
+
const CompanyDefaultView = (props) => {
|
|
14
|
+
const { corporate } = props;
|
|
15
|
+
const [menuKey, setMenuKey] = useState("Company");
|
|
16
|
+
const [documents, setDocuments] = useState([]);
|
|
17
|
+
useDocumentListEffect(null, (list) => {
|
|
18
|
+
setDocuments(list || []);
|
|
19
|
+
}, { Filters: [{ c: "ParentNodeId", o: "=", l: "And", v1: corporate.registersId }] });
|
|
20
|
+
const tab = useTabItem();
|
|
21
|
+
// useEffect(() => {
|
|
22
|
+
// tab.title = corporate?.name;
|
|
23
|
+
// }, [corporate?.name]);
|
|
24
|
+
return useObserver(() => (React.createElement(MainContent, { className: "company-default-view" },
|
|
25
|
+
React.createElement(MainContent.Nav, { collapsible: true },
|
|
26
|
+
React.createElement(Scrollbars, { autoHide: true },
|
|
27
|
+
React.createElement(Menu, { mode: "inline", defaultSelectedKeys: ["Company"], onClick: onClick },
|
|
28
|
+
React.createElement(Menu.Item, { key: "Company" }, "Company Details"),
|
|
29
|
+
React.createElement(Menu.SubMenu, { key: "Registers", title: "Registers" },
|
|
30
|
+
React.createElement(Menu.Item, { key: "RegisterOfficers" }, "Officers"),
|
|
31
|
+
React.createElement(Menu.Item, { key: "RegisterShare" }, "RegisterShare")),
|
|
32
|
+
React.createElement(Menu.Item, { key: "Documents" }, "Documents")))),
|
|
33
|
+
menuKey === "Documents" ? (React.createElement(DocumentIconList, { id: "c4f7edf7-53b1-41f4-93cf-ac2b00239da8" })) : // : menuKey === "Registers" ? (
|
|
34
|
+
// <DocumentCardList id={corporate.registersId} />
|
|
35
|
+
// )
|
|
36
|
+
menuKey === "RegisterOfficers" ? (React.createElement(OfficerDefaultView, { id: "1b9bef21-526f-4ea1-8e3f-12ced14ef92c" })) : menuKey === "RegisterShare" ? (React.createElement(OfficerRegisterDefaultView, { id: "36400a12-643b-48da-846e-ac30002c9f7b" })) : (React.createElement(CompanyDetailsView, { id: corporate.id })))));
|
|
37
|
+
function onClick({ key }) {
|
|
38
|
+
setMenuKey(key.toString());
|
|
39
|
+
console.log(key, "key");
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export default CompanyDefaultView;
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/corporate/company/CompanyDefaultView/index.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
:global {
|
|
2
|
+
.company-default-view {
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
.main-content-nav {
|
|
7
|
+
width: 280px;
|
|
8
|
+
box-shadow: 2px 0 8px 0px rgba(0, 0, 0, 0.15) !important;
|
|
9
|
+
.main-nav-container {
|
|
10
|
+
box-shadow: none;
|
|
11
|
+
}
|
|
12
|
+
.ant-menu {
|
|
13
|
+
font-weight: normal;
|
|
14
|
+
color: #000 !important;
|
|
15
|
+
.ant-menu-item:not(.ant-menu-item-disabled) {
|
|
16
|
+
color: #000 !important;
|
|
17
|
+
}
|
|
18
|
+
.svg-inline--fa {
|
|
19
|
+
min-width: 14px;
|
|
20
|
+
margin-right: 10px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|