@voplus/morpho-workspace 6.0.68 → 6.0.70

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. package/es/controls/filters/AssigneeViewFilter/index.js +3 -4
  2. package/es/controls/filters/AssigneeViewFilter/index.js.map +1 -1
  3. package/es/controls/filters/WorkStatusFilter/index.js +2 -8
  4. package/es/controls/filters/WorkStatusFilter/index.js.map +1 -1
  5. package/es/controls/filters/WorkStatusFilter/state.d.ts +10 -2
  6. package/es/controls/filters/WorkStatusFilter/state.js +46 -1
  7. package/es/controls/filters/WorkStatusFilter/state.js.map +1 -1
  8. package/es/data/notification/NotificationStore.d.ts +14 -8
  9. package/es/data/notification/NotificationStore.js +23 -5
  10. package/es/data/notification/NotificationStore.js.map +1 -1
  11. package/es/data/notification/hooks.d.ts +3 -3
  12. package/es/data/notification/hooks.js +3 -3
  13. package/es/data/notification/hooks.js.map +1 -1
  14. package/es/data/notification/interfaces.d.ts +11 -0
  15. package/es/data/notification/notification-events/useAutoUpdateListData.d.ts +2 -2
  16. package/es/data/notification/notification-events/useAutoUpdateListData.js.map +1 -1
  17. package/es/data/notification/notification-events/useOnDeleteNotification.d.ts +2 -2
  18. package/es/data/notification/notification-events/useOnDeleteNotification.js.map +1 -1
  19. package/es/data/notification/notification-events/useOnNewNotification.d.ts +2 -2
  20. package/es/data/notification/notification-events/useOnNewNotification.js.map +1 -1
  21. package/es/data/notification/types.d.ts +6 -1
  22. package/es/data/work/WorkStore.d.ts +1 -4
  23. package/es/data/work/WorkStore.js +0 -4
  24. package/es/data/work/WorkStore.js.map +1 -1
  25. package/es/data/work/interfaces.d.ts +0 -11
  26. package/es/data/work-report/WorkReportStore.d.ts +19 -0
  27. package/es/data/work-report/WorkReportStore.js +52 -0
  28. package/es/data/work-report/WorkReportStore.js.map +1 -0
  29. package/es/data/work-report/hooks.d.ts +8 -0
  30. package/es/data/work-report/hooks.js +13 -0
  31. package/es/data/work-report/hooks.js.map +1 -0
  32. package/es/data/work-report/index.d.ts +3 -0
  33. package/es/data/work-report/index.js +4 -0
  34. package/es/data/work-report/index.js.map +1 -0
  35. package/es/data/work-report/interfaces.d.ts +16 -0
  36. package/es/data/work-report/interfaces.js +2 -0
  37. package/es/data/work-report/interfaces.js.map +1 -0
  38. package/es/modules/calendar/pages/CalendarMonth/index.js +5 -4
  39. package/es/modules/calendar/pages/CalendarMonth/index.js.map +1 -1
  40. package/es/modules/meeting/components/NewMeetingForm/index.js.map +1 -1
  41. package/es/modules/menus/components/Access/index.js +5 -4
  42. package/es/modules/menus/components/Access/index.js.map +1 -1
  43. package/es/modules/menus/components/Account/index.js +5 -4
  44. package/es/modules/menus/components/Account/index.js.map +1 -1
  45. package/es/modules/menus/components/Status/index.js +5 -4
  46. package/es/modules/menus/components/Status/index.js.map +1 -1
  47. package/es/modules/menus/pages/ListOptions/Company/index.js +7 -5
  48. package/es/modules/menus/pages/ListOptions/Company/index.js.map +1 -1
  49. package/es/modules/notification/components/NotificationHeader/index.js +3 -3
  50. package/es/modules/notification/components/NotificationHeader/index.js.map +1 -1
  51. package/es/modules/notification/components/NotificationItem/index.js +5 -3
  52. package/es/modules/notification/components/NotificationItem/index.js.map +1 -1
  53. package/es/modules/notification/components/NotificationList2/index.js +7 -2
  54. package/es/modules/notification/components/NotificationList2/index.js.map +1 -1
  55. package/es/modules/notification/components/NotificationProperties/index.d.ts +1 -1
  56. package/es/modules/notification/components/NotificationProperties/index.js +12 -5
  57. package/es/modules/notification/components/NotificationProperties/index.js.map +1 -1
  58. package/es/modules/notification/components/NotificationRecipients/index.js +2 -2
  59. package/es/modules/notification/components/NotificationRecipients/index.js.map +1 -1
  60. package/es/modules/notification/components/NotificationTabs/index.js +9 -6
  61. package/es/modules/notification/components/NotificationTabs/index.js.map +1 -1
  62. package/es/modules/notification/controls/NotificationMenu/index.js +6 -4
  63. package/es/modules/notification/controls/NotificationMenu/index.js.map +1 -1
  64. package/es/modules/notification/controls/NotificationMenu/item/Send.d.ts +9 -0
  65. package/es/modules/notification/controls/NotificationMenu/item/Send.js +33 -0
  66. package/es/modules/notification/controls/NotificationMenu/item/Send.js.map +1 -0
  67. package/es/modules/notification/controls/NotificationMenu/item/index.d.ts +1 -0
  68. package/es/modules/notification/controls/NotificationMenu/item/index.js +2 -0
  69. package/es/modules/notification/controls/NotificationMenu/item/index.js.map +1 -0
  70. package/es/modules/notification/controls/NotificationStatusLabel/index.d.ts +6 -0
  71. package/es/modules/notification/controls/NotificationStatusLabel/index.js +7 -0
  72. package/es/modules/notification/controls/NotificationStatusLabel/index.js.map +1 -0
  73. package/es/modules/notification/controls/NotificationStatusLabel/index.less +14 -0
  74. package/es/modules/notification/pages/NotificationDefaultView/index.js +1 -1
  75. package/es/modules/notification/pages/NotificationDefaultView/index.js.map +1 -1
  76. package/es/modules/tasks/reports/TaskSummaryCard/index.js +1 -1
  77. package/es/modules/tasks/reports/TaskSummaryCard/index.js.map +1 -1
  78. package/es/modules/user/pages/Positions/index.js +6 -5
  79. package/es/modules/user/pages/Positions/index.js.map +1 -1
  80. package/es/modules/work/components/RejectWorkDialog/index.js +5 -4
  81. package/es/modules/work/components/RejectWorkDialog/index.js.map +1 -1
  82. package/es/modules/work/components/RejectWorkDialog/index.less +5 -0
  83. package/es/modules/work/components/RelatedWorkList/RelatedWorkList.js +1 -1
  84. package/es/modules/work/components/RelatedWorkList/RelatedWorkList.js.map +1 -1
  85. package/es/modules/work/components/WorkCashReport/index.d.ts +1 -0
  86. package/es/modules/work/components/WorkCashReport/index.js +54 -42
  87. package/es/modules/work/components/WorkCashReport/index.js.map +1 -1
  88. package/es/modules/work/components/WorkCashReport/index.less +8 -12
  89. package/es/modules/work/components/WorkCashReport/state.d.ts +3 -8
  90. package/es/modules/work/components/WorkCashReport/state.js +3 -47
  91. package/es/modules/work/components/WorkCashReport/state.js.map +1 -1
  92. package/es/modules/work/components/WorkList/index.js +2 -2
  93. package/es/modules/work/components/WorkList/index.js.map +1 -1
  94. package/es/modules/work/controls/SeveritySelect/index.js +10 -10
  95. package/es/modules/work/controls/SeveritySelect/index.js.map +1 -1
  96. package/es/modules/work/controls/WorkErrorSelect/index.js +3 -2
  97. package/es/modules/work/controls/WorkErrorSelect/index.js.map +1 -1
  98. package/es/modules/work/work-schedule/components/WorkScheduleList/index.js +10 -1
  99. package/es/modules/work/work-schedule/components/WorkScheduleList/index.js.map +1 -1
  100. package/es/modules/work/work-type/components/RepeatTab/index.js +5 -4
  101. package/es/modules/work/work-type/components/RepeatTab/index.js.map +1 -1
  102. package/es/modules/work/work-type/components/WorkTypeSelect/index.js +11 -6
  103. package/es/modules/work/work-type/components/WorkTypeSelect/index.js.map +1 -1
  104. package/es/modules/work/work-type/controls/WorktypeCompleteWorksChart/index.js +1 -1
  105. package/es/modules/work/work-type/controls/WorktypeCompleteWorksChart/index.js.map +1 -1
  106. package/es/modules/workspace/controls/WorkspaceCompletedWorksChart/index.js +1 -1
  107. package/es/modules/workspace/controls/WorkspaceCompletedWorksChart/index.js.map +1 -1
  108. package/es/modules/workspace/pages/WorkspacePage/WorkTypeWorksDashBoard.js +1 -1
  109. package/es/modules/workspace/pages/WorkspacePage/WorkTypeWorksDashBoard.js.map +1 -1
  110. package/es/obsolete/member/components/MemberSelect.js +3 -2
  111. package/es/obsolete/member/components/MemberSelect.js.map +1 -1
  112. package/package.json +1 -1
  113. package/es/components/AssignPeople/index.d.ts +0 -3
  114. package/es/components/AssignPeople/index.js +0 -24
  115. package/es/components/AssignPeople/index.js.map +0 -1
  116. package/es/modules/work/work-type/controls/SelectedFilterLabel/index.d.ts +0 -4
  117. package/es/modules/work/work-type/controls/SelectedFilterLabel/index.js +0 -23
  118. package/es/modules/work/work-type/controls/SelectedFilterLabel/index.js.map +0 -1
  119. package/es/modules/work/work-type/controls/SelectedFilterLabel/index.less +0 -31
@@ -21,15 +21,14 @@ const AssigneeView = () => {
21
21
  });
22
22
  return observe(() => (React.createElement("div", { className: "assignee-view" },
23
23
  React.createElement("div", { className: "menu-item-title" }, "AssigneeView"),
24
- React.createElement(Select, { loading: list.loading, value: Array.from(state.members.keys()), showSearch: true, placeholder: "Input or select contact.", filterOption: filterItems, optionLabelProp: "title", onSelect: onSelectMember, style: { width: 160 } }, list.data.map((i) => (React.createElement(Select.Option, { key: i.id, value: i.id, title: i.name }, i.name)))),
24
+ React.createElement(Select, { loading: list.loading, value: Array.from(state.members.keys()), showSearch: true, placeholder: "Input or select contact.", optionFilterProp: "label", onSelect: onSelectMember, style: { width: 160 }, options: list.data.map((i) => {
25
+ return { value: i.id, label: i.name };
26
+ }) }),
25
27
  state.memberList.map((item, index) => (React.createElement("div", { key: item.id, className: classnames("assignee-view-item", {
26
28
  bold: state.members.has(item.id),
27
29
  }) },
28
30
  React.createElement(AvatarItem, { id: item.id, index: index, inline: true }),
29
31
  React.createElement(CloseOutlined, { onClick: () => onCancel(item.id) })))))));
30
- function filterItems(input, option) {
31
- return option.title.toLowerCase().includes(input.toLowerCase());
32
- }
33
32
  /** cancel select member */
34
33
  function onCancel(id) {
35
34
  state.memberList = state.memberList.filter((m) => m.id !== id);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/controls/filters/AssigneeViewFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAS,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAE5F,OAAO,UAAU,MAAM,wDAAwD,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,q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AK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAChF,CAAC;AACF,CAAC,CAAC;AACF,eAAe,YAAY,CAAC"}
@@ -1,4 +1,4 @@
1
- import React, { useEffect } from "react";
1
+ import React from "react";
2
2
  import { State } from "./state";
3
3
  import { Badge } from "antd";
4
4
  import { observe } from "@voplus/morpho-ui";
@@ -6,13 +6,7 @@ import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
6
6
  import classnames from "classnames";
7
7
  const WorkStatusFilter = (props) => {
8
8
  const context = useFilterOptionsContext();
9
- const state = context.getFilterState("WorkStatus", () => new State());
10
- // defaultValue 为传入的预选状态
11
- useEffect(() => {
12
- var _a;
13
- state.reset();
14
- (_a = props.defaultValue) === null || _a === void 0 ? void 0 : _a.map((value) => state.onChangeStatus(value));
15
- }, [props.defaultValue]);
9
+ const state = context.getFilterState("WorkStatus", () => new State(props.defaultValue));
16
10
  return observe(() => (React.createElement("div", null,
17
11
  React.createElement("div", { className: "menu-item-title" }, "WorkStatus"),
18
12
  state.menus.map((item, index) => (React.createElement("div", { key: index, className: classnames("filter-menu-item", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/controls/filters/WorkStatusFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,CAAC,KAAkC,EAAE,EAAE;IAC/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terState, ISelectedLabel } from "@voplus/morpho-ui/es/data";
3
3
  export declare class State extends DefaultFilterState {
4
+ private defaultFilter?;
4
5
  /** Status of filter */
5
6
  status: Map<string, boolean>;
6
- constructor();
7
+ selectedLabels: {
8
+ name: string;
9
+ v1: string;
10
+ }[];
11
+ constructor(defaultFilter?: string[] | undefined);
12
+ onInit(): void;
7
13
  /** update status */
8
14
  onChangeStatus(value: string): void;
9
15
  get menus(): {
@@ -13,5 +19,7 @@ export declare class State extends DefaultFilterState {
13
19
  color: string;
14
20
  }[];
15
21
  get filters(): FilterOption[];
22
+ getSelectedLabels(): ISelectedLabel[];
23
+ removeSelected(value: string): ISelectedLabel[];
16
24
  reset(): void;
17
25
  }
@@ -2,8 +2,15 @@ import { __decorate } from "tslib";
2
2
  import { action, makeObservable, observable } from "mobx";
3
3
  import { DefaultFilterState } from "@voplus/morpho-ui/es/data";
4
4
  export class State extends DefaultFilterState {
5
- constructor() {
5
+ constructor(defaultFilter) {
6
+ var _a;
6
7
  super();
8
+ Object.defineProperty(this, "defaultFilter", {
9
+ enumerable: true,
10
+ configurable: true,
11
+ writable: true,
12
+ value: defaultFilter
13
+ });
7
14
  /** Status of filter */
8
15
  Object.defineProperty(this, "status", {
9
16
  enumerable: true,
@@ -11,11 +18,27 @@ export class State extends DefaultFilterState {
11
18
  writable: true,
12
19
  value: new Map()
13
20
  });
21
+ Object.defineProperty(this, "selectedLabels", {
22
+ enumerable: true,
23
+ configurable: true,
24
+ writable: true,
25
+ value: void 0
26
+ });
14
27
  makeObservable(this);
28
+ if ((_a = this.defaultFilter) === null || _a === void 0 ? void 0 : _a.length)
29
+ this.onInit();
30
+ }
31
+ onInit() {
32
+ var _a;
33
+ this.reset();
34
+ (_a = this.defaultFilter) === null || _a === void 0 ? void 0 : _a.map((f) => this.onChangeStatus(f));
15
35
  }
16
36
  /** update status */
17
37
  onChangeStatus(value) {
38
+ var _a;
39
+ this.selectedLabels = [];
18
40
  this.status.has(value) ? this.status.delete(value) : this.status.set(value, true);
41
+ this.selectedLabels = (_a = Array.from(this.status.keys())) === null || _a === void 0 ? void 0 : _a.map((i) => ({ name: i, v1: i }));
19
42
  }
20
43
  get menus() {
21
44
  return [
@@ -37,6 +60,22 @@ export class State extends DefaultFilterState {
37
60
  },
38
61
  ];
39
62
  }
63
+ getSelectedLabels() {
64
+ return [
65
+ {
66
+ state: this,
67
+ key: "WorkStatus",
68
+ label: this.selectedLabels,
69
+ },
70
+ ];
71
+ }
72
+ removeSelected(value) {
73
+ var _a;
74
+ this.onChangeStatus(value);
75
+ if (!((_a = this.selectedLabels) === null || _a === void 0 ? void 0 : _a.length))
76
+ this.onInit();
77
+ return this.getSelectedLabels();
78
+ }
40
79
  reset() {
41
80
  this.status.clear();
42
81
  }
@@ -44,6 +83,12 @@ export class State extends DefaultFilterState {
44
83
  __decorate([
45
84
  observable
46
85
  ], State.prototype, "status", void 0);
86
+ __decorate([
87
+ observable
88
+ ], State.prototype, "selectedLabels", void 0);
89
+ __decorate([
90
+ action
91
+ ], State.prototype, "onInit", null);
47
92
  __decorate([
48
93
  action
49
94
  ], State.prototype, "onChangeStatus", null);
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/controls/filters/WorkStatusFilter/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAG1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,OAAO,KAAM,SAAQ,kBAAkB;IAI5C;QACC,KAAK,EAAE,CAAC;QAJT,uBAAuB;QACJ;;;;mBAA+B,IAAI,GAAG,EAAE;WAAC;QAI3D,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,CAA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AE,MAAM,CAAA;YAAE,IAAI,CAAC,MAAM,EAAE,CAAC;QAEhD,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK;QACX,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACD;AAnEmB;IAAlB,UAAU;qCAAiD;AACzC;IAAlB,UAAU;6CAAuD;AAU3D;IADN,MAAM;mCAIN;AAIM;IADN,MAAM;2CAON"}
@@ -1,6 +1,6 @@
1
1
  import { ApiEndPoint } from "@voplus/api";
2
- import { CountedMap, Store } from "@voplus/morpho-data";
3
- import { INotification, LoadNotificationOptions, NotificationEditOptions, CreateNotificationOptions, DeleteNotificationOptions } from ".";
2
+ import { CountedMap, Store, StoreActionOptions } from "@voplus/morpho-data";
3
+ import { INotification, INewNotification, LoadNotificationOptions, LoadNewNotificationOptions, NotificationEditOptions, CreateNotificationOptions, DeleteNotificationOptions } from ".";
4
4
  import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
5
5
  /** Notificaiton store supply backend functions. */
6
6
  export declare class NotificationStore extends Store {
@@ -12,13 +12,15 @@ export declare class NotificationStore extends Store {
12
12
  private readonly _deleted;
13
13
  constructor(endpoint: ApiEndPoint);
14
14
  /** Event fires when a new notification has been created. */
15
- get NotificationCreatedEvent(): import("strongly-typed-events").IEvent<NotificationStore, INotification>;
15
+ get NotificationCreatedEvent(): import("strongly-typed-events").IEvent<NotificationStore, INewNotification>;
16
16
  /** Event fires when a delete contact has been deleted. */
17
- get NotificationDeletedEvent(): import("strongly-typed-events").IEvent<NotificationStore, INotification>;
17
+ get NotificationDeletedEvent(): import("strongly-typed-events").IEvent<NotificationStore, INewNotification>;
18
18
  /** All currently used notificaiton. */
19
19
  readonly items: CountedMap<string, INotification>;
20
+ /** All currently used notificaiton. */
21
+ readonly nItems: CountedMap<string, INewNotification>;
20
22
  /** Create a new contact base on type. */
21
- create(options: CreateNotificationOptions): Promise<INotification>;
23
+ create(options: CreateNotificationOptions): Promise<INewNotification>;
22
24
  /** Load a notificaiton from server.
23
25
  * @param {string} id - id of the notificaiton.
24
26
  * @param {LoadNotificationOptions} options - Optional load options.
@@ -30,15 +32,19 @@ export declare class NotificationStore extends Store {
30
32
  loadList(options?: LoadDocumentListOptions): Promise<INotification[]>;
31
33
  /** Load a notificaiton from server.
32
34
  * @param {string} id - id of the notificaiton.
33
- * @param {LoadNotificationOptions} options - Optional load options.
35
+ * @param {LoadNewNotificationOptions} options - Optional load options.
34
36
  */
35
- newLoad(id: string, options?: LoadNotificationOptions): Promise<INotification>;
37
+ newLoad(id: string, options?: LoadNewNotificationOptions): Promise<INewNotification>;
36
38
  /** Load a list of documents from server.
37
39
  * @param {LoadDocumentListOptions}
38
40
  */
39
- newLoadList(options?: LoadDocumentListOptions): Promise<INotification[]>;
41
+ newLoadList(options?: LoadDocumentListOptions): Promise<INewNotification[]>;
40
42
  /** Edit an existing item on server. */
41
43
  edit(id: string, options: NotificationEditOptions): Promise<any>;
44
+ /** send work.
45
+ * @param {string} id - id of the work.
46
+ */
47
+ send(id: string, options: StoreActionOptions): Promise<any>;
42
48
  delete(ids: string[], options?: DeleteNotificationOptions): Promise<any>;
43
49
  }
44
50
  /** React hook to retrieve NotificaitonStore */
@@ -41,6 +41,13 @@ export class NotificationStore extends Store {
41
41
  writable: true,
42
42
  value: new CountedMap((key) => ({ id: key, loaded: false }), observable.map([], { deep: true }))
43
43
  });
44
+ /** All currently used notificaiton. */
45
+ Object.defineProperty(this, "nItems", {
46
+ enumerable: true,
47
+ configurable: true,
48
+ writable: true,
49
+ value: new CountedMap((key) => ({ id: key, loaded: false }), observable.map([], { deep: true }))
50
+ });
44
51
  }
45
52
  /** Event fires when a new notification has been created. */
46
53
  get NotificationCreatedEvent() {
@@ -89,7 +96,7 @@ export class NotificationStore extends Store {
89
96
  }
90
97
  /** Load a notificaiton from server.
91
98
  * @param {string} id - id of the notificaiton.
92
- * @param {LoadNotificationOptions} options - Optional load options.
99
+ * @param {LoadNewNotificationOptions} options - Optional load options.
93
100
  */
94
101
  async newLoad(id, options) {
95
102
  options = options !== null && options !== void 0 ? options : {};
@@ -117,18 +124,29 @@ export class NotificationStore extends Store {
117
124
  /** Edit an existing item on server. */
118
125
  async edit(id, options) {
119
126
  return this.action(async () => {
120
- const r = await this.endpoint.post(`/api/myspace/notifications/${id}`, new RequestBuilder().json(options.data));
127
+ const r = await this.endpoint.post(`/api/notifications/${id}`, new RequestBuilder().json(options.data));
128
+ const t = (await r.json());
129
+ this.nItems.overwrite(t.id, t);
130
+ return t;
131
+ }, options);
132
+ }
133
+ /** send work.
134
+ * @param {string} id - id of the work.
135
+ */
136
+ async send(id, options) {
137
+ return this.action(async () => {
138
+ const r = await this.endpoint.post(`/api/notifications/${id}/send`);
121
139
  const t = (await r.json());
122
- this.items.overwrite(t.id, t);
140
+ this.nItems.overwrite(t.id, t);
123
141
  return t;
124
142
  }, options);
125
143
  }
126
144
  async delete(ids, options) {
127
145
  return await this.action(async () => {
128
- await this.endpoint.delete(`/api/myspace/notifications/delete`, new RequestBuilder().json({ Ids: ids, Options: options === null || options === void 0 ? void 0 : options.data }));
146
+ await this.endpoint.delete(`/api/notifications/delete`, new RequestBuilder().json({ Ids: ids, Options: options === null || options === void 0 ? void 0 : options.data }));
129
147
  const deleted = [];
130
148
  for (const id of ids) {
131
- const item = this.items.peek(id);
149
+ const item = this.nItems.peek(id);
132
150
  if (item) {
133
151
  deleted.push(item);
134
152
  this._deleted.dispatch(this, item);
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationStore.js","sourceRoot":"","sources":["../../../src/data/notification/NotificationStore.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,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM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OAAQ,CAAC,CAAC;IACd,CAAC;CACD;AAjBa;IADZ,MAAM;+CAiBN;AAGF,+CAA+C;AAC/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACxC,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,eAAe,CAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,CAAuB,CAAC;AAC5D,CAAC,CAAC"}
@@ -1,11 +1,11 @@
1
- import { INotification, LoadNotificationOptions } from ".";
1
+ import { INotification, INewNotification, LoadNotificationOptions, LoadNewNotificationOptions } from ".";
2
2
  import { ListDataContextState } from "@voplus/morpho-ui/es/data";
3
3
  import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
4
4
  /** notification card */
5
5
  export declare const useNotification: (id: string, options?: LoadNotificationOptions) => INotification;
6
6
  /** 新的 notification */
7
- export declare const useNotifications: (id: string, options?: LoadNotificationOptions) => INotification;
7
+ export declare const useNotifications: (id: string, options?: LoadNewNotificationOptions) => INewNotification;
8
8
  /** notification card list */
9
9
  export declare const useNotificationListEffect: (list: ListDataContextState<INotification> | null, effect: (list: INotification[], total?: number) => void, options?: LoadDocumentListOptions) => void;
10
10
  /** 新的 notification */
11
- export declare const useNotificationsListEffect: (list: ListDataContextState<INotification> | null, effect: (list: INotification[], total?: number) => void, options?: LoadDocumentListOptions) => void;
11
+ export declare const useNotificationsListEffect: (list: ListDataContextState<INewNotification> | null, effect: (list: INewNotification[], total?: number) => void, options?: LoadDocumentListOptions) => void;
@@ -1,4 +1,4 @@
1
- import { useNotificationStore } from ".";
1
+ import { useNotificationStore, } from ".";
2
2
  import { useListLoaderEffect } from "@voplus/morpho-ui/es/hooks";
3
3
  import { useLoadCountedMapItem } from "@voplus/morpho-data";
4
4
  /** notification card */
@@ -11,7 +11,7 @@ export const useNotification = (id, options) => {
11
11
  export const useNotifications = (id, options) => {
12
12
  options = options ? options : {};
13
13
  const store = useNotificationStore();
14
- return useLoadCountedMapItem(id, store.items, (calculatedOptions) => store.newLoad(id, calculatedOptions), options);
14
+ return useLoadCountedMapItem(id, store.nItems, (calculatedOptions) => store.newLoad(id, calculatedOptions), options);
15
15
  };
16
16
  /** notification card list */
17
17
  export const useNotificationListEffect = (list, effect, options) => {
@@ -25,6 +25,6 @@ export const useNotificationsListEffect = (list, effect, options) => {
25
25
  const deps = options ? options : {};
26
26
  const store = useNotificationStore();
27
27
  // Call useListLoaderEffect and ensure won't load twice for same loading options.
28
- return useListLoaderEffect(list, store.items, effect, () => store.newLoadList(options), [deps]);
28
+ return useListLoaderEffect(list, store.nItems, effect, () => store.newLoadList(options), [deps]);
29
29
  };
30
30
  //# sourceMappingURL=hooks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/data/notification/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,oBAAoB,EAAE,MAAM,GAAG,CAAC;AAIjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,wBAAwB;AACxB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAU,EAAE,OAAiC,EAAE,EAAE;IAChF,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA8B,CAAC;IAC9D,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IAErC,OAAO,qBAAqB,CAC3B,EAAE,EACF,KAAK,CAAC,KAAK,EACX,CAAC,iBAAiB,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,iBAAiB,CAAC,EACxD,OAAO,CACP,CAAC;AACH,CAAC,CAAC;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,CAAC,CAAE,EAA8B,CAAC;IAEjE,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IAErC,iFAAiF;IACjF,OAAO,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9F,CAAC,CAAC;AAEF,sBAAsB;AACtB,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACzC,IAAmD,EACnD,MAA0D,EAC1D,OAAiC,EAChC,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA8B,CAAC;IAEjE,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IAErC,iFAAiF;IACjF,OAAO,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAClG,CAAC,CAAC"}
@@ -8,12 +8,23 @@ export type IRrecipient = {
8
8
  sentDate: string;
9
9
  };
10
10
  export type NotificationStatus = "Unread" | "Read" | "Later" | "Dismissed";
11
+ /** notification card list 的 INotification */
11
12
  export interface INotification extends ILoadable {
12
13
  id: string;
13
14
  type: string;
14
15
  status: NotificationStatus;
15
16
  dismissDate?: Date;
16
17
  createDate: Date;
18
+ }
19
+ /** 新的INotification corporate/customer里用 */
20
+ export interface INewNotification extends ILoadable {
21
+ id: string;
22
+ type: string;
23
+ /** Draft = true 時可以Send, 也可以Delete, false 時不可以
24
+ */
25
+ draft: boolean;
26
+ dismissDate?: Date;
27
+ createDate: Date;
17
28
  date?: Date;
18
29
  recipients?: IRrecipient[];
19
30
  channels?: ("Email" | "Instant Message")[];
@@ -1,4 +1,4 @@
1
- import { INotification } from "../interfaces";
1
+ import { INewNotification } from "../interfaces";
2
2
  import { ListDataContextState } from "@voplus/morpho-ui/es/data";
3
3
  /** React hook to call action when a new notification has been created. */
4
- export declare const useAutoUpdateListData: (list: ListDataContextState<any>, shouldUpdate: (d: INotification, event: string) => boolean) => void;
4
+ export declare const useAutoUpdateListData: (list: ListDataContextState<any>, shouldUpdate: (d: INewNotification, event: string) => boolean) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useAutoUpdateListData.js","sourceRoot":"","sources":["../../../../src/data/notification/notification-events/useAutoUpdateListData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,GAAG,CAAC;AAKlE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACpC,IAA+B,EAC/B,YAA0D,EACzD,EAAE;IACH,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC7B,IAAI,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAChC,IAAI,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"useAutoUpdateListData.js","sourceRoot":"","sources":["../../../../src/data/notification/notification-events/useAutoUpdateListData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,GAAG,CAAC;AAKlE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACpC,IAA+B,EAC/B,YAA6D,EAC5D,EAAE;IACH,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC7B,IAAI,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAChC,IAAI,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { NotificationStore } from "../NotificationStore";
2
- import { INotification } from "../interfaces";
2
+ import { INewNotification } from "../interfaces";
3
3
  /** React hook to call action when a delete notification has been created. */
4
- export declare const useOnDeleteNotification: (action: (store: NotificationStore, doc: INotification) => void) => void;
4
+ export declare const useOnDeleteNotification: (action: (store: NotificationStore, doc: INewNotification) => void) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useOnDeleteNotification.js","sourceRoot":"","sources":["../../../../src/data/notification/notification-events/useOnDeleteNotification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG/E,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,MAA8D,EAAE,EAAE;IACzG,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IACrC,MAAM,oBAAoB,GAAG,CAAC,KAAwB,EAAE,GAAkB,EAAE,EAAE;QAC7E,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,wBAAwB,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QAC/D,OAAO,GAAG,EAAE;YACX,KAAK,CAAC,wBAAwB,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;QAClE,CAAC,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"useOnDeleteNotification.js","sourceRoot":"","sources":["../../../../src/data/notification/notification-events/useOnDeleteNotification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG/E,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,MAAiE,EAAE,EAAE;IAC5G,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IACrC,MAAM,oBAAoB,GAAG,CAAC,KAAwB,EAAE,GAAqB,EAAE,EAAE;QAChF,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,wBAAwB,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QAC/D,OAAO,GAAG,EAAE;YACX,KAAK,CAAC,wBAAwB,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;QAClE,CAAC,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { NotificationStore } from "../NotificationStore";
2
- import { INotification } from "../interfaces";
2
+ import { INewNotification } from "../interfaces";
3
3
  /** React hook to call action when a new notification has been created. */
4
- export declare const useOnNewNotification: (action: (store: NotificationStore, doc: INotification) => void) => void;
4
+ export declare const useOnNewNotification: (action: (store: NotificationStore, doc: INewNotification) => void) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useOnNewNotification.js","sourceRoot":"","sources":["../../../../src/data/notification/notification-events/useOnNewNotification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG/E,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,0EAA0E;AAC1E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAA8D,EAAE,EAAE;IACtG,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IACrC,MAAM,iBAAiB,GAAG,CAAC,KAAwB,EAAE,GAAkB,EAAE,EAAE;QAC1E,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,wBAAwB,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAC5D,OAAO,GAAG,EAAE;YACX,KAAK,CAAC,wBAAwB,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;QAC/D,CAAC,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"useOnNewNotification.js","sourceRoot":"","sources":["../../../../src/data/notification/notification-events/useOnNewNotification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG/E,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,0EAA0E;AAC1E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CACnC,MAAiE,EAChE,EAAE;IACH,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IACrC,MAAM,iBAAiB,GAAG,CAAC,KAAwB,EAAE,GAAqB,EAAE,EAAE;QAC7E,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,wBAAwB,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAC5D,OAAO,GAAG,EAAE;YACX,KAAK,CAAC,wBAAwB,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;QAC/D,CAAC,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { INotification, NotificationStatus } from ".";
1
+ import { INotification, INewNotification, NotificationStatus } from ".";
2
2
  import { LoadOptions, StoreActionOptions } from "@voplus/morpho-data";
3
3
  import { DeleteDocumentOptions } from "@voplus/morpho-document-core";
4
4
  import { FilterOption, PageParameters } from "@voplus/morpho-data/es/types";
@@ -14,6 +14,11 @@ export type LoadNotificationOptions = {
14
14
  /** Comma separated include options e.g. path */
15
15
  includes?: string;
16
16
  } & LoadOptions<INotification>;
17
+ /** Custom load contact options type */
18
+ export type LoadNewNotificationOptions = {
19
+ /** Comma separated include options e.g. path */
20
+ includes?: string;
21
+ } & LoadOptions<INewNotification>;
17
22
  export type NotificationEditDataOptions = {
18
23
  status?: NotificationStatus;
19
24
  Date?: string;
@@ -1,6 +1,6 @@
1
1
  import { DocumentStore, DocumentTypeStore, LoadDocumentListOptions, LoadDocumentOptions } from "@voplus/morpho-document-core";
2
2
  import { CreateWorkOptions, IWork, IWorkEditOptions, WorkSendFormOptions } from "./interfaces";
3
- import { StoreActionOptions, FilterOption } from "@voplus/morpho-data";
3
+ import { StoreActionOptions } from "@voplus/morpho-data";
4
4
  import { ApiEndPoint } from "@voplus/api";
5
5
  export declare class WorkStore extends DocumentTypeStore<IWork, LoadDocumentOptions, LoadDocumentListOptions, CreateWorkOptions, IWorkEditOptions, any> {
6
6
  /** Name of the store */
@@ -18,9 +18,6 @@ export declare class WorkStore extends DocumentTypeStore<IWork, LoadDocumentOpti
18
18
  * @param {string} id - id of the work.
19
19
  */
20
20
  reject(id: string, options: StoreActionOptions): Promise<any>;
21
- loadWorkReport(options?: {
22
- Filters?: FilterOption[];
23
- }): Promise<any>;
24
21
  }
25
22
  /** 响应钩子检索 PageStore */
26
23
  export declare const useWorkStore: () => WorkStore;
@@ -49,10 +49,6 @@ export class WorkStore extends DocumentTypeStore {
49
49
  }
50
50
  }, options);
51
51
  }
52
- async loadWorkReport(options) {
53
- const r = await this.endpoint.post(`/api/works/reports/monthly`, new RequestBuilder().json(options ? options : { Filters: [] }));
54
- return await r.json();
55
- }
56
52
  }
57
53
  /** 响应钩子检索 PageStore */
58
54
  export const useWorkStore = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"WorkStore.js","sourceRoot":"","sources":["../../../src/data/work/WorkStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EAGjB,gBAAgB,GAChB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAsB,UAAU,EAAgB,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,SAAS,GAAG,WAAW,CAAC;AAE9B,MAAM,OAAO,SAAU,SAAQ,iBAO9B;IAIA,YAAmB,QAAqB,EAAE,SAAwB;QACjE,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;QAJ1C,wBAAwB;QACR;;;;mBAAe,SAAS;WAAC;IAIzC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAAC,EAAU,EAAE,OAA4B;QACzD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;YAC7B,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE,IAAI,cAAc,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YAC3F,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;gBACnC,IAAI,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAU,CAAC;gBACnD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;YACzB,CAAC;QACF,CAAC,EAAE,OAAO,CAAC,CAAC;IACb,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,OAA2B;QAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;YAC7B,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,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IWorkReport {
70
- id: string;
71
- start: string;
72
- end: string;
73
- items: IWorkReportItem[];
74
- }
75
- export interface IWorkReportItem {
76
- year: number;
77
- month: number;
78
- total: number;
79
- }
@@ -0,0 +1,19 @@
1
+ import { ApiEndPoint } from "@voplus/api";
2
+ import { CountedMap, Store } from "@voplus/morpho-data";
3
+ import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
4
+ import { IWorkReport, IWorkReportItem } from "./interfaces";
5
+ /** WorkReport store supply backend functions. */
6
+ export declare class WorkReportStore extends Store {
7
+ readonly endpoint: ApiEndPoint;
8
+ /** Name of the store */
9
+ readonly name: string;
10
+ constructor(endpoint: ApiEndPoint);
11
+ /** All currently used corporate. */
12
+ readonly items: CountedMap<string, IWorkReportItem>;
13
+ /** Load a list of documents from server.
14
+ * @param {LoadDocumentListOptions}
15
+ */
16
+ loadList(options?: LoadDocumentListOptions): Promise<IWorkReport>;
17
+ }
18
+ /** 响应钩子检索 WorkReportStore */
19
+ export declare const useWorkReportStore: () => WorkReportStore;
@@ -0,0 +1,52 @@
1
+ import { RequestBuilder } from "@voplus/api";
2
+ import { CountedMap, Store, useApplicationContext } from "@voplus/morpho-data";
3
+ import { observable } from "mobx";
4
+ const StoreName = "WorkReportStore";
5
+ /** WorkReport store supply backend functions. */
6
+ export class WorkReportStore extends Store {
7
+ constructor(endpoint) {
8
+ super();
9
+ Object.defineProperty(this, "endpoint", {
10
+ enumerable: true,
11
+ configurable: true,
12
+ writable: true,
13
+ value: endpoint
14
+ });
15
+ /** Name of the store */
16
+ Object.defineProperty(this, "name", {
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true,
20
+ value: StoreName
21
+ });
22
+ /** All currently used corporate. */
23
+ Object.defineProperty(this, "items", {
24
+ enumerable: true,
25
+ configurable: true,
26
+ writable: true,
27
+ value: new CountedMap((key) => ({ id: key, loaded: false }), observable.map([], { deep: true }))
28
+ });
29
+ }
30
+ /** Load a list of documents from server.
31
+ * @param {LoadDocumentListOptions}
32
+ */
33
+ async loadList(options) {
34
+ let query = "";
35
+ if (options === null || options === void 0 ? void 0 : options.Includes) {
36
+ query = query.concat(`includes=${options.Includes}`);
37
+ }
38
+ if (query)
39
+ query = "?".concat(query);
40
+ const r = await this.endpoint.post(`/api/works/reports/monthly`, new RequestBuilder().json(options ? options : { Filters: [] }));
41
+ return (await r.json());
42
+ }
43
+ }
44
+ /** 响应钩子检索 WorkReportStore */
45
+ export const useWorkReportStore = () => {
46
+ const context = useApplicationContext();
47
+ if (!context.getService(StoreName)) {
48
+ context.registerService(new WorkReportStore(context.api.currentEndPoint));
49
+ }
50
+ return context.getService(StoreName);
51
+ };
52
+ //# sourceMappingURL=WorkReportStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkReportStore.js","sourceRoot":"","sources":["../../../src/data/work-report/WorkReportStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAG/E,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,SAAS,GAAG,iBAAiB,CAAC;AAEpC,iDAAiD;AACjD,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAIzC,YAAmC,QAAqB;QACvD,KAAK,EAAE,CAAC;QADU;;;;mBAAgB,QAAQ;WAAa;QAHxD,wBAAwB;QACR;;;;mBAAe,SAAS;WAAC;QAMzC,oCAAoC;QACpB;;;;mBAA6C,IAAI,UAAU,CAC1E,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAsB,CAAA,EAChE,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAClC;WAAC;IANF,CAAC;IAQD;;OAEG;IACI,KAAK,CAAC,QAAQ,CAAC,OAAiC;QACtD,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,EAAE,CAAC;YACvB,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtD,CAAC;QACD,IAAI,KAAK;YAAE,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAErC,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CACjC,4BAA4B,EAC5B,IAAI,cAAc,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,CAAgB,CAAC;IACxC,CAAC;CACD;AAED,6BAA6B;AAC7B,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACtC,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,eAAe,CAAC,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,CAAqB,CAAC;AAC1D,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
2
+ import { IWorkReportData, IWorkReportItem } from ".";
3
+ import { ListDataContextState } from "@voplus/morpho-ui/es/data";
4
+ /** React hook to retrieve a list of ledgers
5
+ * @param effect - Effect callback to be ran after successful retrieved the list.
6
+ * @param options - Optional ledger list loading options.
7
+ */
8
+ export declare const useWorkReportListEffect: (list: ListDataContextState<IWorkReportItem> | null, effect: (list: IWorkReportItem[], total: number, data: IWorkReportData) => void, options?: LoadDocumentListOptions) => void;