diff --git a/.gitlab-docker-x86_64.yml b/.gitlab-docker-x86_64.yml index 55bc345..bc6634d 100644 --- a/.gitlab-docker-x86_64.yml +++ b/.gitlab-docker-x86_64.yml @@ -27,7 +27,7 @@ docker: - if [ -f init ]; then chmod 500 init; fi - ([ -z "$REFRESH" ] && docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG}) || echo "true" - echo -n ${CI_COMMIT_SHORT_SHA} > VERSION - - rm -rf vendor/ database/schema database/seeders database/factories + - rm -rf vendor/ database/schema database/seeders database/factories/* - docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} . - docker push ${CI_REGISTRY_IMAGE}:${VERSION} - docker push ${CI_REGISTRY_IMAGE}:${CACHETAG} diff --git a/.gitlab-test.yml b/.gitlab-test.yml index 16ba0b6..88e157d 100644 --- a/.gitlab-test.yml +++ b/.gitlab-test.yml @@ -1,5 +1,5 @@ test: - image: registry.leenooks.net/leenooks/php:8.0-fpm-ext-test + image: ${CI_REGISTRY}/leenooks/php:8.0-fpm-ext-test stage: test diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index 3824d9f..ee86eda 100644 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -25,12 +25,12 @@ class AdminController extends Controller { if ($request->post()) { $validation = $request->validate([ - 'account_id' => 'required|exists:ab_account,id', + 'account_id' => 'required|exists:accounts,id', 'date_payment' => 'required|date', 'checkout_id' => 'required|exists:ab_checkout,id', 'total_amt' => 'required|numeric|min:0.01', 'fees_amt' => 'nullable|numeric|lt:total_amt', - 'source_id' => 'nullable|exists:ab_account,id', + 'source_id' => 'nullable|exists:accounts,id', 'pending' => 'nullable|boolean', 'notes' => 'nullable|string', 'ip' => 'nullable|ip', diff --git a/app/Models/Charge.php b/app/Models/Charge.php index 91de1bd..5d997d7 100644 --- a/app/Models/Charge.php +++ b/app/Models/Charge.php @@ -12,6 +12,6 @@ class Charge extends Model public function getNameAttribute() { - return sprintf('%s %s',$this->description,join('|',unserialize($this->getAttribute('attributes')))); + return sprintf('%s %s',$this->description,$this->getAttribute('attributes') ? join('|',unserialize($this->getAttribute('attributes'))) : ''); } } \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index be5de75..578ddf0 100644 --- a/routes/web.php +++ b/routes/web.php @@ -93,9 +93,9 @@ Route::group(['middleware'=>['theme:adminlte-be','auth'],'prefix'=>'u'],function // Route::get('service/cancel/{o}','ServiceController@update') // ->where('o','[0-9]+') // ->middleware('can:update,o'); -// Route::get('service/progress/{o}/{status}','UserHomeController@service_progress') -// ->where('o','[0-9]+') -// ->middleware('can:progress,o,status'); + Route::get('service/progress/{o}/{status}',[HomeController::class,'service_progress']) + ->where('o','[0-9]+') + ->middleware('can:progress,o,status'); }); // Doorman Code Routes