@voplus/morpho-workspace 6.0.40 → 6.0.42

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,6 +7,7 @@ import { faAngleLeft, faAngleRight } from "@fortawesome/pro-light-svg-icons";
7
7
  import { useDeepMemo, useTabItem } from "@voplus/morpho-data";
8
8
  import { faCalendar } from "@fortawesome/free-solid-svg-icons";
9
9
  import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
10
+ import { generateLightColorFromHash } from "@voplus/morpho-org/es/tools";
10
11
  import { Scrollbars } from "react-custom-scrollbars-2";
11
12
  import { Button, Select } from "antd";
12
13
  import { runInAction } from "mobx";
@@ -18,7 +19,6 @@ import interactionPlugin from "@fullcalendar/interaction";
18
19
  import timeGridPlugin from "@fullcalendar/timegrid";
19
20
  import FullCalendar from "@fullcalendar/react";
20
21
  import dayGridPlugin from "@fullcalendar/daygrid";
21
- import crypto from "crypto-js";
22
22
  import dayjs from "dayjs";
23
23
  import styles from "./index.less";
24
24
  const CalendarMonth = () => {
@@ -107,37 +107,6 @@ const CalendarMonth = () => {
107
107
  height: "100%",
108
108
  //events={(dataInfo)=>getDate(dataInfo)}//这个要放在eventSources前,不然eventSources数据会被覆盖
109
109
  eventSources: [state.listOptions], eventDrop: eventDrop, eventContent: eventContent, datesSet: (info) => state.datesRender(info) })))))));
110
- function generateLightColorFromHash(type) {
111
- // 使用SHA-256哈希算法生成哈希值
112
- const hash = crypto.SHA256(type).toString();
113
- // 从哈希值中提取一部分用于生成颜色值
114
- // 这里我们使用前6个字符来生成RGB值,你可以根据需要调整
115
- let hexColor = "#" + hash.slice(0, 6);
116
- // 确保颜色足够浅(这里是一个简单的启发式方法,你可以根据需要调整)
117
- let r = parseInt(hexColor.slice(1, 3), 16);
118
- let g = parseInt(hexColor.slice(3, 5), 16);
119
- let b = parseInt(hexColor.slice(5, 7), 16);
120
- const brightness = r * 0.299 + g * 0.587 + b * 0.114; // 使用RGB到亮度的简单转换
121
- // 如果亮度不够高,则增加亮度值
122
- if (brightness < 192) {
123
- // 192是一个阈值,你可以根据需要进行调整
124
- const adjustment = 255 - brightness;
125
- r += Math.round((255 - r) * (adjustment / 255));
126
- g += Math.round((255 - g) * (adjustment / 255));
127
- b += Math.round((255 - b) * (adjustment / 255));
128
- // 确保颜色值不超过255
129
- r = Math.min(r, 255);
130
- g = Math.min(g, 255);
131
- b = Math.min(b, 255);
132
- // 转换为16进制字符串
133
- hexColor =
134
- "#" +
135
- r.toString(16).padStart(2, "0") +
136
- g.toString(16).padStart(2, "0") +
137
- b.toString(16).padStart(2, "0");
138
- }
139
- return hexColor;
140
- }
141
110
  /** 切换month,week,day视图 */
142
111
  function handleChange(value) {
143
112
  runInAction(() => (state.type = value));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/calendar/pages/CalendarMonth/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EACN,YAAY,EACZ,OAAO,EACP,iBAAiB,EACjB,aAAa,IAAI,UAAU,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,EAAa,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,M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M,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QAC7D,CAAC;aAAM,CAAC;YACP,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC;IACF,CAAC;IAED,8BAA8B;IAC9B,SAAS,SAAS,CAAC,IAAS;QAC3B,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAC7C,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,gBAAgB,EAAE,CAAC;YAC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACjE,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,MAAM,EAAE,CAAC;QACf,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -9,6 +9,7 @@ import { useTask, useTaskStore, useMetaStore } from "@voplus/morpho-document-cor
9
9
  import dayjs from "dayjs";
10
10
  import { State } from "./state";
11
11
  import AvatarList from "@voplus/morpho-org/es/components/AvatarList";
12
+ import PresetDatePicker from "@voplus/morpho-ui/es/controls/PresetDatePicker";
12
13
  import { useApplicationContext } from "@voplus/morpho-data";
13
14
  import DocumentHeader from "@voplus/morpho-document/es/components/DocumentHeader";
14
15
  import "./index.less";
@@ -32,9 +33,17 @@ const TaskCheckItem = (props) => {
32
33
  state.checked = task.taskStatus === "Done";
33
34
  } }),
34
35
  React.createElement(FlagIcon, { id: task.id, flag: task.flag, editable: !task.readonly })), tools: React.createElement(React.Fragment, null,
35
- ((_a = task.members) === null || _a === void 0 ? void 0 : _a.length) ? (React.createElement("div", { className: classnames("task-members", { hide: state.isHover, noDate: dueDate }) },
36
+ ((_a = task.members) === null || _a === void 0 ? void 0 : _a.length) ? (React.createElement("div", { className: classnames("task-members", { hide: state.isHover }) },
36
37
  React.createElement(AvatarList, { organizationId: user.info.organizationId, maxCount: 3, list: task.members, editable: false }))) : null,
37
- dueDate && (React.createElement("span", { className: classnames("task-dueDate", { hide: state.isHover }) }, task.dueDate && dayjs(task.dueDate).format("DD MMM YYYY"))),
38
+ dueDate && (React.createElement("span", { className: classnames("task-dueDate", { hide: state.isHover }) }, task.dueDate ? (dayjs(task.dueDate).format("DD MMM YYYY")) : (React.createElement("div", { className: classnames("no-dueDate", { open: state.openDate }) },
39
+ React.createElement("span", { onClick: () => (state.openDate = true) }, "No due date"),
40
+ React.createElement(PresetDatePicker, { className: "task-item-preset-date-picker", open: state.openDate, onChange: async (preset, date) => {
41
+ state.openDate = false;
42
+ await taskStore.edit(task.id, {
43
+ data: { DueDate: dayjs(date).format("YYYY-MM-DD") },
44
+ error: (error) => message.error(error.message),
45
+ });
46
+ }, handleOpenChange: (open) => (state.openDate = open), style: { width: "100%" } }))))),
38
47
  React.createElement("div", { className: classnames("hover-operate-icon", { show: state.isHover }) },
39
48
  React.createElement(ToolBar, { id: id, moreProps: { buttonProps: { size: "middle" } } },
40
49
  React.createElement(Open, { size: "middle", url: meta.getRoute(task) })))) }));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAC3E,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,QAAQ,MAAM,yDAAyD,CAAC;AAC/E,OAAO,EAAE,OAAO,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AC7B,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;gCACnD,KAAK,EAAE,CAAC,KAAY,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;6BACrD,CAAC,CAAC;wBACJ,CAAC,EACD,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,EACnD,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GACvB,CACG,CACN,CACK,CACP;gBACD,6BAAK,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;oBACxE,oBAAC,OAAO,IAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;wBAC9D,oBAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAI,CACvC,CACL,CACJ,GAEH,CACF,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -5,6 +5,13 @@
5
5
  align-items: center;
6
6
  background-color: transparent;
7
7
  padding: 10px 20px 10px 20px;
8
+ &:hover {
9
+ .task-dueDate {
10
+ .no-dueDate {
11
+ background-color: #f5f8fd;
12
+ }
13
+ }
14
+ }
8
15
  .task-members {
9
16
  opacity: 1;
10
17
  // transition: opacity 0.3s;
@@ -12,20 +19,42 @@
12
19
  &.hide {
13
20
  opacity: 0;
14
21
  }
15
- &.noDate {
16
- flex: 1;
17
- opacity: 1;
22
+ .avatar-list-view {
23
+ justify-content: end;
24
+ .ant-avatar {
25
+ width: 1.8em;
26
+ height: 1.8em;
27
+ line-height: 1.8em;
28
+ font-size: 13px;
29
+ }
18
30
  }
19
31
  }
20
32
  .task-dueDate {
21
- width: 100px;
33
+ width: 120px;
22
34
  opacity: 1;
23
- // transition: opacity 0.3s;
35
+ color: #94a3b8;
24
36
  flex-shrink: 0;
25
37
  text-align: right;
26
38
  &.hide {
27
39
  opacity: 0;
28
40
  }
41
+ .no-dueDate {
42
+ position: relative;
43
+ background-color: #fff;
44
+ &.open {
45
+ background-color: #f5f8fd;
46
+ }
47
+ .task-item-preset-date-picker {
48
+ position: absolute;
49
+ left: 0;
50
+ top: 0;
51
+ z-index: -1;
52
+ border: none;
53
+ .ant-picker-suffix {
54
+ display: none;
55
+ }
56
+ }
57
+ }
29
58
  }
30
59
  .hover-operate-icon {
31
60
  display: none;
@@ -5,5 +5,6 @@ export declare class State {
5
5
  checked: boolean;
6
6
  isHover: boolean;
7
7
  task: ITask;
8
+ openDate: boolean;
8
9
  update(task: ITask): void;
9
10
  }
@@ -21,6 +21,12 @@ export class State {
21
21
  writable: true,
22
22
  value: void 0
23
23
  });
24
+ Object.defineProperty(this, "openDate", {
25
+ enumerable: true,
26
+ configurable: true,
27
+ writable: true,
28
+ value: false
29
+ });
24
30
  makeObservable(this);
25
31
  }
26
32
  update(task) {
@@ -37,6 +43,9 @@ __decorate([
37
43
  __decorate([
38
44
  observable
39
45
  ], State.prototype, "task", void 0);
46
+ __decorate([
47
+ observable
48
+ ], State.prototype, "openDate", void 0);
40
49
  __decorate([
41
50
  action
42
51
  ], State.prototype, "update", null);
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckItem/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAG1D,MAAM,OAAO,KAAK;IACjB;QAIA,OAAO;QACY;;;;mBAAU,KAAK;WAAC;QAChB;;;;mBAAU,KAAK;WAAC;QAChB;;;;;WAAY;QAN9B,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAOc,MAAM,CAAC,IAAW;QAChC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC;IAC3C,CAAC;CACD;AARmB;IAAlB,UAAU;sCAAwB;AAChB;IAAlB,UAAU;sCAAwB;AAChB;IAAlB,UAAU;mCAAoB;AAEhB;IAAd,MAAM;mCAGN"}
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckItem/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAG1D,MAAM,OAAO,KAAK;IACjB;QAIA,OAAO;QACY;;;;mBAAU,KAAK;WAAC;QAChB;;;;mBAAU,KAAK;WAAC;QAChB;;;;;WAAY;QACZ;;;;mBAAW,KAAK;WAAC;QAPnC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAQc,MAAM,CAAC,IAAW;QAChC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC;IAC3C,CAAC;CACD;AATmB;IAAlB,UAAU;sCAAwB;AAChB;IAAlB,UAAU;sCAAwB;AAChB;IAAlB,UAAU;mCAAoB;AACZ;IAAlB,UAAU;uCAAyB;AAErB;IAAd,MAAM;mCAGN"}
@@ -6,7 +6,8 @@ import PresetDatePicker from "@voplus/morpho-ui/es/controls/PresetDatePicker";
6
6
  import { runInAction } from "mobx";
7
7
  import { useTaskStore } from "@voplus/morpho-document-core";
8
8
  import { faCalendar } from "@fortawesome/pro-light-svg-icons";
9
- import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
9
+ import { faCalendar as faCalendarSolid } from "@fortawesome/free-solid-svg-icons";
10
+ import Icon from "@voplus/morpho-ui/es/controls/HoverSwitchIcon";
10
11
  import classnames from "classnames";
11
12
  import "./index.less";
12
13
  import dayjs from "dayjs";
@@ -24,8 +25,7 @@ const TaskCheckNewForm = (props) => {
24
25
  React.createElement("div", { className: "task-due-date-content" },
25
26
  state.dueDateString ? (React.createElement("div", { className: "due-val-content", onClick: () => (state.openDate = true) },
26
27
  React.createElement("div", { className: "dueDate" }, "Due"),
27
- React.createElement(React.Fragment, null, state.dueDateString))) : (React.createElement("span", { onClick: () => (state.openDate = true), className: "task-due-date-bnt" },
28
- React.createElement(FAIcon, { icon: faCalendar, size: "lg" }))),
28
+ React.createElement(React.Fragment, null, state.dueDateString))) : (React.createElement(Icon, { className: "task-due-date-bnt", icon: faCalendar, hover: faCalendarSolid, onClick: () => (state.openDate = true) })),
29
29
  React.createElement(PresetDatePicker, { className: "task-preset-date-picker", open: state.openDate, onChange: (preset, date) => {
30
30
  state.params.DueDate = dayjs(date).format("YYYY-MM-DD");
31
31
  state.dueDateString = preset ? preset : dayjs(date).format("YYYY-MM-DD");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckNewForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,gBAAgB,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,eAAe,IAAI,MAAM,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AS,SAAS,CAAC,CAAM;QACxB,IAAI,CAAC,CAAC,OAAO,KAAK,EAAE;YAAE,OAAO;QAC7B,QAAQ,EAAE,CAAC;IACZ,CAAC;IAED,KAAK,UAAU,QAAQ;;QACtB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;YAAE,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACpE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;QAC1C,MAAM,KAAK,CAAC,MAAM,CAAC;YAClB,IAAI,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAS;YAC1D,KAAK,EAAE,SAAS;SAChB,CAAC,CAAC;QACH,WAAW,CAAC,GAAG,EAAE;YAChB,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;YACtB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC7B,CAAC,CAAC,CAAC;QACH,MAAA,KAAK,CAAC,MAAM,qDAAI,CAAC;QACjB,OAAO;IACR,CAAC;IACD,kBAAkB;IAClB,SAAS,QAAQ;;QAChB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,MAAA,KAAK,CAAC,QAAQ,qDAAI,CAAC;IACpB,CAAC;AACF,CAAC,CAAC;AACF,eAAe,gBAAgB,CAAC"}
@@ -8,27 +8,27 @@
8
8
  .task-due-date-content {
9
9
  margin-left: 10px;
10
10
  position: relative;
11
+ background-color: #fff;
11
12
  .task-preset-date-picker {
12
13
  position: absolute;
13
14
  left: 0;
14
15
  top: 0;
15
16
  z-index: -1;
17
+ border: none;
18
+ .ant-picker-suffix {
19
+ display: none;
20
+ }
16
21
  }
17
22
  }
18
23
  .task-due-date-bnt {
19
- width: 40px;
20
- height: 32px;
21
- font-size: 20px;
24
+ font-size: 25px;
22
25
  cursor: pointer;
26
+ color: lightgray;
23
27
  display: inline-flex;
24
- align-items: center;
25
- justify-content: center;
26
- background-color: #fff;
28
+ padding-top: 2px;
27
29
  }
28
30
  .due-val-content {
29
- min-width: 32px;
30
31
  line-height: 18px;
31
- background-color: #fff;
32
32
  cursor: pointer;
33
33
  .dueDate {
34
34
  font-size: 12px;
@@ -74,8 +74,8 @@ export class State {
74
74
  this.loading = true;
75
75
  await this.taskStore.edit(this.id, {
76
76
  data: {
77
- StartDate: dayjs(this.startDate).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"),
78
- DueDate: dayjs(this.dueDate).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"),
77
+ StartDate: this.startDate ? dayjs(this.startDate).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]") : "",
78
+ DueDate: this.dueDate ? dayjs(this.dueDate).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]") : "",
79
79
  EstimatedHours: this.estimatedHours,
80
80
  },
81
81
  error: (error) => {
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskEstimatedTime/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAQ,MAAM,MAAM,CAAC;AAE1E,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,MAAM,OAAO,KAAK;IAiBjB,YAA2B,SAAoB;QAA5B;;;;mBAAQ,SAAS;WAAW;QAhB5B;;;;;WAA8B;QACjD,iBAAiB;QACE;;;;mBAAK,EAAE;WAAC;QAC3B,iBAAiB;QACE;;;;mBAAuC,SAAS;WAAC;QACpE,gBAAgB;QACG;;;;mBAAqC,SAAS;WAAC;QAClE,6BAA6B;QACV;;;;mBAAiB,CAAC;WAAC;QACtC,iCAAiC;QACd;;;;mBAAoB,CAAC;WAAC;QACzC,uBAAuB;QACJ;;;;mBAAU,K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,CAAC,IAAI,EAAE,KAAK,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC;IACnF,CAAC;CACD;AA9DmB;IAAlB,UAAU;oCAAsC;AAE9B;IAAlB,UAAU;iCAAgB;AAER;IAAlB,UAAU;wCAAyD;AAEjD;IAAlB,UAAU;sCAAuD;AAE/C;IAAlB,UAAU;6CAA2B;AAEnB;IAAlB,UAAU;gDAA8B;AAEtB;IAAlB,UAAU;sCAAwB;AAEhB;IAAlB,UAAU;sCAAwB;AAQ5B;IADN,MAAM;qCAqBL;AAGK;IADN,MAAM;mDAKL;AAGK;IADN,MAAM;6CAKL;AAGF;IADC,QAAQ;uCAGR"}
@@ -5,6 +5,7 @@ import { useMetaStore } from "@voplus/morpho-document-core";
5
5
  import { useTask } from "@voplus/morpho-document-core";
6
6
  import DocumentHeader from "@voplus/morpho-document/es/components/DocumentHeader";
7
7
  import TaskProperties from "../TaskProperties";
8
+ import TaskSimpleProperties from "../TaskSimpleProperties";
8
9
  import DocumentList from "@voplus/morpho-document/es/components/DocumentList";
9
10
  import QuickViewDialog from "@voplus/morpho-document/es/controls/QuickViewDialog";
10
11
  import { faFileAlt, faAlignLeft } from "@fortawesome/pro-light-svg-icons";
@@ -39,7 +40,9 @@ const TaskQuickViewDialog = (props) => {
39
40
  title: "Sub-Documents",
40
41
  detail: React.createElement(DocumentList, { id: id, exclude: ["Task"], multiple: true }),
41
42
  },
42
- ] }, loaded && React.createElement(TaskDescription, { id: props.id }))));
43
+ ] }, loaded && (React.createElement(React.Fragment, null,
44
+ React.createElement(TaskSimpleProperties, { id: props.id }),
45
+ React.createElement(TaskDescription, { id: props.id }))))));
43
46
  /** reload data */
44
47
  function onReload() {
45
48
  setLoaded(false);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskQuickViewDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KA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E,EAAE,KAAK,CAAC,EAAE,GAAI;QACtC,oBAAC,eAAe,IAAC,EAAE,EAAE,KAAK,CAAC,EAAE,GAAI,CAC/B,CACH,CACgB,CAClB,CAAC,CAAC;IACH,kBAAkB;IAClB,SAAS,QAAQ;QAChB,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,UAAU,CAAC,GAAG,EAAE;YACf,SAAS,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC,EAAE,GAAG,CAAC,CAAC;IACT,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ import { DocumentPropertiesName } from "@voplus/morpho-document/es/components/DocumentProperties";
3
+ import "./index.less";
4
+ export type TaskPropertiesName = "Status" | "Members" | "Due";
5
+ declare const TaskSimpleProperties: {
6
+ (props: {
7
+ id: string;
8
+ headerVisible?: boolean;
9
+ taskTitle?: string;
10
+ documentTitle?: string;
11
+ taskProperties?: {
12
+ name: TaskPropertiesName;
13
+ visible?: boolean;
14
+ }[];
15
+ documentProperties?: {
16
+ name: DocumentPropertiesName;
17
+ visible?: boolean;
18
+ }[];
19
+ }): React.JSX.Element;
20
+ defaultProps: {
21
+ taskTitle: string;
22
+ taskProperties: {
23
+ name: string;
24
+ }[];
25
+ };
26
+ };
27
+ export default TaskSimpleProperties;
@@ -0,0 +1,64 @@
1
+ import React, { useEffect, useState } from "react";
2
+ import { Form, message, Row, Col } from "antd";
3
+ import { useTask, useTaskStore } from "@voplus/morpho-document-core";
4
+ import { autorun } from "mobx";
5
+ import { observe, PropertiesSection } from "@voplus/morpho-ui";
6
+ import { useApplicationContext } from "@voplus/morpho-data";
7
+ import AvatarList from "@voplus/morpho-org/es/components/AvatarList";
8
+ import TaskEstimatedTime from "../TaskEstimatedTime";
9
+ import TaskStatusLabel from "../../controls/TaskStatusLabel";
10
+ import TasksProgressDataIcon from "../../controls/TasksProgressDataIcon";
11
+ import "./index.less";
12
+ const TaskSimpleProperties = (props) => {
13
+ /** 加class name 为了方便做integration tests */
14
+ const classId = "task-properties";
15
+ const { id, taskTitle, taskProperties } = props;
16
+ const { user } = useApplicationContext();
17
+ const task = useTask(id, { reload: true, includes: "tags,task-number-reports" });
18
+ const taskStore = useTaskStore();
19
+ const [taskStatus, setTaskStatus] = useState(task.taskStatus);
20
+ useEffect(() => autorun(() => setTaskStatus(task.taskStatus)), [task.taskStatus]);
21
+ const filterPro = taskProperties === null || taskProperties === void 0 ? void 0 : taskProperties.filter((i) => (i === null || i === void 0 ? void 0 : i.visible) !== false);
22
+ return observe(() => (React.createElement("div", { className: "properties-list task-simple-properties" },
23
+ React.createElement(PropertiesSection, { title: taskTitle, properties: (labelCol) => (React.createElement(Form, { className: classId + "-form", layout: "vertical", colon: false },
24
+ React.createElement(Row, null, filterPro === null || filterPro === void 0 ? void 0 : filterPro.map((i) => (React.createElement(Col, { key: i.name, span: 8 }, renderProp(i))))))) }))));
25
+ function renderProp(item) {
26
+ switch (item.name) {
27
+ case "Status":
28
+ return task.taskNumbers > 0 ? (React.createElement(Form.Item, { label: "Progress", className: classId + "-progress" },
29
+ React.createElement(TasksProgressDataIcon, { id: id }))) : (React.createElement(Form.Item, { label: "Status", className: classId + "-status" },
30
+ React.createElement(TaskStatusLabel, { status: taskStatus, editable: !task.readonly, onChange: (TaskStatus) => onEdit(TaskStatus) })));
31
+ case "Members":
32
+ return (React.createElement(Form.Item, { label: "Members", className: classId + "-members" },
33
+ React.createElement(AvatarList, { organizationId: user.info.organizationId, editable: !task.readonly, multiple: true, list: [
34
+ ...(task.members || []),
35
+ ...(task.childMembers || [])
36
+ .filter((item) => !(task.members || []).some((member) => member.id === item.id))
37
+ .map((item) => ({
38
+ ...item,
39
+ disabled: true,
40
+ })),
41
+ ], onChange: (ids) => {
42
+ taskStore.edit(id, { data: { MemberIds: ids }, error: "message" });
43
+ } })));
44
+ case "Due":
45
+ return (React.createElement(Form.Item, { label: "Due", className: classId + "-due" },
46
+ React.createElement(TaskEstimatedTime, { id: id, estimatedHours: task.estimatedHours || 0, startDate: task.startDate, dueDate: task.dueDate, editable: !task.readonly })));
47
+ }
48
+ }
49
+ /** task edit TaskStatus */
50
+ async function onEdit(TaskStatus) {
51
+ setTaskStatus(TaskStatus);
52
+ await taskStore.edit(id, {
53
+ data: { TaskStatus },
54
+ error: (error) => message.error(error.message),
55
+ });
56
+ setTaskStatus(task.taskStatus);
57
+ }
58
+ };
59
+ TaskSimpleProperties.defaultProps = {
60
+ taskTitle: "Task Properties",
61
+ taskProperties: [{ name: "Members" }, { name: "Due" }, { name: "Status" }],
62
+ };
63
+ export default TaskSimpleProperties;
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskSimpleProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAK5D,OAAO,UAAU,MAAM,6CAA6C,CAAC;AAGrE,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,eAAe,MAAM,gCAAgC,CAAC;AAC7D,OAAO,qBAAqB,MAAM,sCAAsC,CAAC;AACzE,OAAO,cAAc,CAAC;AAItB,MAAM,oBAAoB,GAAG,CAAC,KAU7B,EAAE,EAAE;IACJ,yCAAyC;IACzC,MAAM,OAAO,GAAG,iBAAiB,CAAC;IAElC,MAAM,EAAE,EAAE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AAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,14 @@
1
+ :global {
2
+ .task-simple-properties.properties-list {
3
+ height: auto;
4
+ .properties-section-header {
5
+ margin: 0 0 8px 0;
6
+ }
7
+ .properties-section-icon {
8
+ display: none;
9
+ }
10
+ .ant-form-item {
11
+ margin: 0;
12
+ }
13
+ }
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voplus/morpho-workspace",
3
- "version": "6.0.40",
3
+ "version": "6.0.42",
4
4
  "description": "morpho workspace module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,13 +39,11 @@
39
39
  "@fullcalendar/timegrid": "6.x",
40
40
  "@voplus/morpho-collaboration-action": "6.x",
41
41
  "@voplus/morpho-report": "6.x",
42
- "crypto-js": "^4.2.0",
43
42
  "react-beautiful-dnd": "^13.1.0",
44
43
  "swiper": "9.x",
45
44
  "tippy.js": "^5.1.4"
46
45
  },
47
46
  "devDependencies": {
48
- "@types/crypto-js": "^4.2.2",
49
47
  "@types/mockjs": "^1.0.3",
50
48
  "@types/react-beautiful-dnd": "^13.0.0",
51
49
  "@voplus/morpho-build": "5.x",