@voplus/morpho-workspace 6.1.21 → 6.1.22
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/modules/notification/components/NotificationOverview/index.d.ts +2 -2
- package/es/modules/notification/components/NotificationOverview/index.js +15 -8
- package/es/modules/notification/components/NotificationOverview/index.js.map +1 -1
- package/es/modules/notification/components/NotificationOverview/state.d.ts +6 -0
- package/es/modules/notification/components/NotificationOverview/state.js +47 -0
- package/es/modules/notification/components/NotificationOverview/state.js.map +1 -0
- package/es/modules/notification/pages/NotificationListPage/index.js +24 -31
- package/es/modules/notification/pages/NotificationListPage/index.js.map +1 -1
- package/es/modules/notification/pages/NotificationListPage/state.d.ts +3 -0
- package/es/modules/notification/pages/NotificationListPage/state.js +40 -1
- package/es/modules/notification/pages/NotificationListPage/state.js.map +1 -1
- package/es/modules/tasks/components/TaskOverview/index.d.ts +4 -3
- package/es/modules/tasks/components/TaskOverview/index.js +22 -12
- package/es/modules/tasks/components/TaskOverview/index.js.map +1 -1
- package/es/modules/tasks/components/TaskOverview/state.d.ts +8 -0
- package/es/modules/tasks/components/TaskOverview/state.js +65 -0
- package/es/modules/tasks/components/TaskOverview/state.js.map +1 -0
- package/es/modules/tasks/pages/TaskListPage/index.js +26 -31
- package/es/modules/tasks/pages/TaskListPage/index.js.map +1 -1
- package/es/modules/tasks/pages/TaskListPage/state.d.ts +7 -2
- package/es/modules/tasks/pages/TaskListPage/state.js +84 -13
- package/es/modules/tasks/pages/TaskListPage/state.js.map +1 -1
- package/es/modules/work/components/WorkOverview/index.d.ts +4 -4
- package/es/modules/work/components/WorkOverview/index.js +24 -12
- package/es/modules/work/components/WorkOverview/index.js.map +1 -1
- package/es/modules/work/components/WorkOverview/state.d.ts +8 -0
- package/es/modules/work/components/WorkOverview/state.js +65 -0
- package/es/modules/work/components/WorkOverview/state.js.map +1 -0
- package/es/modules/work/pages/WorkListPage2/index.js +9 -19
- package/es/modules/work/pages/WorkListPage2/index.js.map +1 -1
- package/es/modules/work/pages/WorkListPage2/state.d.ts +7 -2
- package/es/modules/work/pages/WorkListPage2/state.js +86 -24
- package/es/modules/work/pages/WorkListPage2/state.js.map +1 -1
- package/es/modules/work/work-error/components/WorkErrorPropertiesView/index.js +6 -5
- package/es/modules/work/work-error/components/WorkErrorPropertiesView/index.js.map +1 -1
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/index.d.ts +4 -2
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/index.js +20 -10
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/index.js.map +1 -1
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/state.d.ts +8 -0
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/state.js +63 -0
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/state.js.map +1 -0
- package/es/modules/work/work-schedule/pages/WorkScheduleListPage/index.js +26 -23
- package/es/modules/work/work-schedule/pages/WorkScheduleListPage/index.js.map +1 -1
- package/es/modules/work/work-schedule/pages/WorkScheduleListPage/state.d.ts +7 -2
- package/es/modules/work/work-schedule/pages/WorkScheduleListPage/state.js +92 -19
- package/es/modules/work/work-schedule/pages/WorkScheduleListPage/state.js.map +1 -1
- package/es/modules/work/work-type/components/WorkTypeHeader/index.d.ts +1 -0
- package/es/modules/work/work-type/components/WorkTypeHeader/index.js +3 -2
- package/es/modules/work/work-type/components/WorkTypeHeader/index.js.map +1 -1
- package/es/modules/work/work-type/components/WorkTypePropertiesView/index.js +1 -1
- package/es/modules/work/work-type/components/WorkTypePropertiesView/index.js.map +1 -1
- package/package.json +1 -1
- package/es/modules/notification/components/NotificationOverview/index.less +0 -24
- package/es/modules/tasks/components/TaskOverview/index.less +0 -49
- package/es/modules/work/components/WorkOverview/index.less +0 -49
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/index.less +0 -58
@@ -1,22 +1,32 @@
|
|
1
|
-
import React from "react";
|
1
|
+
import React, { useState } from "react";
|
2
2
|
import { observe } from "@voplus/morpho-ui";
|
3
3
|
import DueItem from "@voplus/morpho-ui/es/controls/PanelOverview/DueItem";
|
4
4
|
import OverviewItem from "@voplus/morpho-ui/es/controls/PanelOverview/OverviewItem";
|
5
5
|
import OverviewAll from "@voplus/morpho-ui/es/controls/PanelOverview/OverviewAll";
|
6
6
|
import { Scrollbars } from "react-custom-scrollbars-2";
|
7
|
-
import { faPlus, faClock } from "@fortawesome/pro-solid-svg-icons";
|
8
7
|
import PanelOverview from "@voplus/morpho-ui/es/controls/PanelOverview";
|
8
|
+
import classnames from "classnames";
|
9
|
+
import { State } from "./state";
|
9
10
|
import dayjs from "dayjs";
|
10
|
-
import "./index.less";
|
11
11
|
const WorkScheduleOverview = (props) => {
|
12
|
-
const { onOverviewItemClick } = props;
|
12
|
+
const { actives, dueActives, onOverviewItemClick, onDueItemClick } = props;
|
13
|
+
const [state] = useState(new State());
|
14
|
+
state.update(actives, dueActives);
|
13
15
|
return observe(() => (React.createElement(Scrollbars, { autoHide: true },
|
14
|
-
React.createElement(PanelOverview, { className: "work-schedule-overview", overviewAll: React.createElement(OverviewAll, { total: 20, description: "Total All Work Schedule" }), overviewList: React.createElement(React.Fragment, null,
|
15
|
-
React.createElement(OverviewItem, {
|
16
|
-
React.createElement(OverviewItem, { className: "
|
17
|
-
React.createElement(DueItem, { title: "Overdue", type: "Works", description: dayjs().format("DD MMM YYYY"), total: 20 }),
|
18
|
-
React.createElement(DueItem, { className: "week", title: "This Week", type: "Works", description: dayjs().endOf("week").format("DD MMM YYYY"), total: 20 }),
|
19
|
-
React.createElement(DueItem, { className: "month", title: "This Month", type: "Works", description: dayjs().endOf("month").format("DD MMM YYYY"), total: 20 })) }))));
|
16
|
+
React.createElement(PanelOverview, { className: "work-schedule-overview", overviewAll: React.createElement(OverviewAll, { className: classnames({ active: state.actives.includes("All") }), total: 20, description: "Total All Work Schedule", onClick: () => onClick("All") }), overviewList: React.createElement(React.Fragment, null,
|
17
|
+
React.createElement(OverviewItem, { className: classnames({ active: state.actives.includes("WorkCreated") }), total: 20, description: "Work Created", onClick: () => onClick("WorkCreated") }),
|
18
|
+
React.createElement(OverviewItem, { className: classnames({ active: state.actives.includes("Unscheduled") }), total: 20, description: "Unscheduled", onClick: () => onClick("Unscheduled") })), nodeTitle: "DUE OF WORKS SCHEDULE", dueList: React.createElement(React.Fragment, null,
|
19
|
+
React.createElement(DueItem, { className: classnames({ active: state.dueActives === "overdue" }), title: "Overdue", type: "Works", description: dayjs().format("DD MMM YYYY"), total: 20, onClick: () => onDueClick("overdue") }),
|
20
|
+
React.createElement(DueItem, { className: classnames("week", { active: state.dueActives === "week" }), title: "This Week", type: "Works", description: dayjs().endOf("week").format("DD MMM YYYY"), total: 20, onClick: () => onDueClick("week") }),
|
21
|
+
React.createElement(DueItem, { className: classnames("month", { active: state.dueActives === "month" }), title: "This Month", type: "Works", description: dayjs().endOf("month").format("DD MMM YYYY"), total: 20, onClick: () => onDueClick("month") })) }))));
|
22
|
+
function onDueClick(dueAct) {
|
23
|
+
state.onDueClick(dueAct);
|
24
|
+
onDueItemClick === null || onDueItemClick === void 0 ? void 0 : onDueItemClick(state.dueActives);
|
25
|
+
}
|
26
|
+
function onClick(status) {
|
27
|
+
state.onClick(status);
|
28
|
+
onOverviewItemClick === null || onOverviewItemClick === void 0 ? void 0 : onOverviewItemClick(state.actives);
|
29
|
+
}
|
20
30
|
};
|
21
31
|
export default WorkScheduleOverview;
|
22
32
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/components/WorkScheduleOverview/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/components/WorkScheduleOverview/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACx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AAC,MAAM,CAAC,aAAa,CAAC,EACzD,KAAK,EAAE,EAAE,EACT,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,GACjC,CACA,GAEH,CACU,CACb,CAAC,CAAC;IAEH,SAAS,UAAU,CAAC,MAAc;QACjC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzB,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAG,KAAK,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED,SAAS,OAAO,CAAC,MAAc;QAC9B,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACtB,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,KAAK,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { action, makeObservable, observable } from "mobx";
|
3
|
+
export class State {
|
4
|
+
constructor() {
|
5
|
+
Object.defineProperty(this, "actives", {
|
6
|
+
enumerable: true,
|
7
|
+
configurable: true,
|
8
|
+
writable: true,
|
9
|
+
value: []
|
10
|
+
});
|
11
|
+
Object.defineProperty(this, "dueActives", {
|
12
|
+
enumerable: true,
|
13
|
+
configurable: true,
|
14
|
+
writable: true,
|
15
|
+
value: void 0
|
16
|
+
});
|
17
|
+
makeObservable(this);
|
18
|
+
}
|
19
|
+
update(currents, dueActives) {
|
20
|
+
if (JSON.stringify(currents) !== JSON.stringify(this.actives)) {
|
21
|
+
this.actives = currents !== null && currents !== void 0 ? currents : [];
|
22
|
+
}
|
23
|
+
if (dueActives !== this.dueActives) {
|
24
|
+
this.dueActives = dueActives;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
onClick(status) {
|
28
|
+
this.actives = [status];
|
29
|
+
// if (status === "All") {
|
30
|
+
// this.actives = [status];
|
31
|
+
// } else {
|
32
|
+
// if (this.actives.includes("All")) {
|
33
|
+
// this.actives = [status];
|
34
|
+
// } else {
|
35
|
+
// if (this.actives.includes(status)) {
|
36
|
+
// this.actives = this.actives.filter((item) => item !== status);
|
37
|
+
// } else {
|
38
|
+
// const actives = Array.isArray(this.actives) ? [...this.actives, status] : [status];
|
39
|
+
// this.actives = actives;
|
40
|
+
// }
|
41
|
+
// }
|
42
|
+
// }
|
43
|
+
}
|
44
|
+
onDueClick(dueAct) {
|
45
|
+
this.dueActives = dueAct;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
__decorate([
|
49
|
+
observable
|
50
|
+
], State.prototype, "actives", void 0);
|
51
|
+
__decorate([
|
52
|
+
observable
|
53
|
+
], State.prototype, "dueActives", void 0);
|
54
|
+
__decorate([
|
55
|
+
action
|
56
|
+
], State.prototype, "update", null);
|
57
|
+
__decorate([
|
58
|
+
action
|
59
|
+
], State.prototype, "onClick", null);
|
60
|
+
__decorate([
|
61
|
+
action
|
62
|
+
], State.prototype, "onDueClick", null);
|
63
|
+
//# sourceMappingURL=state.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/components/WorkScheduleOverview/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE1D,MAAM,OAAO,KAAK;IAIjB;QAHmB;;;;mBAAoB,EAAE;WAAC;QACvB;;;;;WAAoB;QAGtC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAEc,MAAM,CAAC,QAAmB,EAAE,UAAmB;QAC7D,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/D,IAAI,CAAC,OAAO,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAC;QAC/B,CAAC;QACD,IAAI,UAAU,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC;YACpC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC9B,CAAC;IACF,CAAC;IAEc,OAAO,CAAC,MAAc;QACpC,IAAI,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC;QACxB,0BAA0B;QAC1B,4BAA4B;QAC5B,WAAW;QACX,uCAAuC;QACvC,6BAA6B;QAC7B,YAAY;QACZ,yCAAyC;QACzC,oEAAoE;QACpE,aAAa;QACb,yFAAyF;QACzF,6BAA6B;QAC7B,MAAM;QACN,KAAK;QACL,IAAI;IACL,CAAC;IAEc,UAAU,CAAC,MAAc;QACvC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;IAC1B,CAAC;CACD;AArCmB;IAAlB,UAAU;sCAA+B;AACvB;IAAlB,UAAU;yCAA4B;AAMxB;IAAd,MAAM;mCAON;AAEc;IAAd,MAAM;oCAgBN;AAEc;IAAd,MAAM;uCAEN"}
|
@@ -5,38 +5,41 @@ import PageHeadDashboard from "@voplus/morpho-ui/es/components/layout/headers/Pa
|
|
5
5
|
import DefaultViewLayout from "@voplus/morpho-ui/es/components/layout/DefaultViewLayout";
|
6
6
|
import DocumentTabs from "@voplus/morpho-document/es/components/DocumentTabs";
|
7
7
|
import ActivityLog from "@voplus/morpho-org/es/components/ActivityLog2/ActivityLog2";
|
8
|
-
import FilterStatusLabel from "@voplus/morpho-ui/es/controls/FilterStatusLabel";
|
9
8
|
import { observe } from "@voplus/morpho-ui";
|
10
9
|
import WorkScheduleList from "../../components/WorkScheduleList";
|
11
|
-
import WorkTypesFilter from "../../../../../controls/filters/WorkTypesFilter";
|
12
|
-
import WorkScheduleFilter from "../../controls/WorkScheduleFilter";
|
13
10
|
import WorkSchedulePanel from "../../components/WorkSchedulePanel";
|
11
|
+
import FilterLabel from "@voplus/morpho-ui/es/controls/FilterLabel";
|
14
12
|
import { State } from "./state";
|
15
13
|
import styles from "./index.less";
|
16
14
|
const WorkScheduleListPage = (props) => {
|
17
15
|
var _a;
|
18
16
|
const [state] = useState(new State((_a = props.contact) === null || _a === void 0 ? void 0 : _a.id));
|
19
17
|
const [activeKey, setActiveKey] = useState("WorkScheduleList");
|
20
|
-
return observe(() =>
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
18
|
+
return observe(() => {
|
19
|
+
var _a, _b;
|
20
|
+
return (React.createElement(DefaultViewLayout, { className: styles["workSchedule-list-page"], header: React.createElement(PageHeadDashboard, { avatarIcon: React.createElement(FAIcon, { icon: faSuitcase }), title: "Work Schedules", upAble: true, description: "Your tasks: prioritize and complete your work." }), propertiesWidth: "295px", properties: React.createElement(WorkSchedulePanel, { overviewProps: {
|
21
|
+
actives: state.status,
|
22
|
+
dueActives: state.dueActives,
|
23
|
+
onOverviewItemClick: (s) => state.onOverviewItemClick(s),
|
24
|
+
onDueItemClick: (d) => state.onDueItemClick(d),
|
25
|
+
}, workScheduleFilterProps: {
|
26
|
+
onFilter(options) {
|
27
|
+
state.onFilterOptions(options);
|
28
|
+
},
|
29
|
+
} }) },
|
30
|
+
React.createElement(DocumentTabs, { id: "", active: "WorkScheduleList", tabItems: [
|
31
|
+
{
|
32
|
+
key: "WorkScheduleList",
|
33
|
+
label: "Work Schedule List",
|
34
|
+
children: (React.createElement(WorkScheduleList, { ...props, filter: false, asideable: false, headerType: "tool", filterOptions: state.filerOptions })),
|
35
|
+
},
|
36
|
+
{
|
37
|
+
key: "Activities",
|
38
|
+
label: "Activities",
|
39
|
+
children: (React.createElement(React.Fragment, null, activeKey === "Activities" ? (React.createElement(ActivityLog, { id: "", bar: false })) : null)),
|
40
|
+
},
|
41
|
+
], onChange: (key) => setActiveKey(key), tabBarExtraContent: activeKey === "WorkScheduleList" ? (React.createElement("div", { className: "list-tabBar-filter" }, ((_a = state.status) === null || _a === void 0 ? void 0 : _a.includes("All")) ? ("Showed: Total All Work Schedules") : ((_b = state.status) === null || _b === void 0 ? void 0 : _b.length) || state.dueActives ? (React.createElement(FilterLabel, { status: state.status.concat(state.dueActives ? [state.dueActives] : []), maxCount: 2, onFilter: (s) => state.onFilterLabel(s) })) : undefined)) : undefined })));
|
42
|
+
});
|
40
43
|
};
|
41
44
|
export default WorkScheduleListPage;
|
42
45
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/pages/WorkScheduleListPage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,iBAAiB,MAAM,kEAAkE,CAAC;AACjG,OAAO,iBAAiB,MAAM,0DAA0D,CAAC;AACzF,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,WAAW,MAAM,4DAA4D,CAAC;AACrF,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/pages/WorkScheduleListPage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,iBAAiB,MAAM,kEAAkE,CAAC;AACjG,OAAO,iBAAiB,MAAM,0DAA0D,CAAC;AACzF,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,WAAW,MAAM,4DAA4D,CAAC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AAC,CAAC,GACtC,CACF,CAAC,CAAC,CAAC,SAAS,CACR,CACN,CAAC,CAAC,CAAC,SAAS,GAEb,CACiB,CACpB,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
@@ -3,8 +3,13 @@ export declare class State {
|
|
3
3
|
private contactId?;
|
4
4
|
/** 默认值 */
|
5
5
|
filerOptions?: FilterOption[];
|
6
|
+
status: string[];
|
7
|
+
dueActives?: "overdue" | "week" | "month";
|
6
8
|
constructor(contactId?: string | undefined);
|
7
9
|
onFilterOptions(options?: FilterOption[]): void;
|
8
|
-
|
9
|
-
|
10
|
+
onDueItemClick(d: "overdue" | "week" | "month"): void;
|
11
|
+
onOverviewItemClick(s?: string[]): void;
|
12
|
+
onFilterLabel(s?: string): void;
|
13
|
+
get statusFilerOptions(): FilterOption[];
|
14
|
+
get dateFilerOptions(): FilterOption[];
|
10
15
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { action, makeObservable, observable } from "mobx";
|
2
|
+
import { action, makeObservable, observable, computed, toJS } from "mobx";
|
3
3
|
import dayjs from "dayjs";
|
4
4
|
export class State {
|
5
5
|
constructor(contactId) {
|
@@ -16,6 +16,18 @@ export class State {
|
|
16
16
|
writable: true,
|
17
17
|
value: void 0
|
18
18
|
});
|
19
|
+
Object.defineProperty(this, "status", {
|
20
|
+
enumerable: true,
|
21
|
+
configurable: true,
|
22
|
+
writable: true,
|
23
|
+
value: []
|
24
|
+
});
|
25
|
+
Object.defineProperty(this, "dueActives", {
|
26
|
+
enumerable: true,
|
27
|
+
configurable: true,
|
28
|
+
writable: true,
|
29
|
+
value: void 0
|
30
|
+
});
|
19
31
|
makeObservable(this);
|
20
32
|
this.onFilterOptions();
|
21
33
|
}
|
@@ -23,37 +35,98 @@ export class State {
|
|
23
35
|
var _a, _b;
|
24
36
|
this.filerOptions = options !== null && options !== void 0 ? options : [];
|
25
37
|
if (this.contactId && !((_a = this.filerOptions) === null || _a === void 0 ? void 0 : _a.some((item) => item.c === "Contact"))) {
|
26
|
-
(_b = this.filerOptions) === null || _b === void 0 ? void 0 : _b.push({
|
27
|
-
c: "Contact",
|
28
|
-
o: "=",
|
29
|
-
l: "And",
|
30
|
-
v1: this.contactId,
|
31
|
-
});
|
38
|
+
(_b = this.filerOptions) === null || _b === void 0 ? void 0 : _b.push({ c: "Contact", o: "=", l: "And", v1: this.contactId });
|
32
39
|
}
|
33
40
|
}
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
41
|
+
onDueItemClick(d) {
|
42
|
+
this.dueActives = d;
|
43
|
+
if (this.status.includes("All"))
|
44
|
+
this.status = [];
|
45
|
+
this.onFilterOptions(this.statusFilerOptions.concat(this.dateFilerOptions));
|
46
|
+
}
|
47
|
+
onOverviewItemClick(s) {
|
48
|
+
this.status = s !== null && s !== void 0 ? s : [];
|
49
|
+
if (this.status.includes("All"))
|
50
|
+
this.dueActives = undefined;
|
51
|
+
this.onFilterOptions(this.statusFilerOptions.concat(this.dateFilerOptions));
|
40
52
|
}
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
53
|
+
onFilterLabel(s) {
|
54
|
+
if (s) {
|
55
|
+
if (s === "overdue" || s === "week" || s === "month") {
|
56
|
+
this.dueActives = undefined;
|
57
|
+
}
|
58
|
+
let status = toJS(this.status);
|
59
|
+
status = status === null || status === void 0 ? void 0 : status.filter((i) => i !== s);
|
60
|
+
this.onOverviewItemClick(status);
|
61
|
+
}
|
62
|
+
else {
|
63
|
+
this.status = [];
|
64
|
+
this.dueActives = undefined;
|
65
|
+
this.onFilterOptions();
|
66
|
+
}
|
67
|
+
}
|
68
|
+
get statusFilerOptions() {
|
69
|
+
let f = [];
|
70
|
+
if (this.status.includes("All"))
|
71
|
+
return f;
|
72
|
+
let status = toJS(this.status);
|
73
|
+
if (status.includes("WorkCreated")) {
|
74
|
+
f.push({ c: "Work", o: "!=", v1: "null", l: "And" });
|
75
|
+
}
|
76
|
+
if (status.includes("Unscheduled")) {
|
77
|
+
f = f.concat([
|
78
|
+
{ c: "ScheduleDate", o: "is null", l: "And", v1: "" },
|
79
|
+
{ c: "Work", o: "=", v1: "null", l: "And" },
|
80
|
+
]);
|
81
|
+
}
|
82
|
+
return f;
|
83
|
+
}
|
84
|
+
get dateFilerOptions() {
|
85
|
+
let f = [];
|
86
|
+
if (this.status.includes("All"))
|
87
|
+
return f;
|
88
|
+
if (this.dueActives) {
|
89
|
+
if (this.dueActives === "overdue") {
|
90
|
+
f = [{ c: "DueDate", o: "<=", l: "And", v1: dayjs().format("YYYY-MM-DD") }];
|
91
|
+
}
|
92
|
+
else {
|
93
|
+
const v1 = dayjs()
|
94
|
+
.startOf(this.dueActives)
|
95
|
+
.format("YYYY-MM-DD HH:mm:ss");
|
96
|
+
const v2 = dayjs()
|
97
|
+
.endOf(this.dueActives)
|
98
|
+
.format("YYYY-MM-DD HH:mm:ss");
|
99
|
+
f = [{ c: "DueDate", o: "between", l: "And", v1: v1, v2: v2 }];
|
100
|
+
}
|
101
|
+
}
|
102
|
+
return f;
|
45
103
|
}
|
46
104
|
}
|
47
105
|
__decorate([
|
48
106
|
observable
|
49
107
|
], State.prototype, "filerOptions", void 0);
|
108
|
+
__decorate([
|
109
|
+
observable
|
110
|
+
], State.prototype, "status", void 0);
|
111
|
+
__decorate([
|
112
|
+
observable
|
113
|
+
], State.prototype, "dueActives", void 0);
|
50
114
|
__decorate([
|
51
115
|
action
|
52
116
|
], State.prototype, "onFilterOptions", null);
|
53
117
|
__decorate([
|
54
118
|
action
|
55
|
-
], State.prototype, "
|
119
|
+
], State.prototype, "onDueItemClick", null);
|
120
|
+
__decorate([
|
121
|
+
action
|
122
|
+
], State.prototype, "onOverviewItemClick", null);
|
56
123
|
__decorate([
|
57
124
|
action
|
58
|
-
], State.prototype, "
|
125
|
+
], State.prototype, "onFilterLabel", null);
|
126
|
+
__decorate([
|
127
|
+
computed
|
128
|
+
], State.prototype, "statusFilerOptions", null);
|
129
|
+
__decorate([
|
130
|
+
computed
|
131
|
+
], State.prototype, "dateFilerOptions", null);
|
59
132
|
//# sourceMappingURL=state.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/pages/WorkScheduleListPage/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/pages/WorkScheduleListPage/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE1E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,OAAO,KAAK;IAMjB,YAA2B,SAAkB;QAA1B;;;;mBAAQ,SAAS;WAAS;QAL7C,UAAU;QACS;;;;;WAA8B;QAC9B;;;;mBAAmB,EAAE;WAAC;QACtB;;;;;WAA0C;QAG5D,cAAc,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,eAAe,EAAE,CAAC;IACxB,CAAC;IAEc,eAAe,CAAC,OAAwB;;QACtD,IAAI,CAAC,YAAY,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC;QAElC,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,SAAS,CAAC,CAAA,EAAE,CAAC;YAChF,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI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KAAK,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;YAC7E,CAAC;iBAAM,CAAC;gBACP,MAAM,EAAE,GAAG,KAAK,EAAE;qBAChB,OAAO,CAAC,IAAI,CAAC,UAAiB,CAAC;qBAC/B,MAAM,CAAC,qBAAqB,CAAC,CAAC;gBAChC,MAAM,EAAE,GAAG,KAAK,EAAE;qBAChB,KAAK,CAAC,IAAI,CAAC,UAAiB,CAAC;qBAC7B,MAAM,CAAC,qBAAqB,CAAC,CAAC;gBAChC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YAChE,CAAC;QACF,CAAC;QAED,OAAO,CAAC,CAAC;IACV,CAAC;CACD;AAnFmB;IAAlB,UAAU;2CAAsC;AAC9B;IAAlB,UAAU;qCAA8B;AACtB;IAAlB,UAAU;yCAAkD;AAO9C;IAAd,MAAM;4CAMN;AAEc;IAAd,MAAM;2CAIN;AAEc;IAAd,MAAM;gDAIN;AAEc;IAAd,MAAM;0CAaN;AAES;IAAT,QAAQ;+CAiBR;AAES;IAAT,QAAQ;6CAmBR"}
|
@@ -1,19 +1,20 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
2
|
import { State } from "../WorkTypeProperties/state";
|
3
|
-
import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
4
3
|
import { observe, InlineEdit } from "@voplus/morpho-ui";
|
4
|
+
import { Open, Close } from "@voplus/morpho-org/es/controls/ToolBar/items";
|
5
5
|
import { useWorkType, useWorkTypeStore } from "../../../../../data/worktype";
|
6
6
|
import NodeHeaderLayout from "@voplus/morpho-ui/es/controls/NodeHeaderLayout";
|
7
7
|
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
8
8
|
import WorkTypeMenu from "../../controls/WorkTypeMenu";
|
9
9
|
const WorkTypeHeader = (props) => {
|
10
|
-
const id = props
|
10
|
+
const { id, close } = props;
|
11
11
|
const worktype = useWorkType(id);
|
12
12
|
const store = useWorkTypeStore();
|
13
13
|
const [state] = useState(new State(store));
|
14
14
|
state.update(worktype);
|
15
15
|
return observe(() => (React.createElement(NodeHeaderLayout, { content: React.createElement(InlineEdit, { defaultValue: worktype === null || worktype === void 0 ? void 0 : worktype.name, content: (v) => React.createElement("span", null, worktype === null || worktype === void 0 ? void 0 : worktype.name), onSave: (value) => state.save(value, worktype.name, { Name: value }) }), tool: React.createElement(ToolBar, { id: id, showMenu: false },
|
16
16
|
React.createElement(Open, { url: `/work-types-page/${id}` }),
|
17
|
+
close && React.createElement(Close, null),
|
17
18
|
React.createElement(WorkTypeMenu, { id: id, closeAside: true })) })));
|
18
19
|
};
|
19
20
|
export default WorkTypeHeader;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-type/components/WorkTypeHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-type/components/WorkTypeHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,8CAA8C,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,gBAAgB,MAAM,gDAAgD,CAA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
|
23
23
|
});
|
24
24
|
}, [id]);
|
25
25
|
return observe(() => (React.createElement(ViewContext.Provider, { value: view }, worktype.loaded && (React.createElement("div", { className: "module-detail-view worktype-properties-view" },
|
26
|
-
React.createElement(WorkTypeHeader, { id: id }),
|
26
|
+
React.createElement(WorkTypeHeader, { id: id, close: true }),
|
27
27
|
React.createElement(WorktypeCompleteWorksChart, { id: id }),
|
28
28
|
React.createElement(WorkTypePropertiesTabs, { id: id }))))));
|
29
29
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-type/components/WorkTypePropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EACN,WAAW,EACX,eAAe,GACf,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,0BAA0B,MAAM,2CAA2C,CAAC;AACnF,OAAO,sBAAsB,MAAM,2BAA2B,CAAC;AAC/D,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,cAAc,CAAC;AAEtB,MAAM,sBAAsB,GAAG,CAAC,KAAqB,EAAE,EAAE;IACxD,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IAErB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC;IACtE,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,gBAAgB,EAAE,CAAC;IAEpC,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;IAE/C,SAAS,CAAC,GAAG,EAAE;QACd,WAAW,CAAC,KAAK,IAAI,EAAE;YACtB,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YAC1C,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAET,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,IAC/B,QAAQ,CAAC,MAAM,IAAI,CACnB,6BAAK,SAAS,EAAC,6CAA6C;QAC3D,oBAAC,cAAc,IAAC,EAAE,EAAE,EAAE,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-type/components/WorkTypePropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EACN,WAAW,EACX,eAAe,GACf,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,0BAA0B,MAAM,2CAA2C,CA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AsB,CAAC"}
|
package/package.json
CHANGED
@@ -1,24 +0,0 @@
|
|
1
|
-
:global {
|
2
|
-
.notification-overview {
|
3
|
-
.overview-item {
|
4
|
-
&.total {
|
5
|
-
background: #fffdea;
|
6
|
-
.icon {
|
7
|
-
color: #b2a722;
|
8
|
-
}
|
9
|
-
}
|
10
|
-
&.done {
|
11
|
-
background: #eaffee;
|
12
|
-
.icon {
|
13
|
-
color: #21b264;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
&.closed {
|
17
|
-
background: #f7f7f7;
|
18
|
-
.icon {
|
19
|
-
color: #5d5d5d;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
}
|
23
|
-
}
|
24
|
-
}
|
@@ -1,49 +0,0 @@
|
|
1
|
-
:global {
|
2
|
-
.task-overview {
|
3
|
-
.overview-item {
|
4
|
-
&.total {
|
5
|
-
background: #fffdea;
|
6
|
-
.icon {
|
7
|
-
color: #b2a722;
|
8
|
-
}
|
9
|
-
}
|
10
|
-
&.done {
|
11
|
-
background: #eaffee;
|
12
|
-
.icon {
|
13
|
-
color: #21b264;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
&.closed {
|
17
|
-
background: #fff4f4;
|
18
|
-
.icon {
|
19
|
-
color: #b32120;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
}
|
23
|
-
.due-list {
|
24
|
-
.due-item {
|
25
|
-
&.tomorrow {
|
26
|
-
background-color: #fff0e0;
|
27
|
-
border-left-color: #ff951a;
|
28
|
-
.total {
|
29
|
-
color: #ff951a;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
&.week {
|
33
|
-
background-color: #fffad5;
|
34
|
-
border-left-color: #e6d504;
|
35
|
-
.total {
|
36
|
-
color: #e6d504;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
&.month {
|
40
|
-
background-color: #f0faff;
|
41
|
-
border-left-color: #0688e6;
|
42
|
-
.total {
|
43
|
-
color: #0688e6;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}
|
@@ -1,49 +0,0 @@
|
|
1
|
-
:global {
|
2
|
-
.work-overview {
|
3
|
-
.overview-item {
|
4
|
-
&.total {
|
5
|
-
background: #fffdea;
|
6
|
-
.icon {
|
7
|
-
color: #b2a722;
|
8
|
-
}
|
9
|
-
}
|
10
|
-
&.done {
|
11
|
-
background: #eaffee;
|
12
|
-
.icon {
|
13
|
-
color: #21b264;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
&.closed {
|
17
|
-
background: #fff4f4;
|
18
|
-
.icon {
|
19
|
-
color: #b32120;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
}
|
23
|
-
.due-list {
|
24
|
-
.due-item {
|
25
|
-
&.tomorrow {
|
26
|
-
background-color: #fff0e0;
|
27
|
-
border-left-color: #ff951a;
|
28
|
-
.total {
|
29
|
-
color: #ff951a;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
&.week {
|
33
|
-
background-color: #fffad5;
|
34
|
-
border-left-color: #e6d504;
|
35
|
-
.total {
|
36
|
-
color: #e6d504;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
&.month {
|
40
|
-
background-color: #f0faff;
|
41
|
-
border-left-color: #0688e6;
|
42
|
-
.total {
|
43
|
-
color: #0688e6;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}
|