Skip to content

Filter search results with Hotel Name, Price per person, star rating and Hotel facilites#4

Open
shsuneel wants to merge 9 commits into
virginatlanticdevelopment:mainfrom
shsuneel:main
Open

Filter search results with Hotel Name, Price per person, star rating and Hotel facilites#4
shsuneel wants to merge 9 commits into
virginatlanticdevelopment:mainfrom
shsuneel:main

Conversation

@shsuneel
Copy link
Copy Markdown

@shsuneel shsuneel commented Jul 15, 2024

Hi
In this pull request, I have implemented the search results page for the front-end test. Here are the key changes made:
Internet connection needed for images
Running application
app.webm

app

Created a new components

  • filter.components.tsx

  • hotel-widget.component.tsx

  • image-carousel.components.tsx

  • search-bar.component.tsx

  • search-item.component.tsx

  • search-page.components.tsx
    -filterData.service.ts

Updated
search-results.component.tsx to link SearchBarComponent and SearchPageComponent

Added tests for filterData.service.ts and hotel-widget.component.cy.tsx

I also added comments to explain the functions

The SearchPageComponent is a React component that displays a search page with a filter component, the number of holidays found, and a list of hotel widgets based on the search results. It also handles filter events and updates the filtered results accordingly.

Added filters for price per person, hotel facilities, and star rating to allow users to refine their search results.
filterData.service.ts
in this file I added various filters for holiday data based on different criteria such as price per person, hotel facilities, star ratings, and hotel name.
The specific implementation of the filtering functions
getPricePPFilter, getHotelFacilitiesFilter, getStarRatingsFilter

All filters will be dynamically generated as per data

Included appropriate unit tests using Cypress to ensure the functionality of the search results page.

image
image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants