@voplus/morpho-workspace 6.0.69 → 6.0.70
Sign up to get free protection for your applications and to get access to all the features.
- package/es/controls/filters/WorkStatusFilter/index.js +2 -8
- package/es/controls/filters/WorkStatusFilter/index.js.map +1 -1
- package/es/controls/filters/WorkStatusFilter/state.d.ts +10 -2
- package/es/controls/filters/WorkStatusFilter/state.js +46 -1
- package/es/controls/filters/WorkStatusFilter/state.js.map +1 -1
- package/es/data/work/WorkStore.d.ts +1 -4
- package/es/data/work/WorkStore.js +0 -4
- package/es/data/work/WorkStore.js.map +1 -1
- package/es/data/work/interfaces.d.ts +0 -11
- package/es/data/work-report/WorkReportStore.d.ts +19 -0
- package/es/data/work-report/WorkReportStore.js +52 -0
- package/es/data/work-report/WorkReportStore.js.map +1 -0
- package/es/data/work-report/hooks.d.ts +8 -0
- package/es/data/work-report/hooks.js +13 -0
- package/es/data/work-report/hooks.js.map +1 -0
- package/es/data/work-report/index.d.ts +3 -0
- package/es/data/work-report/index.js +4 -0
- package/es/data/work-report/index.js.map +1 -0
- package/es/data/work-report/interfaces.d.ts +16 -0
- package/es/data/work-report/interfaces.js +2 -0
- package/es/data/work-report/interfaces.js.map +1 -0
- package/es/modules/work/components/WorkCashReport/index.d.ts +1 -0
- package/es/modules/work/components/WorkCashReport/index.js +54 -42
- package/es/modules/work/components/WorkCashReport/index.js.map +1 -1
- package/es/modules/work/components/WorkCashReport/index.less +8 -12
- package/es/modules/work/components/WorkCashReport/state.d.ts +3 -8
- package/es/modules/work/components/WorkCashReport/state.js +3 -47
- package/es/modules/work/components/WorkCashReport/state.js.map +1 -1
- package/es/modules/work/components/WorkList/index.js +2 -2
- package/es/modules/work/components/WorkList/index.js.map +1 -1
- package/es/modules/work/work-schedule/components/WorkScheduleList/index.js +10 -1
- package/es/modules/work/work-schedule/components/WorkScheduleList/index.js.map +1 -1
- package/es/modules/workspace/pages/WorkspacePage/WorkTypeWorksDashBoard.js +1 -1
- package/es/modules/workspace/pages/WorkspacePage/WorkTypeWorksDashBoard.js.map +1 -1
- package/package.json +1 -1
- package/es/modules/work/work-type/controls/SelectedFilterLabel/index.d.ts +0 -4
- package/es/modules/work/work-type/controls/SelectedFilterLabel/index.js +0 -23
- package/es/modules/work/work-type/controls/SelectedFilterLabel/index.js.map +0 -1
- package/es/modules/work/work-type/controls/SelectedFilterLabel/index.less +0 -31
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from "react";
|
2
2
|
import { State } from "./state";
|
3
3
|
import { Badge } from "antd";
|
4
4
|
import { observe } from "@voplus/morpho-ui";
|
@@ -6,13 +6,7 @@ import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
|
|
6
6
|
import classnames from "classnames";
|
7
7
|
const WorkStatusFilter = (props) => {
|
8
8
|
const context = useFilterOptionsContext();
|
9
|
-
const state = context.getFilterState("WorkStatus", () => new State());
|
10
|
-
// defaultValue 为传入的预选状态
|
11
|
-
useEffect(() => {
|
12
|
-
var _a;
|
13
|
-
state.reset();
|
14
|
-
(_a = props.defaultValue) === null || _a === void 0 ? void 0 : _a.map((value) => state.onChangeStatus(value));
|
15
|
-
}, [props.defaultValue]);
|
9
|
+
const state = context.getFilterState("WorkStatus", () => new State(props.defaultValue));
|
16
10
|
return observe(() => (React.createElement("div", null,
|
17
11
|
React.createElement("div", { className: "menu-item-title" }, "WorkStatus"),
|
18
12
|
state.menus.map((item, index) => (React.createElement("div", { key: index, className: classnames("filter-menu-item", {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/controls/filters/WorkStatusFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/controls/filters/WorkStatusFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,CAAC,KAAkC,EAAE,EAAE;IAC/D,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAE1C,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAExF,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB;QACC,6BAAK,SAAS,EAAC,iBAAiB,iBAAiB;QAChD,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,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;YAE/C,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,gBAAgB,CAAC"}
|
@@ -1,9 +1,15 @@
|
|
1
1
|
import { FilterOption } from "@voplus/morpho-data";
|
2
|
-
import { DefaultFilterState } from "@voplus/morpho-ui/es/data";
|
2
|
+
import { DefaultFilterState, ISelectedLabel } from "@voplus/morpho-ui/es/data";
|
3
3
|
export declare class State extends DefaultFilterState {
|
4
|
+
private defaultFilter?;
|
4
5
|
/** Status of filter */
|
5
6
|
status: Map<string, boolean>;
|
6
|
-
|
7
|
+
selectedLabels: {
|
8
|
+
name: string;
|
9
|
+
v1: string;
|
10
|
+
}[];
|
11
|
+
constructor(defaultFilter?: string[] | undefined);
|
12
|
+
onInit(): void;
|
7
13
|
/** update status */
|
8
14
|
onChangeStatus(value: string): void;
|
9
15
|
get menus(): {
|
@@ -13,5 +19,7 @@ export declare class State extends DefaultFilterState {
|
|
13
19
|
color: string;
|
14
20
|
}[];
|
15
21
|
get filters(): FilterOption[];
|
22
|
+
getSelectedLabels(): ISelectedLabel[];
|
23
|
+
removeSelected(value: string): ISelectedLabel[];
|
16
24
|
reset(): void;
|
17
25
|
}
|
@@ -2,8 +2,15 @@ import { __decorate } from "tslib";
|
|
2
2
|
import { action, makeObservable, observable } from "mobx";
|
3
3
|
import { DefaultFilterState } from "@voplus/morpho-ui/es/data";
|
4
4
|
export class State extends DefaultFilterState {
|
5
|
-
constructor() {
|
5
|
+
constructor(defaultFilter) {
|
6
|
+
var _a;
|
6
7
|
super();
|
8
|
+
Object.defineProperty(this, "defaultFilter", {
|
9
|
+
enumerable: true,
|
10
|
+
configurable: true,
|
11
|
+
writable: true,
|
12
|
+
value: defaultFilter
|
13
|
+
});
|
7
14
|
/** Status of filter */
|
8
15
|
Object.defineProperty(this, "status", {
|
9
16
|
enumerable: true,
|
@@ -11,11 +18,27 @@ export class State extends DefaultFilterState {
|
|
11
18
|
writable: true,
|
12
19
|
value: new Map()
|
13
20
|
});
|
21
|
+
Object.defineProperty(this, "selectedLabels", {
|
22
|
+
enumerable: true,
|
23
|
+
configurable: true,
|
24
|
+
writable: true,
|
25
|
+
value: void 0
|
26
|
+
});
|
14
27
|
makeObservable(this);
|
28
|
+
if ((_a = this.defaultFilter) === null || _a === void 0 ? void 0 : _a.length)
|
29
|
+
this.onInit();
|
30
|
+
}
|
31
|
+
onInit() {
|
32
|
+
var _a;
|
33
|
+
this.reset();
|
34
|
+
(_a = this.defaultFilter) === null || _a === void 0 ? void 0 : _a.map((f) => this.onChangeStatus(f));
|
15
35
|
}
|
16
36
|
/** update status */
|
17
37
|
onChangeStatus(value) {
|
38
|
+
var _a;
|
39
|
+
this.selectedLabels = [];
|
18
40
|
this.status.has(value) ? this.status.delete(value) : this.status.set(value, true);
|
41
|
+
this.selectedLabels = (_a = Array.from(this.status.keys())) === null || _a === void 0 ? void 0 : _a.map((i) => ({ name: i, v1: i }));
|
19
42
|
}
|
20
43
|
get menus() {
|
21
44
|
return [
|
@@ -37,6 +60,22 @@ export class State extends DefaultFilterState {
|
|
37
60
|
},
|
38
61
|
];
|
39
62
|
}
|
63
|
+
getSelectedLabels() {
|
64
|
+
return [
|
65
|
+
{
|
66
|
+
state: this,
|
67
|
+
key: "WorkStatus",
|
68
|
+
label: this.selectedLabels,
|
69
|
+
},
|
70
|
+
];
|
71
|
+
}
|
72
|
+
removeSelected(value) {
|
73
|
+
var _a;
|
74
|
+
this.onChangeStatus(value);
|
75
|
+
if (!((_a = this.selectedLabels) === null || _a === void 0 ? void 0 : _a.length))
|
76
|
+
this.onInit();
|
77
|
+
return this.getSelectedLabels();
|
78
|
+
}
|
40
79
|
reset() {
|
41
80
|
this.status.clear();
|
42
81
|
}
|
@@ -44,6 +83,12 @@ export class State extends DefaultFilterState {
|
|
44
83
|
__decorate([
|
45
84
|
observable
|
46
85
|
], State.prototype, "status", void 0);
|
86
|
+
__decorate([
|
87
|
+
observable
|
88
|
+
], State.prototype, "selectedLabels", void 0);
|
89
|
+
__decorate([
|
90
|
+
action
|
91
|
+
], State.prototype, "onInit", null);
|
47
92
|
__decorate([
|
48
93
|
action
|
49
94
|
], State.prototype, "onChangeStatus", null);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/controls/filters/WorkStatusFilter/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE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AAC,KAAK,CAAC,CAAC;QAC3B,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,cAAc,0CAAE,MAAM,CAAA;YAAE,IAAI,CAAC,MAAM,EAAE,CAAC;QAEhD,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK;QACX,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACD;AAnEmB;IAAlB,UAAU;qCAAiD;AACzC;IAAlB,UAAU;6CAAuD;AAU3D;IADN,MAAM;mCAIN;AAIM;IADN,MAAM;2CAON"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { DocumentStore, DocumentTypeStore, LoadDocumentListOptions, LoadDocumentOptions } from "@voplus/morpho-document-core";
|
2
2
|
import { CreateWorkOptions, IWork, IWorkEditOptions, WorkSendFormOptions } from "./interfaces";
|
3
|
-
import { StoreActionOptions
|
3
|
+
import { StoreActionOptions } from "@voplus/morpho-data";
|
4
4
|
import { ApiEndPoint } from "@voplus/api";
|
5
5
|
export declare class WorkStore extends DocumentTypeStore<IWork, LoadDocumentOptions, LoadDocumentListOptions, CreateWorkOptions, IWorkEditOptions, any> {
|
6
6
|
/** Name of the store */
|
@@ -18,9 +18,6 @@ export declare class WorkStore extends DocumentTypeStore<IWork, LoadDocumentOpti
|
|
18
18
|
* @param {string} id - id of the work.
|
19
19
|
*/
|
20
20
|
reject(id: string, options: StoreActionOptions): Promise<any>;
|
21
|
-
loadWorkReport(options?: {
|
22
|
-
Filters?: FilterOption[];
|
23
|
-
}): Promise<any>;
|
24
21
|
}
|
25
22
|
/** 响应钩子检索 PageStore */
|
26
23
|
export declare const useWorkStore: () => WorkStore;
|
@@ -49,10 +49,6 @@ export class WorkStore extends DocumentTypeStore {
|
|
49
49
|
}
|
50
50
|
}, options);
|
51
51
|
}
|
52
|
-
async loadWorkReport(options) {
|
53
|
-
const r = await this.endpoint.post(`/api/works/reports/monthly`, new RequestBuilder().json(options ? options : { Filters: [] }));
|
54
|
-
return await r.json();
|
55
|
-
}
|
56
52
|
}
|
57
53
|
/** 响应钩子检索 PageStore */
|
58
54
|
export const useWorkStore = () => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WorkStore.js","sourceRoot":"","sources":["../../../src/data/work/WorkStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EAGjB,gBAAgB,GAChB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAsB,UAAU,
|
1
|
+
{"version":3,"file":"WorkStore.js","sourceRoot":"","sources":["../../../src/data/work/WorkStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EAGjB,gBAAgB,GAChB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAsB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,SAAS,GAAG,WAAW,CAAC;AAE9B,MAAM,OAAO,SAAU,SAAQ,iBAO9B;IAIA,YAAmB,QAAqB,EAAE,SAAwB;QACjE,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;QAJ1C,wBAAwB;QACR;;;;mBAAe,SAAS;WAAC;IAIzC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAAC,EAAU,EAAE,OAA4B;QACzD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;YAC7B,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE,IAAI,cAAc,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YAC3F,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;gBACnC,IAAI,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAU,CAAC;gBACnD,IAAI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OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,SAAS,CAAC,CAClE,CAAC;AACH,CAAC,CAAC"}
|
@@ -66,14 +66,3 @@ export type WorkSendFormOptions = {
|
|
66
66
|
Message: string;
|
67
67
|
};
|
68
68
|
} & StoreActionOptions;
|
69
|
-
export interface IWorkReport {
|
70
|
-
id: string;
|
71
|
-
start: string;
|
72
|
-
end: string;
|
73
|
-
items: IWorkReportItem[];
|
74
|
-
}
|
75
|
-
export interface IWorkReportItem {
|
76
|
-
year: number;
|
77
|
-
month: number;
|
78
|
-
total: number;
|
79
|
-
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { ApiEndPoint } from "@voplus/api";
|
2
|
+
import { CountedMap, Store } from "@voplus/morpho-data";
|
3
|
+
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
4
|
+
import { IWorkReport, IWorkReportItem } from "./interfaces";
|
5
|
+
/** WorkReport store supply backend functions. */
|
6
|
+
export declare class WorkReportStore extends Store {
|
7
|
+
readonly endpoint: ApiEndPoint;
|
8
|
+
/** Name of the store */
|
9
|
+
readonly name: string;
|
10
|
+
constructor(endpoint: ApiEndPoint);
|
11
|
+
/** All currently used corporate. */
|
12
|
+
readonly items: CountedMap<string, IWorkReportItem>;
|
13
|
+
/** Load a list of documents from server.
|
14
|
+
* @param {LoadDocumentListOptions}
|
15
|
+
*/
|
16
|
+
loadList(options?: LoadDocumentListOptions): Promise<IWorkReport>;
|
17
|
+
}
|
18
|
+
/** 响应钩子检索 WorkReportStore */
|
19
|
+
export declare const useWorkReportStore: () => WorkReportStore;
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import { RequestBuilder } from "@voplus/api";
|
2
|
+
import { CountedMap, Store, useApplicationContext } from "@voplus/morpho-data";
|
3
|
+
import { observable } from "mobx";
|
4
|
+
const StoreName = "WorkReportStore";
|
5
|
+
/** WorkReport store supply backend functions. */
|
6
|
+
export class WorkReportStore extends Store {
|
7
|
+
constructor(endpoint) {
|
8
|
+
super();
|
9
|
+
Object.defineProperty(this, "endpoint", {
|
10
|
+
enumerable: true,
|
11
|
+
configurable: true,
|
12
|
+
writable: true,
|
13
|
+
value: endpoint
|
14
|
+
});
|
15
|
+
/** Name of the store */
|
16
|
+
Object.defineProperty(this, "name", {
|
17
|
+
enumerable: true,
|
18
|
+
configurable: true,
|
19
|
+
writable: true,
|
20
|
+
value: StoreName
|
21
|
+
});
|
22
|
+
/** All currently used corporate. */
|
23
|
+
Object.defineProperty(this, "items", {
|
24
|
+
enumerable: true,
|
25
|
+
configurable: true,
|
26
|
+
writable: true,
|
27
|
+
value: new CountedMap((key) => ({ id: key, loaded: false }), observable.map([], { deep: true }))
|
28
|
+
});
|
29
|
+
}
|
30
|
+
/** Load a list of documents from server.
|
31
|
+
* @param {LoadDocumentListOptions}
|
32
|
+
*/
|
33
|
+
async loadList(options) {
|
34
|
+
let query = "";
|
35
|
+
if (options === null || options === void 0 ? void 0 : options.Includes) {
|
36
|
+
query = query.concat(`includes=${options.Includes}`);
|
37
|
+
}
|
38
|
+
if (query)
|
39
|
+
query = "?".concat(query);
|
40
|
+
const r = await this.endpoint.post(`/api/works/reports/monthly`, new RequestBuilder().json(options ? options : { Filters: [] }));
|
41
|
+
return (await r.json());
|
42
|
+
}
|
43
|
+
}
|
44
|
+
/** 响应钩子检索 WorkReportStore */
|
45
|
+
export const useWorkReportStore = () => {
|
46
|
+
const context = useApplicationContext();
|
47
|
+
if (!context.getService(StoreName)) {
|
48
|
+
context.registerService(new WorkReportStore(context.api.currentEndPoint));
|
49
|
+
}
|
50
|
+
return context.getService(StoreName);
|
51
|
+
};
|
52
|
+
//# sourceMappingURL=WorkReportStore.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"WorkReportStore.js","sourceRoot":"","sources":["../../../src/data/work-report/WorkReportStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,KAAK,E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,EAAE;IACtC,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,eAAe,CAAC,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,CAAqB,CAAC;AAC1D,CAAC,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
2
|
+
import { IWorkReportData, IWorkReportItem } from ".";
|
3
|
+
import { ListDataContextState } from "@voplus/morpho-ui/es/data";
|
4
|
+
/** React hook to retrieve a list of ledgers
|
5
|
+
* @param effect - Effect callback to be ran after successful retrieved the list.
|
6
|
+
* @param options - Optional ledger list loading options.
|
7
|
+
*/
|
8
|
+
export declare const useWorkReportListEffect: (list: ListDataContextState<IWorkReportItem> | null, effect: (list: IWorkReportItem[], total: number, data: IWorkReportData) => void, options?: LoadDocumentListOptions) => void;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { useWorkReportStore } from ".";
|
2
|
+
import { useListLoaderEffect } from "@voplus/morpho-ui/es/hooks";
|
3
|
+
/** React hook to retrieve a list of ledgers
|
4
|
+
* @param effect - Effect callback to be ran after successful retrieved the list.
|
5
|
+
* @param options - Optional ledger list loading options.
|
6
|
+
*/
|
7
|
+
export const useWorkReportListEffect = (list, effect, options) => {
|
8
|
+
const deps = options ? options : {};
|
9
|
+
const store = useWorkReportStore();
|
10
|
+
// Call useDocumentListEffect and ensure won't load twice for same loading options.
|
11
|
+
return useListLoaderEffect(list, store.items, effect, () => store.loadList(options), [deps]);
|
12
|
+
};
|
13
|
+
//# sourceMappingURL=hooks.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/data/work-report/hooks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAoC,MAAM,GAAG,CAAC;AAEzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACtC,IAAkD,EAClD,MAA+E,EAC/E,OAAiC,EAChC,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA8B,CAAC;IACjE,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IAEnC,mFAAmF;IACnF,OAAO,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9F,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data/work-report/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { ILoadable } from "@voplus/morpho-data";
|
2
|
+
export interface IWorkReportData {
|
3
|
+
end: string;
|
4
|
+
start: string;
|
5
|
+
}
|
6
|
+
export interface IWorkReportItem extends ILoadable {
|
7
|
+
id: string;
|
8
|
+
year?: number;
|
9
|
+
month?: number;
|
10
|
+
total?: number;
|
11
|
+
}
|
12
|
+
export interface IWorkReport extends ILoadable {
|
13
|
+
data: IWorkReportData;
|
14
|
+
list: IWorkReportItem[];
|
15
|
+
total: number;
|
16
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/data/work-report/interfaces.ts"],"names":[],"mappings":""}
|
@@ -1,56 +1,68 @@
|
|
1
|
-
import React, {
|
2
|
-
import { observe } from "@voplus/morpho-ui";
|
1
|
+
import React, { useState } from "react";
|
2
|
+
import { observe, useRenderOnChange } from "@voplus/morpho-ui";
|
3
|
+
import { SelectedFilterLabel } from "@voplus/morpho-ui/es/controls";
|
3
4
|
import { FilterOptionsContext, ListDataContext, useCreateListDataState, } from "@voplus/morpho-ui/es/data";
|
4
|
-
import {
|
5
|
+
import { useWorkReportListEffect } from "../../../../data/work-report";
|
6
|
+
import { useAutoUpdateListData } from "@voplus/morpho-document-core";
|
5
7
|
import { State } from "./state";
|
6
8
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
7
9
|
import { faBarsFilter } from "@fortawesome/pro-light-svg-icons";
|
8
|
-
import { runInAction } from "mobx";
|
9
10
|
import { Skeleton } from "antd";
|
10
|
-
import {
|
11
|
+
import { State as WorkStatusState } from "../../../../controls/filters/WorkStatusFilter/state";
|
11
12
|
import { WorkStatusFilter } from "../../../../controls/filters";
|
12
13
|
import WorkCashReportTemplate from "./WorkCashReportTemplate";
|
13
14
|
import FilterView from "@voplus/morpho-ui/es/controls/FilterView";
|
14
15
|
import styles from "./index.less";
|
15
16
|
const WorkCashReport = (props) => {
|
16
|
-
const
|
17
|
-
const
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
const [state] = useState(new State());
|
18
|
+
const defaultFilter = [
|
19
|
+
{
|
20
|
+
c: "WorkStatus",
|
21
|
+
o: "contains",
|
22
|
+
l: "And",
|
23
|
+
v1: JSON.stringify(["Active"]),
|
24
|
+
},
|
25
|
+
{ c: "WorkType", o: "=", l: "And", v1: props.id },
|
26
|
+
{ c: "Workspace", o: "=", l: "And", v1: props.workspaceId },
|
27
|
+
];
|
28
|
+
const list = useCreateListDataState({
|
29
|
+
filterDefaults: {
|
30
|
+
filters: defaultFilter,
|
31
|
+
page: { Page: 1, PageSize: 50 },
|
32
|
+
},
|
33
|
+
filterStateDefault: [
|
34
|
+
{
|
35
|
+
key: "WorkStatus",
|
36
|
+
factory: () => new WorkStatusState(["Active"]),
|
37
|
+
},
|
38
|
+
],
|
22
39
|
}, [props.id]);
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
state.
|
27
|
-
state.
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
return observe(() => {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
React.createElement("div", { className: "
|
37
|
-
React.createElement(
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
}, onReset: () => onFilter(["Active"]) })))),
|
50
|
-
React.createElement("div", { className: "work-report-content" },
|
51
|
-
React.createElement(Skeleton, { loading: state.loading, active: true },
|
52
|
-
React.createElement(WorkCashReportTemplate, { data: state.dataList }))))));
|
53
|
-
});
|
40
|
+
useWorkReportListEffect(list, async (result, total, data) => {
|
41
|
+
state.loading = true;
|
42
|
+
list.union(result);
|
43
|
+
await state.loadCashList(result);
|
44
|
+
state.loading = false;
|
45
|
+
}, list.filters.options);
|
46
|
+
useAutoUpdateListData(list, (d) => true);
|
47
|
+
useRenderOnChange(() => list.filters.options);
|
48
|
+
return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
|
49
|
+
React.createElement("div", { className: styles["work-report-g2"] },
|
50
|
+
React.createElement(FilterOptionsContext.Provider, { value: list.filters },
|
51
|
+
React.createElement("div", { className: "work-report-header" },
|
52
|
+
React.createElement(SelectedFilterLabel, { filterKey: "WorkStatus" }),
|
53
|
+
React.createElement("div", { className: "filter-component" },
|
54
|
+
React.createElement(FilterView, { className: "ml-2.5", icon: React.createElement(FAIcon, { icon: faBarsFilter, size: "lg" }), columns: [React.createElement(WorkStatusFilter, { key: "WorkStatusFilter", defaultValue: ["Active"] })], onFilter: onFilter, onReset: onReset })))),
|
55
|
+
React.createElement("div", { className: "work-report-content" },
|
56
|
+
React.createElement(Skeleton, { loading: state.loading, active: true },
|
57
|
+
React.createElement(WorkCashReportTemplate, { data: state.dataList })))))));
|
58
|
+
function onFilter(context) {
|
59
|
+
context.paging.Page = 1;
|
60
|
+
context.filter();
|
61
|
+
}
|
62
|
+
function onReset(context) {
|
63
|
+
context.paging.Page = 1;
|
64
|
+
context.filter();
|
65
|
+
}
|
54
66
|
};
|
55
67
|
export default WorkCashReport;
|
56
68
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkCashReport/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkCashReport/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EACN,oBAAoB,EACpB,eAAe,EACf,sBAAsB,GACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,qDAAqD,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,UAAU,MAAM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C;IAED,SAAS,OAAO,CAAC,OAAY;QAC5B,OAAO,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC;QACxB,OAAO,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
@@ -6,14 +6,14 @@
|
|
6
6
|
margin-bottom: 40px;
|
7
7
|
}
|
8
8
|
|
9
|
-
.selected-filter {
|
10
|
-
}
|
11
|
-
|
12
9
|
.selected-filter-item {
|
13
|
-
position: relative;
|
14
|
-
display: inline-block;
|
15
10
|
|
16
|
-
.
|
11
|
+
.prosemirror-mention-node {
|
12
|
+
line-height: unit((24/18), em);
|
13
|
+
margin-top: 0;
|
14
|
+
}
|
15
|
+
|
16
|
+
.selected-filter-item-delete {
|
17
17
|
position: absolute;
|
18
18
|
font-size: 12px;
|
19
19
|
right: 12px;
|
@@ -22,14 +22,10 @@
|
|
22
22
|
}
|
23
23
|
|
24
24
|
&:hover {
|
25
|
-
.
|
26
|
-
padding-right: 24px;
|
27
|
-
}
|
28
|
-
|
29
|
-
.selected-filter-item-del {
|
25
|
+
.selected-filter-item-delete {
|
30
26
|
display: block;
|
31
27
|
}
|
32
28
|
}
|
33
29
|
}
|
34
30
|
}
|
35
|
-
}
|
31
|
+
}
|
@@ -1,15 +1,10 @@
|
|
1
|
-
import {
|
2
|
-
import { FilterOption } from "@voplus/morpho-data";
|
1
|
+
import { IWorkReportItem } from "../../../../data/work-report";
|
3
2
|
export declare class State {
|
4
|
-
private store;
|
5
3
|
loading: boolean;
|
6
|
-
filterV1Val: string[];
|
7
|
-
filter: FilterOption[];
|
8
4
|
dataList: {
|
9
5
|
date: string;
|
10
6
|
total: number;
|
11
7
|
}[];
|
12
|
-
constructor(
|
13
|
-
|
14
|
-
loadCashList(workReport: IWorkReport): void;
|
8
|
+
constructor();
|
9
|
+
loadCashList(workReport: IWorkReportItem[]): Promise<void>;
|
15
10
|
}
|
@@ -2,39 +2,13 @@ import { __decorate } from "tslib";
|
|
2
2
|
import { makeObservable, observable, action } from "mobx";
|
3
3
|
import dayjs from "dayjs";
|
4
4
|
export class State {
|
5
|
-
constructor(
|
6
|
-
Object.defineProperty(this, "store", {
|
7
|
-
enumerable: true,
|
8
|
-
configurable: true,
|
9
|
-
writable: true,
|
10
|
-
value: store
|
11
|
-
});
|
5
|
+
constructor() {
|
12
6
|
Object.defineProperty(this, "loading", {
|
13
7
|
enumerable: true,
|
14
8
|
configurable: true,
|
15
9
|
writable: true,
|
16
10
|
value: false
|
17
11
|
});
|
18
|
-
Object.defineProperty(this, "filterV1Val", {
|
19
|
-
enumerable: true,
|
20
|
-
configurable: true,
|
21
|
-
writable: true,
|
22
|
-
value: ["Active"]
|
23
|
-
});
|
24
|
-
Object.defineProperty(this, "filter", {
|
25
|
-
enumerable: true,
|
26
|
-
configurable: true,
|
27
|
-
writable: true,
|
28
|
-
value: [
|
29
|
-
{
|
30
|
-
c: "WorkStatus",
|
31
|
-
o: "contains",
|
32
|
-
l: "And",
|
33
|
-
v1: JSON.stringify(this.filterV1Val),
|
34
|
-
},
|
35
|
-
{ c: "WorkType", o: "=", l: "And", v1: "" },
|
36
|
-
]
|
37
|
-
});
|
38
12
|
// 柱状图的数据列表
|
39
13
|
Object.defineProperty(this, "dataList", {
|
40
14
|
enumerable: true,
|
@@ -44,18 +18,9 @@ export class State {
|
|
44
18
|
});
|
45
19
|
makeObservable(this);
|
46
20
|
}
|
47
|
-
|
48
|
-
this.loading = true;
|
49
|
-
this.store
|
50
|
-
.loadWorkReport({ Filters: filterOption !== null && filterOption !== void 0 ? filterOption : this.filter })
|
51
|
-
.then((res) => this.loadCashList(res))
|
52
|
-
.finally(() => (this.loading = false));
|
53
|
-
}
|
54
|
-
// 把后台返回的值转成柱状图所需要的数据
|
55
|
-
loadCashList(workReport) {
|
56
|
-
var _a;
|
21
|
+
async loadCashList(workReport) {
|
57
22
|
this.dataList = [];
|
58
|
-
|
23
|
+
workReport === null || workReport === void 0 ? void 0 : workReport.map((i) => this.dataList.push({
|
59
24
|
date: dayjs(`${i.year}-${i.month}`).format("YYYY MMM"),
|
60
25
|
total: i.total,
|
61
26
|
}));
|
@@ -64,18 +29,9 @@ export class State {
|
|
64
29
|
__decorate([
|
65
30
|
observable
|
66
31
|
], State.prototype, "loading", void 0);
|
67
|
-
__decorate([
|
68
|
-
observable
|
69
|
-
], State.prototype, "filterV1Val", void 0);
|
70
|
-
__decorate([
|
71
|
-
observable
|
72
|
-
], State.prototype, "filter", void 0);
|
73
32
|
__decorate([
|
74
33
|
observable
|
75
34
|
], State.prototype, "dataList", void 0);
|
76
|
-
__decorate([
|
77
|
-
action
|
78
|
-
], State.prototype, "onLoad", null);
|
79
35
|
__decorate([
|
80
36
|
action
|
81
37
|
], State.prototype, "loadCashList", null);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkCashReport/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkCashReport/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,OAAO,KAAK;IAMjB;QALY;;;;mBAAU,KAAK;WAAC;QAE5B,WAAW;QACC;;;;mBAA8C,EAAE;WAAC;QAG5D,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAEoB,AAAN,KAAK,CAAC,YAAY,CAAC,UAA6B;QAC9D,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QAEnB,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACrB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YAClB,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;YACtD,KAAK,EAAE,CAAC,CAAC,KAAM;SACf,CAAC,CACF,CAAC;IACH,CAAC;CACD;AAnBY;IAAX,UAAU;sCAAiB;AAGhB;IAAX,UAAU;uCAAkD;AAMxC;IAApB,MAAM;yCASN"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
2
|
import { useWorkListEffect } from "../../../../data/work";
|
3
|
+
import { SelectedFilterLabel } from "@voplus/morpho-ui/es/controls";
|
3
4
|
import { useWorkType, useWorkTypeListEffect } from "../../../../data/worktype";
|
4
5
|
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
5
6
|
import { WorkStatusFilter, WorkTypesFilter } from "../../../../controls/filters";
|
@@ -8,7 +9,6 @@ import { observe, useRenderOnChange } from "@voplus/morpho-ui";
|
|
8
9
|
import { Badge } from "antd";
|
9
10
|
import DocumentItemFrame from "@voplus/morpho-document/es/controls/DocumentItemFrame";
|
10
11
|
import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView2";
|
11
|
-
import SelectedFilterLabel from "../../work-type/controls/SelectedFilterLabel";
|
12
12
|
import NewWorkForm from "../NewWorkForm";
|
13
13
|
import WorkItem from "../WorkItem";
|
14
14
|
import dayjs from "dayjs";
|
@@ -58,7 +58,7 @@ const WorkList = (props) => {
|
|
58
58
|
viewTitle: (React.createElement(React.Fragment, null,
|
59
59
|
React.createElement("span", { className: "margin-right-10" }, viewTitle || (workType === null || workType === void 0 ? void 0 : workType.name) || "My Works"),
|
60
60
|
total && workTotal ? React.createElement(Badge, { count: workTotal }) : null,
|
61
|
-
React.createElement(SelectedFilterLabel,
|
61
|
+
React.createElement(SelectedFilterLabel, { filterKey: "WorkTypes" }))),
|
62
62
|
sortable: false,
|
63
63
|
quickSearch: true,
|
64
64
|
addAble: addAble || (dueDate === "requested" ? true : false),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAS,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAa,WAAW,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,iBAAiB,MAAM,uDAAuD,CAAC;AACtF,OAAO,QAAQ,MAAM,2DAA2D,CAAC;AACjF,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAS,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAa,WAAW,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,8B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AAO,CAAC,CAAC;IAC5C,CAAC;IAED,SAAS,YAAY;QACpB,QAAQ,OAAO,EAAE,CAAC;YACjB,KAAK,OAAO,CAAC;YACb,KAAK,MAAM,CAAC;YACZ,KAAK,OAAO,CAAC;YACb,KAAK,KAAK;gBACT,OAAO,CAAC,QAAQ,CAAC,CAAC;YACnB,KAAK,WAAW;gBACf,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;YACnC;gBACC,MAAM;QACR,CAAC;QACD,IAAI,SAAS;YAAE,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACxC,IAAI,OAAO;YAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC/B,OAAO,EAAE,CAAC;IACX,CAAC;IAED,SAAS,QAAQ,CAAC,OAAY;QAC7B,OAAO,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC;QACxB,OAAO,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;AACF,CAAC,CAAC;AAEF,QAAQ,CAAC,YAAY,GAAG;IACvB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,IAAI;CACnB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
@@ -2,10 +2,12 @@ import React, { useState } from "react";
|
|
2
2
|
import { observe } from "@voplus/morpho-ui";
|
3
3
|
import { useRenderOnChange } from "@voplus/morpho-ui";
|
4
4
|
import { useWorkScheduleListEffect } from "../../../../../data/work-schedule";
|
5
|
+
import { useWorkTypeListEffect } from "../../../../../data/worktype";
|
5
6
|
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
6
7
|
import { useAutoUpdateListData } from "../../../../../data/work-schedule/work-schedule-events";
|
7
8
|
import { useViewContext } from "@voplus/morpho-document-core/es/data/context/ViewContext";
|
8
9
|
import WorkScheduleFilter from "../../controls/WorkScheduleFilter";
|
10
|
+
import WorkTypesFilter from "../../../../../controls/filters/WorkTypesFilter";
|
9
11
|
import NewWorkScheduleForm from "../NewWorkScheduleForm";
|
10
12
|
import NewWorkScheduleFormDialog from "../NewWorkScheduleForm/NewWorkScheduleFormDialog";
|
11
13
|
import WorkSchedulePropertiesView from "../WorkSchedulePropertiesView";
|
@@ -20,6 +22,7 @@ const WorkScheduleList = (props) => {
|
|
20
22
|
const { contact, viewTitle, asideable, scheduleDate } = props;
|
21
23
|
const [activeId, setActiveId] = useState("");
|
22
24
|
const [addAble, setAddAble] = useState(false);
|
25
|
+
const [workTypeList, setWorkTypeList] = useState([]);
|
23
26
|
const view = useViewContext();
|
24
27
|
const list = useCreateListDataState({
|
25
28
|
filterDefaults: {
|
@@ -45,6 +48,9 @@ const WorkScheduleList = (props) => {
|
|
45
48
|
Total: true,
|
46
49
|
...list.filters.options,
|
47
50
|
});
|
51
|
+
useWorkTypeListEffect(null, (result) => setWorkTypeList(result), {
|
52
|
+
Filters: [],
|
53
|
+
});
|
48
54
|
return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
|
49
55
|
React.createElement("div", { className: styles["work-schedule-list"] },
|
50
56
|
React.createElement(ListView, { headerProps: {
|
@@ -53,7 +59,10 @@ const WorkScheduleList = (props) => {
|
|
53
59
|
quickSearch: true,
|
54
60
|
onAdd: () => (view === null || view === void 0 ? void 0 : view.Type) === "PropertiesView" && setAddAble(!addAble),
|
55
61
|
filterViewProps: {
|
56
|
-
columns: [
|
62
|
+
columns: [
|
63
|
+
React.createElement(WorkScheduleFilter, { key: "WorkScheduleFilter", defaultValue: "Empty" }),
|
64
|
+
React.createElement(WorkTypesFilter, { key: "WorkTypesFilter", workTypeList: workTypeList }),
|
65
|
+
],
|
57
66
|
onFilter,
|
58
67
|
},
|
59
68
|
}, asideable: asideable, className: "work-schedule-list-content", formView: (view === null || view === void 0 ? void 0 : view.Type) !== "PropertiesView" && React.createElement(NewWorkScheduleForm, { contact: contact }), renderItem: ({ item, connectDragSource }) => (React.createElement(DocumentItemFrame, { key: item.id, frameProps: { active: activeId === item.id }, onClick: () => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/components/WorkScheduleList/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,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAiB,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAC1F,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AACzD,OAAO,yBAAyB,MAAM,kDAAkD,CAAC;AACzF,OAAO,0BAA0B,MAAM,+BAA+B,CAAC;AACvE,OAAO,iBAAiB,MAAM,uDAAuD,CAAC;AACtF,OAAO,QAAQ,MAAM,2DAA2D,CAAC;AACjF,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AAiB5B,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;IACzD,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAC9D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC7C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/components/WorkScheduleList/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,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAiB,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EAAa,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAC1F,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,eAAe,MAAM,iDAAiD,CAAC;AAC9E,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AACzD,OAAO,yBAAyB,MAAM,kDAAkD,CAAC;AACzF,OAAO,0BAA0B,MAAM,+BAA+B,CAAC;AACvE,OAAO,iBAAiB,MAAM,uDAAuD,CAAC;AACtF,OAAO,QAAQ,MAAM,2DAA2D,CAAC;AACjF,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AAiB5B,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;IACzD,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAC9D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QA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,UAAU,EAAE,GAAG,MAAM,CAAC,CAAC;gBACjC,MAAM;YACP,KAAK,OAAO;gBACX,MAAM,GAAG,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,CAAC;gBAClC,MAAM;YACP,KAAK,SAAS;gBACb,MAAM,GAAG,CAAC,aAAa,EAAE,GAAG,MAAM,CAAC,CAAC;gBACpC,MAAM;YACP;gBACC,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAED,SAAS,QAAQ,CAAC,OAAY;QAC7B,OAAO,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC;QACxB,OAAO,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;AACF,CAAC,CAAC;AAEF,gBAAgB,CAAC,YAAY,GAAG;IAC/B,SAAS,EAAE,GAAG;CACd,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
@@ -22,7 +22,7 @@ const Dashboard = (props) => {
|
|
22
22
|
return observe(() => (React.createElement("div", { className: styles["worktype-works-dashboard"], ref: ref },
|
23
23
|
React.createElement(RelatedDocument, null,
|
24
24
|
React.createElement(Card, { className: "work-cash-report" },
|
25
|
-
React.createElement(WorkCashReport, { id: params.typesId, onFilterOutPut: (statusArr) => setStatusArr(statusArr) })),
|
25
|
+
React.createElement(WorkCashReport, { id: params.typesId, workspaceId: params.id, onFilterOutPut: (statusArr) => setStatusArr(statusArr) })),
|
26
26
|
React.createElement("div", { className: "work-list-card" },
|
27
27
|
React.createElement(WorkListCard, { style: { height: `${dashboardHeight - 463}px` }, filterVisible: false, statusArr: statusArr, active: params.active, typesId: params.typesId, workspaceId: params.id, onClickItem: (item) => {
|
28
28
|
layout.history.replace(generatePath(props.path, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WorkTypeWorksDashBoard.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/pages/WorkspacePage/WorkTypeWorksDashBoard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE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AAc,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,GACrD,CACI;YAEP,6BAAK,SAAS,EAAC,gBAAgB;gBAC9B,oBAAC,YAAY,IACZ,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,eAAgB,GAAG,GAAG,IAAI,EAAE,EAChD,aAAa,EAAE,KAAK,EACpB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,OAAO,EAAE,MAAM,CAAC,OAAO,EACvB,WAAW,EAAE,MAAM,CAAC,EAAE,EACtB,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE;wBACrB,MAAM,CAAC,OAAO,CAAC,OAAO,CACrB,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE;4BACxB,EAAE,EAAE,MAAM,CAAC,EAAG;4BACd,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,EAAE;4BAC7B,MAAM,EAAE,IAAI,CAAC,EAAE;yBACf,CAAC,CACF,CAAC;oBACH,CAAC,EACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAClB,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,OAAQ,CAAC,GAAG,KAAK,CAAC,CAAC,GAEzE,CACG,CACW,CACb,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
1
|
+
{"version":3,"file":"WorkTypeWorksDashBoard.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/pages/WorkspacePage/WorkTypeWorksDashBoard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAA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MAAM,EAAE,GAAG,eAAgB,GAAG,GAAG,IAAI,EAAE,EAChD,aAAa,EAAE,KAAK,EACpB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,OAAO,EAAE,MAAM,CAAC,OAAO,EACvB,WAAW,EAAE,MAAM,CAAC,EAAE,EACtB,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE;wBACrB,MAAM,CAAC,OAAO,CAAC,OAAO,CACrB,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE;4BACxB,EAAE,EAAE,MAAM,CAAC,EAAG;4BACd,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,EAAE;4BAC7B,MAAM,EAAE,IAAI,CAAC,EAAE;yBACf,CAAC,CACF,CAAC;oBACH,CAAC,EACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAClB,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,OAAQ,CAAC,GAAG,KAAK,CAAC,CAAC,GAEzE,CACG,CACW,CACb,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
@@ -1,23 +0,0 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import { CloseOutlined } from "@ant-design/icons";
|
3
|
-
import { observe } from "@voplus/morpho-ui";
|
4
|
-
import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
|
5
|
-
import "./index.less";
|
6
|
-
const SelectedFilterLabel = () => {
|
7
|
-
const context = useFilterOptionsContext();
|
8
|
-
return observe(() => {
|
9
|
-
var _a;
|
10
|
-
const selectedLabel = (_a = context.selectedLabels) === null || _a === void 0 ? void 0 : _a.filter((i) => i.key === "WorkTypes");
|
11
|
-
return (React.createElement("div", { className: "selected-filter-label-list" }, (selectedLabel === null || selectedLabel === void 0 ? void 0 : selectedLabel.length) > 0
|
12
|
-
? selectedLabel[0].label.map((label) => (React.createElement("div", { className: "selected-filter-item", key: label.v1 },
|
13
|
-
React.createElement("span", { className: "prosemirror-mention-node" }, label.name),
|
14
|
-
React.createElement(CloseOutlined, { className: "selected-filter-item-delete", onClick: () => {
|
15
|
-
var _a, _b;
|
16
|
-
(_b = (_a = selectedLabel[0]) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.removeSelected(label.v1);
|
17
|
-
context.filter();
|
18
|
-
} }))))
|
19
|
-
: null));
|
20
|
-
});
|
21
|
-
};
|
22
|
-
export default SelectedFilterLabel;
|
23
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-type/controls/SelectedFilterLabel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAkB,MAAM,2BAA2B,CAAC;AACpF,OAAO,cAAc,CAAC;AAEtB,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAChC,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAE1C,OAAO,OAAO,CAAC,GAAG,EAAE;;QACnB,MAAM,aAAa,GAAqB,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,CACrE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,WAAW,CAC5B,CAAC;QAEF,OAAO,CACN,6BAAK,SAAS,EAAC,4BAA4B,IACzC,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,IAAG,CAAC;YACzB,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACtC,6BAAK,SAAS,EAAC,sBAAsB,EAAC,GAAG,EAAE,KAAK,CAAC,EAAE;gBAClD,8BAAM,SAAS,EAAC,0BAA0B,IAAE,KAAK,CAAC,IAAI,CAAQ;gBAC9D,oBAAC,aAAa,IACb,SAAS,EAAC,6BAA6B,EACvC,OAAO,EAAE,GAAG,EAAE;;wBACb,MAAA,MAAA,aAAa,CAAC,CAAC,CAAC,0CAAE,KAAK,0CAAE,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;wBAClD,OAAO,CAAC,MAAM,EAAE,CAAC;oBAClB,CAAC,GACA,CACG,CACL,CAAC;YACJ,CAAC,CAAC,IAAI,CACF,CACN,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
:global {
|
2
|
-
.selected-filter-label-list {
|
3
|
-
.selected-filter-item {
|
4
|
-
position: relative;
|
5
|
-
display: inline-block;
|
6
|
-
|
7
|
-
.prosemirror-mention-node {
|
8
|
-
line-height: 1em;
|
9
|
-
margin-top: 8px;
|
10
|
-
}
|
11
|
-
|
12
|
-
.selected-filter-item-delete {
|
13
|
-
position: absolute;
|
14
|
-
font-size: 12px;
|
15
|
-
right: 12px;
|
16
|
-
top: 20px;
|
17
|
-
display: none;
|
18
|
-
}
|
19
|
-
|
20
|
-
&:hover {
|
21
|
-
.prosemirror-mention-node {
|
22
|
-
padding-right: 24px;
|
23
|
-
}
|
24
|
-
|
25
|
-
.selected-filter-item-delete {
|
26
|
-
display: block;
|
27
|
-
}
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
}
|