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

Auto-calculate Distance on Add Flight page #355

Closed
ProAviaAZ opened this issue Aug 10, 2019 · 1 comment · Fixed by #366
Closed

Auto-calculate Distance on Add Flight page #355

ProAviaAZ opened this issue Aug 10, 2019 · 1 comment · Fixed by #366
Milestone

Comments

@ProAviaAZ
Copy link

ProAviaAZ commented Aug 10, 2019

Possible enhancement - Auto-calculate Distance on Add Flight page

On Add Flight page (maybe Edit Flight page too) - Allow clicking on Distance to auto-calculate the distance from departure to arrival airports.

This function is available in prior versions and calculates the distance based on the distance setting (NM, km, etc) in local.config.

While I'm sure it's different in v7 than prior, here is the entry in /admin/lib/phpvmsadmin.js for earlier versions.

function calcDistance() {
$("#distance").val("Calculating...");
$.get(baseurl + "/admin/action.php/operations/calculatedistance",
{ depicao: $("#depicao").val(), arricao: $("#arricao").val() },
function(data) {
$("#distance").val(data);
});
}

@nabeelio nabeelio added this to the beta milestone Aug 10, 2019
@nabeelio
Copy link
Owner

Thanks! I'll pull that code out from v2

nabeelio added a commit that referenced this issue Aug 26, 2019
* #355 Calculate distance button in add/edit Flight page

* Styling

* Move add/edit flight logic out of controller and into service layer

* Styling

* Formatting

* Run styleci against modules dir

* Styleci config

* Style fixes in /modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants