complexqa_frontend_core 1.5.2 → 1.6.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
package/publish/api/index.js
CHANGED
|
@@ -5,6 +5,7 @@ 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";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Обертка над axios
|
|
@@ -114,5 +115,6 @@ export class Api
|
|
|
114
115
|
this.test_case_step = new TestCaseStepApi(payload);
|
|
115
116
|
this.test_suite = new TestSuiteApi(payload);
|
|
116
117
|
this.team_management = new TeamManagementApi(payload);
|
|
118
|
+
this.team_member = new TeamMemberApi(payload);
|
|
117
119
|
}
|
|
118
120
|
}
|
|
@@ -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
|
}
|