1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

Merge branch 'dev' into 'spaces_multiprices'

# Conflicts:
#   CHANGELOG.md
This commit is contained in:
Vincent 2021-12-22 14:29:56 +00:00
commit 934ac309a1
3 changed files with 3 additions and 10 deletions

View File

@ -5,7 +5,7 @@
- Ability to configure prices for spaces by time slots different than the default hourly rate
- Updated portuguese translation
- Refactored the ReserveButton component to use the same user's data across all the component
- [TODO DEPLOY] `rails db:seed`
- First optimization the load time of the payment schedules list
## v5.1.13 2021 November 16

View File

@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react';
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { react2angular } from 'react2angular';
import { DocumentFilters } from '../document-filters';
@ -38,13 +38,6 @@ const PaymentSchedulesList: React.FC<PaymentSchedulesListProps> = ({ currentUser
// current filter, by date, for the schedules and the deadlines
const [dateFilter, setDateFilter] = useState<Date>(null);
/**
* When the component is loaded first, refresh the list of schedules to fill the first page.
*/
useEffect(() => {
handleRefreshList();
}, []);
/**
* Fetch from the API the payments schedules matching the given filters and reset the results table with the new schedules.
*/

View File

@ -127,7 +127,7 @@ class PaymentScheduleService
# @param filters {Hash} allowed filters: reference, customer, date.
##
def self.list(page, size, filters = {})
ps = PaymentSchedule.includes(:invoicing_profile, :payment_schedule_items)
ps = PaymentSchedule.includes(:invoicing_profile, :payment_schedule_items, :payment_schedule_objects)
.joins(:invoicing_profile)
.order('payment_schedules.created_at DESC')
.page(page)