@voplus/morpho-workspace 6.0.31 → 6.0.32

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,7 @@ import React, { useState } from "react";
3
3
  import DataIconBar from "@voplus/morpho-document/es/controls/DataIconBar";
4
4
  import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
5
5
  import { Tooltip } from "antd";
6
+ import { useCurrentContactContext } from "@voplus/morpho-document-core/es/data/context/CurrentContactContext";
6
7
  import UnitReference from "@voplus/morpho-org/es/controls/UnitReference/LoadedUnitReference";
7
8
  import WorkStatusDataIcon from "../WorkStatusDataIcon";
8
9
  import { faAlarmExclamation } from "@fortawesome/pro-light-svg-icons";
@@ -11,6 +12,7 @@ import { observe } from "@voplus/morpho-ui";
11
12
  import { useWork } from "../../../../data/work";
12
13
  const WorkDataIconBar = (props) => {
13
14
  const { id, dueDateVisible, documentDateVisible, commentVisible, statusVisible } = props;
15
+ const context = useCurrentContactContext();
14
16
  const [visible, setVisible] = useState(false);
15
17
  const work = useWork(id);
16
18
  return observe(() => {
@@ -25,7 +27,7 @@ const WorkDataIconBar = (props) => {
25
27
  React.createElement(DocumentDataIcon, { id: id }),
26
28
  commentVisible && React.createElement(CommentDataIcon, { id: id }),
27
29
  React.createElement(UserQuickIcon, { id: id }),
28
- ((_a = work.contact) === null || _a === void 0 ? void 0 : _a.id) && (React.createElement(Tooltip, { title: "Work Contact", open: visible, onOpenChange: onVisibleChange },
30
+ work.contact && work.contact.id !== ((_a = context === null || context === void 0 ? void 0 : context.contact) === null || _a === void 0 ? void 0 : _a.id) && (React.createElement(Tooltip, { title: "Work Contact", open: visible, onOpenChange: onVisibleChange },
29
31
  React.createElement("span", { className: "data-icon", onClick: () => setVisible(false) },
30
32
  React.createElement(UnitReference, { unit: work.contact })))),
31
33
  statusVisible && React.createElement(WorkStatusDataIcon, { id: id })));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/controls/WorkDataIconBar/index.tsx"],"names":[],"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AAI,CACvB,oBAAC,OAAO,IAAC,KAAK,EAAC,eAAe;gBAC7B,8BAAM,SAAS,EAAC,WAAW,IACzB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CACzD,CACE,CACV;YACD,oBAAC,gBAAgB,IAAC,EAAE,EAAE,EAAE,GAAI;YAC3B,cAAc,IAAI,oBAAC,eAAe,IAAC,EAAE,EAAE,EAAE,GAAI;YAC9C,oBAAC,aAAa,IAAC,EAAE,EAAE,EAAE,GAAI;YACxB,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,EAAE,KAAI,CACpB,oBAAC,OAAO,IAAC,KAAK,EAAC,cAAc,EAAC,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe;gBACzE,8BAAM,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;oBAC3D,oBAAC,aAAa,IAAC,IAAI,EAAE,IAAI,CAAC,OAAO,GAAI,CAC/B,CACE,CACV;YACA,aAAa,IAAI,oBAAC,kBAAkB,IAAC,EAAE,EAAE,EAAE,GAAI,CACnC,CACd,CAAA;KAAA,CAAC,CAAC;IAEH,SAAS,eAAe,CAAC,OAAgB;QACxC,UAAU,CAAC,OAAO,CAAC,CAAC;IACrB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG;IAC9B,mBAAmB,EAAE,IAAI;IACzB,cAAc,EAAE,IAAI;CACpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/controls/WorkDataIconBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,eAAe,EACf,gBAAgB,EAChB,aAAa,GACb,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE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O,IAAC,KAAK,EAAC,eAAe;gBAC7B,8BAAM,SAAS,EAAC,WAAW,IACzB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CACzD,CACE,CACV;YACD,oBAAC,gBAAgB,IAAC,EAAE,EAAE,EAAE,GAAI;YAC3B,cAAc,IAAI,oBAAC,eAAe,IAAC,EAAE,EAAE,EAAE,GAAI;YAC9C,oBAAC,aAAa,IAAC,EAAE,EAAE,EAAE,GAAI;YACxB,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,EAAE,MAAK,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,EAAE,CAAA,IAAI,CAC5D,oBAAC,OAAO,IAAC,KAAK,EAAC,cAAc,EAAC,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe;gBACzE,8BAAM,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;oBAC3D,oBAAC,aAAa,IAAC,IAAI,EAAE,IAAI,CAAC,OAAO,GAAI,CAC/B,CACE,CACV;YACA,aAAa,IAAI,oBAAC,kBAAkB,IAAC,EAAE,EAAE,EAAE,GAAI,CACnC,CACd,CAAA;KAAA,CAAC,CAAC;IAEH,SAAS,eAAe,CAAC,OAAgB;QACxC,UAAU,CAAC,OAAO,CAAC,CAAC;IACrB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG;IAC9B,mBAAmB,EAAE,IAAI;IACzB,cAAc,EAAE,IAAI;CACpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voplus/morpho-workspace",
3
- "version": "6.0.31",
3
+ "version": "6.0.32",
4
4
  "description": "morpho workspace module",
5
5
  "repository": {
6
6
  "type": "git",