@voplus/morpho-workspace 6.0.120 → 6.0.122

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,7 @@ 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";
5
+ import { PlaceholderValue } from "@voplus/morpho-document/es/data/message-template";
5
6
  import dayjs from "dayjs";
6
7
  /** Custom load notification list options type */
7
8
  export type LoadNotificationListOptions = {
@@ -41,6 +42,7 @@ export type CreateNotificationOptions = {
41
42
  Channels: number;
42
43
  Subject?: string;
43
44
  Body?: string;
45
+ Placeholders?: PlaceholderValue;
44
46
  };
45
47
  } & StoreActionOptions;
46
48
  /** Custom load notification list options type. */
@@ -32,6 +32,7 @@ const NewNotificationFormContent = (props) => {
32
32
  emailTemplateStore.load(data.id, { includes: "placeholders" }).then((res) => {
33
33
  var _a;
34
34
  state.params.EmailTemplateId = res.id;
35
+ state.params.Subject = res.subject;
35
36
  (_a = res.placeholders) === null || _a === void 0 ? void 0 : _a.map((item) => state.placeholderList.push({ Placeholder: item }));
36
37
  });
37
38
  } }),
@@ -69,7 +70,7 @@ const NewNotificationFormContent = (props) => {
69
70
  } }))),
70
71
  React.createElement(Col, { span: context.host.isTest ? 12 : 24 },
71
72
  React.createElement(Form.Item, { label: "Subject" },
72
- React.createElement(Input, { onChange: (e) => (state.params.Subject = e.target.value) }))))),
73
+ React.createElement(Input, { value: state.params.Subject, onChange: (e) => (state.params.Subject = e.target.value) }))))),
73
74
  React.createElement(Tabs, { className: "new-notification-form-tabs", defaultActiveKey: "Email Content", onChange: (key) => {
74
75
  if (key !== "preview" || !state.params.EmailTemplateId)
75
76
  return;
@@ -113,7 +114,16 @@ const NewNotificationFormContent = (props) => {
113
114
  onPreview();
114
115
  state.loading = true;
115
116
  const res = await store.create({
116
- data: { TargetId: props.targetId, ...state.params },
117
+ data: state.chooseMessageTemplate
118
+ ? {
119
+ ...state.params,
120
+ TargetId: props.targetId,
121
+ Placeholders: state.placeholderList,
122
+ }
123
+ : {
124
+ ...state.params,
125
+ TargetId: props.targetId,
126
+ },
117
127
  error: "message",
118
128
  });
119
129
  state.loading = false;
@@ -122,6 +132,7 @@ const NewNotificationFormContent = (props) => {
122
132
  span: 12,
123
133
  });
124
134
  state.params = state.Params;
135
+ state.placeholderList = [];
125
136
  (_a = props.onSave) === null || _a === void 0 ? void 0 : _a.call(props);
126
137
  }
127
138
  // cancel add notifications
@@ -130,6 +141,7 @@ const NewNotificationFormContent = (props) => {
130
141
  if (props.showView)
131
142
  asideContext.closeAside();
132
143
  state.params = state.Params;
144
+ state.placeholderList = [];
133
145
  (_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
134
146
  }
135
147
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationForm.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/NewNotificationForm/NotificationForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EACN,IAAI,EACJ,GAAG,EACH,GAAG,EACH,KAAK,EACL,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,OAAO,EACP,QAAQ,EACR,KAAK,GAEL,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO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C,QAAQ;YAAE,YAAa,CAAC,UAAU,EAAE,CAAC;QAC/C,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAE5B,MAAA,KAAK,CAAC,QAAQ,qDAAI,CAAC;IACpB,CAAC;AACF,CAAC,CAAC;AAEF,0BAA0B,CAAC,YAAY,GAAG;IACzC,IAAI,EAAE,MAAM;CACZ,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
1
+ {"version":3,"file":"NotificationForm.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/NewNotificationForm/NotificationForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EACN,IAAI,EACJ,GAAG,EACH,GAAG,EACH,KAAK,EACL,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,OAAO,EACP,QAAQ,EACR,KAAK,GAEL,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,qBAAqB,MAAM,sFAAsF,CAAC;AACzH,OAAO,WAAW,MAAM,2CAA2C,CAAC;AACpE,OAAO,aAAa,MAAM,kEAAkE,CAAC;AAE7F,OAAO,WAAW,MAAM,6CAA6C,CAAC;AACtE,OAAO,0BAA0B,MAAM,+BAA+B,CAAC;AACvE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,CAAC;AActB,MAAM,0BA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;IAClB,CAAC;IAED,2BAA2B;IAC3B,SAAS,QAAQ;;QAChB,IAAI,KAAK,CAAC,QAAQ;YAAE,YAAa,CAAC,UAAU,EAAE,CAAC;QAC/C,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC;QAE3B,MAAA,KAAK,CAAC,QAAQ,qDAAI,CAAC;IACpB,CAAC;AACF,CAAC,CAAC;AAEF,0BAA0B,CAAC,YAAY,GAAG;IACzC,IAAI,EAAE,MAAM;CACZ,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
@@ -9,7 +9,16 @@ const WorkCashReportTemplate = (props) => {
9
9
  autoFit: true,
10
10
  height: 280,
11
11
  });
12
- chart.interval().data(props.data).encode("x", "date").encode("y", "total");
12
+ chart.data(props.data);
13
+ chart.scale("total", {
14
+ nice: true,
15
+ });
16
+ chart.axis("total", {
17
+ title: { text: "Monthly Works" },
18
+ });
19
+ chart.interval().position("date*total");
20
+ chart.interaction("active-region");
21
+ chart.interaction("element-active");
13
22
  chart.render();
14
23
  };
15
24
  return observe(() => React.createElement("div", { id: "work-report-container" }));
@@ -1 +1 @@
1
- {"version":3,"file":"WorkCashReportTemplate.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkCashReport/WorkCashReportTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,sBAAsB,GAAG,CAAC,KAAkD,EAAE,EAAE;IACrF,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAE5B,MAAM,IAAI,GAAG,GAAG,EAAE;QACjB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC;YACvB,SAAS,EAAE,uBAAuB;YAClC,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,GAAG;SACX,CAAC,CAAC;QACH,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAE3E,KAAK,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC,CAAC;IAEF,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,6BAAK,EAAE,EAAC,uBAAuB,GAAG,CAAC,CAAC;AAC1D,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"WorkCashReportTemplate.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkCashReport/WorkCashReportTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,sBAAsB,GAAG,CAAC,KAAkD,EAAE,EAAE;IACrF,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAE5B,MAAM,IAAI,GAAG,GAAG,EAAE;QACjB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC;YACvB,SAAS,EAAE,uBAAuB;YAClC,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,GAAG;SACX,CAAC,CAAC;QAEH,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACvB,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE;YACpB,IAAI,EAAE,IAAI;SACV,CAAC,CAAC;QAEH,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE;YACnB,KAAK,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE;SAChC,CAAC,CAAC;QAEH,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QAExC,KAAK,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;QACnC,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;QAEpC,KAAK,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC,CAAC;IAEF,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,6BAAK,EAAE,EAAC,uBAAuB,GAAG,CAAC,CAAC;AAC1D,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voplus/morpho-workspace",
3
- "version": "6.0.120",
3
+ "version": "6.0.122",
4
4
  "description": "morpho workspace module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,6 +32,7 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
+ "@antv/g2": "^4.2.11",
35
36
  "@fullcalendar/core": "6.x",
36
37
  "@fullcalendar/daygrid": "6.x",
37
38
  "@fullcalendar/interaction": "6.x",