complexqa_frontend_core 1.12.2 → 1.13.1

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": "complexqa_frontend_core",
3
- "version": "1.12.2",
3
+ "version": "1.13.1",
4
4
  "description": "core of web ",
5
5
  "type": "module",
6
6
  "exports": {
package/publish/index.js CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  export { Api } from "./api/index.js";
3
2
  export { UserService } from './services/UserService.js';
4
3
  export { TeamService } from './services/TeamService.js';
@@ -19,7 +18,7 @@ export { typeTestAccount } from './types/family_elements/typeTestAccount.js'
19
18
  export { typeUser } from './types/family_elements/typeUser.js';
20
19
  export { typeTeam } from './types/family_elements/typeTeam.js';
21
20
  export { typeTeamMember } from './types/family_elements/typeTeamMember.js';
22
- export {typeTeamTotalStatistic} from './types/family_contracts/typeTeamTotalStatistic.js';
21
+ export { typeTeamTotalStatistic } from './types/family_contracts/typeTeamTotalStatistic.js';
23
22
 
24
23
  export { typeTask } from './types/family_elements/typeTask.js';
25
24
 
@@ -17,6 +17,8 @@ export class familyGeneralElement
17
17
  ru:{}
18
18
  }
19
19
 
20
+ enum_value_translate_matrix = false;
21
+
20
22
 
21
23
  /***********************************************/
22
24
  /***********************************************/
@@ -218,7 +220,7 @@ export class familyGeneralElement
218
220
  */
219
221
  get_attribute_name_translate(attribute_name, lang)
220
222
  {
221
- let response = attribute_name
223
+ let response = attribute_name;
222
224
 
223
225
  if (!lang)
224
226
  {
@@ -233,6 +235,29 @@ export class familyGeneralElement
233
235
  return response;
234
236
  }
235
237
 
238
+
239
+ /**
240
+ *
241
+ * @version v.1.0 (05/04/2026)
242
+ * @returns {*}
243
+ */
244
+ get_enum_value_translate(attribute, value, lang)
245
+ {
246
+ let response = value;
247
+
248
+ if (!lang)
249
+ {
250
+ lang = 'en';
251
+ }
252
+
253
+ if (this.enum_value_translate_matrix?.[attribute]?.[lang]?.[value])
254
+ {
255
+ response = this.enum_value_translate_matrix?.[attribute]?.[lang]?.[value];
256
+ }
257
+
258
+ return response;
259
+ }
260
+
236
261
  /***********************************************/
237
262
 
238
263
  /**
@@ -37,6 +37,19 @@ export class typeProject extends familyGeneralElement
37
37
  project_status: [ 'OPEN', 'CLOSED' ]
38
38
  };
39
39
 
40
+ enum_value_translate_matrix = {
41
+ project_status: {
42
+ en: {
43
+ OPEN:'Open',
44
+ CLOSED:'Closed',
45
+ },
46
+ ru: {
47
+ OPEN:'Открыт',
48
+ CLOSED:'Закрыт',
49
+ },
50
+ }
51
+ };
52
+
40
53
  status_color = {
41
54
  OPEN : '#3AADA0',
42
55
  CLOSED : '#9E9E9E',
@@ -44,6 +57,24 @@ export class typeProject extends familyGeneralElement
44
57
  };
45
58
 
46
59
 
60
+ attribute_name_translate_matrix = {
61
+ en: {
62
+ project_id : 'Project ID',
63
+ project_name : 'Project name',
64
+ project_description: 'Description',
65
+ project_status : 'Status',
66
+ team_id : 'team_id',
67
+ },
68
+ ru: {
69
+ project_id : 'Проект ID',
70
+ project_name : 'Название',
71
+ project_description: 'Описание',
72
+ project_status : 'Статус',
73
+ team_id : 'team_id',
74
+ },
75
+ };
76
+
77
+
47
78
  /**
48
79
  *
49
80
  * @param {object|false|undefined} data
@@ -45,6 +45,9 @@ export class typeTeam extends familyGeneralElement
45
45
  };
46
46
 
47
47
 
48
+
49
+
50
+
48
51
  /**
49
52
  *
50
53
  * @param {object|false|undefined} data
@@ -30,6 +30,27 @@ export class typeTestAccount extends familyGeneralElement
30
30
  test_account_description: 'string | optional',
31
31
  };
32
32
 
33
+ attribute_name_translate_matrix = {
34
+ en: {
35
+ test_account_id : 'ID',
36
+ project_id : 'Project',
37
+ team_id : 'Team',
38
+ resource : 'Resource',
39
+ login : 'Login',
40
+ password : 'Password',
41
+ test_account_description: 'Description',
42
+ },
43
+ ru: {
44
+ test_account_id : 'ID',
45
+ project_id : 'Проект',
46
+ team_id : 'Команда',
47
+ resource : 'Ресурс',
48
+ login : 'Логин',
49
+ password : 'Пароль',
50
+ test_account_description: 'Описание',
51
+ },
52
+ };
53
+
33
54
 
34
55
  /**
35
56
  *
@@ -12,6 +12,7 @@ export class typeTestCase extends familyTestDocumentation
12
12
  test_suite_id; // foreign key
13
13
  project_id; // foreign key
14
14
  team_id; // foreign key // secure - access
15
+ assigned_to;
15
16
  functional_id; // foreign key
16
17
  test_case_title; // text 90
17
18
  test_case_preconditions; // text (взято у рельсов)
@@ -39,6 +40,7 @@ export class typeTestCase extends familyTestDocumentation
39
40
  test_suite_id : 'integer | optional',
40
41
  project_id : 'integer | require',
41
42
  team_id : 'integer | require',
43
+ assigned_to : 'integer | optional',
42
44
  functional_id : 'integer | optional',
43
45
  test_case_title : 'string | optional',
44
46
  test_case_descriptions : 'string | optional',
@@ -58,33 +60,62 @@ export class typeTestCase extends familyTestDocumentation
58
60
  test_case_importance: [ 'LOW', 'NORMAL', 'HIGH' ],
59
61
  };
60
62
 
63
+ enum_value_translate_matrix = {
64
+ test_case_complexity: {
65
+ en: {
66
+ LOW : 'Low',
67
+ NORMAL: 'Normal',
68
+ HIGH : 'High',
69
+ },
70
+ ru: {
71
+ LOW : 'Низкая',
72
+ NORMAL: 'Нормальная',
73
+ HIGH : 'Высокая',
74
+ },
75
+ },
76
+ test_case_importance: {
77
+ en: {
78
+ LOW : 'Low',
79
+ NORMAL: 'Normal',
80
+ HIGH : 'High',
81
+ },
82
+ ru: {
83
+ LOW : 'Низкая',
84
+ NORMAL: 'Нормальная',
85
+ HIGH : 'Высокая',
86
+ },
87
+ },
88
+ };
89
+
61
90
 
62
91
  attribute_name_translate_matrix = {
63
92
  en: {
64
- test_case_id : 'id',
65
- test_suite_id : 'suite',
66
- project_id : 'project',
67
- team_id : 'team',
68
- test_case_title : 'title',
69
- test_case_descriptions : 'descriptions',
70
- test_case_time_to_execute: 'time to execute',
71
- test_case_complexity : 'complexity',
72
- test_case_importance : 'importance',
73
- created_at : 'created at',
74
- updated_at : 'updated at',
93
+ test_case_id : 'ID',
94
+ test_suite_id : 'Suite',
95
+ project_id : 'Project',
96
+ team_id : 'Team',
97
+ assigned_to : 'Assigned to',
98
+ test_case_title : 'Title',
99
+ test_case_descriptions : 'Descriptions',
100
+ test_case_time_to_execute: 'Time to execute',
101
+ test_case_complexity : 'Complexity',
102
+ test_case_importance : 'Importance',
103
+ created_at : 'Created at',
104
+ updated_at : 'Updated at',
75
105
  },
76
106
  ru: {
77
- test_case_id : 'id',
78
- test_suite_id : 'набор',
79
- project_id : 'проект',
80
- team_id : 'команда',
81
- test_case_title : 'название',
82
- test_case_descriptions : 'описание',
83
- test_case_time_to_execute: 'время выполнения',
84
- test_case_complexity : 'сложность',
85
- test_case_importance : 'важность',
86
- created_at : 'создано',
87
- updated_at : 'обновлено',
107
+ test_case_id : 'ID',
108
+ test_suite_id : 'Набор',
109
+ project_id : 'Проект',
110
+ team_id : 'Команда',
111
+ assigned_to : 'Назначен',
112
+ test_case_title : 'Название',
113
+ test_case_descriptions : 'Описание',
114
+ test_case_time_to_execute: 'Время выполнения',
115
+ test_case_complexity : 'Сложность',
116
+ test_case_importance : 'Важность',
117
+ created_at : 'Создано',
118
+ updated_at : 'Обновлено',
88
119
  },
89
120
  };
90
121
 
@@ -4,7 +4,7 @@ import { familyTestDocumentation } from "./1_familyTestDocumentation.js";
4
4
 
5
5
  /**
6
6
  *
7
- * @version v.1.1 (26/05/2024)
7
+ * @version v.1.2 (05/01/2026)
8
8
  */
9
9
  export class typeTestCaseStep extends familyTestDocumentation
10
10
  {
@@ -41,31 +41,45 @@ export class typeTestCaseStep extends familyTestDocumentation
41
41
  test_case_step_type: [ 'TEST_CASE_STEP', 'TEST_CASE_PRESTEP' ],
42
42
  };
43
43
 
44
+ enum_value_translate_matrix = {
45
+ test_case_step_type: {
46
+ en: {
47
+ TEST_CASE_STEP : 'Step',
48
+ TEST_CASE_PRESTEP: 'Prestep',
49
+ },
50
+ ru: {
51
+ TEST_CASE_STEP : 'Шаг теста',
52
+ TEST_CASE_PRESTEP: 'Предварительный шаг',
53
+ },
54
+ },
55
+ };
56
+
44
57
  attribute_name_translate_matrix = {
45
58
  en: {
46
- test_case_step_id : 'id',
47
- test_case_step_type : 'step type',
48
- team_id : 'team',
49
- test_case_id : 'test case',
50
- sort_order : 'sort order',
51
- step_text : 'text',
52
- step_element : 'element',
53
- step_element_action : 'element action',
54
- step_excepted_result: 'excepted result',
59
+ test_case_step_id : 'ID',
60
+ test_case_step_type : 'Step type',
61
+ team_id : 'Team',
62
+ test_case_id : 'Test case',
63
+ sort_order : 'Sort order',
64
+ step_text : 'Text',
65
+ step_element : 'Element',
66
+ step_element_action : 'Element action',
67
+ step_excepted_result: 'Excepted result',
55
68
  },
56
69
  ru: {
57
- test_case_step_id : 'id',
58
- test_case_step_type : 'тип',
59
- team_id : 'команда',
60
- test_case_id : 'тест кейс',
61
- sort_order : 'порядковый номер',
62
- step_text : 'текст',
63
- step_element : 'элемент',
64
- step_element_action : 'действие',
65
- step_excepted_result: 'ожидаемый результат',
70
+ test_case_step_id : 'ID',
71
+ test_case_step_type : 'Тип',
72
+ team_id : 'Команда',
73
+ test_case_id : 'Тест кейс',
74
+ sort_order : 'Порядковый номер',
75
+ step_text : 'Текст',
76
+ step_element : 'Элемент',
77
+ step_element_action : 'Действие',
78
+ step_excepted_result: 'Ожидаемый результат',
66
79
  },
67
80
  };
68
81
 
82
+
69
83
  /******************************************************************************************/
70
84
  /******************************************************************************************/
71
85
  /******************************************************************************************/
@@ -94,11 +108,10 @@ export class typeTestCaseStep extends familyTestDocumentation
94
108
  }
95
109
 
96
110
 
97
-
98
- /******************************************************************************************/
99
111
  /******************************************************************************************/
100
112
  /******************************************************************************************/
101
113
 
114
+ /******************************************************************************************/
102
115
 
103
116
 
104
117
  /**
@@ -114,6 +127,7 @@ export class typeTestCaseStep extends familyTestDocumentation
114
127
 
115
128
  /******************************************************************************************/
116
129
  /******************************************************************************************/
130
+
117
131
  /******************************************************************************************/
118
132
 
119
133
  /**
@@ -54,6 +54,61 @@ export class typeTestRun extends familyTestDocumentation
54
54
  test_run_status: [ 'PENDING', 'IN_PROGRESS', 'COMPLETED', 'CLOSED' ],
55
55
  };
56
56
 
57
+
58
+ enum_value_translate_matrix = {
59
+ test_run_status: {
60
+ en: {
61
+ PENDING : 'Pending',
62
+ IN_PROGRESS: 'In progress',
63
+ COMPLETED : 'Completed',
64
+ CLOSED : 'Closed',
65
+ },
66
+ ru: {
67
+ PENDING : 'Ожидает',
68
+ IN_PROGRESS: 'В работе',
69
+ COMPLETED : 'Завершен',
70
+ CLOSED : 'Закрыт',
71
+ },
72
+ },
73
+ };
74
+
75
+
76
+ attribute_name_translate_matrix = {
77
+ en: {
78
+ test_run_id : 'ID',
79
+ test_run_name : 'Name',
80
+ project_id : 'Project',
81
+ team_id : 'Team',
82
+ test_run_description: 'Description',
83
+ assigned_to : 'Assigned to',
84
+ test_case_ids : 'Test cases',
85
+ test_run_status : 'Status',
86
+ created_at : 'created at',
87
+ updated_at : 'updated at',
88
+ completed_at : 'completed at',
89
+ },
90
+ ru: {
91
+ test_run_id : 'ID',
92
+ test_run_name : 'Название',
93
+ project_id : 'Проект',
94
+ team_id : 'Команда',
95
+ test_run_description: 'Описание',
96
+ assigned_to : 'Назначен',
97
+ test_case_ids : 'Тест кейсы',
98
+ test_run_status : 'Статус',
99
+ created_at : 'Создано',
100
+ updated_at : 'Изменено',
101
+ completed_at : 'Завершено',
102
+ },
103
+ };
104
+
105
+
106
+
107
+
108
+ /******************************************************************************************/
109
+ /******************************************************************************************/
110
+ /******************************************************************************************/
111
+
57
112
  /**
58
113
  *
59
114
  * @param {object|false|undefined} data