Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fa480c5a0 | ||
|
|
6eef246b6a | ||
|
|
fc8ca69729 | ||
|
|
57277c558d |
@@ -9,6 +9,7 @@ use App\Models\Enums\PirepSource;
|
||||
use App\Models\Enums\PirepState;
|
||||
use App\Models\Pirep;
|
||||
use App\Models\PirepComment;
|
||||
use App\Models\PirepFare;
|
||||
use App\Repositories\AircraftRepository;
|
||||
use App\Repositories\AirlineRepository;
|
||||
use App\Repositories\AirportRepository;
|
||||
@@ -151,10 +152,10 @@ class PirepController extends Controller
|
||||
$count = $request->input($field_name);
|
||||
}
|
||||
|
||||
$fares[] = [
|
||||
$fares[] = new PirepFare([
|
||||
'fare_id' => $fare->id,
|
||||
'count' => $count,
|
||||
];
|
||||
]);
|
||||
}
|
||||
|
||||
$this->fareSvc->saveForPirep($pirep, $fares);
|
||||
|
||||
@@ -123,7 +123,7 @@ class ProfileController extends Controller
|
||||
|
||||
$airlines = $this->airlineRepo->selectBoxList();
|
||||
$airports = $this->airportRepo->selectBoxList(false, setting('pilots.home_hubs_only'));
|
||||
$userFields = $this->userRepo->getUserFields($user, true);
|
||||
$userFields = $this->userRepo->getUserFields($user);
|
||||
|
||||
return view('profile.edit', [
|
||||
'user' => $user,
|
||||
|
||||
@@ -36,9 +36,14 @@ class UserRepository extends Repository
|
||||
*
|
||||
* @return \App\Models\UserField[]|\Illuminate\Database\Eloquent\Collection|\Illuminate\Support\Collection
|
||||
*/
|
||||
public function getUserFields(User $user, $only_public_fields = true): Collection
|
||||
public function getUserFields(User $user, $only_public_fields = null): Collection
|
||||
{
|
||||
$fields = UserField::where(['private' => !$only_public_fields])->get();
|
||||
if (is_bool($only_public_fields)) {
|
||||
$fields = UserField::where(['private' => !$only_public_fields])->get();
|
||||
} else {
|
||||
$fields = UserField::get();
|
||||
}
|
||||
|
||||
return $fields->map(function ($field, $_) use ($user) {
|
||||
foreach ($user->fields as $userFieldValue) {
|
||||
if ($userFieldValue->field->slug === $field->slug) {
|
||||
|
||||
@@ -309,7 +309,7 @@ class GeoService extends Service
|
||||
foreach ($all_route_points as $point) {
|
||||
$route->addPoint($point->lat, $point->lon, [
|
||||
'name' => $point->name,
|
||||
'popup' => $point->name.' ('.$point->name.')',
|
||||
'popup' => $point->name.' ('.$point->lat.', '.$point->lon.')',
|
||||
'icon' => '',
|
||||
]);
|
||||
}
|
||||
@@ -351,7 +351,7 @@ class GeoService extends Service
|
||||
foreach ($planned_route as $point) {
|
||||
$planned->addPoint($point->lat, $point->lon, [
|
||||
'name' => $point->name,
|
||||
'popup' => $point->name.' ('.$point->name.')',
|
||||
'popup' => $point->name.' ('.$point->lat.', '.$point->lon.')',
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ class GeoService extends Service
|
||||
$actual->addPoint($point->lat, $point->lon, [
|
||||
'pirep_id' => $pirep->id,
|
||||
'name' => $point->altitude,
|
||||
'popup' => 'GS: '.$point->gs.'<br />Alt: '.$point->altitude,
|
||||
'popup' => 'Spd: '.$point->gs.' kts<br />Alt: '.$point->altitude.' ft<br />Pos: '.$point->lat.', '.$point->lon,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Generated
+8
-8
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "phpvms",
|
||||
"name": "npm-proj-1630530959563-0.3771552149793951CYCCrG",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
@@ -40,7 +40,7 @@
|
||||
"rivets": "^0.9.6",
|
||||
"select2": "^4.0.13",
|
||||
"ssri": "^8.0.1",
|
||||
"tar": ">=4.4.2",
|
||||
"tar": "^6.1.9",
|
||||
"webpack": "^5.45.1",
|
||||
"webpack-cli": "^3.3.12",
|
||||
"x-editable": "1.5.1"
|
||||
@@ -12802,9 +12802,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tar": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz",
|
||||
"integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==",
|
||||
"version": "6.1.9",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.9.tgz",
|
||||
"integrity": "sha512-XjLaMNl76o07zqZC/aW4lwegdY07baOH1T8w3AEfrHAdyg/oYO4ctjzEBq9Gy9fEP9oHqLIgvx6zuGDGe+bc8Q==",
|
||||
"dependencies": {
|
||||
"chownr": "^2.0.0",
|
||||
"fs-minipass": "^2.0.0",
|
||||
@@ -23866,9 +23866,9 @@
|
||||
"integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA=="
|
||||
},
|
||||
"tar": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz",
|
||||
"integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==",
|
||||
"version": "6.1.9",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.9.tgz",
|
||||
"integrity": "sha512-XjLaMNl76o07zqZC/aW4lwegdY07baOH1T8w3AEfrHAdyg/oYO4ctjzEBq9Gy9fEP9oHqLIgvx6zuGDGe+bc8Q==",
|
||||
"requires": {
|
||||
"chownr": "^2.0.0",
|
||||
"fs-minipass": "^2.0.0",
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@
|
||||
"rivets": "^0.9.6",
|
||||
"select2": "^4.0.13",
|
||||
"ssri": "^8.0.1",
|
||||
"tar": ">=4.4.2",
|
||||
"tar": ">=6.1.9",
|
||||
"webpack": "^5.45.1",
|
||||
"webpack-cli": "^3.3.12",
|
||||
"x-editable": "1.5.1"
|
||||
|
||||
Reference in New Issue
Block a user