@etsoo/smarterp-core 1.0.16 → 1.0.17

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.
@@ -1,5 +1,6 @@
1
1
  import { TiplistProps } from "@etsoo/materialui";
2
2
  import { OrgListDto } from "../../dto/org/OrgListDto";
3
+ import { OrgListRQ } from "../../rq/org/OrgListRQ";
3
4
  /**
4
5
  * Organization tiplist properties
5
6
  * 机构提示列表属性
@@ -13,6 +14,10 @@ export type OrgTiplistProps = Omit<TiplistProps<OrgListDto, "id">, "loadData" |
13
14
  * Name
14
15
  */
15
16
  name?: string;
17
+ /**
18
+ * Default request data
19
+ */
20
+ rq?: Partial<OrgListRQ>;
16
21
  };
17
22
  /**
18
23
  * Organization tiplist
@@ -14,10 +14,10 @@ function OrgTiplist(props) {
14
14
  // App
15
15
  const app = (0, ICoreServiceApp_1.useRequiredAppContext)();
16
16
  // Destruct
17
- const { fullWidth = true, label = app.get("org"), maxItems = 10, getOptionLabel = (data) => data.name + "(" + data.pin + ")", name = "organizationId", ...rest } = props;
17
+ const { fullWidth = true, label = app.get("org"), maxItems = 10, getOptionLabel = (data) => data.name + "(" + data.pin + ")", name = "organizationId", rq = { enabled: true }, ...rest } = props;
18
18
  // Layout
19
19
  return ((0, jsx_runtime_1.jsx)(materialui_1.Tiplist, { label: label, getOptionLabel: getOptionLabel, name: name, fullWidth: fullWidth, maxItems: maxItems, loadData: (keyword, id, maxItems) => app.core.orgApi.list({
20
- enabled: true,
20
+ ...rq,
21
21
  keyword,
22
22
  id,
23
23
  queryPaging: {
@@ -1,5 +1,6 @@
1
1
  import { TiplistProps } from "@etsoo/materialui";
2
2
  import { MemberListDto } from "../../dto/member/MemberListDto";
3
+ import { MemberListRQ } from "../../rq/member/MemberListRQ";
3
4
  /**
4
5
  * User tiplist properties
5
6
  * 用户提示列表属性
@@ -13,6 +14,10 @@ export type UserTiplistProps = Omit<TiplistProps<MemberListDto, "id">, "loadData
13
14
  * Name
14
15
  */
15
16
  name?: string;
17
+ /**
18
+ * Default request data
19
+ */
20
+ rq?: Partial<MemberListRQ>;
16
21
  };
17
22
  /**
18
23
  * User tiplist
@@ -14,10 +14,10 @@ function UserTiplist(props) {
14
14
  // App
15
15
  const app = (0, ICoreServiceApp_1.useRequiredAppContext)();
16
16
  // Destruct
17
- const { fullWidth = true, label = app.get("user"), maxItems = 10, getOptionLabel = (data) => data.name, name = "userId", ...rest } = props;
17
+ const { fullWidth = true, label = app.get("user"), maxItems = 10, getOptionLabel = (data) => data.name, name = "userId", rq = { enabled: true }, ...rest } = props;
18
18
  // Layout
19
19
  return ((0, jsx_runtime_1.jsx)(materialui_1.Tiplist, { label: label, getOptionLabel: getOptionLabel, name: name, fullWidth: fullWidth, maxItems: maxItems, loadData: (keyword, id, maxItems) => app.core.memberApi.list({
20
- enabled: true,
20
+ ...rq,
21
21
  keyword,
22
22
  id,
23
23
  queryPaging: {
@@ -15,4 +15,14 @@ export type MemberListRQ = StatusQueryRQ & {
15
15
  * User role start
16
16
  */
17
17
  userRoleStart?: UserRole;
18
+ /**
19
+ * Inviter id
20
+ * 邀请人编号
21
+ */
22
+ inviterId?: number;
23
+ /**
24
+ * Report to
25
+ * 汇报对象
26
+ */
27
+ reportTo?: number;
18
28
  };
@@ -1,5 +1,6 @@
1
1
  import { TiplistProps } from "@etsoo/materialui";
2
2
  import { OrgListDto } from "../../dto/org/OrgListDto";
3
+ import { OrgListRQ } from "../../rq/org/OrgListRQ";
3
4
  /**
4
5
  * Organization tiplist properties
5
6
  * 机构提示列表属性
@@ -13,6 +14,10 @@ export type OrgTiplistProps = Omit<TiplistProps<OrgListDto, "id">, "loadData" |
13
14
  * Name
14
15
  */
15
16
  name?: string;
17
+ /**
18
+ * Default request data
19
+ */
20
+ rq?: Partial<OrgListRQ>;
16
21
  };
17
22
  /**
18
23
  * Organization tiplist
@@ -11,10 +11,10 @@ export function OrgTiplist(props) {
11
11
  // App
12
12
  const app = useRequiredAppContext();
13
13
  // Destruct
14
- const { fullWidth = true, label = app.get("org"), maxItems = 10, getOptionLabel = (data) => data.name + "(" + data.pin + ")", name = "organizationId", ...rest } = props;
14
+ const { fullWidth = true, label = app.get("org"), maxItems = 10, getOptionLabel = (data) => data.name + "(" + data.pin + ")", name = "organizationId", rq = { enabled: true }, ...rest } = props;
15
15
  // Layout
16
16
  return (_jsx(Tiplist, { label: label, getOptionLabel: getOptionLabel, name: name, fullWidth: fullWidth, maxItems: maxItems, loadData: (keyword, id, maxItems) => app.core.orgApi.list({
17
- enabled: true,
17
+ ...rq,
18
18
  keyword,
19
19
  id,
20
20
  queryPaging: {
@@ -1,5 +1,6 @@
1
1
  import { TiplistProps } from "@etsoo/materialui";
2
2
  import { MemberListDto } from "../../dto/member/MemberListDto";
3
+ import { MemberListRQ } from "../../rq/member/MemberListRQ";
3
4
  /**
4
5
  * User tiplist properties
5
6
  * 用户提示列表属性
@@ -13,6 +14,10 @@ export type UserTiplistProps = Omit<TiplistProps<MemberListDto, "id">, "loadData
13
14
  * Name
14
15
  */
15
16
  name?: string;
17
+ /**
18
+ * Default request data
19
+ */
20
+ rq?: Partial<MemberListRQ>;
16
21
  };
17
22
  /**
18
23
  * User tiplist
@@ -11,10 +11,10 @@ export function UserTiplist(props) {
11
11
  // App
12
12
  const app = useRequiredAppContext();
13
13
  // Destruct
14
- const { fullWidth = true, label = app.get("user"), maxItems = 10, getOptionLabel = (data) => data.name, name = "userId", ...rest } = props;
14
+ const { fullWidth = true, label = app.get("user"), maxItems = 10, getOptionLabel = (data) => data.name, name = "userId", rq = { enabled: true }, ...rest } = props;
15
15
  // Layout
16
16
  return (_jsx(Tiplist, { label: label, getOptionLabel: getOptionLabel, name: name, fullWidth: fullWidth, maxItems: maxItems, loadData: (keyword, id, maxItems) => app.core.memberApi.list({
17
- enabled: true,
17
+ ...rq,
18
18
  keyword,
19
19
  id,
20
20
  queryPaging: {
@@ -15,4 +15,14 @@ export type MemberListRQ = StatusQueryRQ & {
15
15
  * User role start
16
16
  */
17
17
  userRoleStart?: UserRole;
18
+ /**
19
+ * Inviter id
20
+ * 邀请人编号
21
+ */
22
+ inviterId?: number;
23
+ /**
24
+ * Report to
25
+ * 汇报对象
26
+ */
27
+ reportTo?: number;
18
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/smarterp-core",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "TypeScript APIs for SmartERP Core",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -1,6 +1,7 @@
1
1
  import { Tiplist, TiplistProps } from "@etsoo/materialui";
2
2
  import { OrgListDto } from "../../dto/org/OrgListDto";
3
3
  import { useRequiredAppContext } from "../../ICoreServiceApp";
4
+ import { OrgListRQ } from "../../rq/org/OrgListRQ";
4
5
 
5
6
  /**
6
7
  * Organization tiplist properties
@@ -19,6 +20,11 @@ export type OrgTiplistProps = Omit<
19
20
  * Name
20
21
  */
21
22
  name?: string;
23
+
24
+ /**
25
+ * Default request data
26
+ */
27
+ rq?: Partial<OrgListRQ>;
22
28
  };
23
29
 
24
30
  /**
@@ -38,6 +44,7 @@ export function OrgTiplist(props: OrgTiplistProps) {
38
44
  maxItems = 10,
39
45
  getOptionLabel = (data) => data.name + "(" + data.pin + ")",
40
46
  name = "organizationId",
47
+ rq = { enabled: true },
41
48
  ...rest
42
49
  } = props;
43
50
 
@@ -52,7 +59,7 @@ export function OrgTiplist(props: OrgTiplistProps) {
52
59
  loadData={(keyword, id, maxItems) =>
53
60
  app.core.orgApi.list(
54
61
  {
55
- enabled: true,
62
+ ...rq,
56
63
  keyword,
57
64
  id,
58
65
  queryPaging: {
@@ -1,6 +1,7 @@
1
1
  import { Tiplist, TiplistProps } from "@etsoo/materialui";
2
2
  import { useRequiredAppContext } from "../../ICoreServiceApp";
3
3
  import { MemberListDto } from "../../dto/member/MemberListDto";
4
+ import { MemberListRQ } from "../../rq/member/MemberListRQ";
4
5
 
5
6
  /**
6
7
  * User tiplist properties
@@ -19,6 +20,11 @@ export type UserTiplistProps = Omit<
19
20
  * Name
20
21
  */
21
22
  name?: string;
23
+
24
+ /**
25
+ * Default request data
26
+ */
27
+ rq?: Partial<MemberListRQ>;
22
28
  };
23
29
 
24
30
  /**
@@ -38,6 +44,7 @@ export function UserTiplist(props: UserTiplistProps) {
38
44
  maxItems = 10,
39
45
  getOptionLabel = (data) => data.name,
40
46
  name = "userId",
47
+ rq = { enabled: true },
41
48
  ...rest
42
49
  } = props;
43
50
 
@@ -52,7 +59,7 @@ export function UserTiplist(props: UserTiplistProps) {
52
59
  loadData={(keyword, id, maxItems) =>
53
60
  app.core.memberApi.list(
54
61
  {
55
- enabled: true,
62
+ ...rq,
56
63
  keyword,
57
64
  id,
58
65
  queryPaging: {
@@ -18,4 +18,16 @@ export type MemberListRQ = StatusQueryRQ & {
18
18
  * User role start
19
19
  */
20
20
  userRoleStart?: UserRole;
21
+
22
+ /**
23
+ * Inviter id
24
+ * 邀请人编号
25
+ */
26
+ inviterId?: number;
27
+
28
+ /**
29
+ * Report to
30
+ * 汇报对象
31
+ */
32
+ reportTo?: number;
21
33
  };