Compare commits

...
Author SHA1 Message Date
snyk-bot a5830dcc08 fix: package.json & package-lock.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-Y18N-1021887
2020-11-18 02:24:37 +00:00
Nabeel Shahzad a2de532f72 Merge branch 'dev' of https://github.com/nabeelio/phpvms into dev 2020-11-02 11:57:27 -05:00
Nabeel Shahzad a52d844719 Set flight_id to be fillable 2020-11-02 11:57:25 -05:00
Timothy Sturm fd814bc79e * Fixed broken links on README
* Fixed broken links on README

* Misc. edits to markdown formatting, Title Grammer, and Stylizing the phpVMS brand.
2020-10-31 18:43:00 -04:00
Nabeel Shahzad 0fa00206ce Make sure stdclass is returned in flight fields 2020-10-29 12:38:40 -04:00
7 changed files with 3907 additions and 2115 deletions
+9 -12
View File
@@ -1,18 +1,15 @@
# phpvms <sup>7</sup>
# phpVMS <sup>7</sup>
[![Build Status](https://travis-ci.org/nabeelio/phpvms.svg)](https://travis-ci.org/nabeelio/phpvms) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/d668bebb0a3c46bda381af16ce3d9450)](https://www.codacy.com/app/nabeelio/phpvms?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=nabeelio/phpvms&amp;utm_campaign=Badge_Grade) [![Latest Stable Version](https://poser.pugx.org/nabeel/phpvms/v/stable)](https://packagist.org/packages/nabeel/phpvms) ![StyleCI](https://github.styleci.io/repos/93688482/shield?branch=dev) [![License](https://poser.pugx.org/nabeel/phpvms/license)](https://packagist.org/packages/nabeel/phpvms)
The next phpvms version built on the laravel framework. work in progress. The latest documentation, with installation instructions is available
[on the phpVMS documentation](http://docs.phpvms.net/) page.
The next phpvms version built on the laravel framework. work in progress. The latest documentation, with installation instructions is available [on the phpVMS documentation](https://docs.phpvms.net/) page.
# installation
## Installation
A full distribution, with all of the composer dependencies, is available at this
[GitHub Releases](https://github.com/nabeelio/phpvms/releases) link.
## Requirements
### Requirements
- PHP 7.3+, extensions:
- cURL
@@ -24,16 +21,16 @@ A full distribution, with all of the composer dependencies, is available at this
- Database:
- MySQL 5.5+ (or MySQL variant, including MariaDB and Percona)
[View more details on requirements](http://docs.phpvms.net/setup/requirements)
[View more details on requirements](https://docs.phpvms.net/requirements)
## Installer
### Installer
1. Upload to your server
1. Visit the site, and follow the link to the installer
[View installation details](http://docs.phpvms.net/setup/installation)
[View installation details](https://docs.phpvms.net/installation/installation)
# development environment
## Development Environment
A full development environment can be brought up using Docker:
@@ -50,7 +47,7 @@ Then go to `http://localhost`. If you're using dnsmasq, the `app` container is l
127.0.0.1 phpvms.test
```
## Building JS/CSS assets
### Building JS/CSS assets
Yarn is required, run:
@@ -18,7 +18,7 @@ class ValidationException extends AbstractHttpException
parent::__construct(
400,
'Validation exception'
'Validation Error'
);
}
+4 -4
View File
@@ -18,17 +18,17 @@ class Flight extends Resource
private function setFields()
{
/** @var \Illuminate\Support\Collection $field_values */
$return_values = new stdClass();
$field_values = $this->field_values;
if (empty($field_values) || $field_values->count() === 0) {
return new stdClass();
return $return_values;
}
$fields = [];
foreach ($field_values as $field) {
$fields[$field->name] = $field->value;
$return_values->{$field->name} = $field->value;
}
return $fields;
return $return_values;
}
/**
+1
View File
@@ -75,6 +75,7 @@ class Pirep extends Model
'flight_number',
'route_code',
'route_leg',
'flight_id',
'dpt_airport_id',
'arr_airport_id',
'alt_airport_id',
+3881 -2095
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -27,7 +27,7 @@
"jquery": "^3.5.1",
"jquery-pjax": "~2.0",
"js-yaml": "^3.14.0",
"laravel-mix": "^5.0.7",
"laravel-mix": "^5.0.8",
"leaflet": "^1.3.4",
"leaflet-ajax": "2.1.0",
"leaflet-providers": "1.0.*",
@@ -46,8 +46,8 @@
"select2": "^4.0.13",
"ssri": "^5.3.0",
"tar": ">=4.4.2",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack": "^5.1.1",
"webpack-cli": "^4.0.0",
"x-editable": "1.5.1"
},
"devDependencies": {
+8
View File
@@ -113,12 +113,20 @@ class FlightTest extends TestCase
*/
public function testSearchFlight()
{
/** @var \App\Models\User user */
$this->user = factory(User::class)->create();
$flight = $this->addFlight($this->user);
/** @var \App\Services\FlightService $flightSvc */
$flightSvc = app(FlightService::class);
$flightSvc->updateCustomFields($flight, [
['name' => '0', 'value' => 'value'],
]);
// search specifically for a flight ID
$query = 'flight_id='.$flight->id;
$req = $this->get('/api/flights/search?'.$query);
$body = $req->json(['data']);
$req->assertStatus(200);
}