-
Notifications
You must be signed in to change notification settings - Fork 0
55 pagination #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
55 pagination #64
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…urned data is in the same order
09fd3ee to
1a444ae
Compare
KwiatkowskiML
approved these changes
Jan 17, 2025
Owner
KwiatkowskiML
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
KwiatkowskiML
added a commit
that referenced
this pull request
Jan 17, 2025
* initial database implementation * database schema * additional fields in cars table: horsepower, engine capacity and fuel type * add licence_plate to cars table * add contact to integrator * database v0.1 * update doc * A huge mess - WIP * functioning database api * dev doc * print db schema * car and carprovider dtos * Simple React Frontend (#4) * A React frontend with a call to backend * Authorization (#6) * simple react frontend * frontend auth working * update created_at typed in database, make authorization work in backend, hide appsettings with secrets. * readme and logout button * update data models * misspell * remove lock json * update gitignore * fix readme * fix README * template->example env * Generating offer endpoint (#9) * database offers, base_price, insurances * get-offer endpoint * Searchbar and filters (#7) * simple react frontend * frontend auth working * update created_at typed in database, make authorization work in backend, hide appsettings with secrets. * readme and logout button * misspell * fix readme * Basic search functionality * added filters * fixed searching * added pagination and changed reults layout * improved file tree * creating offer and redirecting to details page * car details page * changed place of getting offer --------- Co-authored-by: WojciechMat <wmatsad@gmail.com> * 10 get user id api and choose offer (#14) * user controller and rental dto * get user id by email * authorization * get offer fix * get offer returning existing offers * rentals refactor * rentals refactor working api * choose offer yet to finish * Create Rental Endpoint (#17) * Sending confirmation emails (#18) * Making Confirmation Page Work Better (#19) * fix the link page, make sure there are no duplicates in the database * registration form and 10 minutes expiration * 21 refactor repository (#25) * mappers refactor * repositiores refactor carscontroller2 working * user controller v2 * get offer * mappers turned static * rentals controller * auth controller 2 * getting rid of warnings * removing unnecesary filter from get cars * user controller small fix * offers controller update * unused endpoint * api routes update, yet to test rentals and add auth * auth controller * bugfix rentals * removed deprecated controllers * transition to new controllers - not working yet * rental confirmation bugfix * final refactor and moved files * 26 workers api (#28) * rentals update * all rentals * database update * get offer bugfix and datamodel update not tested yet * get rentals bugfix * get customer * Update WebAPI/Controllers/CustomerController.cs Co-authored-by: Wojciech Matejuk <74838859+WojciechMat@users.noreply.github.com> * Update WebAPI/Controllers/CustomerController.cs Co-authored-by: Wojciech Matejuk <74838859+WojciechMat@users.noreply.github.com> * Update WebAPI/Controllers/WorkerController.cs Co-authored-by: Wojciech Matejuk <74838859+WojciechMat@users.noreply.github.com> * sql adjastment * update of retrieving values from rental status table - yet to be finished * simple changing of rental's status * simple return logic fix * filtering fixed * basic return * returns almost done yet to add all values to return object * process return completed * filtering the rentals in worker's controller * finishing touches --------- Co-authored-by: Wojciech Matejuk <74838859+WojciechMat@users.noreply.github.com> * 22 wokrers view (#33) Added workers view with return dialog, enabling workers to finalise returns. Enabled Customers to return rented cars in Rental History. --------- Authored-by: Rafal Filarecki <rafalfilarecki@gmail.com> * 23 gcp deployment (#27) * use environment variables for security and enabling deployment, remove old unnecessary data, add Dockerfile and stratup script * almost-full deployment * updated firebase rewrites so that it renders confrimation page, vite.config.js configured for local development * frontend deployment documentation * update doc with list of APIs to enable in GCP * better example * storage car images bucket * Fully working storage bucket images in deployed version * Fix example data after merge * update doc: remove unnecessary step * More logging, updated cors, fixed firebase configuration, specifically disable caching for current user api call * 39 refactor price calculator (#47) * calculate price interface * chain of responsibilities pattern * 45 sending confirmation mails after succesfull rental (#50) * email service update, sending rental success mails, not working on local host and not tested yet * removed unnecessary logs * doubled api calls issue resolved * sending email with placeholder link * unnecessary logs deletion * return started email confirmation * sending invoice * invioce fix * 24 workers view (#51) * workers view filtering and searching by brand and model using api * employee user has access only to /worker/rentals * Revert "24 workers view (#51)" (#57) This reverts commit ef863ae. * offer deletion service (#53) * offer deletion service * offer removal constants * 35 prepare test scenarios (#56) * PriceCalculatorTests * RentalConfirmationService tests * CarRepository tests * Offers repository tests * Rental repository unit tests * user repository test * workflow setup (#60) * 24 workers view (#58) * workers view filtering and searching by brand and model using api * employee user has access only to /worker/rentals * fixed confirmation email redirect * added simple car availability in car price dialog * null reference fix * removed debug logs and translated polish to english * improved worker rentals view and rental car cards, added brand and model filters instead of search bar --------- Co-authored-by: kwiatkowskim <kwiatkowski.michal.2003@gmail.com> * 43 access without logging in (#62) * workers view filtering and searching by brand and model using api * employee user has access only to /worker/rentals * removed debug logs and translated polish to english * improved worker rentals view and rental car cards, added brand and model filters instead of search bar * basic access without logging; needs to be improved * worker has no access to the browser * unlogged user has access to a car details page, after logging in, the user is redirected to the car details page * changed redirect to /login after logout * 36 photo upload (#52) * Upload photo to the cloud storage (local) * deploy script * add tests do dev deployment script * return details with photo on worker's view * added storage constants --------- Co-authored-by: kwiatkowskim <kwiatkowski.michal.2003@gmail.com> * 41 fix car search in the frontend (#63) * filtering cars using api * searching cars using api * searching only by model available * changed placeholder text * 55 pagination (#64) * added pagination to the browser * fixed filter bug * added order by before skiping in pagination to make sure that the returned data is in the same order * added pagination in users rental history * fixed car details and changed 'return car' button style * sending emails restored * added missing using statement * fixed worker's view filters * fixed browser model filtering * added number of pages to pagination in the browser and rental history * getting insuraces using WebAPI * gps and child seat fix * order by --------- Co-authored-by: kwiatkowskim <kwiatkowski.michal.2003@gmail.com> * 44 date of birth in user table (#69) * initail migration * initial migration sql script * change age to birth date migration script * context update and tests fixed * authorization update * Rental status fix * Revert "44 date of birth in user table (#69)" This reverts commit 495ff1f. * initail migration * initial migration sql script * change age to birth date migration script * context update and tests fixed * authorization update * Rental status fix * 49 security and prod (#67) * control car image storage through environment variables * prod configuration and deployment pipeline * update example * make sure caching works --------- Co-authored-by: WojciechMat <wmatsad@gmail.com> Co-authored-by: Wojciech Matejuk <74838859+WojciechMat@users.noreply.github.com> Co-authored-by: Rafał Filarecki <147185416+rafalfilarecki@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement Server-Side Pagination and Enhance Car Search Filters
Overview
This update introduces server-side pagination to improve the performance of car search results while addressing critical issues with the filtering functionality.
Server-Side Pagination
GetPaginatedCarsAsyncinCarRepositoryfor efficient data retrieval.{ "cars": [...], "totalCount": number, "currentPage": number, "pageSize": number, "totalPages": number }Search Filters Improvements
GET /api/Cars/filter-options) to fetch complete filter options (brands, models, years, fuel types, locations).Testing
The following scenarios have been tested: