Skip to content

Commit

Permalink
Update Bookings.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Sep 21, 2023
1 parent dc26a02 commit 573b380
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions backend/src/components/BookingList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ const BookingList = (

useEffect(() => {
if (reload) {
setPage(0)
paginationModel.page = 0
setPaginationModel(paginationModel)
const _paginationModel = bookcarsHelper.clone(paginationModel)
_paginationModel.page = 0
setPaginationModel(_paginationModel)
_fetch(0, user)
setReload(false)
}
Expand Down
12 changes: 6 additions & 6 deletions backend/src/pages/Bookings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ const Bookings = () => {
}
}, [user])

const handleSupplierFilterChange = (newCompanies: string[]) => {
setCompanies(newCompanies)
const handleSupplierFilterChange = (companies: string[]) => {
setCompanies(companies)
}

const handleStatusFilterChange = (newStatuses: bookcarsTypes.BookingStatus[]) => {
setStatuses(newStatuses)
const handleStatusFilterChange = (statuses: bookcarsTypes.BookingStatus[]) => {
setStatuses(statuses)
}

const handleBookingFilterSubmit = (newFilter: bookcarsTypes.Filter | null) => {
setFilter(newFilter)
const handleBookingFilterSubmit = (filter: bookcarsTypes.Filter | null) => {
setFilter(filter)
}

const onLoad = async (user?: bookcarsTypes.User) => {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/BookingList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ const BookingList = (

useEffect(() => {
if (reload) {
setPage(0)
paginationModel.page = 0
setPaginationModel(paginationModel)
const _paginationModel = bookcarsHelper.clone(paginationModel)
_paginationModel.page = 0
setPaginationModel(_paginationModel)
_fetch(0, user)
setReload(false)
}
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/pages/Bookings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ const Bookings = () => {
}
}, [user])

const handleSupplierFilterChange = (newCompanies: string[]) => {
setCompanies(newCompanies)
const handleSupplierFilterChange = (companies: string[]) => {
setCompanies(companies)
}

const handleStatusFilterChange = (newStatuses: bookcarsTypes.BookingStatus[]) => {
setStatuses(newStatuses)
const handleStatusFilterChange = (statuses: bookcarsTypes.BookingStatus[]) => {
setStatuses(statuses)
}

const handleBookingFilterSubmit = (newFilter: bookcarsTypes.Filter | null) => {
setFilter(newFilter)
const handleBookingFilterSubmit = (filter: bookcarsTypes.Filter | null) => {
setFilter(filter)
}

const onLoad = async (user?: bookcarsTypes.User) => {
Expand Down

0 comments on commit 573b380

Please sign in to comment.