@noatgnu/cupcake-core 1.2.1 → 1.2.3
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.
|
@@ -568,10 +568,10 @@ class ApiService {
|
|
|
568
568
|
httpParams = httpParams.set('is_active', params.isActive.toString());
|
|
569
569
|
if (params?.search)
|
|
570
570
|
httpParams = httpParams.set('search', params.search);
|
|
571
|
-
if (params?.
|
|
572
|
-
httpParams = httpParams.set('
|
|
573
|
-
if (params?.
|
|
574
|
-
httpParams = httpParams.set('
|
|
571
|
+
if (params?.limit)
|
|
572
|
+
httpParams = httpParams.set('limit', params.limit.toString());
|
|
573
|
+
if (params?.offset !== undefined)
|
|
574
|
+
httpParams = httpParams.set('offset', params.offset.toString());
|
|
575
575
|
return this.http.get(`${this.apiUrl}/users/`, { params: httpParams });
|
|
576
576
|
}
|
|
577
577
|
getUser(id) {
|
|
@@ -1701,6 +1701,29 @@ class LabGroupService extends BaseApiService {
|
|
|
1701
1701
|
cancelLabGroupInvitation(id) {
|
|
1702
1702
|
return this.post(`${this.apiUrl}/lab-group-invitations/${id}/cancel_invitation/`, {});
|
|
1703
1703
|
}
|
|
1704
|
+
// LAB GROUP PERMISSIONS
|
|
1705
|
+
getLabGroupPermissions(params) {
|
|
1706
|
+
const httpParams = this.buildHttpParams(params);
|
|
1707
|
+
return this.get(`${this.apiUrl}/lab-group-permissions/`, { params: httpParams });
|
|
1708
|
+
}
|
|
1709
|
+
getLabGroupPermission(id) {
|
|
1710
|
+
return this.get(`${this.apiUrl}/lab-group-permissions/${id}/`);
|
|
1711
|
+
}
|
|
1712
|
+
createLabGroupPermission(permission) {
|
|
1713
|
+
return this.post(`${this.apiUrl}/lab-group-permissions/`, permission);
|
|
1714
|
+
}
|
|
1715
|
+
updateLabGroupPermission(id, permission) {
|
|
1716
|
+
return this.patch(`${this.apiUrl}/lab-group-permissions/${id}/`, permission);
|
|
1717
|
+
}
|
|
1718
|
+
deleteLabGroupPermission(id) {
|
|
1719
|
+
return this.delete(`${this.apiUrl}/lab-group-permissions/${id}/`);
|
|
1720
|
+
}
|
|
1721
|
+
getLabGroupPermissionsForLabGroup(labGroupId) {
|
|
1722
|
+
return this.getLabGroupPermissions({ labGroup: labGroupId });
|
|
1723
|
+
}
|
|
1724
|
+
getLabGroupPermissionsForUser(userId) {
|
|
1725
|
+
return this.getLabGroupPermissions({ user: userId });
|
|
1726
|
+
}
|
|
1704
1727
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: LabGroupService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1705
1728
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: LabGroupService, providedIn: 'root' });
|
|
1706
1729
|
}
|
|
@@ -2362,12 +2385,13 @@ class UserManagementComponent {
|
|
|
2362
2385
|
loadUsers() {
|
|
2363
2386
|
this.isLoading.set(true);
|
|
2364
2387
|
this.errorMessage.set('');
|
|
2388
|
+
const offset = (this.currentPage() - 1) * this.pageSize();
|
|
2365
2389
|
const searchParams = {
|
|
2366
2390
|
search: this.searchTerm() || undefined,
|
|
2367
2391
|
isStaff: this.staffFilter() !== '' ? this.staffFilter() === 'true' : undefined,
|
|
2368
2392
|
isActive: this.activeFilter() !== '' ? this.activeFilter() === 'true' : undefined,
|
|
2369
|
-
|
|
2370
|
-
|
|
2393
|
+
limit: this.pageSize(),
|
|
2394
|
+
offset: offset
|
|
2371
2395
|
};
|
|
2372
2396
|
this.userManagementService.getUsers(searchParams).subscribe({
|
|
2373
2397
|
next: (response) => {
|