From dc250e1e791eb4b89c815fb18484c12d160202d6 Mon Sep 17 00:00:00 2001 From: dlohvinov Date: Tue, 28 Nov 2023 22:27:03 +0200 Subject: [PATCH] 23.12.48: wt-progress-bar error color usage fix [WTEL-3950] --- package.json | 2 +- .../__tests__/useRepresentableAgentPauseCause.spec.js | 2 +- .../useRepresentableAgentPauseCause.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 081627ba7..8f5c71129 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@webitel/ui-sdk", - "version": "23.12.47", + "version": "23.12.48", "private": false, "scripts": { "dev": "vite", diff --git a/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js b/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js index 588f03cce..c814b51f4 100644 --- a/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +++ b/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js @@ -54,7 +54,7 @@ describe('useRepresentableAgentPauseCause', () => { const { representablePauseCause, } = useRepresentableAgentPauseCause(pauseCauses); - expect(representablePauseCause.value[0].progressColor).toBe('danger'); + expect(representablePauseCause.value[0].progressColor).toBe('error'); }); it('correctly computes progressColor with duration < limit', () => { diff --git a/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js b/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js index edc8d3aa6..8e9fd41c8 100644 --- a/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +++ b/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js @@ -18,7 +18,7 @@ const duration = ({ durationMin, limitMin }) => { }; const pauseCauseProgressColor = ({ durationMin, limitMin }) => { - if (isDurationOverflow({ durationMin, limitMin })) return 'danger'; + if (isDurationOverflow({ durationMin, limitMin })) return 'error'; if (durationMin <= (limitMin * 0.75)) return 'success'; return 'primary'; };