tickera-angular-components 0.0.1-dev.141 → 0.0.1-dev.143

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.
@@ -3100,14 +3100,8 @@ class CustomerService {
3100
3100
  createOne(data) {
3101
3101
  return this.apiService.post(CUSTOMERS_API_ROUTES.create, data);
3102
3102
  }
3103
- fetchCustomers(page, search, limit) {
3104
- const queryParams = new URLSearchParams();
3105
- if (page)
3106
- queryParams.append('page', page.toString());
3107
- if (search)
3108
- queryParams.append('search', search);
3109
- if (limit)
3110
- queryParams.append('limit', limit.toString());
3103
+ fetchCustomers(params) {
3104
+ const queryParams = transformUrlParams(params);
3111
3105
  const queryString = queryParams.toString();
3112
3106
  const apiRoute = `${CUSTOMERS_API_ROUTES.findAll}${queryString ? '?' + queryString : ''}`;
3113
3107
  return this.apiService.get(apiRoute);
@@ -7281,7 +7275,7 @@ class CustomerSelectComponent {
7281
7275
  onChange = () => { };
7282
7276
  onTouched = () => { };
7283
7277
  config = {
7284
- load: (params) => this.customerService.fetchCustomers(1, params?.search || '', 50),
7278
+ load: (params) => this.customerService.fetchCustomers({ search: params?.search || '' }),
7285
7279
  map: (res) => res.data.customers?.map((customer) => ({
7286
7280
  value: customer.id,
7287
7281
  label: `${getCustomerFullname(customer)} - ${customer.email}`.trim(),