I have a customer which works with buses and passenger transportation.Now he would like that all routes would be visible on a site and guests could filter routes by source and destination points.
Routes examples:
Route A-E
StopA 08:10
StopB 08:20
StopC 08:30
StopD 08:40
StopE 08:50
Route E-A
StopE 09:00
StopD 09:10
StopC 09:20
StopB 09:30
StopA 09:40
Now client wants Search fields Source and Destination and for example if Source has value StopB and Destination has value StopC than user should only see Route A-E
How I'm doing this:
Firstly I created a new paragraph and added two fields in it: stop(text field) and time (time field)
Then I Created a content type Routes and added newly created paragraph
When I'm creating a new Content of Routes I can add as many stops with time as I like.
I created a view:
It shows all data as expected
I added Relationship field_stops: Paragraph
After that data multiplied 5 times same amount as routes in Content. Why is that?
Then I was able to add Filter Criteria field_stops: Paragraph
Now if I type StopB in filter field it filters both routes: Route A-E and Route E-A and it's normal because both of them has StopB value
Now I need ideas how can I add another filter field and search for both values in Routes.
And how to implement source and destination route? Can it use time field?
I hope I'm clear with my question