@giteeteam/apps-team-components 1.2.2-alpha.2 → 1.2.2-alpha.4

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.
@@ -255,7 +255,7 @@ export function checkItemCondition(transition, item) {
255
255
  let sourceValue = null, targetValue = null;
256
256
  switch (field.componentType) {
257
257
  case CustomFieldComponentTypes.Number:
258
- case CustomFieldComponentTypes.Date: {
258
+ case CustomFieldComponentTypes.Date:
259
259
  targetValue = comparedValue;
260
260
  if (field.componentType === CustomFieldComponentTypes.Date && NumberConditions.equalTo.key === numberCompare) {
261
261
  targetValue = getFormat(targetValue || null, getDateType(pickerType));
@@ -290,7 +290,7 @@ export function checkItemCondition(transition, item) {
290
290
  }
291
291
  let showValue = comparedValue;
292
292
  if (field.componentType === CustomFieldComponentTypes.Date) {
293
- showValue = getFormat(comparedValue, getDateType('dateTime'));
293
+ showValue = getFormat(comparedValue, getDateType(pickerType));
294
294
  }
295
295
  return {
296
296
  result: false,
@@ -308,7 +308,7 @@ export function checkItemCondition(transition, item) {
308
308
  };
309
309
  }
310
310
  }
311
- }
311
+ break;
312
312
  case CustomFieldComponentTypes.Text:
313
313
  case CustomFieldComponentTypes.LongText:
314
314
  targetValue = comparedValue;
@@ -426,9 +426,13 @@ export function checkTransition(item, transition, permissions, flowHandlerActive
426
426
  const conditionList = [roleCheck, conditionCheck];
427
427
  const notEmpty = conditionList.filter(item => !item.isEmpty);
428
428
  if ((notEmpty === null || notEmpty === void 0 ? void 0 : notEmpty.length) > 0) {
429
- const [notEmptyCondition] = notEmpty;
430
- if (!notEmptyCondition.result) {
431
- return notEmptyCondition;
429
+ const hasPass = notEmpty.find(item => item.result);
430
+ if (hasPass) {
431
+ return { result: true };
432
+ }
433
+ else {
434
+ const notPass = notEmpty.find(item => !item.result);
435
+ return notPass;
432
436
  }
433
437
  }
434
438
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-team-components",
3
- "version": "1.2.2-alpha.2",
3
+ "version": "1.2.2-alpha.4",
4
4
  "description": "Gitee team components",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",