Skip to content
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

Fix PIREP Create/Edit Airport Fields Not Filling Properly #1709

Closed
wants to merge 0 commits into from

Conversation

BossOfGames
Copy link
Contributor

closes #1708

@FatihKoz
Copy link
Contributor

FatihKoz commented Dec 4, 2023

Can't we make it more simpler, just by fixing the blade :)

As select2 does not offer proper readonly support, we can just remove the dropdowns and use the airport details there directly without utilizing the ajax search and select2.

Right now, even with your solution at controller level, there will be two airports in the dropdown and it will not be readonly, pilot error still possible.

@BossOfGames
Copy link
Contributor Author

Can't we make it more simpler, just by fixing the blade :)

As select2 does not offer proper readonly support, we can just remove the dropdowns and use the airport details there directly without utilizing the ajax search and select2.

Right now, even with your solution at controller level, there will be two airports in the dropdown and it will not be readonly, pilot error still possible.

You do bring up a good point. I was trying to preserve the original functionality with this code. Keep in mind that the form is also used for new pireps not based on existing flights (i.e. free flights). I think we should look into a different "screen" if the PIREP is based on a flight, vs one that's created from scratch.

@FatihKoz
Copy link
Contributor

FatihKoz commented Dec 8, 2023

Why we should have different "screen"s for a pirep, when current one just needs to be filled properly according to source.

By "free flight" if you want to mention a VA with no restrictions, then again this same form will be used. And when restrictions are set, pilots will not be able to select a different airport for their departure anyway. So "free flights" should not be an issue to think here in this form.

What I am telling that is your controller level fix will work with logical flaws, nothing more. I am offering a more simpler solution, if a pirep is being generated from a flight or from a simbrief ofp, that two fields should be fixed, thus no need to provide a dropdown to select airports. (thus no controller changes are needed)

Anyway, this is your PR, you are free to offer what you think is the best :)

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.

Create PIREP on Flights Doesn't Auto-FIll Airports
2 participants