@titaui/pc 1.12.92 → 1.12.95
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.
|
@@ -34,6 +34,8 @@ var _default = /*#__PURE__*/function () {
|
|
|
34
34
|
cb(_menus.PAGE_SUMMARY_SHARE);
|
|
35
35
|
} else if (this.isSubordinatesSummary()) {
|
|
36
36
|
cb(_menus.PAGE_SUMMARY_SUBORDINATE);
|
|
37
|
+
} else if (this.isSummaryDashboard()) {
|
|
38
|
+
cb(_menus.PAGE_SUMMARY_DASHBOARD);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
return null;
|
|
@@ -68,6 +70,12 @@ var _default = /*#__PURE__*/function () {
|
|
|
68
70
|
var pathname = this.history.location.pathname;
|
|
69
71
|
return pathname.match(/summary\/chart/);
|
|
70
72
|
}
|
|
73
|
+
}, {
|
|
74
|
+
key: "isSummaryDashboard",
|
|
75
|
+
value: function isSummaryDashboard() {
|
|
76
|
+
var pathname = this.history.location.pathname;
|
|
77
|
+
return pathname.match(/summary\/dashboard/);
|
|
78
|
+
}
|
|
71
79
|
}]);
|
|
72
80
|
|
|
73
81
|
return _default;
|
|
@@ -115,15 +115,14 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
115
115
|
href: "#/enterprise/manage?reactRouterName=daily",
|
|
116
116
|
isShow: isShowManage,
|
|
117
117
|
openBlank: true
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
];
|
|
118
|
+
}, {
|
|
119
|
+
icon: 'yibiao',
|
|
120
|
+
label: _i18n.locale.menu_summary_dashboard,
|
|
121
|
+
key: PAGE_SUMMARY_DASHBOARD,
|
|
122
|
+
type: _index.MENU_ITEM_NOE,
|
|
123
|
+
href: '#/summary/dashboard',
|
|
124
|
+
isShow: props.isShowDashboard
|
|
125
|
+
}];
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
_createClass(summaryMenus, [{
|
|
@@ -80,6 +80,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
80
80
|
setIsShowShare = _useState8[1];
|
|
81
81
|
|
|
82
82
|
var isShowDepartment = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager() || baseAuth.isDepartmentLeader() || baseAuth.isHrbp();
|
|
83
|
+
var isShowDashboard = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager() || baseAuth.isHrbp();
|
|
83
84
|
var flipRef = (0, _react.useRef)({
|
|
84
85
|
next: function next() {},
|
|
85
86
|
goback: function goback() {}
|
|
@@ -206,11 +207,12 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
206
207
|
(0, _react.useEffect)(function () {
|
|
207
208
|
var newMenu = new _menus["default"]({
|
|
208
209
|
isShowShare: isShowShare,
|
|
209
|
-
isShowDept: isShowDepartment
|
|
210
|
+
isShowDept: isShowDepartment,
|
|
211
|
+
isShowDashboard: isShowDashboard
|
|
210
212
|
});
|
|
211
213
|
summaryMenusData.current = newMenu;
|
|
212
214
|
setMenus(newMenu.getMenus());
|
|
213
|
-
}, [isShowShare, isShowDepartment]);
|
|
215
|
+
}, [isShowShare, isShowDepartment, isShowDashboard]);
|
|
214
216
|
(0, _react.useEffect)(function () {
|
|
215
217
|
(0, _requestApi.getShareStatus)().then(function (resp) {
|
|
216
218
|
if (resp.Code === 1) {
|