@noatgnu/cupcake-core 1.2.2 → 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?.page)
572
- httpParams = httpParams.set('page', params.page.toString());
573
- if (params?.pageSize)
574
- httpParams = httpParams.set('page_size', params.pageSize.toString());
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) {
@@ -2385,12 +2385,13 @@ class UserManagementComponent {
2385
2385
  loadUsers() {
2386
2386
  this.isLoading.set(true);
2387
2387
  this.errorMessage.set('');
2388
+ const offset = (this.currentPage() - 1) * this.pageSize();
2388
2389
  const searchParams = {
2389
2390
  search: this.searchTerm() || undefined,
2390
2391
  isStaff: this.staffFilter() !== '' ? this.staffFilter() === 'true' : undefined,
2391
2392
  isActive: this.activeFilter() !== '' ? this.activeFilter() === 'true' : undefined,
2392
- page: this.currentPage(),
2393
- pageSize: this.pageSize()
2393
+ limit: this.pageSize(),
2394
+ offset: offset
2394
2395
  };
2395
2396
  this.userManagementService.getUsers(searchParams).subscribe({
2396
2397
  next: (response) => {