Skip to content

Commit

Permalink
Merge pull request #57 from fleetbase/dev-v1.4.0
Browse files Browse the repository at this point in the history
v1.4.0
  • Loading branch information
roncodes authored Feb 7, 2024
2 parents 9cbad09 + ceb5c7a commit c98e08a
Show file tree
Hide file tree
Showing 51 changed files with 1,239 additions and 340 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.2'
extensions: mbstring, xml, gd, zip, pdo_mysql, sockets, intl, bcmath, gmp
coverage: xdebug

Expand All @@ -28,6 +28,9 @@ jobs:
sudo apt-get update
sudo apt-get install -y libzip-dev libgd-dev libfreetype6-dev libjpeg-dev libpng-dev imagemagick libmagickwand-dev libmemcached-dev libgeos-dev libgmp-dev default-mysql-client libicu-dev
- name: Configure Composer Auth for Github
run: composer config --global github-oauth.github.com ${{ secrets._GITHUB_AUTH_TOKEN }}

- name: Validate composer.json and composer.lock
run: composer validate

Expand Down
36 changes: 18 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fleetbase/core-api",
"version": "1.3.13",
"version": "1.4.0",
"description": "Core Framework and Resources for Fleetbase API",
"keywords": [
"fleetbase",
Expand All @@ -18,38 +18,38 @@
}
],
"require": {
"php": "^7.4|^8.0",
"php": "^8.0",
"fleetbase/laravel-mysql-spatial": "^1.0.2",
"illuminate/broadcasting": "^9.0|^10.0",
"illuminate/contracts": "^9.0|^10.0",
"illuminate/database": "^9.0|^10.0",
"illuminate/http": "^9.0|^10.0",
"illuminate/notifications": "^9.0|^10.0",
"illuminate/routing": "^9.0|^10.0",
"illuminate/support": "^9.0|^10.0",
"aloha/twilio": "^5.0",
"aws/aws-sdk-php-laravel": "^3.7",
"giggsey/libphonenumber-for-php": "^8.13",
"grimzy/laravel-mysql-spatial": "^5.0",
"guzzlehttp/guzzle": "^7.4",
"hammerstone/fast-paginate": "^1.0",
"illuminate/broadcasting": "^7.0|^8.0|^9.0",
"illuminate/contracts": "^7.0|^8.0|^9.0",
"illuminate/database": "^7.0|^8.0|^9.0",
"illuminate/http": "^7.0|^8.0|^9.0",
"illuminate/notifications": "^7.0|^8.0|^9.0",
"illuminate/routing": "^7.0|^8.0|^9.0",
"illuminate/support": "^7.0|^8.0|^9.0",
"jdorn/sql-formatter": "^1.2",
"laravel/sanctum": "^2.15",
"laravel/sanctum": "^3.2",
"maatwebsite/excel": "^3.1",
"phpoffice/phpspreadsheet": "^1.28",
"phrity/websocket": "^1.7",
"pragmarx/countries": "^0.8.2",
"sentry/sentry-laravel": "*",
"spatie/laravel-activitylog": "^3.17",
"spatie/laravel-permission": "^5.5",
"spatie/laravel-responsecache": "^6.6",
"spatie/laravel-sluggable": "^2.6",
"vinkla/hashids": "^9.1",
"spatie/laravel-activitylog": "^4.7",
"spatie/laravel-permission": "^6.3",
"spatie/laravel-responsecache": "^7.4",
"spatie/laravel-sluggable": "^3.5",
"sqids/sqids": "^0.4.1",
"xantios/mimey": "^2.2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.34.1",
"nunomaduro/collision": "^5.11.0|^6.4.0",
"pestphp/pest": "^1.22.6",
"nunomaduro/collision": "^7.0",
"pestphp/pest": "^2.33.2",
"phpstan/phpstan": "^1.10.38",
"symfony/var-dumper": "^5.4.29"
},
Expand Down
4 changes: 4 additions & 0 deletions config/fleetbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@
'connection' => [
'db' => env('DB_CONNECTION', 'mysql'),
'sandbox' => env('SANDBOX_DB_CONNECTION', 'sandbox')
],
'branding' => [
'logo_url' => 'https://flb-assets.s3.ap-southeast-1.amazonaws.com/static/fleetbase-logo.png',
'icon_url' => 'https://flb-assets.s3.ap-southeast-1.amazonaws.com/static/fleetbase-icon.png'
]
];
4 changes: 2 additions & 2 deletions migrations/2023_09_04_091906_create_failed_jobs_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateFailedJobsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
Expand Down Expand Up @@ -33,4 +33,4 @@ public function down()
{
Schema::dropIfExists('failed_jobs');
}
}
};
4 changes: 2 additions & 2 deletions migrations/2023_10_18_080950_create_notifications_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateNotificationsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
Expand Down Expand Up @@ -32,4 +32,4 @@ public function down()
{
Schema::dropIfExists('notifications');
}
}
};
26 changes: 26 additions & 0 deletions migrations/2024_01_24_072624_create_dashboards_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateDashboardsTable extends Migration
{
public function up()
{
Schema::create('dashboards', function (Blueprint $table) {
$table->id();
$table->uuid('uuid')->nullable()->index();
$table->uuid('company_uuid')->nullable()->index();
$table->uuid('user_uuid')->nullable()->index();
$table->string('name');
$table->boolean('is_default')->default(false);
$table->softDeletes();
$table->timestamps();
});
}

public function down()
{
Schema::dropIfExists('dashboards');
}
}
27 changes: 27 additions & 0 deletions migrations/2024_01_24_072707_create_dashboard_widgets_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateDashboardWidgetsTable extends Migration
{
public function up()
{
Schema::create('dashboard_widgets', function (Blueprint $table) {
$table->id();
$table->uuid('uuid')->nullable()->index();
$table->uuid('dashboard_uuid')->nullable()->index();
$table->string('name');
$table->string('component');
$table->json('grid_options');
$table->json('options');
$table->timestamps();
$table->softDeletes();
});
}

public function down()
{
Schema::dropIfExists('dashboard_widgets');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('dashboard_widgets', function (Blueprint $table) {
$table->foreign('dashboard_uuid')
->references('uuid')
->on('dashboards')
->onUpdate('CASCADE')
->onDelete('CASCADE');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('dashboard_widgets', function (Blueprint $table) {
$table->dropForeign(['dashboard_uuid']);
});
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (Schema::hasTable('personal_access_tokens')) {
Schema::table('personal_access_tokens', function (Blueprint $table) {
if (!Schema::hasColumn('personal_access_tokens', 'expires_at')) {
$table->timestamp('expires_at')->nullable()->after('last_used_at');
}
});
}
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
if (Schema::hasTable('personal_access_tokens')) {
Schema::table('personal_access_tokens', function (Blueprint $table) {
if (Schema::hasColumn('personal_access_tokens', 'expires_at')) {
$table->dropColumn('expires_at');
}
});
}
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

return new class extends Migration
{
public function up()
{
Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {
$table->string('event')->nullable()->after('subject_type');
});
}

public function down()
{
Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {
$table->dropColumn('event');
});
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

return new class extends Migration
{
public function up()
{
Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {
$table->uuid('batch_uuid')->nullable()->after('properties');
});
}

public function down()
{
Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {
$table->dropColumn('batch_uuid');
});
}
};
48 changes: 48 additions & 0 deletions migrations/2024_02_04_051200_create_custom_fields_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('custom_fields', function (Blueprint $table) {
$table->increments('id');
$table->uuid('uuid')->index();
$table->foreignUuid('company_uuid')->nullable()->index()->references('uuid')->on('companies');
$table->uuid('subject_uuid');
$table->string('subject_type');
$table->string('name');
$table->string('label');
$table->string('type');
$table->string('component')->nullable();
$table->json('options')->nullable();
$table->boolean('required')->default(false);
$table->text('default_value')->nullable();
$table->json('validation_rules')->nullable();
$table->json('meta')->nullable();
$table->mediumText('description')->nullable();
$table->mediumText('help_text')->nullable();
$table->integer('order')->nullable();
$table->timestamps();
$table->softDeletes();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('custom_fields');
}
};
Loading

0 comments on commit c98e08a

Please sign in to comment.