complexqa_frontend_core 1.5.2 → 1.6.2
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/api/index.js +5 -1
- package/publish/api/team_member_api.js +22 -1
- package/publish/app_configuration/table_configuration.js +98 -0
- package/publish/services/UserService.js +1 -0
- package/publish/types/family_elements/typeTeamMember.js +43 -1
- package/publish/types/family_elements/typeTestRun.js +3 -0
package/package.json
CHANGED
package/publish/api/index.js
CHANGED
|
@@ -5,6 +5,8 @@ import { TestCaseApi } from "./test_case_api";
|
|
|
5
5
|
import { TestSuiteApi } from "./test_suite_api";
|
|
6
6
|
import { TestCaseStepApi } from "./test_case_step_api.js";
|
|
7
7
|
import { TeamManagementApi } from "./team_management_api.js";
|
|
8
|
+
import { TeamMemberApi } from "./team_member_api.js";
|
|
9
|
+
import { TestRunApi } from "./test_run_api.js";
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* Обертка над axios
|
|
@@ -107,12 +109,14 @@ export class Api
|
|
|
107
109
|
|
|
108
110
|
//echo({payload});
|
|
109
111
|
|
|
112
|
+
this.team_management = new TeamManagementApi(payload);
|
|
113
|
+
this.team_member = new TeamMemberApi(payload);
|
|
110
114
|
this.test_plan = new TestPlanApi(payload);
|
|
111
115
|
this.project = new ProjectApi(payload);
|
|
112
116
|
this.service = new ServiceApi(payload);
|
|
113
117
|
this.test_case = new TestCaseApi(payload);
|
|
114
118
|
this.test_case_step = new TestCaseStepApi(payload);
|
|
115
119
|
this.test_suite = new TestSuiteApi(payload);
|
|
116
|
-
this.
|
|
120
|
+
this.test_run = new TestRunApi(payload);
|
|
117
121
|
}
|
|
118
122
|
}
|
|
@@ -4,7 +4,7 @@ import { typeTeamMember } from "../types/family_elements/typeTeamMember";
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
|
-
* @version v.0
|
|
7
|
+
* @version v.1.0 (08/01/2026)
|
|
8
8
|
*/
|
|
9
9
|
export class TeamMemberApi extends ApiAbstractElementClass
|
|
10
10
|
{
|
|
@@ -15,4 +15,25 @@ export class TeamMemberApi extends ApiAbstractElementClass
|
|
|
15
15
|
super(options);
|
|
16
16
|
this.set_element_class_instance(typeTeamMember);
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @version v.1.0 (08/01/2026)
|
|
23
|
+
* @param payload
|
|
24
|
+
* @returns {{payload, response: Promise<*>}}
|
|
25
|
+
*/
|
|
26
|
+
async invite_emails(payload)
|
|
27
|
+
{
|
|
28
|
+
let url = `/${ this.api_prefix }/${ this.module_prefix }/invite_emails`;
|
|
29
|
+
|
|
30
|
+
payload = this.handle_request_payload(payload);
|
|
31
|
+
let response = this.api_request(url, payload);
|
|
32
|
+
response = this.handle_response(response);
|
|
33
|
+
|
|
34
|
+
return {
|
|
35
|
+
response: response,
|
|
36
|
+
payload : payload
|
|
37
|
+
};
|
|
38
|
+
}
|
|
18
39
|
}
|
|
@@ -79,6 +79,7 @@ export class TableConfiguration extends abstractAppConfiguration
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
this.bootstrap_test_case();
|
|
82
|
+
this.bootstrap_team_member();
|
|
82
83
|
|
|
83
84
|
this.state.loaded = true;
|
|
84
85
|
}
|
|
@@ -104,6 +105,103 @@ export class TableConfiguration extends abstractAppConfiguration
|
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @version v.0.1 (08/01/2026)
|
|
111
|
+
*/
|
|
112
|
+
static bootstrap_team_member()
|
|
113
|
+
{
|
|
114
|
+
let payload_listing = {};
|
|
115
|
+
|
|
116
|
+
let columns = this.bootstrap_team_member_listing_columns();
|
|
117
|
+
|
|
118
|
+
payload_listing.config = new typeTableConfiguration({
|
|
119
|
+
columns: columns
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
this.config.team_member = {
|
|
123
|
+
listing: payload_listing
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
* @version v.0.1 (08/01/2026)
|
|
131
|
+
*/
|
|
132
|
+
static bootstrap_team_member_listing_columns()
|
|
133
|
+
{
|
|
134
|
+
let response = [];
|
|
135
|
+
|
|
136
|
+
response.push(new typeTableColumn({
|
|
137
|
+
header_name : 'ID',
|
|
138
|
+
field : 'team_member_id',
|
|
139
|
+
width : '120',
|
|
140
|
+
sort_order : '1',
|
|
141
|
+
cell_classes: 'bg-secondary',
|
|
142
|
+
default_sort: 'asc',
|
|
143
|
+
is_sortable : true,
|
|
144
|
+
is_filter : true,
|
|
145
|
+
is_hide : true,
|
|
146
|
+
is_editable : false,
|
|
147
|
+
}));
|
|
148
|
+
|
|
149
|
+
response.push(new typeTableColumn({
|
|
150
|
+
header_name : 'User',
|
|
151
|
+
field : 'user_id.first_name',
|
|
152
|
+
width : '360',
|
|
153
|
+
sort_order : '1',
|
|
154
|
+
cell_classes: '',
|
|
155
|
+
default_sort: '',
|
|
156
|
+
is_sortable : true,
|
|
157
|
+
is_filter : true,
|
|
158
|
+
is_hide : false,
|
|
159
|
+
is_editable : true,
|
|
160
|
+
}));
|
|
161
|
+
|
|
162
|
+
response.push(new typeTableColumn({
|
|
163
|
+
header_name : 'Email',
|
|
164
|
+
field : 'user_id.email',
|
|
165
|
+
width : '240',
|
|
166
|
+
sort_order : '1',
|
|
167
|
+
cell_classes: '',
|
|
168
|
+
default_sort: '',
|
|
169
|
+
is_sortable : true,
|
|
170
|
+
is_filter : true,
|
|
171
|
+
is_hide : false,
|
|
172
|
+
is_editable : true,
|
|
173
|
+
}));
|
|
174
|
+
|
|
175
|
+
response.push(new typeTableColumn({
|
|
176
|
+
header_name : 'Status',
|
|
177
|
+
field : 'team_member_status',
|
|
178
|
+
width : '120',
|
|
179
|
+
sort_order : '2',
|
|
180
|
+
cell_classes: '',
|
|
181
|
+
default_sort: '',
|
|
182
|
+
is_sortable : true,
|
|
183
|
+
is_filter : true,
|
|
184
|
+
is_hide : false,
|
|
185
|
+
is_editable : true,
|
|
186
|
+
}));
|
|
187
|
+
|
|
188
|
+
response.push(new typeTableColumn({
|
|
189
|
+
header_name : 'Role',
|
|
190
|
+
field : 'member_role',
|
|
191
|
+
width : '120',
|
|
192
|
+
sort_order : '2',
|
|
193
|
+
cell_classes: '',
|
|
194
|
+
default_sort: '',
|
|
195
|
+
is_sortable : true,
|
|
196
|
+
is_filter : true,
|
|
197
|
+
is_hide : false,
|
|
198
|
+
is_editable : true,
|
|
199
|
+
}));
|
|
200
|
+
|
|
201
|
+
return response;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
|
|
107
205
|
/**
|
|
108
206
|
*
|
|
109
207
|
* @version v.0.1 (17/08/2025)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { familyGeneralElement } from "./0_familyGeneralElement";
|
|
2
|
-
import { is_object } from "../../utils/utils";
|
|
2
|
+
import { echo, is_object } from "../../utils/utils";
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -17,6 +17,7 @@ export class typeTeamMember extends familyGeneralElement
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
primary_key = 'team_member_id';
|
|
20
|
+
api_key = 'team_member';
|
|
20
21
|
|
|
21
22
|
structure_scheme = {
|
|
22
23
|
team_member_id : 'integer | require',
|
|
@@ -55,4 +56,45 @@ export class typeTeamMember extends familyGeneralElement
|
|
|
55
56
|
|
|
56
57
|
return this;
|
|
57
58
|
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @version v.1.0 (08/01/2026)
|
|
64
|
+
*
|
|
65
|
+
* @param {array} emails
|
|
66
|
+
* @param {object} callback
|
|
67
|
+
*/
|
|
68
|
+
invite_emails(emails, callback)
|
|
69
|
+
{
|
|
70
|
+
let payload = {
|
|
71
|
+
emails: emails
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (typeof callback?.before === 'function')
|
|
75
|
+
{
|
|
76
|
+
callback?.before({ payload });
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return ApiService[this.api_key].invite_emails(payload).then((response) =>
|
|
80
|
+
{
|
|
81
|
+
if (typeof callback?.success === 'function')
|
|
82
|
+
{
|
|
83
|
+
callback?.success({ response, payload })
|
|
84
|
+
}
|
|
85
|
+
}).catch((error) =>
|
|
86
|
+
{
|
|
87
|
+
echo({ error });
|
|
88
|
+
if (typeof callback?.error === 'function')
|
|
89
|
+
{
|
|
90
|
+
callback?.error({ error, payload })
|
|
91
|
+
}
|
|
92
|
+
}).finally((response) =>
|
|
93
|
+
{
|
|
94
|
+
if (typeof callback?.final === 'function')
|
|
95
|
+
{
|
|
96
|
+
callback?.final({ response, payload })
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
58
100
|
}
|
|
@@ -13,6 +13,8 @@ export class typeTestRun extends familyTestDocumentation
|
|
|
13
13
|
{
|
|
14
14
|
test_run_id;
|
|
15
15
|
test_run_name;
|
|
16
|
+
project_id;
|
|
17
|
+
team_id;
|
|
16
18
|
test_run_description;
|
|
17
19
|
milestone_id; /// ??
|
|
18
20
|
assigned_to; // кому назначили выполнение, пока в той же таблице, только 1 член команды
|
|
@@ -28,6 +30,7 @@ export class typeTestRun extends familyTestDocumentation
|
|
|
28
30
|
|
|
29
31
|
// логи запуска, окончания - отдельно
|
|
30
32
|
primary_key = 'test_run_id';
|
|
33
|
+
api_key = 'test_run';
|
|
31
34
|
|
|
32
35
|
available_enum_values = {
|
|
33
36
|
test_run_status: [ 'PENDING', 'IN_PROGRESS', 'COMPLETED', 'CLOSED' ],
|