Skip to content

Commit

Permalink
Merge branch 'dev' into modalForExternalRedirects
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeelio authored Mar 5, 2024
2 parents c0774c3 + 1f5b83b commit 990193e
Show file tree
Hide file tree
Showing 8 changed files with 143 additions and 70 deletions.
4 changes: 2 additions & 2 deletions app/Console/Commands/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ public function handle()

// If a version is being passed in, the update the build, etc data against this
if ($this->argument('version')) {
$version = \SemVer\SemVer\Version::fromString($this->argument('version'));
$version = \Version\Version::fromString($this->argument('version'));
if ($this->option('write-full-version')) {
$cfg['current']['major'] = $version->getMajor();
$cfg['current']['minor'] = $version->getMinor();
$cfg['current']['patch'] = $version->getPatch();
}

$prerelease = $version->getPreRelease();
$prerelease = $version->getPreRelease()?->toString();
if (strpos($prerelease, '.') !== false) {
$prerelease = explode('.', $prerelease);
$cfg['current']['prerelease'] = $prerelease[0];
Expand Down
8 changes: 4 additions & 4 deletions app/Services/VersionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use App\Support\HttpClient;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Support\Facades\Log;
use SemVer\SemVer\Version;
use Symfony\Component\Yaml\Yaml;
use Version\Version;

class VersionService extends Service
{
Expand Down Expand Up @@ -232,8 +232,8 @@ public function isNewVersionAvailable($current_version = null)
*/
public function isGreaterThan($version1, $version2): bool
{
$version1 = Version::fromString($version1);
$version2 = Version::fromString($version2);
return $version1->isGreaterThan($version2);
$parsedVersion1 = Version::fromString($version1);
$parsedVersion2 = Version::fromString($version2);
return $parsedVersion1->isGreaterThan($parsedVersion2);
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"phpvms/sample-module": "~1.0",
"prettus/l5-repository": "~2.9.0",
"santigarcor/laratrust": "^8.2.2",
"semver/semver": "~1.1.0",
"spatie/valuestore": "~1.3.2",
"tivie/php-os-detector": "~1.1.0",
"vlucas/phpdotenv": "~5.5",
Expand All @@ -88,7 +87,8 @@
"symfony/postmark-mailer": "^6.0",
"league/html-to-markdown": "^5.1",
"league/flysystem-aws-s3-v3": "^3.0",
"league/flysystem-sftp-v3": "^3.0"
"league/flysystem-sftp-v3": "^3.0",
"nikolaposa/version": "^4.2"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.8.1",
Expand Down
182 changes: 129 additions & 53 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions config/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,12 @@
/*
* If this is an empty string, the name field on the webhook will be used.
*/
'username' => env('BACKUP_DISCORD_USERNAME', ''),
'username' => env('BACKUP_DISCORD_USERNAME', 'phpVMS Backup'),

/*
* If this is an empty string, the avatar on the webhook will be used.
*/
'avatar_url' => env('BACKUP_DISCORD_AVATAR_URL', ''),
'avatar_url' => env('BACKUP_DISCORD_AVATAR_URL', env('APP_URL').'/assets/img/logo.png'),
],
],

Expand Down
Binary file added public/assets/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions resources/views/admin/pireps/fields.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
{{ Form::label('block_fuel', 'Block Fuel (lbs):') }}
<div class="row">
<div class="col-sm-12">
{{ Form::number('block_fuel', null, ['class' => 'form-control', 'min' => 0, 'step' => '0.01']) }}
<input class="form-control" type="number" name="block_fuel" value="{{ $pirep->block_fuel->internal() ?? null }}" step="0.01" />
<p class="text-danger">{{ $errors->first('block_fuel') }}</p>
</div>
</div>
Expand All @@ -147,7 +147,7 @@
{{ Form::label('fuel_used', 'Used Fuel (lbs):') }}
<div class="row">
<div class="col-sm-12">
{{ Form::number('fuel_used', null, ['class' => 'form-control', 'min' => 0, 'step' => '0.01']) }}
<input class="form-control" type="number" name="fuel_used" value="{{ $pirep->fuel_used->internal() ?? null }}" step="0.01" />
<p class="text-danger">{{ $errors->first('fuel_used') }}</p>
</div>
</div>
Expand Down Expand Up @@ -176,7 +176,7 @@
{{ Form::label('planned_distance', 'Pln.Dist. (nmi):') }}
<div class="row">
<div class="col-sm-12">
{{ Form::number('planned_distance', null, ['class' => 'form-control', 'readonly' => 'readonly', 'min' => 0, 'step' => '0.01']) }}
<input class="form-control" type="number" name="planned_distance" value="{{ $pirep->planned_distance->internal() ?? null }}" min="0" step="0.1" readonly/>
<p class="text-danger">{{ $errors->first('planned_distance') }}</p>
</div>
</div>
Expand All @@ -186,7 +186,7 @@
{{ Form::label('distance', 'Flt.Dist. (nmi):') }}
<div class="row">
<div class="col-sm-12">
{{ Form::number('distance', null, ['class' => 'form-control', 'min' => 0, 'step' => '0.01']) }}
<input class="form-control" type="number" name="distance" value="{{ $pirep->distance->internal() ?? null}}" min="0" step="0.1" />
<p class="text-danger">{{ $errors->first('distance') }}</p>
</div>
</div>
Expand Down
3 changes: 0 additions & 3 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,6 @@
"sempro/phpunit-pretty-print": {
"version": "1.4.0"
},
"semver/semver": {
"version": "1.1.0"
},
"spatie/backtrace": {
"version": "1.2.1"
},
Expand Down

0 comments on commit 990193e

Please sign in to comment.