@titaui/pc 1.15.77-beta.2 → 1.15.77-beta.5
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/lib/components/okr-detail/base-info/other-infos/principal/index.js +3 -0
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +1 -1
- package/lib/components/okr-detail/okr-list/index.js +2 -2
- package/lib/components/okr-detail/schedule/components/o-progress/index.js +7 -7
- package/package.json +1 -1
|
@@ -92,7 +92,7 @@ var EKrNode = function EKrNode(props) {
|
|
|
92
92
|
var onlySuperCreateWork = (_window = window) === null || _window === void 0 ? void 0 : (_window$BSGlobal = _window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$Work = _window$BSGlobal.WorkAdvancedSetting) === null || _window$BSGlobal$Work === void 0 ? void 0 : (_window$BSGlobal$Work2 = _window$BSGlobal$Work.WorkFunctionSetting) === null || _window$BSGlobal$Work2 === void 0 ? void 0 : _window$BSGlobal$Work2.WorkCreate; //开启后,仅超管、目标管理员、老板/助理可创建项目
|
|
93
93
|
|
|
94
94
|
var canCreateWork = baseAuth.isBoss() || baseAuth.isManager() || baseAuth.isWorkManager() || baseAuth.isAssistant() || !onlySuperCreateWork;
|
|
95
|
-
var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
|
|
95
|
+
var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2 || okrInfo.isParticipant || data.isParticipant;
|
|
96
96
|
var hasRelativeAuth;
|
|
97
97
|
|
|
98
98
|
if (isOTask) {
|
|
@@ -430,7 +430,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
430
430
|
onCreateKr: function onCreateKr() {
|
|
431
431
|
return setCreateKrShow(true);
|
|
432
432
|
},
|
|
433
|
-
canEditOkr: canEditOkr || isInnerUser,
|
|
433
|
+
canEditOkr: canEditOkr || isInnerUser || okrInfo.isParticipant,
|
|
434
434
|
style: isShowAlignOkr ? {
|
|
435
435
|
padding: '40px 0 24px 0'
|
|
436
436
|
} : {
|
|
@@ -449,7 +449,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
449
449
|
okrInfo: okrInfo,
|
|
450
450
|
draggable: canEditOkr && (okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState) !== _helper.EApproveStatus.UnderApproval,
|
|
451
451
|
onDrop: onOkrItemDropHandler
|
|
452
|
-
}))), (canEditOkr || isInnerUser) && (0, _helper.getApprovalOkr)(approvalSetting, 'createOkr', okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
452
|
+
}))), (canEditOkr || isInnerUser || okrInfo.isParticipant) && (0, _helper.getApprovalOkr)(approvalSetting, 'createOkr', okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
453
453
|
ref: wrapperRef,
|
|
454
454
|
className: (0, _classnames["default"])("".concat(preCls, "__addkr"))
|
|
455
455
|
}, /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], null, createKrShow ? /*#__PURE__*/_react["default"].createElement(_createKrItem["default"], {
|
|
@@ -82,10 +82,10 @@ var OProgress = function OProgress(_ref) {
|
|
|
82
82
|
isPrincipalUser = _useState4[0],
|
|
83
83
|
setIsPrincipalUser = _useState4[1];
|
|
84
84
|
|
|
85
|
-
var _useState5 = (0, _react.useState)(new _auth.OAuth({
|
|
85
|
+
var _useState5 = (0, _react.useState)((new _auth.OAuth({
|
|
86
86
|
principalUser: generalPrincipalUser,
|
|
87
87
|
createUserId: okrInfo.createUserId
|
|
88
|
-
}).hasAuth() && okrInfo.status !== 2),
|
|
88
|
+
}).hasAuth() || okrInfo.isParticipant) && okrInfo.status !== 2),
|
|
89
89
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
90
90
|
isCanEditProgress = _useState6[0],
|
|
91
91
|
setIsCanEditProgress = _useState6[1];
|
|
@@ -240,10 +240,10 @@ var OProgress = function OProgress(_ref) {
|
|
|
240
240
|
}, []);
|
|
241
241
|
(0, _react.useEffect)(function () {
|
|
242
242
|
setIsPrincipalUser((0, _util.isPrincipal)(generalPrincipalUser));
|
|
243
|
-
setIsCanEditProgress(new _auth.OAuth({
|
|
243
|
+
setIsCanEditProgress((new _auth.OAuth({
|
|
244
244
|
principalUser: generalPrincipalUser,
|
|
245
245
|
createUserId: okrInfo.createUserId
|
|
246
|
-
}).hasAuth() && okrInfo.status !== 2);
|
|
246
|
+
}).hasAuth() || okrInfo.isParticipant) && okrInfo.status !== 2);
|
|
247
247
|
}, [generalPrincipalUser]);
|
|
248
248
|
(0, _react.useEffect)(function () {
|
|
249
249
|
// @ts-ignore
|
|
@@ -296,14 +296,14 @@ var OProgress = function OProgress(_ref) {
|
|
|
296
296
|
src: _scheduleEmpty["default"]
|
|
297
297
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
298
298
|
className: "o-progress__empty-text"
|
|
299
|
-
}, isPrincipalUser ? (0, _getLocale.getLocale)('OKR_MyO_KRP_tochecko') : (0, _getLocale.getLocale)('OKR_MyO_Pr_Text_Nooprogress')), isPrincipalUser && /*#__PURE__*/_react["default"].createElement(_oProgressUpdate["default"], {
|
|
299
|
+
}, isPrincipalUser ? (0, _getLocale.getLocale)('OKR_MyO_KRP_tochecko') : (0, _getLocale.getLocale)('OKR_MyO_Pr_Text_Nooprogress')), (isPrincipalUser || okrInfo.isParticipant) && /*#__PURE__*/_react["default"].createElement(_oProgressUpdate["default"], {
|
|
300
300
|
okrInfo: okrInfo,
|
|
301
301
|
renderContent: renderUpdateBtn,
|
|
302
302
|
setUpdateData: setUpdateProgress
|
|
303
303
|
}), !isCanEditProgress && /*#__PURE__*/_react["default"].createElement("button", {
|
|
304
304
|
className: "o-progress__empty-button",
|
|
305
305
|
onClick: handleRemindClick
|
|
306
|
-
}, (0, _getLocale.getLocale)('OKR_MyO_Pr_Butt_Reminder')), isCanEditProgress && !isPrincipalUser && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("button", {
|
|
306
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pr_Butt_Reminder')), isCanEditProgress && !isPrincipalUser && !okrInfo.isParticipant && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("button", {
|
|
307
307
|
className: "o-progress__empty-button",
|
|
308
308
|
onClick: handleRemindClick
|
|
309
309
|
}, (0, _getLocale.getLocale)('OKR_MyO_Pr_Butt_Reminder')), /*#__PURE__*/_react["default"].createElement(_oProgressUpdate["default"], {
|
|
@@ -313,7 +313,7 @@ var OProgress = function OProgress(_ref) {
|
|
|
313
313
|
})));
|
|
314
314
|
}, [hasOtherProgress]);
|
|
315
315
|
var renderDefaultRemindCmp = (0, _react.useMemo)(function () {
|
|
316
|
-
var text = isPrincipalUser ? (0, _auth.hasSuperior)() ? (0, _getLocale.getLocale)('OKR_MyO_Prog_Butt_Remind') : null : (0, _getLocale.getLocale)('OKR_MyO_Pr_Butt_Reminder');
|
|
316
|
+
var text = isPrincipalUser ? (0, _auth.hasSuperior)() ? (0, _getLocale.getLocale)('OKR_MyO_Prog_Butt_Remind') : null : okrInfo.isParticipant ? '' : (0, _getLocale.getLocale)('OKR_MyO_Pr_Butt_Reminder');
|
|
317
317
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
318
318
|
className: "o-progress__func-btn",
|
|
319
319
|
onClick: handleRemindClick
|