@titaui/pc 1.15.76 → 1.15.77-beta.3

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.
@@ -387,8 +387,7 @@ var BaseInfo = function BaseInfo(_ref) {
387
387
  }, [generalPrincipalUser, okrInfo]); // 判断是否有权限和是否上面可编辑
388
388
 
389
389
  (0, _react.useEffect)(function () {
390
- var inParticipant = (0, _util.findUser)(participant, loginUser.Id);
391
- var canEditParticipantAndFollowers = canEditAllInfo || inParticipant;
390
+ var canEditParticipantAndFollowers = canEditAllInfo || okrInfo.isParticipant;
392
391
  setCanEditPerson(!!canEditParticipantAndFollowers);
393
392
  }, [participant, canEditAllInfo]);
394
393
  (0, _react.useEffect)(function () {
@@ -456,13 +455,13 @@ var BaseInfo = function BaseInfo(_ref) {
456
455
  visiableLimit: generalVisibility.visibilityScope,
457
456
  canEdit: canEditAllInfo,
458
457
  okrId: okrId
459
- })), !canEditPerson && !canEditAllInfo && participant.length === 0 && followers.length === 0 ? null : /*#__PURE__*/_react["default"].createElement("div", {
458
+ })), !canEditPerson && !okrInfo.isParticipant && !canEditAllInfo && participant.length === 0 && followers.length === 0 ? null : /*#__PURE__*/_react["default"].createElement("div", {
460
459
  className: "base-info__divider"
461
460
  }), /*#__PURE__*/_react["default"].createElement("div", {
462
461
  className: "base-info__participant-followers-wrapper"
463
462
  }, /*#__PURE__*/_react["default"].createElement("div", {
464
463
  className: "base-info__person-block"
465
- }, !canEditPerson && !canEditAllInfo && participant.length === 0 ? null : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
464
+ }, !canEditPerson && !canEditAllInfo && !okrInfo.isParticipant && participant.length === 0 ? null : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
466
465
  className: "base-info__person-block-title"
467
466
  }, (0, _getLocale.getLocale)("Mod_Participants")), /*#__PURE__*/_react["default"].createElement(_person["default"], {
468
467
  users: participant,
@@ -176,6 +176,9 @@ var Principal = function Principal(_ref) {
176
176
  }, /*#__PURE__*/_react["default"].createElement(_avatar["default"].Name, {
177
177
  showNameTips: true,
178
178
  textWidth: 317,
179
+ style: {
180
+ minWidth: '24px'
181
+ },
179
182
  size: {
180
183
  width: 24,
181
184
  textNum: 1,
@@ -110,6 +110,8 @@ function Header(props) {
110
110
  }, [generalPrincipalUser]);
111
111
  var editable = auth && okrInfo.status == 1; // 有权限 && 进行中
112
112
 
113
+ var progressEdit = (auth || okrInfo.isParticipant) && okrInfo.status == 1;
114
+
113
115
  var renderContent = function renderContent(_ref) {
114
116
  var onOpenModal = _ref.onOpenModal;
115
117
 
@@ -120,7 +122,7 @@ function Header(props) {
120
122
  color: okrInfo.status === 2 ? 'linear-gradient(270deg, #BFC7D5, #E1E5EC)' : _utils.OkrRiskMapping[okrInfo.manualRiskLevel].line
121
123
  });
122
124
 
123
- if (!editable) {
125
+ if (!progressEdit) {
124
126
  return /*#__PURE__*/_react["default"].createElement("span", {
125
127
  className: "okr-drawer-header__action-progress"
126
128
  }, progressCmp, progressGrow !== 0 && /*#__PURE__*/_react["default"].createElement("span", {
@@ -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;
96
96
  var hasRelativeAuth;
97
97
 
98
98
  if (isOTask) {
@@ -191,6 +191,7 @@ function _default(props) {
191
191
  _useState26 = _slicedToArray(_useState25, 1),
192
192
  krCanEdit = _useState26[0];
193
193
 
194
+ var progressEdit = okrInfo.isParticipant || data.isParticipant || krCanEdit;
194
195
  var mentionInputRef = (0, _react.useRef)();
195
196
  (0, _react.useEffect)(function () {
196
197
  setKrNameData({
@@ -363,7 +364,7 @@ function _default(props) {
363
364
  };
364
365
 
365
366
  var onPrograssEditHandler = function onPrograssEditHandler() {
366
- if (!krCanEdit) return;
367
+ if (!progressEdit) return;
367
368
  setKrModalVsible(true);
368
369
  };
369
370
 
@@ -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"], {
@@ -68,7 +68,7 @@ var OrderAward = function OrderAward() {
68
68
  }
69
69
  };
70
70
 
71
- if (!noshowChangeVersion) return null;
71
+ if (noshowChangeVersion) return null;
72
72
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
73
73
  className: (0, _classnames["default"])('order-have-award'),
74
74
  onClick: handlePoint
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.15.76",
3
+ "version": "1.15.77-beta.3",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",