complexqa_frontend_core 1.17.10 → 1.17.12
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 +1 -1
- package/publish/app_configuration/table/helpers/column_factory.js +1 -0
- package/publish/app_configuration/table/helpers/column_locale.js +66 -0
- package/publish/app_configuration/table/helpers/table_element_models.js +26 -0
- package/publish/app_configuration/table/sections/bug.js +21 -1
- package/publish/app_configuration/table/sections/team_member.js +7 -11
- package/publish/app_configuration/table/sections/test_case.js +16 -5
- package/publish/app_configuration/table/sections/test_case_step.js +22 -4
- package/publish/app_configuration/table/sections/test_run.js +26 -1
- package/publish/app_configuration/table/sections/test_run_result.js +28 -8
- package/publish/app_configuration/table/table_base_config.js +2 -24
- package/publish/app_configuration/table/table_configuration.js +7 -5
- package/publish/types/family_service/typeTableColumn.js +5 -0
package/package.json
CHANGED
|
@@ -30,6 +30,7 @@ export function createColumn(model, locale, field, overrides = {})
|
|
|
30
30
|
|
|
31
31
|
return new typeTableColumn({
|
|
32
32
|
...COLUMN_DEFAULTS,
|
|
33
|
+
header_field,
|
|
33
34
|
header_name: overrides.header_name ?? header_model.get_attribute_name_translate(header_field, locale),
|
|
34
35
|
field,
|
|
35
36
|
...overrides,
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { typeTableColumn } from '../../../types/family_service/typeTableColumn.js';
|
|
2
|
+
import { typeTableConfiguration } from '../../../types/family_service/typeTableConfiguration.js';
|
|
3
|
+
import { TABLE_ELEMENT_MODELS } from './table_element_models.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @param {typeTableColumn} column
|
|
7
|
+
* @param {string} element_type
|
|
8
|
+
* @param {string} lang
|
|
9
|
+
* @returns {typeTableColumn}
|
|
10
|
+
*/
|
|
11
|
+
export function localizeTableColumn(column, element_type, lang)
|
|
12
|
+
{
|
|
13
|
+
if (column.column_kind !== 'data' || !column.header_field)
|
|
14
|
+
{
|
|
15
|
+
return column;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const model_key = column.header_element_type || element_type;
|
|
19
|
+
const ModelClass = TABLE_ELEMENT_MODELS[ model_key ];
|
|
20
|
+
|
|
21
|
+
if (!ModelClass)
|
|
22
|
+
{
|
|
23
|
+
return column;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const model = new ModelClass();
|
|
27
|
+
const header_name = model.get_attribute_name_translate(column.header_field, lang);
|
|
28
|
+
|
|
29
|
+
return new typeTableColumn({
|
|
30
|
+
header_name : header_name,
|
|
31
|
+
field : column.field,
|
|
32
|
+
width : column.width,
|
|
33
|
+
sort_order : column.sort_order,
|
|
34
|
+
cell_classes : column.cell_classes,
|
|
35
|
+
default_sort : column.default_sort,
|
|
36
|
+
is_sortable : column.is_sortable,
|
|
37
|
+
is_filter : column.is_filter,
|
|
38
|
+
is_hide : column.is_hide,
|
|
39
|
+
is_editable : column.is_editable,
|
|
40
|
+
column_kind : column.column_kind,
|
|
41
|
+
is_required : column.is_required,
|
|
42
|
+
is_title : column.is_title,
|
|
43
|
+
header_element_type : column.header_element_type,
|
|
44
|
+
header_field : column.header_field,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @param {{ config: typeTableConfiguration }} section
|
|
51
|
+
* @param {string} element_type
|
|
52
|
+
* @param {string} lang
|
|
53
|
+
*/
|
|
54
|
+
export function localizeTableSection(section, element_type, lang)
|
|
55
|
+
{
|
|
56
|
+
const config = section.config;
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
config: new typeTableConfiguration({
|
|
60
|
+
columns : config.columns.map((column) => localizeTableColumn(column, element_type, lang)),
|
|
61
|
+
for : config.for,
|
|
62
|
+
contained_element_type : config.contained_element_type,
|
|
63
|
+
documentation : config.documentation,
|
|
64
|
+
}),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { typeTestCase } from '../../../types/family_elements/typeTestCase.js';
|
|
2
|
+
import { typeProject } from '../../../types/family_elements/typeProject.js';
|
|
3
|
+
import { typeTestRun } from '../../../types/family_elements/typeTestRun.js';
|
|
4
|
+
import { typeBug } from '../../../types/family_elements/typeBug.js';
|
|
5
|
+
import { typeTestRunResult } from '../../../types/family_elements/typeTestRunResult.js';
|
|
6
|
+
import { typeTestAccount } from '../../../types/family_elements/typeTestAccount.js';
|
|
7
|
+
import { typeTeamMember } from '../../../types/family_elements/typeTeamMember.js';
|
|
8
|
+
import { typeTestCaseStep } from '../../../types/family_elements/typeTestCaseStep.js';
|
|
9
|
+
import { typeUser } from '../../../types/family_elements/typeUser.js';
|
|
10
|
+
import { typeTeam } from '../../../types/family_elements/typeTeam.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Модели сущностей для таблиц (row id, перевод заголовков колонок).
|
|
14
|
+
*/
|
|
15
|
+
export const TABLE_ELEMENT_MODELS = {
|
|
16
|
+
test_case : typeTestCase,
|
|
17
|
+
project : typeProject,
|
|
18
|
+
test_run : typeTestRun,
|
|
19
|
+
bug : typeBug,
|
|
20
|
+
test_run_result: typeTestRunResult,
|
|
21
|
+
test_account : typeTestAccount,
|
|
22
|
+
team_member : typeTeamMember,
|
|
23
|
+
test_case_step : typeTestCaseStep,
|
|
24
|
+
user : typeUser,
|
|
25
|
+
team : typeTeam,
|
|
26
|
+
};
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
createRowSelectColumn
|
|
8
8
|
} from '../helpers/column_factory.js';
|
|
9
9
|
import { createListingFor, registerSection } from '../helpers/section_registry.js';
|
|
10
|
+
import { typeTableColumn } from '../../../types/family_service/typeTableColumn.js';
|
|
10
11
|
|
|
11
12
|
function build_bug_listing_columns(locale, { include_select = true } = {})
|
|
12
13
|
{
|
|
@@ -38,6 +39,25 @@ function build_bug_listing_columns(locale, { include_select = true } = {})
|
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
|
|
42
|
+
function build_bug_todo_columns(locale)
|
|
43
|
+
{
|
|
44
|
+
const columns = build_bug_listing_columns(locale, { include_select: false });
|
|
45
|
+
|
|
46
|
+
return columns.map((column) =>
|
|
47
|
+
{
|
|
48
|
+
if (column.field === 'completed_at')
|
|
49
|
+
{
|
|
50
|
+
return new typeTableColumn({
|
|
51
|
+
...column,
|
|
52
|
+
is_hide: false,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return column;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
41
61
|
function build_bug_details_columns(locale)
|
|
42
62
|
{
|
|
43
63
|
const model = new typeBug();
|
|
@@ -73,7 +93,7 @@ export function bootstrap_bug(config)
|
|
|
73
93
|
for: createListingFor([ 'project_id' ]),
|
|
74
94
|
});
|
|
75
95
|
|
|
76
|
-
registerSection(config, 'bug', 'todo',
|
|
96
|
+
registerSection(config, 'bug', 'todo', build_bug_todo_columns(locale), {
|
|
77
97
|
contained_element_type: 'project',
|
|
78
98
|
});
|
|
79
99
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { typeTeamMember } from '../../../types/family_elements/typeTeamMember.js';
|
|
2
|
-
import { typeUser } from '../../../types/family_elements/typeUser.js';
|
|
3
2
|
import { UserService } from '../../../services/UserService.js';
|
|
4
3
|
import { createColumn } from '../helpers/column_factory.js';
|
|
5
4
|
import { createListingFor, registerSection } from '../helpers/section_registry.js';
|
|
@@ -7,29 +6,26 @@ import { createListingFor, registerSection } from '../helpers/section_registry.j
|
|
|
7
6
|
function build_team_member_listing_columns(locale)
|
|
8
7
|
{
|
|
9
8
|
const model = new typeTeamMember();
|
|
10
|
-
const user_model = new typeUser();
|
|
11
9
|
|
|
12
10
|
return [
|
|
13
11
|
createColumn(model, locale, 'user_id.first_name', {
|
|
14
|
-
|
|
12
|
+
header_field: 'first_name',
|
|
15
13
|
width : '200',
|
|
16
14
|
is_filter : false,
|
|
17
15
|
is_editable : false,
|
|
18
|
-
header_element_type: 'user',
|
|
19
16
|
}),
|
|
20
17
|
createColumn(model, locale, 'user_id.last_name', {
|
|
21
|
-
|
|
18
|
+
header_field: 'last_name',
|
|
22
19
|
width : '200',
|
|
23
20
|
is_filter : false,
|
|
24
21
|
is_editable : false,
|
|
25
|
-
header_element_type: 'user',
|
|
26
22
|
}),
|
|
27
23
|
createColumn(model, locale, 'user_id.email', {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
header_field : 'email',
|
|
25
|
+
header_element_type : 'user',
|
|
26
|
+
width : '200',
|
|
27
|
+
is_filter : false,
|
|
28
|
+
is_editable : false,
|
|
33
29
|
}),
|
|
34
30
|
createColumn(model, locale, 'team_member_status', { width: '160', is_filter: false, is_editable: true }),
|
|
35
31
|
createColumn(model, locale, 'member_role', { width: '200', is_filter: false, is_editable: true }),
|
|
@@ -3,7 +3,7 @@ import { UserService } from '../../../services/UserService.js';
|
|
|
3
3
|
import { createColumn, createGoToColumn, createPrimaryKeyColumn, createRowSelectColumn } from '../helpers/column_factory.js';
|
|
4
4
|
import { createListingFor, registerSection } from '../helpers/section_registry.js';
|
|
5
5
|
|
|
6
|
-
function build_test_case_listing_columns(locale, { include_select = true, include_goto = true } = {})
|
|
6
|
+
function build_test_case_listing_columns(locale, { include_select = true, include_goto = true, include_status = true } = {})
|
|
7
7
|
{
|
|
8
8
|
const model = new typeTestCase();
|
|
9
9
|
const columns = [];
|
|
@@ -24,7 +24,11 @@ function build_test_case_listing_columns(locale, { include_select = true, includ
|
|
|
24
24
|
columns.push(createColumn(model, locale, 'test_case_time_to_execute', { width: '80', is_editable: true, is_required: true }));
|
|
25
25
|
columns.push(createColumn(model, locale, 'test_case_complexity', { width: '80', is_editable: true, is_required: true }));
|
|
26
26
|
columns.push(createColumn(model, locale, 'test_case_importance', { width: '80', is_editable: true, is_required: true }));
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
if (include_status)
|
|
29
|
+
{
|
|
30
|
+
columns.push(createColumn(model, locale, 'test_case_status', { width: '150', is_editable: true, is_required: true }));
|
|
31
|
+
}
|
|
28
32
|
|
|
29
33
|
if (include_goto)
|
|
30
34
|
{
|
|
@@ -35,6 +39,15 @@ function build_test_case_listing_columns(locale, { include_select = true, includ
|
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
|
|
42
|
+
function build_test_case_todo_columns(locale)
|
|
43
|
+
{
|
|
44
|
+
return build_test_case_listing_columns(locale, {
|
|
45
|
+
include_select: false,
|
|
46
|
+
include_status: false,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
38
51
|
export function bootstrap_test_case(config)
|
|
39
52
|
{
|
|
40
53
|
const locale = UserService.get_current_language();
|
|
@@ -43,9 +56,7 @@ export function bootstrap_test_case(config)
|
|
|
43
56
|
for: createListingFor([ 'project_id', 'test_suite_id' ]),
|
|
44
57
|
});
|
|
45
58
|
|
|
46
|
-
registerSection(config, 'test_case', 'todo',
|
|
47
|
-
include_select: false,
|
|
48
|
-
}), {
|
|
59
|
+
registerSection(config, 'test_case', 'todo', build_test_case_todo_columns(locale), {
|
|
49
60
|
contained_element_type: 'project',
|
|
50
61
|
});
|
|
51
62
|
|
|
@@ -4,7 +4,7 @@ import { createColumn } from '../helpers/column_factory.js';
|
|
|
4
4
|
import { createListingFor, registerSection } from '../helpers/section_registry.js';
|
|
5
5
|
import { typeTableColumn } from '../../../types/family_service/typeTableColumn.js';
|
|
6
6
|
|
|
7
|
-
function
|
|
7
|
+
function build_test_case_step_shared_columns(locale)
|
|
8
8
|
{
|
|
9
9
|
const model = new typeTestCaseStep();
|
|
10
10
|
|
|
@@ -17,7 +17,11 @@ function build_test_case_step_columns(locale)
|
|
|
17
17
|
}),
|
|
18
18
|
createColumn(model, locale, 'step_element', { width: '200', is_editable: true }),
|
|
19
19
|
createColumn(model, locale, 'step_element_action', { width: '200', is_editable: true }),
|
|
20
|
-
createColumn(model, locale, 'step_excepted_result', {
|
|
20
|
+
createColumn(model, locale, 'step_excepted_result', {
|
|
21
|
+
width : '480',
|
|
22
|
+
is_editable: true,
|
|
23
|
+
is_title : true,
|
|
24
|
+
}),
|
|
21
25
|
new typeTableColumn({
|
|
22
26
|
header_name : '',
|
|
23
27
|
field : 'test_case_step_id',
|
|
@@ -31,12 +35,26 @@ function build_test_case_step_columns(locale)
|
|
|
31
35
|
];
|
|
32
36
|
}
|
|
33
37
|
|
|
38
|
+
function build_test_case_steps_columns(locale)
|
|
39
|
+
{
|
|
40
|
+
return build_test_case_step_shared_columns(locale);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function build_test_case_presteps_columns(locale)
|
|
44
|
+
{
|
|
45
|
+
return build_test_case_step_shared_columns(locale);
|
|
46
|
+
}
|
|
34
47
|
|
|
35
48
|
export function bootstrap_test_case_step(config)
|
|
36
49
|
{
|
|
37
50
|
const locale = UserService.get_current_language();
|
|
51
|
+
const embedded_for = createListingFor([ 'test_case_id', 'test_case_step_type' ]);
|
|
52
|
+
|
|
53
|
+
registerSection(config, 'test_case_step', 'steps', build_test_case_steps_columns(locale), {
|
|
54
|
+
for: embedded_for,
|
|
55
|
+
});
|
|
38
56
|
|
|
39
|
-
registerSection(config, 'test_case_step', '
|
|
40
|
-
for:
|
|
57
|
+
registerSection(config, 'test_case_step', 'presteps', build_test_case_presteps_columns(locale), {
|
|
58
|
+
for: embedded_for,
|
|
41
59
|
});
|
|
42
60
|
}
|
|
@@ -34,6 +34,31 @@ function build_test_run_listing_columns(locale, { include_select = true } = {})
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
function build_test_run_todo_columns(locale)
|
|
38
|
+
{
|
|
39
|
+
const model = new typeTestRun();
|
|
40
|
+
|
|
41
|
+
return [
|
|
42
|
+
createPrimaryKeyColumn(model, locale, { is_editable: true }),
|
|
43
|
+
createColumn(model, locale, 'test_run_name', {
|
|
44
|
+
width : '480',
|
|
45
|
+
is_editable : true,
|
|
46
|
+
is_required : true,
|
|
47
|
+
is_title : true,
|
|
48
|
+
}),
|
|
49
|
+
createColumn(model, locale, 'test_run_description', {
|
|
50
|
+
width : '480',
|
|
51
|
+
is_editable : false,
|
|
52
|
+
is_required : true,
|
|
53
|
+
is_title : true,
|
|
54
|
+
}),
|
|
55
|
+
createColumn(model, locale, 'test_run_status', { width: '80', is_editable: true, is_required: true }),
|
|
56
|
+
createColumn(model, locale, 'completed_at', { width: '150', is_required: true }),
|
|
57
|
+
createGoToColumn(model, locale),
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
37
62
|
export function bootstrap_test_run(config)
|
|
38
63
|
{
|
|
39
64
|
const locale = UserService.get_current_language();
|
|
@@ -42,7 +67,7 @@ export function bootstrap_test_run(config)
|
|
|
42
67
|
for: createListingFor([ 'project_id' ]),
|
|
43
68
|
});
|
|
44
69
|
|
|
45
|
-
registerSection(config, 'test_run', 'todo',
|
|
70
|
+
registerSection(config, 'test_run', 'todo', build_test_run_todo_columns(locale), {
|
|
46
71
|
contained_element_type: 'project',
|
|
47
72
|
});
|
|
48
73
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { typeTestRunResult } from '../../../types/family_elements/typeTestRunResult.js';
|
|
2
|
-
import { typeTestCase } from '../../../types/family_elements/typeTestCase.js';
|
|
3
2
|
import { UserService } from '../../../services/UserService.js';
|
|
4
|
-
import { createColumn, createGoToColumn, createRowSelectColumn } from '../helpers/column_factory.js';
|
|
3
|
+
import { createColumn, createGoToColumn, createPrimaryKeyColumn, createRowSelectColumn } from '../helpers/column_factory.js';
|
|
5
4
|
import { createListingFor, registerSection } from '../helpers/section_registry.js';
|
|
6
5
|
|
|
7
6
|
function build_test_run_result_listing_columns(locale, { include_select = true } = {})
|
|
8
7
|
{
|
|
9
8
|
const model = new typeTestRunResult();
|
|
10
|
-
const test_case_model = new typeTestCase();
|
|
11
9
|
const columns = [];
|
|
12
10
|
|
|
13
11
|
if (include_select)
|
|
@@ -16,10 +14,11 @@ function build_test_run_result_listing_columns(locale, { include_select = true }
|
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
columns.push(createColumn(model, locale, 'test_case_id.test_case_title', {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
header_field : 'test_case_title',
|
|
18
|
+
header_element_type : 'test_case',
|
|
19
|
+
width : '480',
|
|
20
|
+
is_editable : false,
|
|
21
|
+
is_required : true,
|
|
23
22
|
}));
|
|
24
23
|
columns.push(createColumn(model, locale, 'assigned_to', { width: '220', is_editable: true, is_required: true }));
|
|
25
24
|
columns.push(createColumn(model, locale, 'created_at', { width: '170', is_required: true }));
|
|
@@ -32,6 +31,27 @@ function build_test_run_result_listing_columns(locale, { include_select = true }
|
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
|
|
34
|
+
function build_test_run_result_todo_columns(locale)
|
|
35
|
+
{
|
|
36
|
+
const model = new typeTestRunResult();
|
|
37
|
+
return [
|
|
38
|
+
createPrimaryKeyColumn(model, locale),
|
|
39
|
+
createColumn(model, locale, 'test_case_id.test_case_title', {
|
|
40
|
+
header_field : 'test_case_title',
|
|
41
|
+
header_element_type : 'test_case',
|
|
42
|
+
width : '480',
|
|
43
|
+
is_editable : false,
|
|
44
|
+
is_required : true,
|
|
45
|
+
is_title : true,
|
|
46
|
+
}),
|
|
47
|
+
createColumn(model, locale, 'assigned_to', { width: '220', is_editable: true, is_required: true }),
|
|
48
|
+
createColumn(model, locale, 'test_result_status', { width: '150', is_editable: true, is_required: true }),
|
|
49
|
+
createColumn(model, locale, 'completed_at', { width: '150', is_required: true }),
|
|
50
|
+
createGoToColumn(model, locale),
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
35
55
|
function build_test_run_result_details_columns(locale)
|
|
36
56
|
{
|
|
37
57
|
const model = new typeTestRunResult();
|
|
@@ -62,7 +82,7 @@ export function bootstrap_test_run_result(config)
|
|
|
62
82
|
for: createListingFor([ 'project_id', 'test_case_id', 'test_run_id' ]),
|
|
63
83
|
});
|
|
64
84
|
|
|
65
|
-
registerSection(config, 'test_run_result', 'todo',
|
|
85
|
+
registerSection(config, 'test_run_result', 'todo', build_test_run_result_todo_columns(locale), {
|
|
66
86
|
contained_element_type: 'project',
|
|
67
87
|
});
|
|
68
88
|
|
|
@@ -1,28 +1,6 @@
|
|
|
1
1
|
import { LOCALE_AG_GRID_RU } from '../locale_table_ru.js';
|
|
2
2
|
import { LOCALE_AG_GRID_EG } from '../table_locale_ar.js';
|
|
3
|
-
import {
|
|
4
|
-
import { typeProject } from '../../types/family_elements/typeProject.js';
|
|
5
|
-
import { typeTestRun } from '../../types/family_elements/typeTestRun.js';
|
|
6
|
-
import { typeBug } from '../../types/family_elements/typeBug.js';
|
|
7
|
-
import { typeTestRunResult } from '../../types/family_elements/typeTestRunResult.js';
|
|
8
|
-
import { typeTestAccount } from '../../types/family_elements/typeTestAccount.js';
|
|
9
|
-
import { typeTeamMember } from '../../types/family_elements/typeTeamMember.js';
|
|
10
|
-
import { typeTestCaseStep } from '../../types/family_elements/typeTestCaseStep.js';
|
|
11
|
-
import { typeUser } from '../../types/family_elements/typeUser.js';
|
|
12
|
-
import { typeTeam } from '../../types/family_elements/typeTeam.js';
|
|
13
|
-
|
|
14
|
-
const ROW_NODE_MODELS = {
|
|
15
|
-
test_case : typeTestCase,
|
|
16
|
-
project : typeProject,
|
|
17
|
-
test_run : typeTestRun,
|
|
18
|
-
bug : typeBug,
|
|
19
|
-
test_run_result: typeTestRunResult,
|
|
20
|
-
test_account : typeTestAccount,
|
|
21
|
-
team_member : typeTeamMember,
|
|
22
|
-
test_case_step : typeTestCaseStep,
|
|
23
|
-
user : typeUser,
|
|
24
|
-
team : typeTeam,
|
|
25
|
-
};
|
|
3
|
+
import { TABLE_ELEMENT_MODELS } from './helpers/table_element_models.js';
|
|
26
4
|
|
|
27
5
|
/**
|
|
28
6
|
* Базовые опции ag-grid, общие для всех таблиц.
|
|
@@ -84,7 +62,7 @@ export class TableBaseConfig
|
|
|
84
62
|
return function (data)
|
|
85
63
|
{
|
|
86
64
|
let id = 0;
|
|
87
|
-
const ModelClass =
|
|
65
|
+
const ModelClass = TABLE_ELEMENT_MODELS[ element_type ];
|
|
88
66
|
|
|
89
67
|
if (ModelClass)
|
|
90
68
|
{
|
|
@@ -9,6 +9,7 @@ import { bootstrap_team_member } from './sections/team_member.js';
|
|
|
9
9
|
import { bootstrap_user } from './sections/user.js';
|
|
10
10
|
import { bootstrap_team } from './sections/team.js';
|
|
11
11
|
import { bootstrap_project } from './sections/project.js';
|
|
12
|
+
import { localizeTableSection } from './helpers/column_locale.js';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Реестр конфигураций таблиц (ag-grid).
|
|
@@ -47,21 +48,22 @@ export class TableConfiguration extends abstractAppConfiguration
|
|
|
47
48
|
* @param {string} section
|
|
48
49
|
* @param {string} lang
|
|
49
50
|
*
|
|
50
|
-
* @todo - header_name модифицируем под локаль
|
|
51
51
|
*/
|
|
52
|
-
static get_config(element_type, section, lang)
|
|
52
|
+
static get_config(element_type, section, lang = 'en')
|
|
53
53
|
{
|
|
54
54
|
if (!this.state.loaded)
|
|
55
55
|
{
|
|
56
56
|
this.bootstrap();
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
const section_config = this.config?.[ element_type ]?.[ section ];
|
|
60
|
+
|
|
61
|
+
if (!section_config)
|
|
60
62
|
{
|
|
61
|
-
return
|
|
63
|
+
return false;
|
|
62
64
|
}
|
|
63
65
|
|
|
64
|
-
return
|
|
66
|
+
return localizeTableSection(section_config, element_type, lang || 'en');
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
|