@webitel/ui-sdk 25.12.76 → 25.12.78

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "25.12.76",
3
+ "version": "25.12.78",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run lint:fix || true) && npm run publish-lib",
@@ -51,7 +51,6 @@
51
51
  </template>
52
52
 
53
53
  <script lang="ts" setup>
54
- import cloneDeep from 'lodash/cloneDeep';
55
54
  import { computed } from 'vue';
56
55
  import { useI18n } from 'vue-i18n';
57
56
  import { EngineAuditQuestionType, EngineQuestion } from 'webitel-sdk';
@@ -111,13 +110,18 @@ function updateQuestion({ path, value }) {
111
110
  }
112
111
 
113
112
  function handleQuestionTypeChange(type) {
114
- const question = cloneDeep(questionModel.value);
113
+ const commonFields = {
114
+ question: questionModel.value.question,
115
+ required: questionModel.value.required,
116
+ description: questionModel.value.description,
117
+ criticalViolation: questionModel.value.criticalViolation,
118
+ };
119
+
115
120
  if (type === EngineAuditQuestionType.Option) {
116
- Object.assign(question, generateQuestionOptionsSchema());
121
+ questionModel.value = { ...commonFields, ...generateQuestionOptionsSchema() };
117
122
  } else if (type === EngineAuditQuestionType.Score) {
118
- Object.assign(question, generateQuestionScoreSchema());
123
+ questionModel.value = { ...commonFields, ...generateQuestionScoreSchema() };
119
124
  }
120
- questionModel.value = question;
121
125
  }
122
126
  </script>
123
127
 
@@ -12,12 +12,16 @@ export const createSettingsStore = ({ namespace = 'userinfo' } = {}) => {
12
12
  const storedTimezone = localStorage.getItem(TIMEZONE_STORAGE_KEY);
13
13
  if (storedTimezone) {
14
14
  timezone.value = storedTimezone;
15
- } else {
16
- try {
17
- const { timezone: userTimezone } = await UserSettingsAPI.getUserTimezone();
15
+ }
16
+
17
+ try {
18
+ const { timezone: userTimezone } = await UserSettingsAPI.getUserTimezone();
19
+ if (userTimezone && userTimezone !== timezone.value) {
18
20
  timezone.value = userTimezone;
19
21
  localStorage.setItem(TIMEZONE_STORAGE_KEY, userTimezone);
20
- } catch {
22
+ }
23
+ } catch {
24
+ if (!timezone.value) {
21
25
  const systemTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
22
26
  timezone.value = systemTimezone;
23
27
  localStorage.setItem(TIMEZONE_STORAGE_KEY, systemTimezone);