@giteeteam/apps-team-components 1.7.0 → 1.7.2

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.
@@ -104,7 +104,7 @@ const TransitionPanel = ({ itemId, itemType, workspace, objectId, onTransitionSu
104
104
  message: i18n.t('pages.fields.view.checkInStatus'),
105
105
  };
106
106
  }
107
- const checkResult = checkFlowHandler(itemData, { userId: currentUser.id }, flowHandlerActive);
107
+ const checkResult = checkFlowHandler(itemData, { userId: currentUser === null || currentUser === void 0 ? void 0 : currentUser.id }, flowHandlerActive);
108
108
  if (checkResult && !checkResult.result) {
109
109
  return checkResult;
110
110
  }
@@ -115,7 +115,7 @@ const TransitionPanel = ({ itemId, itemType, workspace, objectId, onTransitionSu
115
115
  return conditionCheck;
116
116
  }
117
117
  return { result: true };
118
- }, [checkApproval, currentUser, flowHandlerActive, hideDisabledStatusTransition, validateCheckIn, itemData]);
118
+ }, [checkApproval, currentUser === null || currentUser === void 0 ? void 0 : currentUser.id, flowHandlerActive, hideDisabledStatusTransition, validateCheckIn, itemData]);
119
119
  const getTheTargetTransitions = useCallback(({ workflowData, statusId }) => {
120
120
  var _a;
121
121
  if (workflowData && statusId) {
@@ -195,15 +195,18 @@ const TransitionPanel = ({ itemId, itemType, workspace, objectId, onTransitionSu
195
195
  getWorkflowData,
196
196
  postCheckTransitions,
197
197
  getTheTargetTransitions,
198
+ currentUser === null || currentUser === void 0 ? void 0 : currentUser.id,
198
199
  ]);
199
200
  useEffect(() => {
200
- logger('refresh workflow');
201
- refresh();
202
- }, []);
201
+ logger('refresh workflow', currentUser);
202
+ if (currentUser === null || currentUser === void 0 ? void 0 : currentUser.id) {
203
+ refresh();
204
+ }
205
+ }, [currentUser === null || currentUser === void 0 ? void 0 : currentUser.id]);
203
206
  useEffect(() => {
204
207
  logger('updateWorkflowMessage', statusId);
205
208
  updateWorkflowMessage(workflowData, statusId, checkResultList);
206
- }, [statusId, workflowData, checkResultList, itemData]);
209
+ }, [statusId, workflowData, checkResultList, itemData, updateWorkflowMessage]);
207
210
  const refreshItem = useCallback((status) => {
208
211
  if (newItem.current !== itemId) {
209
212
  return;
@@ -6,7 +6,7 @@ const isUserDisabled = (user) => toBoolean(user === null || user === void 0 ? vo
6
6
  const generateUserDisplayName = (user, onlyNickname = false) => {
7
7
  const getDisplaySuffix = () => {
8
8
  if (isUserDeleted(user)) {
9
- return i18n.t('pages.users.default.delete');
9
+ return '';
10
10
  }
11
11
  else if (isUserDisabled(user)) {
12
12
  return i18n.t('pages.users.default.forbidden');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-team-components",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Gitee team components",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -107,4 +107,4 @@
107
107
  "public"
108
108
  ]
109
109
  }
110
- }
110
+ }