diff --git a/cypress/fixtures/actionConditions.cl b/cypress/fixtures/actionConditions.cl index 96bcb190..00939d03 100644 --- a/cypress/fixtures/actionConditions.cl +++ b/cypress/fixtures/actionConditions.cl @@ -2907,7 +2907,7 @@ { "entityId": "ba50584b-244c-4c73-83fe-b0bf04498714", "value": 3, - "condition": "LESS_THEN_OR_EQUAL" + "condition": "LESS_THAN_OR_EQUAL" } ], "negativeConditions": [], diff --git a/package-lock.json b/package-lock.json index 9c1c4c24..b326d655 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1782,9 +1782,9 @@ } }, "@conversationlearner/models": { - "version": "0.218.0", - "resolved": "https://registry.npmjs.org/@conversationlearner/models/-/models-0.218.0.tgz", - "integrity": "sha512-ogD9zt8WJwX0GqElrhQlkhxVzzrz2IbNdkglDenb1kgek+xKPqvzwyf5KzvKLCy8n6Lzmlx553c6CTcE6mfrEg==", + "version": "0.219.0", + "resolved": "https://registry.npmjs.org/@conversationlearner/models/-/models-0.219.0.tgz", + "integrity": "sha512-QB1TFMqkf/BDXOrulDs3v4j4Ot8Ozs+jWAx7M0e0XBqXTQLWFJa33e4KR7QFJOruERIwaCJy1xvwRkczHg99Kw==", "requires": { "jest-resolve": "^24.8.0" }, diff --git a/package.json b/package.json index 3057c620..53c2bc55 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ }, "private": true, "dependencies": { - "@conversationlearner/models": "0.218.0", + "@conversationlearner/models": "0.219.0", "@conversationlearner/webchat": "0.157.0", "@cypress/webpack-preprocessor": "4.0.3", "@types/klaw-sync": "^6.0.0", diff --git a/src/Utils/actionCondition.ts b/src/Utils/actionCondition.ts index 7825eae9..16da94d4 100644 --- a/src/Utils/actionCondition.ts +++ b/src/Utils/actionCondition.ts @@ -16,7 +16,7 @@ export const conditionDisplay: Record = { [CLM.ConditionType.GREATER_THAN]: '>', [CLM.ConditionType.GREATER_THAN_OR_EQUAL]: '>=', [CLM.ConditionType.LESS_THAN]: '<', - [CLM.ConditionType.LESS_THEN_OR_EQUAL]: '<=', + [CLM.ConditionType.LESS_THAN_OR_EQUAL]: '<=', } export const getEnumConditionName = (entity: CLM.EntityBase, enumValue: CLM.EnumValue): string => { @@ -102,7 +102,7 @@ export const isValueConditionTrue = (condition: CLM.Condition, numberValue: numb || (condition.condition === CLM.ConditionType.GREATER_THAN && numberValue > condition.value) || (condition.condition === CLM.ConditionType.GREATER_THAN_OR_EQUAL && numberValue >= condition.value) || (condition.condition === CLM.ConditionType.LESS_THAN && numberValue < condition.value) - || (condition.condition === CLM.ConditionType.LESS_THEN_OR_EQUAL && numberValue <= condition.value) + || (condition.condition === CLM.ConditionType.LESS_THAN_OR_EQUAL && numberValue <= condition.value) } return isTrue @@ -150,7 +150,7 @@ export const getUpdatedActionsUsingCondition = (actions: CLM.ActionBase[], exist draftAction.requiredConditions.splice(requiredConditionIndex, 1, newCondition) isActionUsingCondition = true } - + const negativeConditionIndex = draftAction.negativeConditions.findIndex(c => isConditionEqual(c, existingCondition)) if (negativeConditionIndex >= 0) { draftAction.negativeConditions.splice(negativeConditionIndex, 1, newCondition)