diff --git a/app/Http/Controllers/V3/Dashboard/Harim/GeneralManagerController.php b/app/Http/Controllers/V3/Dashboard/Harim/GeneralManagerController.php index 56a45151..e065acc3 100644 --- a/app/Http/Controllers/V3/Dashboard/Harim/GeneralManagerController.php +++ b/app/Http/Controllers/V3/Dashboard/Harim/GeneralManagerController.php @@ -28,6 +28,7 @@ use Illuminate\Support\Facades\DB; class GeneralManagerController extends Controller { use ApiResponse; + public function index(Request $request): JsonResponse { $query = Harim::query() @@ -235,9 +236,9 @@ class GeneralManagerController extends Controller return $this->successResponse(); } + public function show(ShowRequest $request, Harim $harim): JsonResponse { return $this->successResponse($harim->load('histories')); - } } diff --git a/app/Http/Controllers/V3/Dashboard/Harim/PanjareVahedController.php b/app/Http/Controllers/V3/Dashboard/Harim/PanjareVahedController.php new file mode 100644 index 00000000..d19bac12 --- /dev/null +++ b/app/Http/Controllers/V3/Dashboard/Harim/PanjareVahedController.php @@ -0,0 +1,23 @@ +create([ + + ]); + + return $this->successResponse(); + } +} diff --git a/app/Http/Controllers/V3/Dashboard/Mission/RequestPortalController.php b/app/Http/Controllers/V3/Dashboard/Mission/RequestPortalController.php index 8e5385da..a7f68b25 100644 --- a/app/Http/Controllers/V3/Dashboard/Mission/RequestPortalController.php +++ b/app/Http/Controllers/V3/Dashboard/Mission/RequestPortalController.php @@ -96,7 +96,6 @@ class RequestPortalController extends Controller 'zone_fa' => MissionZones::name($request->zone), 'start_date' => $request->start_date, 'end_date' => $request->end_date, - 'request_date' => $request->request_date, 'description' => $request->description, 'end_point' => $request->end_point, 'area' => json_encode($request->area), diff --git a/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/ConstructionActivityController.php b/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/ConstructionActivityController.php index b8299e63..08919373 100644 --- a/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/ConstructionActivityController.php +++ b/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/ConstructionActivityController.php @@ -19,7 +19,6 @@ class ConstructionActivityController extends Controller use ApiResponse; public function countryActivity(Request $request, OperatorService $operatorService): JsonResponse { - $data = $operatorService->countryActivity(89); return $this->successResponse([ @@ -52,6 +51,4 @@ class ConstructionActivityController extends Controller $name = ' گزارش نگهداری حریم راه برای ساخت و ساز غیر مجاز' . verta()->now()->format('Y-m-d H-i') . '.xlsx'; return Excel::download(new ConstructionReport($data, $request), $name); } - - } diff --git a/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/UtilityPassingActivityController.php b/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/UtilityPassingActivityController.php index da3b9ed3..618fdbc4 100644 --- a/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/UtilityPassingActivityController.php +++ b/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/UtilityPassingActivityController.php @@ -5,6 +5,7 @@ namespace App\Http\Controllers\V3\Dashboard\SafetyAndPrivacy\OperatorReport; use App\Exports\V3\SafetyAndPrivacy\Country\UtilityPassingReport as ExcelReport; use App\Exports\V3\SafetyAndPrivacy\Province\UtilityPassingReport; use App\Http\Controllers\Controller; +use App\Http\Traits\ApiResponse; use App\Models\EdarateShahri; use App\Models\Province; use App\Services\Cartables\SafetyAndPrivacy\OperatorService; @@ -15,9 +16,10 @@ use Symfony\Component\HttpFoundation\BinaryFileResponse; class UtilityPassingActivityController extends Controller { + use ApiResponse; + public function countryActivity(Request $request, OperatorService $operatorService): JsonResponse { - $data = $operatorService->countryActivity(91); return $this->successResponse([ @@ -50,5 +52,4 @@ class UtilityPassingActivityController extends Controller $name = 'گزارش نگهداری حریم راه برای عبور تاسیسات زیربنایی غیر مجاز ' . verta()->now()->format('Y-m-d H-i') . '.xlsx'; return Excel::download(new UtilityPassingReport($data, $request), $name); } - } diff --git a/app/Http/Requests/V3/AccidentReceipt/ConfirmPaymentInfoRequest.php b/app/Http/Requests/V3/AccidentReceipt/ConfirmPaymentInfoRequest.php index 0bbed211..fc24bf06 100644 --- a/app/Http/Requests/V3/AccidentReceipt/ConfirmPaymentInfoRequest.php +++ b/app/Http/Requests/V3/AccidentReceipt/ConfirmPaymentInfoRequest.php @@ -13,7 +13,9 @@ class ConfirmPaymentInfoRequest extends FormRequest */ public function authorize(): bool { - return $this->accident->status === AccidentStates::SODOR_NAME_BIME_VA_DAGHI->value; + return in_array($this->accident->status, + [AccidentStates::SODOR_NAME_BIME_VA_DAGHI->value, AccidentStates::SABT_FISH->value] + ); } /** diff --git a/app/Providers/HorizonServiceProvider.php b/app/Providers/HorizonServiceProvider.php new file mode 100644 index 00000000..8b52b089 --- /dev/null +++ b/app/Providers/HorizonServiceProvider.php @@ -0,0 +1,34 @@ +username == 'witel'; + }); + } +} diff --git a/app/Services/Cartables/AccidentReceiptTableService.php b/app/Services/Cartables/AccidentReceiptTableService.php index 69ab80d3..45de66a6 100644 --- a/app/Services/Cartables/AccidentReceiptTableService.php +++ b/app/Services/Cartables/AccidentReceiptTableService.php @@ -57,7 +57,7 @@ class AccidentReceiptTableService SUM(CASE WHEN STATUS > 3 THEN `deposit_daghi_amount` END) AS vasel_shode_daghi, SUM(CASE WHEN STATUS > 3 THEN `final_amount` END) AS vasel_shode_final FROM `accidents` - where created_at BETWEEN "'.$request->from_date.'" AND "'.$request->date_to.'" + where created_at BETWEEN "'.$request->from_date.' 00:00:00" AND "'.$request->date_to.' 23:59:59" union SELECT province_fa, @@ -74,7 +74,7 @@ class AccidentReceiptTableService SUM(CASE WHEN STATUS > 3 THEN `deposit_daghi_amount` END) AS vasel_shode_daghi, SUM(CASE WHEN STATUS > 3 THEN `final_amount` END) AS vasel_shode_final FROM `accidents` - where created_at BETWEEN "'.$request->from_date.'" AND "'.$request->date_to.'" + where created_at BETWEEN "'.$request->from_date.' 00:00:00" AND "'.$request->date_to.' 23:59:59" GROUP BY province_id ' ); @@ -104,7 +104,7 @@ class AccidentReceiptTableService SUM(CASE WHEN STATUS > 3 THEN `deposit_daghi_amount` END) AS vasel_shode_daghi, SUM(CASE WHEN STATUS > 3 THEN `final_amount` END) AS vasel_shode_final FROM `accidents` - where created_at BETWEEN "'.$request->from_date.'" AND "'.$request->date_to.'" AND province_id ='.$request->province_id.' + where created_at BETWEEN "'.$request->from_date.' 00:00:00" AND "'.$request->date_to.' 23:59:59" AND province_id ='.$request->province_id.' union SELECT city_fa, @@ -121,7 +121,7 @@ class AccidentReceiptTableService SUM(CASE WHEN STATUS > 3 THEN `deposit_daghi_amount` END) AS vasel_shode_daghi, SUM(CASE WHEN STATUS > 3 THEN `final_amount` END) AS vasel_shode_final FROM `accidents` - where created_at BETWEEN "'.$request->from_date.'" AND "'.$request->date_to.'" AND province_id ='.$request->province_id.' + where created_at BETWEEN "'.$request->from_date.' 00:00:00" AND "'.$request->date_to.' 23:59:59" AND province_id ='.$request->province_id.' GROUP BY city_id ' ); diff --git a/app/Services/Cartables/SafetyAndPrivacy/OperatorService.php b/app/Services/Cartables/SafetyAndPrivacy/OperatorService.php index c840e5d8..fee91a66 100644 --- a/app/Services/Cartables/SafetyAndPrivacy/OperatorService.php +++ b/app/Services/Cartables/SafetyAndPrivacy/OperatorService.php @@ -49,11 +49,11 @@ class OperatorService ) s ), provinces AS ( - SELECT DISTINCT province_fa FROM safety_and_privacy WHERE info_id = ? + SELECT DISTINCT province_id FROM safety_and_privacy WHERE info_id = ? ), data AS ( SELECT - p.province_fa, + p.province_id, c.axis_type_id, c.step, COUNT(sp.id) AS total @@ -62,18 +62,18 @@ class OperatorService LEFT JOIN safety_and_privacy sp ON sp.axis_type_id = c.axis_type_id AND sp.step = c.step - AND sp.province_fa = p.province_fa + AND sp.province_id = p.province_id AND sp.info_id = ? - GROUP BY p.province_fa, c.axis_type_id, c.step + GROUP BY p.province_id, c.axis_type_id, c.step ) SELECT - province_fa, + province_id, axis_type_id, step, total, - SUM(total) OVER (PARTITION BY province_fa) AS total_sum + SUM(total) OVER (PARTITION BY province_id) AS total_sum FROM data - ORDER BY province_fa, axis_type_id, step + ORDER BY province_id, axis_type_id, step ", [$info_id, $info_id]); } @@ -90,7 +90,7 @@ class OperatorService ) s ), edarat AS ( - SELECT id AS edare_id, name_fa + SELECT id AS edare_id FROM edarate_shahri WHERE province_id = :provinceId ), @@ -111,7 +111,6 @@ class OperatorService ) SELECT e.edare_id, - e.name_fa AS edare_name, d.axis_type_id, d.step, d.total, @@ -124,5 +123,4 @@ class OperatorService 'infoId' => $info_id, ]); } - } \ No newline at end of file diff --git a/bootstrap/cache/packages.php b/bootstrap/cache/packages.php index 58a2a104..1a06b457 100755 --- a/bootstrap/cache/packages.php +++ b/bootstrap/cache/packages.php @@ -28,6 +28,17 @@ 0 => 'KitLoong\\MigrationsGenerator\\MigrationsGeneratorServiceProvider', ), ), + 'laravel/horizon' => + array ( + 'aliases' => + array ( + 'Horizon' => 'Laravel\\Horizon\\Horizon', + ), + 'providers' => + array ( + 0 => 'Laravel\\Horizon\\HorizonServiceProvider', + ), + ), 'laravel/pulse' => array ( 'aliases' => diff --git a/bootstrap/cache/services.php b/bootstrap/cache/services.php index da457a76..13531056 100755 --- a/bootstrap/cache/services.php +++ b/bootstrap/cache/services.php @@ -26,28 +26,30 @@ 22 => 'Barryvdh\\Debugbar\\ServiceProvider', 23 => 'Hekmatinasser\\Verta\\Laravel\\VertaServiceProvider', 24 => 'KitLoong\\MigrationsGenerator\\MigrationsGeneratorServiceProvider', - 25 => 'Laravel\\Pulse\\PulseServiceProvider', - 26 => 'Laravel\\Sail\\SailServiceProvider', - 27 => 'Laravel\\Sanctum\\SanctumServiceProvider', - 28 => 'Laravel\\Telescope\\TelescopeServiceProvider', - 29 => 'Laravel\\Tinker\\TinkerServiceProvider', - 30 => 'Laravel\\Ui\\UiServiceProvider', - 31 => 'Livewire\\LivewireServiceProvider', - 32 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 33 => 'Carbon\\Laravel\\ServiceProvider', - 34 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', - 35 => 'Termwind\\Laravel\\TermwindServiceProvider', - 36 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider', - 37 => 'Spatie\\Permission\\PermissionServiceProvider', + 25 => 'Laravel\\Horizon\\HorizonServiceProvider', + 26 => 'Laravel\\Pulse\\PulseServiceProvider', + 27 => 'Laravel\\Sail\\SailServiceProvider', + 28 => 'Laravel\\Sanctum\\SanctumServiceProvider', + 29 => 'Laravel\\Telescope\\TelescopeServiceProvider', + 30 => 'Laravel\\Tinker\\TinkerServiceProvider', + 31 => 'Laravel\\Ui\\UiServiceProvider', + 32 => 'Livewire\\LivewireServiceProvider', + 33 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + 34 => 'Carbon\\Laravel\\ServiceProvider', + 35 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', + 36 => 'Termwind\\Laravel\\TermwindServiceProvider', + 37 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider', 38 => 'Spatie\\Permission\\PermissionServiceProvider', - 39 => 'App\\Providers\\AppServiceProvider', - 40 => 'App\\Providers\\AuthServiceProvider', - 41 => 'App\\Providers\\EventServiceProvider', - 42 => 'App\\Providers\\RouteServiceProvider', - 43 => 'App\\Providers\\TelescopeServiceProvider', - 44 => 'Barryvdh\\Debugbar\\ServiceProvider', - 45 => 'App\\Providers\\DataTableServiceProvider', - 46 => 'App\\Providers\\FileServiceProvider', + 39 => 'Spatie\\Permission\\PermissionServiceProvider', + 40 => 'App\\Providers\\AppServiceProvider', + 41 => 'App\\Providers\\AuthServiceProvider', + 42 => 'App\\Providers\\EventServiceProvider', + 43 => 'App\\Providers\\HorizonServiceProvider', + 44 => 'App\\Providers\\RouteServiceProvider', + 45 => 'App\\Providers\\TelescopeServiceProvider', + 46 => 'Barryvdh\\Debugbar\\ServiceProvider', + 47 => 'App\\Providers\\DataTableServiceProvider', + 48 => 'App\\Providers\\FileServiceProvider', ), 'eager' => array ( @@ -64,26 +66,28 @@ 10 => 'Barryvdh\\Debugbar\\ServiceProvider', 11 => 'Hekmatinasser\\Verta\\Laravel\\VertaServiceProvider', 12 => 'KitLoong\\MigrationsGenerator\\MigrationsGeneratorServiceProvider', - 13 => 'Laravel\\Pulse\\PulseServiceProvider', - 14 => 'Laravel\\Sanctum\\SanctumServiceProvider', - 15 => 'Laravel\\Telescope\\TelescopeServiceProvider', - 16 => 'Laravel\\Ui\\UiServiceProvider', - 17 => 'Livewire\\LivewireServiceProvider', - 18 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 19 => 'Carbon\\Laravel\\ServiceProvider', - 20 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', - 21 => 'Termwind\\Laravel\\TermwindServiceProvider', - 22 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider', - 23 => 'Spatie\\Permission\\PermissionServiceProvider', + 13 => 'Laravel\\Horizon\\HorizonServiceProvider', + 14 => 'Laravel\\Pulse\\PulseServiceProvider', + 15 => 'Laravel\\Sanctum\\SanctumServiceProvider', + 16 => 'Laravel\\Telescope\\TelescopeServiceProvider', + 17 => 'Laravel\\Ui\\UiServiceProvider', + 18 => 'Livewire\\LivewireServiceProvider', + 19 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + 20 => 'Carbon\\Laravel\\ServiceProvider', + 21 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', + 22 => 'Termwind\\Laravel\\TermwindServiceProvider', + 23 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider', 24 => 'Spatie\\Permission\\PermissionServiceProvider', - 25 => 'App\\Providers\\AppServiceProvider', - 26 => 'App\\Providers\\AuthServiceProvider', - 27 => 'App\\Providers\\EventServiceProvider', - 28 => 'App\\Providers\\RouteServiceProvider', - 29 => 'App\\Providers\\TelescopeServiceProvider', - 30 => 'Barryvdh\\Debugbar\\ServiceProvider', - 31 => 'App\\Providers\\DataTableServiceProvider', - 32 => 'App\\Providers\\FileServiceProvider', + 25 => 'Spatie\\Permission\\PermissionServiceProvider', + 26 => 'App\\Providers\\AppServiceProvider', + 27 => 'App\\Providers\\AuthServiceProvider', + 28 => 'App\\Providers\\EventServiceProvider', + 29 => 'App\\Providers\\HorizonServiceProvider', + 30 => 'App\\Providers\\RouteServiceProvider', + 31 => 'App\\Providers\\TelescopeServiceProvider', + 32 => 'Barryvdh\\Debugbar\\ServiceProvider', + 33 => 'App\\Providers\\DataTableServiceProvider', + 34 => 'App\\Providers\\FileServiceProvider', ), 'deferred' => array ( diff --git a/composer.json b/composer.json index 8d9ff456..a2345809 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,7 @@ "guzzlehttp/guzzle": "^7.2", "hekmatinasser/verta": "^8.3", "laravel/framework": "^10.10", + "laravel/horizon": "^5.33", "laravel/pulse": "^1.0@beta", "laravel/sanctum": "^3.2", "laravel/telescope": "^4.17", diff --git a/composer.lock b/composer.lock index 0388dc70..2928ac05 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bf9b86b55591e7c7df84cb1be8ea9db3", + "content-hash": "379d6ba4ded00ca7079f26aa5b12e04e", "packages": [ { "name": "beberlei/assert", @@ -1949,6 +1949,86 @@ }, "time": "2024-01-30T16:25:02+00:00" }, + { + "name": "laravel/horizon", + "version": "v5.33.3", + "source": { + "type": "git", + "url": "https://github.com/laravel/horizon.git", + "reference": "aabcd425b34005182acc4c22aae48692684cb765" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/horizon/zipball/aabcd425b34005182acc4c22aae48692684cb765", + "reference": "aabcd425b34005182acc4c22aae48692684cb765", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcntl": "*", + "ext-posix": "*", + "illuminate/contracts": "^9.21|^10.0|^11.0|^12.0", + "illuminate/queue": "^9.21|^10.0|^11.0|^12.0", + "illuminate/support": "^9.21|^10.0|^11.0|^12.0", + "nesbot/carbon": "^2.17|^3.0", + "php": "^8.0", + "ramsey/uuid": "^4.0", + "symfony/console": "^6.0|^7.0", + "symfony/error-handler": "^6.0|^7.0", + "symfony/polyfill-php83": "^1.28", + "symfony/process": "^6.0|^7.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0", + "phpstan/phpstan": "^1.10|^2.0", + "phpunit/phpunit": "^9.0|^10.4|^11.5|^12.0", + "predis/predis": "^1.1|^2.0|^3.0" + }, + "suggest": { + "ext-redis": "Required to use the Redis PHP driver.", + "predis/predis": "Required when not using the Redis PHP driver (^1.1|^2.0|^3.0)." + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "Horizon": "Laravel\\Horizon\\Horizon" + }, + "providers": [ + "Laravel\\Horizon\\HorizonServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\Horizon\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Dashboard and code-driven configuration for Laravel queues.", + "keywords": [ + "laravel", + "queue" + ], + "support": { + "issues": "https://github.com/laravel/horizon/issues", + "source": "https://github.com/laravel/horizon/tree/v5.33.3" + }, + "time": "2025-08-11T14:55:49+00:00" + }, { "name": "laravel/prompts", "version": "v0.1.15", diff --git a/config/app.php b/config/app.php index 43214a21..699fea14 100644 --- a/config/app.php +++ b/config/app.php @@ -177,6 +177,7 @@ return [ App\Providers\AuthServiceProvider::class, // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, + App\Providers\HorizonServiceProvider::class, App\Providers\RouteServiceProvider::class, App\Providers\TelescopeServiceProvider::class, Barryvdh\Debugbar\ServiceProvider::class, diff --git a/config/horizon.php b/config/horizon.php new file mode 100644 index 00000000..8b1f9e44 --- /dev/null +++ b/config/horizon.php @@ -0,0 +1,214 @@ + env('HORIZON_DOMAIN'), + + /* + |-------------------------------------------------------------------------- + | Horizon Path + |-------------------------------------------------------------------------- + | + | This is the URI path where Horizon will be accessible from. Feel free + | to change this path to anything you like. Note that the URI will not + | affect the paths of its internal API that aren't exposed to users. + | + */ + + 'path' => env('HORIZON_PATH', 'horizon'), + + /* + |-------------------------------------------------------------------------- + | Horizon Redis Connection + |-------------------------------------------------------------------------- + | + | This is the name of the Redis connection where Horizon will store the + | meta information required for it to function. It includes the list + | of supervisors, failed jobs, job metrics, and other information. + | + */ + + 'use' => 'default', + + /* + |-------------------------------------------------------------------------- + | Horizon Redis Prefix + |-------------------------------------------------------------------------- + | + | This prefix will be used when storing all Horizon data in Redis. You + | may modify the prefix when you are running multiple installations + | of Horizon on the same server so that they don't have problems. + | + */ + + 'prefix' => env( + 'HORIZON_PREFIX', + Str::slug(env('APP_NAME', 'laravel'), '_').'_horizon:' + ), + + /* + |-------------------------------------------------------------------------- + | Horizon Route Middleware + |-------------------------------------------------------------------------- + | + | These middleware will get attached onto each Horizon route, giving you + | the chance to add your own middleware to this list or change any of + | the existing middleware. Or, you can simply stick with this list. + | + */ + + 'middleware' => ['web'], + + /* + |-------------------------------------------------------------------------- + | Queue Wait Time Thresholds + |-------------------------------------------------------------------------- + | + | This option allows you to configure when the LongWaitDetected event + | will be fired. Every connection / queue combination may have its + | own, unique threshold (in seconds) before this event is fired. + | + */ + + 'waits' => [ + 'redis:default' => 60, + ], + + /* + |-------------------------------------------------------------------------- + | Job Trimming Times + |-------------------------------------------------------------------------- + | + | Here you can configure for how long (in minutes) you desire Horizon to + | persist the recent and failed jobs. Typically, recent jobs are kept + | for one hour while all failed jobs are stored for an entire week. + | + */ + + 'trim' => [ + 'recent' => 60, + 'pending' => 60, + 'completed' => 60, + 'recent_failed' => 10080, + 'failed' => 10080, + 'monitored' => 10080, + ], + + /* + |-------------------------------------------------------------------------- + | Silenced Jobs + |-------------------------------------------------------------------------- + | + | Silencing a job will instruct Horizon to not place the job in the list + | of completed jobs within the Horizon dashboard. This setting may be + | used to fully remove any noisy jobs from the completed jobs list. + | + */ + + 'silenced' => [ + // App\Jobs\ExampleJob::class, + ], + + /* + |-------------------------------------------------------------------------- + | Metrics + |-------------------------------------------------------------------------- + | + | Here you can configure how many snapshots should be kept to display in + | the metrics graph. This will get used in combination with Horizon's + | `horizon:snapshot` schedule to define how long to retain metrics. + | + */ + + 'metrics' => [ + 'trim_snapshots' => [ + 'job' => 24, + 'queue' => 24, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Fast Termination + |-------------------------------------------------------------------------- + | + | When this option is enabled, Horizon's "terminate" command will not + | wait on all of the workers to terminate unless the --wait option + | is provided. Fast termination can shorten deployment delay by + | allowing a new instance of Horizon to start while the last + | instance will continue to terminate each of its workers. + | + */ + + 'fast_termination' => false, + + /* + |-------------------------------------------------------------------------- + | Memory Limit (MB) + |-------------------------------------------------------------------------- + | + | This value describes the maximum amount of memory the Horizon master + | supervisor may consume before it is terminated and restarted. For + | configuring these limits on your workers, see the next section. + | + */ + + 'memory_limit' => 64, + + /* + |-------------------------------------------------------------------------- + | Queue Worker Configuration + |-------------------------------------------------------------------------- + | + | Here you may define the queue worker settings used by your application + | in all environments. These supervisors and settings handle all your + | queued jobs and will be provisioned by Horizon during deployment. + | + */ + + 'defaults' => [ + 'supervisor-1' => [ + 'connection' => 'redis', + 'queue' => ['default'], + 'balance' => 'auto', + 'autoScalingStrategy' => 'time', + 'maxProcesses' => 1, + 'maxTime' => 0, + 'maxJobs' => 0, + 'memory' => 128, + 'tries' => 2, + 'timeout' => 60, + 'nice' => 0, + 'backoff' => 10, + ], + ], + + 'environments' => [ + 'production' => [ + 'supervisor-1' => [ + 'maxProcesses' => 10, + 'balanceMaxShift' => 1, + 'balanceCooldown' => 3, + ], + ], + + 'local' => [ + 'supervisor-1' => [ + 'maxProcesses' => 3, + ], + ], + ], +]; diff --git a/database/migrations/2025_08_19_144959_change_column_in_harims_table.php b/database/migrations/2025_08_19_144959_change_column_in_harims_table.php new file mode 100644 index 00000000..43a75e12 --- /dev/null +++ b/database/migrations/2025_08_19_144959_change_column_in_harims_table.php @@ -0,0 +1,42 @@ +dropColumn(['first_name', 'last_name', 'request_number', 'county']); + $table->unsignedBigInteger('panjare_vahed_id'); + $table->string('national_id'); + $table->string('worksheet_id'); + $table->json('response_options')->nullable(); + $table->string('isic'); + $table->polygon('primary_area'); + $table->polygon('forbidden_area')->nullable(); + $table->polygon('final_area'); + $table->polygon('final_plan'); + $table->polygon('access_road')->nullable(); + $table->string('payment_amount'); + $table->boolean('need_payment'); + $table->boolean('need_access_road'); + $table->boolean('access_road_allowed')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('harims', function (Blueprint $table) { + // + }); + } +}; diff --git a/routes/v3.php b/routes/v3.php index e8ec2b33..50eb8330 100644 --- a/routes/v3.php +++ b/routes/v3.php @@ -558,32 +558,31 @@ Route::prefix('harim') Route::post('/confirm_guarantee_letter_need/{harim}', 'confirmGuaranteeLetterNeed')->name('confirmGuaranteeLetterNeed'); Route::get('/{harim}', 'show')->name('show'); }); - Route::prefix('user_management') - ->name('user_management.') - ->controller(UserManagementController::class) - ->group(function () { -// Route::get('/', 'index')->name('index'); - Route::get('/index_user', 'indexUser')->name('indexUser'); - Route::get('/activity_report', 'activityReport')->name('activityReport'); - Route::get('/userActivityLogs', 'userActivityLogs')->name('userActivityLogs'); - Route::post('/change_confirmed_status', 'changeConfirmedStatus')->name('changeConfirmedStatus'); - Route::get('/give_permissions_to', 'givePermissionsTo')->name('givePermissionsTo'); - Route::get('/get_user_permissions', 'getUserPermissions')->name('getUserPermissions'); - Route::get('/get_user_summary_report', 'getUserSummaryReport')->name('getUserSummaryReport'); - Route::get('/print_group', 'printGroup')->name('printGroup'); - Route::get('/user_permission', 'userPermission')->name('userPermission'); - Route::get('/assign_permission', 'assignPermission')->name('assignPermission'); - Route::get('/show_all_roles', 'showAllRoles')->name('showAllRoles'); - Route::post('/change_user_enabeld','changeUserEnabeld')->name('changeUserEnabeld'); - Route::post('/','store')->name('store'); - Route::post('/create_role','createRole')->name('createRole'); - Route::post('/edit_role','editRole')->name('editRole'); - Route::get('/{user}', 'show')->name('show'); - Route::post('/{user}', 'update')->name('update'); - Route::delete('/{user}', 'destroy')->name('destroy'); - Route::post('/change_password/{user}', 'changePassword')->name('changePassword'); - Route::post('delete-role/{id}', 'deleteRole')->name('deleteRole'); - - }); }); +Route::prefix('user_management') + ->name('user_management.') + ->controller(UserManagementController::class) + ->group(function () { +// Route::get('/', 'index')->name('index'); + Route::get('/index_user', 'indexUser')->name('indexUser'); + Route::get('/activity_report', 'activityReport')->name('activityReport'); + Route::get('/userActivityLogs', 'userActivityLogs')->name('userActivityLogs'); + Route::post('/change_confirmed_status', 'changeConfirmedStatus')->name('changeConfirmedStatus'); + Route::get('/give_permissions_to', 'givePermissionsTo')->name('givePermissionsTo'); + Route::get('/get_user_permissions', 'getUserPermissions')->name('getUserPermissions'); + Route::get('/get_user_summary_report', 'getUserSummaryReport')->name('getUserSummaryReport'); + Route::get('/print_group', 'printGroup')->name('printGroup'); + Route::get('/user_permission', 'userPermission')->name('userPermission'); + Route::get('/assign_permission', 'assignPermission')->name('assignPermission'); + Route::get('/show_all_roles', 'showAllRoles')->name('showAllRoles'); + Route::post('/change_user_enabeld','changeUserEnabeld')->name('changeUserEnabeld'); + Route::post('/','store')->name('store'); + Route::post('/create_role','createRole')->name('createRole'); + Route::post('/edit_role','editRole')->name('editRole'); + Route::get('/{user}', 'show')->name('show'); + Route::post('/{user}', 'update')->name('update'); + Route::delete('/{user}', 'destroy')->name('destroy'); + Route::post('/change_password/{user}', 'changePassword')->name('changePassword'); + Route::post('delete-role/{id}', 'deleteRole')->name('deleteRole'); + });