@voplus/morpho-workspace 1.1.0-dev013 → 1.1.0-dev014
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/AvatarList/state.js +50 -46
- package/es/components/AvatarList/state.js.map +1 -1
- package/es/components/TimeLog/index.d.ts +1 -1
- package/es/data/board/LinkStore.js +38 -34
- package/es/data/board/LinkStore.js.map +1 -1
- package/es/data/board/index.js +2 -0
- package/es/data/board/index.js.map +1 -1
- package/es/data/board/metas.js +15 -11
- package/es/data/board/metas.js.map +1 -1
- package/es/data/meeting/index.js +2 -0
- package/es/data/meeting/index.js.map +1 -1
- package/es/data/meeting/metas.js +22 -18
- package/es/data/meeting/metas.js.map +1 -1
- package/es/data/task/index.js +2 -0
- package/es/data/task/index.js.map +1 -1
- package/es/data/task/metas.js +19 -15
- package/es/data/task/metas.js.map +1 -1
- package/es/modules/board/components/Board/state.d.ts +2 -2
- package/es/modules/board/components/Board/state.js +111 -107
- package/es/modules/board/components/Board/state.js.map +1 -1
- package/es/modules/board/components/BoardColumn/state.js +142 -138
- package/es/modules/board/components/BoardColumn/state.js.map +1 -1
- package/es/modules/board/components/DocumentCard/index.d.ts +4 -4
- package/es/modules/board/components/DocumentCard/state.js +54 -50
- package/es/modules/board/components/DocumentCard/state.js.map +1 -1
- package/es/modules/board/components/LinkList/state.js +31 -27
- package/es/modules/board/components/LinkList/state.js.map +1 -1
- package/es/modules/board/components/NewTaskForm/state.js +41 -37
- package/es/modules/board/components/NewTaskForm/state.js.map +1 -1
- package/es/modules/board/components/TaskCard/state.js +117 -113
- package/es/modules/board/components/TaskCard/state.js.map +1 -1
- package/es/modules/board/pages/BoardViewList/state.js +14 -10
- package/es/modules/board/pages/BoardViewList/state.js.map +1 -1
- package/es/modules/calendar/components/CalendarMenu/index.d.ts +1 -1
- package/es/modules/calendar/components/TaskCard/state.js +58 -54
- package/es/modules/calendar/components/TaskCard/state.js.map +1 -1
- package/es/modules/calendar/pages/CalendarMonth/state.js +12 -8
- package/es/modules/calendar/pages/CalendarMonth/state.js.map +1 -1
- package/es/modules/meeting/components/AgendaList/AgendaHeader/index.d.ts +2 -2
- package/es/modules/meeting/components/AgendaList/AgendaItem/components/TaskItem/index.d.ts +1 -1
- package/es/modules/meeting/components/AgendaList/AgendaItem/components/TaskList/state.js +40 -36
- package/es/modules/meeting/components/AgendaList/AgendaItem/components/TaskList/state.js.map +1 -1
- package/es/modules/meeting/components/AgendaList/AgendaItem/state.js +47 -43
- package/es/modules/meeting/components/AgendaList/AgendaItem/state.js.map +1 -1
- package/es/modules/meeting/components/AgendaList/AgendaNewForm/state.js +19 -15
- package/es/modules/meeting/components/AgendaList/AgendaNewForm/state.js.map +1 -1
- package/es/modules/meeting/components/AgendaList/state.js +22 -18
- package/es/modules/meeting/components/AgendaList/state.js.map +1 -1
- package/es/modules/meeting/components/MeetingDescription/index.d.ts +1 -1
- package/es/modules/meeting/components/MeetingHeader/index.d.ts +3 -3
- package/es/modules/meeting/components/MeetingItem/index.d.ts +1 -1
- package/es/modules/meeting/components/MeetingItem/state.js +22 -18
- package/es/modules/meeting/components/MeetingItem/state.js.map +1 -1
- package/es/modules/meeting/components/MeetingQuickViewDialog/index.d.ts +2 -2
- package/es/modules/meeting/components/NewMeetingForm/index.js +1 -1
- package/es/modules/meeting/components/NewMeetingForm/index.js.map +1 -1
- package/es/modules/meeting/components/NewMeetingForm/state.js +31 -27
- package/es/modules/meeting/components/NewMeetingForm/state.js.map +1 -1
- package/es/modules/menus/components/Access/index.d.ts +2 -2
- package/es/modules/menus/components/Account/index.d.ts +2 -2
- package/es/modules/menus/components/Status/index.d.ts +2 -2
- package/es/modules/tasks/components/NewTaskForm/index.js +1 -1
- package/es/modules/tasks/components/NewTaskForm/index.js.map +1 -1
- package/es/modules/tasks/components/NewTaskForm/state.js +30 -26
- package/es/modules/tasks/components/NewTaskForm/state.js.map +1 -1
- package/es/modules/tasks/components/SubTaskList/state.js +22 -18
- package/es/modules/tasks/components/SubTaskList/state.js.map +1 -1
- package/es/modules/tasks/components/TaskDescription/index.d.ts +1 -1
- package/es/modules/tasks/components/TaskItem/state.js +157 -153
- package/es/modules/tasks/components/TaskItem/state.js.map +1 -1
- package/es/modules/tasks/components/TaskPropertiesView/index.d.ts +1 -1
- package/es/modules/tasks/components/TaskQuickViewDialog/index.d.ts +2 -2
- package/es/modules/tasks/components/TaskTimeBox/index.d.ts +4 -4
- package/es/modules/tasks/components/TaskTimeBox/state.js +74 -70
- package/es/modules/tasks/components/TaskTimeBox/state.js.map +1 -1
- package/es/modules/workspaces/components/Access/index.d.ts +2 -2
- package/es/modules/workspaces/components/Account/index.d.ts +2 -2
- package/es/modules/workspaces/components/ListHeard/index.d.ts +1 -1
- package/es/modules/workspaces/components/Status/index.d.ts +2 -2
- package/package.json +5 -5
@@ -2,159 +2,163 @@ import { __decorate } from "tslib";
|
|
2
2
|
import { action, computed, observable, toJS } from "mobx";
|
3
3
|
import { isEqual } from "lodash-es";
|
4
4
|
import { message } from "@voplus/antd";
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
/** loading of save */
|
19
|
-
this.loading = false;
|
20
|
-
this.visibleQuickView = false;
|
21
|
-
this.modalType = "";
|
22
|
-
/** MouseOver of sub task */
|
23
|
-
this.isHover = false;
|
24
|
-
this.reload = false;
|
25
|
-
/** Start edit date of task */
|
26
|
-
this.open = false;
|
27
|
-
this.startEdit = () => {
|
28
|
-
this.name = this.task.name;
|
29
|
-
this.ids = [...(this.task.members || [])].map(({ id }) => id);
|
30
|
-
this.isHover = false;
|
31
|
-
this.editable = !this.editable;
|
32
|
-
};
|
33
|
-
this.startEditDate = () => {
|
34
|
-
this.open = true;
|
35
|
-
this.editable = true;
|
36
|
-
};
|
37
|
-
this.save = async () => {
|
38
|
-
const params = { Name: this.name, MemberIds: this.ids };
|
39
|
-
// if (this.estimatedHours) params = { ...params, EstimatedHours: this.estimatedHours };
|
40
|
-
// if (this.schedule[0])
|
41
|
-
// params = { ...params, StartDate: this.schedule[0], DueDate: this.schedule[1] };
|
42
|
-
this.loading = true;
|
43
|
-
await this.taskStore.edit(this.task.id, params);
|
44
|
-
this.loading = false;
|
45
|
-
// }
|
5
|
+
let State = /** @class */ (() => {
|
6
|
+
class State {
|
7
|
+
constructor(taskStore, documents) {
|
8
|
+
this.taskStore = taskStore;
|
9
|
+
this.documents = documents;
|
10
|
+
this.ids = [];
|
11
|
+
this.members = [];
|
12
|
+
this.name = "";
|
13
|
+
/** Schedule of task */
|
14
|
+
this.schedule = [];
|
15
|
+
/** EstimatedHours of task */
|
16
|
+
this.estimatedHours = 0;
|
17
|
+
/** Edit model of task */
|
46
18
|
this.editable = false;
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
19
|
+
/** loading of save */
|
20
|
+
this.loading = false;
|
21
|
+
this.visibleQuickView = false;
|
22
|
+
this.modalType = "";
|
23
|
+
/** MouseOver of sub task */
|
24
|
+
this.isHover = false;
|
25
|
+
this.reload = false;
|
26
|
+
/** Start edit date of task */
|
27
|
+
this.open = false;
|
28
|
+
this.startEdit = () => {
|
29
|
+
this.name = this.task.name;
|
30
|
+
this.ids = [...(this.task.members || [])].map(({ id }) => id);
|
31
|
+
this.isHover = false;
|
32
|
+
this.editable = !this.editable;
|
33
|
+
};
|
34
|
+
this.startEditDate = () => {
|
35
|
+
this.open = true;
|
36
|
+
this.editable = true;
|
37
|
+
};
|
38
|
+
this.save = async () => {
|
39
|
+
const params = { Name: this.name, MemberIds: this.ids };
|
40
|
+
// if (this.estimatedHours) params = { ...params, EstimatedHours: this.estimatedHours };
|
41
|
+
// if (this.schedule[0])
|
42
|
+
// params = { ...params, StartDate: this.schedule[0], DueDate: this.schedule[1] };
|
43
|
+
this.loading = true;
|
44
|
+
await this.taskStore.edit(this.task.id, params);
|
45
|
+
this.loading = false;
|
46
|
+
// }
|
47
|
+
this.editable = false;
|
48
|
+
};
|
49
|
+
/** task edit */
|
50
|
+
this.onEdit = async (option) => {
|
51
|
+
await this.taskStore.edit(this.task.id, option);
|
52
|
+
};
|
53
|
+
/** task delete */
|
54
|
+
this.onDelete = async () => {
|
55
|
+
await this.taskStore.delete([this.task.id], { DeleteChilds: true });
|
56
|
+
};
|
57
|
+
this.onMove = () => {
|
58
|
+
this.documents.cut([this.task.id]);
|
59
|
+
};
|
60
|
+
/** */
|
61
|
+
this.onPaste = () => {
|
62
|
+
if (this.documents.moveIds.some((id) => id === this.task.id))
|
63
|
+
message.warn("Cannot move to itself");
|
64
|
+
this.documents.paste(this.task.id);
|
65
|
+
// state.reload = true;
|
66
|
+
};
|
67
|
+
}
|
68
|
+
get childMembers() {
|
69
|
+
return (this.task.childMembers || [])
|
70
|
+
.filter(item => !this.task.members.some(member => member.id === item.id))
|
71
|
+
.map(item => ({
|
72
|
+
...item,
|
73
|
+
disabled: true
|
74
|
+
}));
|
75
|
+
}
|
76
|
+
get readonly() {
|
77
|
+
return this.task.status === "Readonly";
|
78
|
+
}
|
79
|
+
get hasChanges() {
|
80
|
+
if (!this.name)
|
81
|
+
return;
|
82
|
+
const ids = toJS([...(this.task.members || []), ...this.childMembers].map(({ id }) => id));
|
83
|
+
const { name, startDate, dueDate, estimatedHours } = this.task;
|
84
|
+
const originalData = { name, ids };
|
85
|
+
const modifiedData = {
|
86
|
+
name: this.name.trim(),
|
87
|
+
ids: this.ids
|
88
|
+
// startDate: toJS(this.schedule)[0],
|
89
|
+
// dueDate: toJS(this.schedule)[1],
|
90
|
+
// estimatedHours: this.estimatedHours || estimatedHours
|
91
|
+
};
|
92
|
+
return !isEqual(originalData, modifiedData);
|
93
|
+
}
|
92
94
|
}
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
95
|
+
__decorate([
|
96
|
+
observable
|
97
|
+
], State.prototype, "task", void 0);
|
98
|
+
__decorate([
|
99
|
+
observable
|
100
|
+
], State.prototype, "ids", void 0);
|
101
|
+
__decorate([
|
102
|
+
observable
|
103
|
+
], State.prototype, "members", void 0);
|
104
|
+
__decorate([
|
105
|
+
observable
|
106
|
+
], State.prototype, "name", void 0);
|
107
|
+
__decorate([
|
108
|
+
observable
|
109
|
+
], State.prototype, "schedule", void 0);
|
110
|
+
__decorate([
|
111
|
+
observable
|
112
|
+
], State.prototype, "estimatedHours", void 0);
|
113
|
+
__decorate([
|
114
|
+
observable
|
115
|
+
], State.prototype, "editable", void 0);
|
116
|
+
__decorate([
|
117
|
+
observable
|
118
|
+
], State.prototype, "loading", void 0);
|
119
|
+
__decorate([
|
120
|
+
observable
|
121
|
+
], State.prototype, "visibleQuickView", void 0);
|
122
|
+
__decorate([
|
123
|
+
observable
|
124
|
+
], State.prototype, "modalType", void 0);
|
125
|
+
__decorate([
|
126
|
+
observable
|
127
|
+
], State.prototype, "isHover", void 0);
|
128
|
+
__decorate([
|
129
|
+
observable
|
130
|
+
], State.prototype, "reload", void 0);
|
131
|
+
__decorate([
|
132
|
+
observable
|
133
|
+
], State.prototype, "open", void 0);
|
134
|
+
__decorate([
|
135
|
+
action
|
136
|
+
], State.prototype, "startEdit", void 0);
|
137
|
+
__decorate([
|
138
|
+
action
|
139
|
+
], State.prototype, "startEditDate", void 0);
|
140
|
+
__decorate([
|
141
|
+
action
|
142
|
+
], State.prototype, "save", void 0);
|
143
|
+
__decorate([
|
144
|
+
action
|
145
|
+
], State.prototype, "onEdit", void 0);
|
146
|
+
__decorate([
|
147
|
+
action
|
148
|
+
], State.prototype, "onDelete", void 0);
|
149
|
+
__decorate([
|
150
|
+
action
|
151
|
+
], State.prototype, "onMove", void 0);
|
152
|
+
__decorate([
|
153
|
+
computed
|
154
|
+
], State.prototype, "childMembers", null);
|
155
|
+
__decorate([
|
156
|
+
computed
|
157
|
+
], State.prototype, "readonly", null);
|
158
|
+
__decorate([
|
159
|
+
computed
|
160
|
+
], State.prototype, "hasChanges", null);
|
161
|
+
return State;
|
162
|
+
})();
|
163
|
+
export { State };
|
160
164
|
//# sourceMappingURL=state.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskItem/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE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AAO,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;YAC/D,MAAM,YAAY,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;YACnC,MAAM,YAAY,GAAG;gBACpB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBACtB,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,qCAAqC;gBACrC,mCAAmC;gBACnC,wDAAwD;aACxD,CAAC;YACF,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;QAC7C,CAAC;KACD;IAvGY;QAAX,UAAU;uCAAoB;IACnB;QAAX,UAAU;sCAA2B;IAC1B;QAAX,UAAU;0CAA4B;IAC3B;QAAX,UAAU;uCAAkB;IAEjB;QAAX,UAAU;2CAA6B;IAE5B;QAAX,UAAU;iDAA2B;IAE1B;QAAX,UAAU;2CAAyB;IAExB;QAAX,UAAU;0CAAwB;IACvB;QAAX,UAAU;mDAAiC;IAChC;QAAX,UAAU;4CAAuB;IAEtB;QAAX,UAAU;0CAAwB;IACvB;QAAX,UAAU;yCAAuB;IAEtB;QAAX,UAAU;uCAAqB;IAKhC;QADC,MAAM;4CAML;IAGF;QADC,MAAM;gDAIL;IAGF;QADC,MAAM;uCAWL;IAGF;QADC,MAAM;yCAGL;IAGF;QADC,MAAM;2CAGL;IAGF;QAFC,MAAM;yCAIL;IAYF;QADC,QAAQ;6CAQR;IAGD;QADC,QAAQ;yCAGR;IAGD;QADC,QAAQ;2CAcR;IACF,YAAC;KAAA;SAzGY,KAAK"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
declare const TaskQuickViewDialog: (props: {
|
3
3
|
id: string;
|
4
|
-
visible?: boolean
|
5
|
-
onCancel?: (
|
4
|
+
visible?: boolean;
|
5
|
+
onCancel?: () => void;
|
6
6
|
}) => JSX.Element;
|
7
7
|
export default TaskQuickViewDialog;
|
@@ -3,10 +3,10 @@ import "./index.less";
|
|
3
3
|
declare const TaskTimeBox: {
|
4
4
|
(props: {
|
5
5
|
id: string;
|
6
|
-
estimatedHours?: number
|
7
|
-
schedule?: any[]
|
8
|
-
editable?: boolean
|
9
|
-
className?: string
|
6
|
+
estimatedHours?: number;
|
7
|
+
schedule?: any[];
|
8
|
+
editable?: boolean;
|
9
|
+
className?: string;
|
10
10
|
}): JSX.Element;
|
11
11
|
defaultProps: {
|
12
12
|
editable: boolean;
|
@@ -1,76 +1,80 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
2
|
import { action, observable, toJS } from "mobx";
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
/** visible of schedule/estimatedHours edit dialog */
|
17
|
-
this.visible = false;
|
18
|
-
/** save StartDate && DueDate or EstimatedHours*/
|
19
|
-
this.onSave = () => {
|
20
|
-
const schedule = toJS(this.schedule);
|
21
|
-
const StartDate = (schedule && schedule[0]) || "";
|
22
|
-
const DueDate = (schedule && schedule[1]) || "";
|
23
|
-
this.loading = true;
|
24
|
-
this.taskStore.edit(this.id, {
|
25
|
-
StartDate,
|
26
|
-
DueDate,
|
27
|
-
EstimatedHours: this.estimatedHours
|
28
|
-
});
|
3
|
+
let State = /** @class */ (() => {
|
4
|
+
class State {
|
5
|
+
constructor(taskStore) {
|
6
|
+
this.taskStore = taskStore;
|
7
|
+
/** id of task */
|
8
|
+
this.id = "";
|
9
|
+
/** Schedule of task */
|
10
|
+
this.schedule = [];
|
11
|
+
/** EstimatedHours of task */
|
12
|
+
this.estimatedHours = 0;
|
13
|
+
/** Old EstimatedHours of task */
|
14
|
+
this.oldEstimatedHours = 0;
|
15
|
+
/** loading of save */
|
29
16
|
this.loading = false;
|
17
|
+
/** visible of schedule/estimatedHours edit dialog */
|
30
18
|
this.visible = false;
|
31
|
-
|
32
|
-
this.
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
19
|
+
/** save StartDate && DueDate or EstimatedHours*/
|
20
|
+
this.onSave = () => {
|
21
|
+
const schedule = toJS(this.schedule);
|
22
|
+
const StartDate = (schedule && schedule[0]) || "";
|
23
|
+
const DueDate = (schedule && schedule[1]) || "";
|
24
|
+
this.loading = true;
|
25
|
+
this.taskStore.edit(this.id, {
|
26
|
+
StartDate,
|
27
|
+
DueDate,
|
28
|
+
EstimatedHours: this.estimatedHours
|
29
|
+
});
|
30
|
+
this.loading = false;
|
31
|
+
this.visible = false;
|
32
|
+
this.oldEstimatedHours = this.estimatedHours;
|
33
|
+
this.oldSchedule = StartDate ? schedule : undefined;
|
34
|
+
};
|
35
|
+
/** edit estimatedHours */
|
36
|
+
this.changeEstimatedHours = (value) => {
|
37
|
+
this.estimatedHours = value;
|
38
|
+
this.schedule = toJS([]);
|
39
|
+
};
|
40
|
+
/** edit schedule */
|
41
|
+
this.changeSchedule = (value) => {
|
42
|
+
this.schedule = value;
|
43
|
+
this.estimatedHours = 0;
|
44
|
+
};
|
45
|
+
}
|
44
46
|
}
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
47
|
+
__decorate([
|
48
|
+
observable
|
49
|
+
], State.prototype, "id", void 0);
|
50
|
+
__decorate([
|
51
|
+
observable
|
52
|
+
], State.prototype, "schedule", void 0);
|
53
|
+
__decorate([
|
54
|
+
observable
|
55
|
+
], State.prototype, "oldSchedule", void 0);
|
56
|
+
__decorate([
|
57
|
+
observable
|
58
|
+
], State.prototype, "estimatedHours", void 0);
|
59
|
+
__decorate([
|
60
|
+
observable
|
61
|
+
], State.prototype, "oldEstimatedHours", void 0);
|
62
|
+
__decorate([
|
63
|
+
observable
|
64
|
+
], State.prototype, "loading", void 0);
|
65
|
+
__decorate([
|
66
|
+
observable
|
67
|
+
], State.prototype, "visible", void 0);
|
68
|
+
__decorate([
|
69
|
+
action
|
70
|
+
], State.prototype, "onSave", void 0);
|
71
|
+
__decorate([
|
72
|
+
action
|
73
|
+
], State.prototype, "changeEstimatedHours", void 0);
|
74
|
+
__decorate([
|
75
|
+
action
|
76
|
+
], State.prototype, "changeSchedule", void 0);
|
77
|
+
return State;
|
78
|
+
})();
|
79
|
+
export { State };
|
76
80
|
//# sourceMappingURL=state.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskTimeBox/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAIhD,
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskTimeBox/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAIhD;IAAA,MAAa,KAAK;QAgBjB,YAA2B,SAAoB;YAApB,cAAS,GAAT,SAAS,CAAW;YAf/C,iBAAiB;YACE,OAAE,GAAG,EAAE,CAAC;YAC3B,uBAAuB;YACJ,aAAQ,GAAQ,EAAE,CAAC;YAGtC,6BAA6B;YACV,mBAAc,GAAG,CAAC,CAAC;YACtC,iCAAiC;YACd,sBAAiB,GAAG,CAAC,CAAC;YACzC,uBAAuB;YACJ,YAAO,GAAG,KAAK,CAAC;YACnC,uDAAuD;YACpC,YAAO,GAAG,KAAK,CAAC;YAInC,kDAAkD;YAE3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oDAA8B;IAE7B;QAAX,UAAU;0CAAwB;IAEvB;QAAX,UAAU;0CAAwB;IAMnC;QADC,MAAM;yCAeL;IAGF;QADC,MAAM;uDAIL;IAGF;QADC,MAAM;iDAIL;IACH,YAAC;KAAA;SA/CY,KAAK"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@voplus/morpho-workspace",
|
3
|
-
"version": "1.1.0-
|
3
|
+
"version": "1.1.0-dev014",
|
4
4
|
"description": "morpho workspace module",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -38,15 +38,15 @@
|
|
38
38
|
"@types/react-dom": "^16.9.8",
|
39
39
|
"@types/react-router": "^5.1.7",
|
40
40
|
"@types/react-router-dom": "^5.1.5",
|
41
|
-
"@voplus/antd": "^4.
|
41
|
+
"@voplus/antd": "^4.2.2-vo1.0.2",
|
42
42
|
"@voplus/morpho-client-test": "^1.0.0-dev014",
|
43
43
|
"@voplus/morpho-collaboration": "^1.0.0-dev024",
|
44
44
|
"@voplus/morpho-config": "^1.0.0-dev50",
|
45
|
-
"@voplus/morpho-data": "^1.0.0-
|
46
|
-
"@voplus/morpho-document": "^1.0.0-
|
45
|
+
"@voplus/morpho-data": "^1.0.0-dev097",
|
46
|
+
"@voplus/morpho-document": "^1.0.0-dev227",
|
47
47
|
"@voplus/morpho-org": "^1.0.0-dev032-antd4",
|
48
48
|
"@voplus/morpho-text": "^1.0.0-dev016",
|
49
|
-
"@voplus/morpho-ui": "^1.0.0-
|
49
|
+
"@voplus/morpho-ui": "^1.0.0-dev115",
|
50
50
|
"draft-js": "^0.11.5",
|
51
51
|
"mobx": "^5.15.4",
|
52
52
|
"mobx-react-lite": "^1.5.1",
|