diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be7f1c97..f1737fda 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,16 +26,6 @@ variables: cache: key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" -noNeeds: - stage: preparation - image: alpine:latest - variables: - GIT_STRATEGY: none - script: - - echo "This build is a workaround for 'https://gitlab.com/gitlab-org/gitlab/issues/30631'" - cache: {} - dependencies: [] - composer: stage: preparation script: @@ -122,8 +112,7 @@ codestyle: image: lorisleiva/laravel-docker script: - phpcs --extensions=php app - needs: - - noNeeds + needs: [] dependencies: [] allow_failure: true @@ -132,8 +121,7 @@ phpcpd: script: - test -f phpcpd.phar || curl -L https://phar.phpunit.de/phpcpd.phar -o phpcpd.phar - php phpcpd.phar app/ --min-lines=50 - needs: - - noNeeds + needs: [] dependencies: [] cache: paths: @@ -154,8 +142,7 @@ sensiolabs: sonarqube: image: johnnei/sonarqube-scanner:3.2.0.1227-4 stage: security - needs: - - noNeeds + needs: [] dependencies: [] allow_failure: true only: diff --git a/CHANGELOG.md b/CHANGELOG.md index 9580c5fa..e20e9e7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [v1.5.3](https://gitlab.com/daveroverts/Book-me-a-cookie/compare/v1.5.3...v1.5.2) - 2020-03-04 + +### Changed +- BookingController@export() for normal events now includes ETA, and now never falls back to event times + ## [v1.5.2](https://gitlab.com/daveroverts/Book-me-a-cookie/compare/v1.5.2...v1.5.1.e) - 2020-02-16 ### Added diff --git a/app/Http/Controllers/Booking/BookingAdminController.php b/app/Http/Controllers/Booking/BookingAdminController.php index 31a7a5b5..d387867e 100644 --- a/app/Http/Controllers/Booking/BookingAdminController.php +++ b/app/Http/Controllers/Booking/BookingAdminController.php @@ -303,6 +303,16 @@ public function export(Event $event, Request $request) /* @var Booking $booking */ /* @var Flight $flight */ $flight = $booking->flights()->first(); + if (!empty($flight->getOriginal('ctot'))) { + $ctot = Carbon::parse($flight->getOriginal('ctot'))->format('H:i:s'); + } else { + $ctot = null; + } + if (!empty($flight->getOriginal('eta'))) { + $eta = Carbon::parse($flight->getOriginal('eta'))->format('H:i:s'); + } else { + $eta = null; + } return [ $booking->user->full_name, $booking->user_id, @@ -311,7 +321,8 @@ public function export(Event $event, Request $request) $flight->airportDep->icao, $flight->airportArr->icao, $flight->getOriginal('oceanicFL'), - Carbon::parse($flight->getOriginal('ctot'))->format('H:i:s'), + $ctot, + $eta, $flight->route, ]; });