@voplus/morpho-workspace 1.3.160 → 1.3.162
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/data/work-schedule/WorkScheduleStore.d.ts +33 -0
- package/es/data/work-schedule/WorkScheduleStore.js +115 -0
- package/es/data/work-schedule/WorkScheduleStore.js.map +1 -0
- package/es/data/work-schedule/hooks.d.ts +10 -0
- package/es/data/work-schedule/hooks.js +19 -0
- package/es/data/work-schedule/hooks.js.map +1 -0
- package/es/data/work-schedule/index.d.ts +4 -0
- package/es/data/work-schedule/index.js +5 -0
- package/es/data/work-schedule/index.js.map +1 -0
- package/es/data/work-schedule/interfaces.d.ts +16 -0
- package/es/data/work-schedule/interfaces.js +2 -0
- package/es/data/work-schedule/interfaces.js.map +1 -0
- package/es/data/work-schedule/types.d.ts +25 -0
- package/es/data/work-schedule/types.js +2 -0
- package/es/data/work-schedule/types.js.map +1 -0
- package/es/data/work-schedule/work-schedule-events/index.d.ts +3 -0
- package/es/data/work-schedule/work-schedule-events/index.js +4 -0
- package/es/data/work-schedule/work-schedule-events/index.js.map +1 -0
- package/es/data/work-schedule/work-schedule-events/useAutoUpdateListData.d.ts +4 -0
- package/es/data/work-schedule/work-schedule-events/useAutoUpdateListData.js +15 -0
- package/es/data/work-schedule/work-schedule-events/useAutoUpdateListData.js.map +1 -0
- package/es/data/work-schedule/work-schedule-events/useOnDeleteWorkSchedule.d.ts +4 -0
- package/es/data/work-schedule/work-schedule-events/useOnDeleteWorkSchedule.js +16 -0
- package/es/data/work-schedule/work-schedule-events/useOnDeleteWorkSchedule.js.map +1 -0
- package/es/data/work-schedule/work-schedule-events/useOnNewWorkSchedule.d.ts +4 -0
- package/es/data/work-schedule/work-schedule-events/useOnNewWorkSchedule.js +17 -0
- package/es/data/work-schedule/work-schedule-events/useOnNewWorkSchedule.js.map +1 -0
- package/es/modules/Routes.d.ts +6 -0
- package/es/modules/Routes.js +13 -0
- package/es/modules/Routes.js.map +1 -1
- package/es/modules/work/work-schedule/components/NewWorkScheduleForm/index.d.ts +15 -0
- package/es/modules/work/work-schedule/components/NewWorkScheduleForm/index.js +62 -0
- package/es/modules/work/work-schedule/components/NewWorkScheduleForm/index.js.map +1 -0
- package/es/modules/work/work-schedule/components/NewWorkScheduleForm/index.less +10 -0
- package/es/modules/work/work-schedule/components/NewWorkScheduleForm/state.d.ts +13 -0
- package/es/modules/work/work-schedule/components/NewWorkScheduleForm/state.js +35 -0
- package/es/modules/work/work-schedule/components/NewWorkScheduleForm/state.js.map +1 -0
- package/es/modules/work/work-schedule/components/WorkScheduleHeader/index.d.ts +6 -0
- package/es/modules/work/work-schedule/components/WorkScheduleHeader/index.js +18 -0
- package/es/modules/work/work-schedule/components/WorkScheduleHeader/index.js.map +1 -0
- package/es/modules/work/work-schedule/components/WorkScheduleHeader/index.less +12 -0
- package/es/modules/work/work-schedule/components/WorkScheduleItem/index.d.ts +6 -0
- package/es/modules/work/work-schedule/components/WorkScheduleItem/index.js +80 -0
- package/es/modules/work/work-schedule/components/WorkScheduleItem/index.js.map +1 -0
- package/es/modules/work/work-schedule/components/WorkScheduleItem/index.less +61 -0
- package/es/modules/work/work-schedule/components/WorkScheduleList/index.d.ts +20 -0
- package/es/modules/work/work-schedule/components/WorkScheduleList/index.js +71 -0
- package/es/modules/work/work-schedule/components/WorkScheduleList/index.js.map +1 -0
- package/es/modules/work/work-schedule/components/WorkScheduleList/index.less +12 -0
- package/es/modules/work/work-schedule/components/WorkScheduleProperties/index.d.ts +20 -0
- package/es/modules/work/work-schedule/components/WorkScheduleProperties/index.js +87 -0
- package/es/modules/work/work-schedule/components/WorkScheduleProperties/index.js.map +1 -0
- package/es/modules/work/work-schedule/components/WorkSchedulePropertiesView/index.d.ts +6 -0
- package/es/modules/work/work-schedule/components/WorkSchedulePropertiesView/index.js +15 -0
- package/es/modules/work/work-schedule/components/WorkSchedulePropertiesView/index.js.map +1 -0
- package/es/modules/work/work-schedule/components/WorkScheduleQuickViewDialog/index.d.ts +15 -0
- package/es/modules/work/work-schedule/components/WorkScheduleQuickViewDialog/index.js +30 -0
- package/es/modules/work/work-schedule/components/WorkScheduleQuickViewDialog/index.js.map +1 -0
- package/es/modules/work/work-schedule/components/WorkScheduleQuickViewDialog/index.less +25 -0
- package/es/modules/work/work-schedule/components/WorkScheduleTabs/index.d.ts +6 -0
- package/es/modules/work/work-schedule/components/WorkScheduleTabs/index.js +29 -0
- package/es/modules/work/work-schedule/components/WorkScheduleTabs/index.js.map +1 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleMenu/index.d.ts +13 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleMenu/index.js +44 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleMenu/index.js.map +1 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleMenu/index.less +39 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleStatusFilter/index.d.ts +5 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleStatusFilter/index.js +29 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleStatusFilter/index.js.map +1 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleStatusFilter/state.d.ts +19 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleStatusFilter/state.js +56 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleStatusFilter/state.js.map +1 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleStatusLabel/index.d.ts +10 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleStatusLabel/index.js +12 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleStatusLabel/index.js.map +1 -0
- package/es/modules/work/work-schedule/controls/WorkScheduleStatusLabel/index.less +21 -0
- package/es/modules/work/work-schedule/pages/WorkScheduleDefaultView/index.d.ts +3 -0
- package/es/modules/work/work-schedule/pages/WorkScheduleDefaultView/index.js +30 -0
- package/es/modules/work/work-schedule/pages/WorkScheduleDefaultView/index.js.map +1 -0
- package/es/modules/work/work-schedule/pages/WorkScheduleDefaultView/index.less +22 -0
- package/package.json +1 -1
@@ -0,0 +1,39 @@
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
2
|
+
|
3
|
+
.work-schedule-menu {
|
4
|
+
padding: 4px 8px;
|
5
|
+
list-style-type: none;
|
6
|
+
background-color: #fff;
|
7
|
+
background-clip: padding-box;
|
8
|
+
border-radius: @border-radius;
|
9
|
+
outline: none;
|
10
|
+
box-shadow: @more-box-shadow;
|
11
|
+
|
12
|
+
:global {
|
13
|
+
.ant-btn {
|
14
|
+
display: block;
|
15
|
+
width: 100%;
|
16
|
+
padding: 0 12px;
|
17
|
+
height: 34px;
|
18
|
+
color: #666;
|
19
|
+
text-align: left;
|
20
|
+
|
21
|
+
&[disabled] {
|
22
|
+
color: rgba(0, 0, 0, 0.25);
|
23
|
+
}
|
24
|
+
|
25
|
+
&:hover {
|
26
|
+
background-color: @ant-menu-hover-color;
|
27
|
+
box-shadow: @hover-button-shadow;
|
28
|
+
}
|
29
|
+
|
30
|
+
> span {
|
31
|
+
margin-left: 10px;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
.delete {
|
36
|
+
color: #f5222d;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
4
|
+
import { runInAction } from "mobx";
|
5
|
+
import { Badge } from "@voplus/antd";
|
6
|
+
import { State } from "./state";
|
7
|
+
import classnames from "classnames";
|
8
|
+
const WorkScheduleStatusFilter = (props) => {
|
9
|
+
const context = useFilterOptionsContext();
|
10
|
+
const state = context.getFilterState("WorkScheduleStatus", () => new State());
|
11
|
+
// defaultValue 为传入的预选状态
|
12
|
+
state.showDefaultValue &&
|
13
|
+
props.defaultValue &&
|
14
|
+
props.defaultValue.map((value) => state.onChangeStatus(value));
|
15
|
+
return observe(() => (React.createElement("div", null,
|
16
|
+
React.createElement("div", { className: "menu-item-title" }, "WorkSchedule Status"),
|
17
|
+
state.menus.map((item, index) => (React.createElement("div", { key: index, className: classnames("filter-menu-item", {
|
18
|
+
bold: state.status.has(item.value),
|
19
|
+
}), onClick: () => {
|
20
|
+
state.onChangeStatus(item.value);
|
21
|
+
runInAction(() => (state.showDefaultValue = false));
|
22
|
+
} },
|
23
|
+
React.createElement("div", { className: "filter-name" },
|
24
|
+
React.createElement(Badge, { color: item.color }),
|
25
|
+
item.name),
|
26
|
+
React.createElement("span", null, item.counts)))))));
|
27
|
+
};
|
28
|
+
export default WorkScheduleStatusFilter;
|
29
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/controls/WorkScheduleStatusFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,MAAM,wBAAwB,GAAG,CAAC,KAAkC,EAAE,EAAE;IACvE,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAE1C,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAE9E,wBAAwB;IACxB,KAAK,CAAC,gBAAgB;QACrB,KAAK,CAAC,YAAY;QAClB,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAEhE,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB;QACC,6BAAK,SAAS,EAAC,iBAAiB,0BAA0B;QACzD,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,KAAa,EAAE,EAAE,CAAC,CAC9C,6BACC,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,UAAU,CAAC,kBAAkB,EAAE;gBACzC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;aAClC,CAAC,EACF,OAAO,EAAE,GAAG,EAAE;gBACb,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACjC,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC,CAAC;YACrD,CAAC;YAED,6BAAK,SAAS,EAAC,aAAa;gBAC3B,oBAAC,KAAK,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAI;gBAC3B,IAAI,CAAC,IAAI,CACL;YACN,kCAAO,IAAI,CAAC,MAAM,CAAQ,CACrB,CACN,CAAC,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { FilterOption } from "@voplus/morpho-data";
|
2
|
+
import { IFilterState } from "@voplus/morpho-ui/es/data/IFilterState";
|
3
|
+
export declare class State implements IFilterState {
|
4
|
+
/** 是否显示预选status */
|
5
|
+
showDefaultValue: boolean;
|
6
|
+
/** Status of filter */
|
7
|
+
status: Map<string, boolean>;
|
8
|
+
constructor();
|
9
|
+
/** update status */
|
10
|
+
onChangeStatus(value: string): void;
|
11
|
+
get menus(): {
|
12
|
+
name: string;
|
13
|
+
value: string;
|
14
|
+
counts: string;
|
15
|
+
color: string;
|
16
|
+
}[];
|
17
|
+
get filters(): FilterOption[];
|
18
|
+
reset(): void;
|
19
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { action, makeObservable, observable } from "mobx";
|
3
|
+
export class State {
|
4
|
+
constructor() {
|
5
|
+
/** 是否显示预选status */
|
6
|
+
Object.defineProperty(this, "showDefaultValue", {
|
7
|
+
enumerable: true,
|
8
|
+
configurable: true,
|
9
|
+
writable: true,
|
10
|
+
value: true
|
11
|
+
});
|
12
|
+
/** Status of filter */
|
13
|
+
Object.defineProperty(this, "status", {
|
14
|
+
enumerable: true,
|
15
|
+
configurable: true,
|
16
|
+
writable: true,
|
17
|
+
value: new Map()
|
18
|
+
});
|
19
|
+
makeObservable(this);
|
20
|
+
}
|
21
|
+
/** update status */
|
22
|
+
onChangeStatus(value) {
|
23
|
+
this.status.has(value) ? this.status.delete(value) : this.status.set(value, true);
|
24
|
+
}
|
25
|
+
get menus() {
|
26
|
+
return [
|
27
|
+
{ name: "Active", value: "Active", counts: "n", color: "#1890ff" },
|
28
|
+
{ name: "Draft", value: "Draft", counts: "n", color: "#ffe58f" },
|
29
|
+
{ name: "Disabled", value: "Disabled", counts: "n", color: "#f0f0f0" },
|
30
|
+
];
|
31
|
+
}
|
32
|
+
get filters() {
|
33
|
+
return [
|
34
|
+
{
|
35
|
+
c: "Status",
|
36
|
+
o: "contains",
|
37
|
+
v1: JSON.stringify(Array.from(this.status.keys())),
|
38
|
+
l: "And",
|
39
|
+
},
|
40
|
+
];
|
41
|
+
}
|
42
|
+
reset() {
|
43
|
+
this.status.clear();
|
44
|
+
this.showDefaultValue = true;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
__decorate([
|
48
|
+
observable
|
49
|
+
], State.prototype, "showDefaultValue", void 0);
|
50
|
+
__decorate([
|
51
|
+
observable
|
52
|
+
], State.prototype, "status", void 0);
|
53
|
+
__decorate([
|
54
|
+
action
|
55
|
+
], State.prototype, "onChangeStatus", null);
|
56
|
+
//# sourceMappingURL=state.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/controls/WorkScheduleStatusFilter/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAK1D,MAAM,OAAO,KAAK;IAMjB;QALA,mBAAmB;QACP;;;;mBAA0B,IAAI;WAAC;QAC3C,uBAAuB;QACX;;;;mBAAsC,IAAI,GAAG,EAAE;WAAC;QAG3D,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAED,oBAAoB;IAEb,cAAc,CAAC,KAAa;QAClC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACnF,CAAC;IAED,IAAW,KAAK;QACf,OAAO;YACN,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;YAClE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;YAChE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;SACtE,CAAC;IACH,CAAC;IACD,IAAW,OAAO;QACjB,OAAO;YACN;gBACC,CAAC,EAAE,QAAQ;gBACX,CAAC,EAAE,UAAU;gBACb,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;gBAClD,CAAC,EAAE,KAAK;aACQ;SACjB,CAAC;IACH,CAAC;IACM,KAAK;QACX,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC9B,CAAC;CACD;AAnCY;IAAX,UAAU;+CAAgC;AAE/B;IAAX,UAAU;qCAAiD;AAQ5D;IADC,MAAM;2CAGN"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { WorkScheduleStatus } from "../../../../../data/work-schedule";
|
3
|
+
import "./index.less";
|
4
|
+
declare const WorkScheduleStatusLabel: (props: {
|
5
|
+
status: string;
|
6
|
+
editable: boolean;
|
7
|
+
className?: string | undefined;
|
8
|
+
onChange?: ((status: WorkScheduleStatus) => void) | undefined;
|
9
|
+
}) => JSX.Element;
|
10
|
+
export default WorkScheduleStatusLabel;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import DocumentStatusLabel from "@voplus/morpho-document/es/controls/DocumentStatusLabel";
|
3
|
+
import classnames from "classnames";
|
4
|
+
import "./index.less";
|
5
|
+
const WorkScheduleStatusLabel = (props) => {
|
6
|
+
const statusData = props.status === "Draft"
|
7
|
+
? [{ name: "Draft" }, { name: "Active" }, { name: "Disabled" }]
|
8
|
+
: [{ name: "Active" }, { name: "Disabled" }];
|
9
|
+
return (React.createElement(DocumentStatusLabel, { className: classnames("work-schedule-status", props.className), editable: props.editable, list: statusData, status: props.status, onChange: props.onChange }));
|
10
|
+
};
|
11
|
+
export default WorkScheduleStatusLabel;
|
12
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/controls/WorkScheduleStatusLabel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,mBAAmB,MAAM,yDAAyD,CAAC;AAC1F,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB,MAAM,uBAAuB,GAAG,CAAC,KAKhC,EAAE,EAAE;IACJ,MAAM,UAAU,GACf,KAAK,CAAC,MAAM,KAAK,OAAO;QACvB,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QAC/D,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IAC/C,OAAO,CACN,oBAAC,mBAAmB,IACnB,SAAS,EAAE,UAAU,CAAC,sBAAsB,EAAE,KAAK,CAAC,SAAS,CAAC,EAC9D,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ,GACvB,CACF,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
2
|
+
|
3
|
+
:global {
|
4
|
+
.work-schedule-status {
|
5
|
+
&.draft,
|
6
|
+
&.draft:hover {
|
7
|
+
border: unset;
|
8
|
+
background: #ffe58f;
|
9
|
+
}
|
10
|
+
|
11
|
+
&.active,
|
12
|
+
&.active:hover {
|
13
|
+
background: @active-color;
|
14
|
+
}
|
15
|
+
|
16
|
+
&.disabled,
|
17
|
+
&.disabled:hover {
|
18
|
+
background: #f0f0f0;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
2
|
+
import { TabItemContext, TabItemStore, useTabItem } from "@voplus/morpho-data";
|
3
|
+
import { observe, useAsideContentContext } from "@voplus/morpho-ui";
|
4
|
+
import { useRouteMatch } from "react-router";
|
5
|
+
import { runInAction } from "mobx";
|
6
|
+
import { useFrame } from "@voplus/morpho-document/es/components/ViewFrame/ViewFrameContext";
|
7
|
+
import AsideContent from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
8
|
+
import MainContent from "@voplus/morpho-ui/es/components/layout/MainContent";
|
9
|
+
import WorkScheduleProperties from "../../components/WorkScheduleProperties";
|
10
|
+
import WorkScheduleTabs from "../../components/WorkScheduleTabs";
|
11
|
+
import styles from "./index.less";
|
12
|
+
const WorkScheduleDefaultView = () => {
|
13
|
+
const match = useRouteMatch();
|
14
|
+
const id = match.params.id;
|
15
|
+
const store = new TabItemStore({ url: "" });
|
16
|
+
const frame = useFrame();
|
17
|
+
const tab = useTabItem();
|
18
|
+
const [asideContext] = useState(frame ? useAsideContentContext() : AsideContent.createContext());
|
19
|
+
useEffect(() => {
|
20
|
+
runInAction(() => (tab.title = `Work Schedule`));
|
21
|
+
});
|
22
|
+
return observe(() => (React.createElement(TabItemContext.Provider, { value: store },
|
23
|
+
React.createElement(MainContent, { className: styles["work-schedule-default-view"], asideable: frame ? false : true },
|
24
|
+
React.createElement(MainContent.Nav, { collapsible: true },
|
25
|
+
React.createElement(WorkScheduleProperties, { id: id, headerVisible: true })),
|
26
|
+
React.createElement("div", { className: "work-schedule-context" }, frame ? (React.createElement(WorkScheduleTabs, { id: id })) : (React.createElement(AsideContent, { context: asideContext },
|
27
|
+
React.createElement(WorkScheduleTabs, { id: id }))))))));
|
28
|
+
};
|
29
|
+
export default WorkScheduleDefaultView;
|
30
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/pages/WorkScheduleDefaultView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAmB,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,kEAAkE,CAAC;AAC5F,OAAO,YAAY,MAAM,qDAAqD,CAAC;AAC/E,OAAO,WAAW,MAAM,oDAAoD,CAAC;AAC7E,OAAO,sBAAsB,MAAM,yCAAyC,CAAC;AAC7E,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IACpC,MAAM,KAAK,GAAG,aAAa,EAAkB,CAAC;IAC9C,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;IAE3B,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5C,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,GAAG,GAAG,UAAU,EAAE,CAAC;IACzB,MAAM,CAAC,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,sBAAsB,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC,CAAC;IAEjG,SAAS,CAAC,GAAG,EAAE;QACd,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,eAAe,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK;QACpC,oBAAC,WAAW,IACX,SAAS,EAAE,MAAM,CAAC,4BAA4B,CAAC,EAC/C,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;YAE/B,oBAAC,WAAW,CAAC,GAAG,IAAC,WAAW;gBAC3B,oBAAC,sBAAsB,IAAC,EAAE,EAAE,EAAE,EAAE,aAAa,SAAG,CAC/B;YAClB,6BAAK,SAAS,EAAC,uBAAuB,IACpC,KAAK,CAAC,CAAC,CAAC,CACR,oBAAC,gBAAgB,IAAC,EAAE,EAAE,EAAE,GAAI,CAC5B,CAAC,CAAC,CAAC,CACH,oBAAC,YAAY,IAAC,OAAO,EAAE,YAAmB;gBACzC,oBAAC,gBAAgB,IAAC,EAAE,EAAE,EAAE,GAAI,CACd,CACf,CACI,CACO,CACW,CAC1B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
.work-schedule-default-view {
|
2
|
+
:global {
|
3
|
+
.main-content-nav {
|
4
|
+
width: 370px;
|
5
|
+
padding: 0;
|
6
|
+
}
|
7
|
+
|
8
|
+
.work-schedule-header {
|
9
|
+
padding: 10px 0;
|
10
|
+
}
|
11
|
+
|
12
|
+
.work-schedule-context {
|
13
|
+
display: flex;
|
14
|
+
padding: 0;
|
15
|
+
background: #ffffff;
|
16
|
+
|
17
|
+
>div {
|
18
|
+
flex: 1;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|