@voplus/morpho-workspace 6.0.4 → 6.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Button, Space } from "antd";
|
2
2
|
import { useNotification, } from "../../../../data/notification";
|
3
|
+
import { useApplicationContext } from "@voplus/morpho-data";
|
3
4
|
import Card from "@voplus/morpho-ui/es/controls/Card";
|
4
5
|
import { useAsideContentContext } from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
5
6
|
import ProseMirrorViewer from "@voplus/morpho-text/es/controls/ProseMirror/Viewer";
|
@@ -10,6 +11,7 @@ import dayjs from "dayjs";
|
|
10
11
|
import { observe } from "@voplus/morpho-ui";
|
11
12
|
import styles from "./index.less";
|
12
13
|
const DocumentNotificationCard = (props) => {
|
14
|
+
const context = useApplicationContext();
|
13
15
|
const asideContext = useAsideContentContext();
|
14
16
|
const notification = useNotification(props.id);
|
15
17
|
return observe(() => (React.createElement(Card, { className: classnames(styles["notification-card"], props.className, { active: props.active }), bordered: true,
|
@@ -22,7 +24,7 @@ const DocumentNotificationCard = (props) => {
|
|
22
24
|
React.createElement("div", { className: "notification-date" }, dayjs(notification.createDate).format("DD MMM YYYY")),
|
23
25
|
React.createElement("div", { className: "notification-btn" },
|
24
26
|
React.createElement(Space, null,
|
25
|
-
notification.status !== "Dismissed" && (React.createElement(Button, { className: "btn-dismiss", onClick: (ev) => {
|
27
|
+
context.host.isTest && notification.status !== "Dismissed" && (React.createElement(Button, { className: "btn-dismiss", onClick: (ev) => {
|
26
28
|
ev.stopPropagation();
|
27
29
|
asideContext.openAside(React.createElement(NewTaskForm, { showView: true, self: true, description: notification.content.content, parentId: notification.content.documentId, onCancel: () => asideContext === null || asideContext === void 0 ? void 0 : asideContext.closeAside() }), { span: 12 });
|
28
30
|
} }, "Ceate Task")),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/DocumentNotificationCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAGN,eAAe,GACf,MAAM,+BAA+B,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/DocumentNotificationCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAGN,eAAe,GACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,iBAAiB,MAAM,oDAAoD,CAAC;AACnF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,WAAW,MAAM,uCAAuC,CAAC;AAChE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,wBAAwB,GAAG,CAAC,KAMjC,EAAE,EAAE;IACJ,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,MAAM,YAAY,GAAG,sBAAsB,EAAE,CAAC;IAC9C,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC,EAAE,CAA0B,CAAC;IAExE,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,IAAI,IACJ,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,EAC7F,QAAQ;QACR,aAAa;QACb,MAAM;QAEN,6BAAK,SAAS,EAAC,2BAA2B,EAAC,OAAO,EAAE,KAAK,C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