phpvms icon indicating copy to clipboard operation
phpvms copied to clipboard

Improve the flight search

Open avs-code opened this issue 1 year ago • 5 comments

Is your feature request related to a problem? Please describe.

Feature 1. I'm trying to get the flight search form to work, with the "only show/allow flights from current location" option enabled.

Keeping that when you try to make the booking it tells you that you are not at the departure airport. This way, a pilot could see, for example, all the routes he can fly with a certain sub-fleet or flight duration, and after do a jumpseat/aircraft transfer. Actually, with show/allow option enabled and joined, a pilot only can search in their current airport, so leaves the flight search useless.

Describe the solution you'd like

  1. I found two ways, I think it is best to do the simplest and least change-intensive one for core and third-party addons.
  • First manner: Separate the option "only show/allow flights from current location" in two: "only show flights from current location" False "only allow flights from the current location" True

  • Second manner: Create other option in admin side settings to search flights tool: I commented this code: phpvms\app\Http\Controllers\Frontend\FlightController.php

97         // default restrictions on the flights shown. Handle search differently
98         /*if (setting('pilots.only_flights_from_current')) {
99             $where['dpt_airport_id'] = $user->curr_airport_id;
100        }*/

I think that last solution is the most affordable, an option in admin settings to enable/disable that code. But I am not an expert, hehe.

~~Feature 2. Additionally, many pilots are asking to be able to see a list of flights they have not yet flown. I think a checkbox could be added that says "exclude flights already flown" or similar. Clicking the button to start the search would return a list of flights that meet the criteria, but exclude flights that the pilot has already flown.~~

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

  1. I am available to view all flights that meet the criteria, but I can only bid on the ones I am at the departure airport.

imagen

~~2. Checkbox to second feature.~~

tempsnip

  • [✔] Feature 1 accepted?

  • [❌] Feature 2 accepted?

avs-code avatar Jan 11 '23 14:01 avs-code

"Exclude flights already flown" part is kind of non schedule logic, I mean not realistic considering "flight schedule" displaying. (Can be done, not impossible but how do you want to match pireps with flights? Id match or city pair match or flight number match, what will happen if you update your schedule etc... all those checks mean server load and processing time, imagine a va with 20k flights and a user with 5k pireps)

First part of your request, the part for seperation of allowing and displaying options, is understandable and may fit more to a realistic "flight schedule" system.

FatihKoz avatar Jan 11 '23 16:01 FatihKoz

"Exclude flights already flown" part is kind of non schedule logic, I mean not realistic considering "flight schedule" displaying. (Can be done, not impossible but how do you want to match pireps with flights? Id match or city pair match or flight number match, what will happen if you update your schedule etc... all those checks mean server load and processing time, imagine a va with 20k flights and a user with 5k pireps)

First part of your request, the part for seperation of allowing and displaying options, is understandable and may fit more to a realistic "flight schedule" system.

I know, compare flight number in user and in flights is heavy load to server. Is what I replied to them when they asked me that. I don't think there is a solution where there is no such workload. I don't know how it could be done either. I suppose I could export a sql query and send it as a pdf to interested pilots.

avs-code avatar Jan 11 '23 16:01 avs-code

It is not just server load, it is a complex logic. Imagine you have 10 flights between MAD - AMS replicating a real airline, all with different departure times, different flight numbers, and as expected different flight id's and all can be flown with different aircraft. And a pilot only used 2 of them in the past.

If you filter out with just flight id's, then you will not show 2 of it, but there will be 8 more MAD - AMS flights to list.

If you filter out with DEP-ARR airports, all will be hidden if a pilot flies only one flight between MAD - AMS.

Add multiple airlines to the equation, it will be really a complex matching logic which will never please everyone at the same time. You will request filtering with DEP-ARR match, another person will like to filter out with flight id's, another VA or admin will wish to filter out if all aircraft options are used etc.

This is why I did not liked that idea, a pilot can track his/her own flights if he/she does not want to fly the same city pair again, it is a personal choice and task.

FatihKoz avatar Jan 11 '23 17:01 FatihKoz

a pilot can track his/her own flights if he/she does not want to fly the same city pair again,

Currently, is that possible? I told them that on the map they could see this, but apparently it shows by city not by flight, so they don't know if they've done a round trip or a return, anyway you are right in your argument.

avs-code avatar Jan 11 '23 17:01 avs-code

The idea is interesting but needs more thought

nabeelio avatar Aug 23 '23 18:08 nabeelio