fix code
This commit is contained in:
@@ -158,7 +158,7 @@ class HarimOfficeController extends Controller
|
|||||||
'state_name' => HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_MOAVEN->label(),
|
'state_name' => HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_MOAVEN->label(),
|
||||||
'traffic' => $request->traffic,
|
'traffic' => $request->traffic,
|
||||||
'position' => $request->position,
|
'position' => $request->position,
|
||||||
'final_plan_space' => $request->final_plan_space,
|
'final_area_space' => $request->final_area_space,
|
||||||
'road_type' => $request->road_type,
|
'road_type' => $request->road_type,
|
||||||
'payment_amount' => $request->payment_amount,
|
'payment_amount' => $request->payment_amount,
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ class ComputingPaymentRequest extends FormRequest
|
|||||||
*/
|
*/
|
||||||
public function authorize(): bool
|
public function authorize(): bool
|
||||||
{
|
{
|
||||||
return $this->harim->province_id === auth()->user()->province_id &&
|
return $this->harim->province_id == auth()->user()->province_id &&
|
||||||
$this->harim->state_id === HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_DAFTAR_HARIM->value;
|
$this->harim->state_id == HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_DAFTAR_HARIM->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,11 +25,11 @@ class ComputingPaymentRequest extends FormRequest
|
|||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'traffic' => 'required|numeric|decimal:1',
|
'traffic' => 'required|numeric|decimal:0,1',
|
||||||
'road_type' => 'required|numeric|decimal:1',
|
'road_type' => 'required|numeric|decimal:0,1',
|
||||||
'position' => 'required|numeric|decimal:1',
|
'position' => 'required|numeric|decimal:0,1',
|
||||||
'final_area_space' => 'required|numeric|decimal:2',
|
'final_area_space' => 'required|numeric|decimal:0,2',
|
||||||
'payment_amount' => 'required|numeric|decimal:2',
|
'payment_amount' => 'required|numeric|decimal:0,2',
|
||||||
'expert_description' => 'required|string',
|
'expert_description' => 'required|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use App\Enums\HarimStates;
|
|
||||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
@@ -39,7 +38,7 @@ class Harim extends Model
|
|||||||
'previous_state_name' => $this->state_name,
|
'previous_state_name' => $this->state_name,
|
||||||
'expert_description' => $description,
|
'expert_description' => $description,
|
||||||
'action_id' => $action,
|
'action_id' => $action,
|
||||||
'action_name' => HarimAction::name($action),
|
'action_name' => \App\Enums\HarimAction::name($action),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->update($data);
|
$this->update($data);
|
||||||
|
|||||||
@@ -14,23 +14,23 @@ class HarimStateSeeder extends Seeder
|
|||||||
public function run(): void
|
public function run(): void
|
||||||
{
|
{
|
||||||
DB::table('harim_states')->insert([
|
DB::table('harim_states')->insert([
|
||||||
['id' => 1, 'name' => 'بررسی ادارات شهرستان', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 1, 'name' => 'بررسی ادارات شهرستان', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 2, 'name' => 'بررسی توسط ادارات حریم', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 2, 'name' => 'بررسی توسط ادارات حریم','created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 3, 'name' => 'بررسی توسط معاون', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 3, 'name' => 'بررسی توسط معاون', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 4, 'name' => 'بررسی توسط مدیر کل', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 4, 'name' => 'بررسی توسط مدیر کل','created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 5, 'name' => 'بررسی فایل آپلود شده توسط اداره حریم', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 5, 'name' => 'بررسی راه دسترسی آپلود شده توسط اداره حریم', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 6, 'name' => 'بررسی فایل آپلود شده توسط معاون', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 6, 'name' => 'بررسی راه دسترسی آپلود شده توسط معاون', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 7, 'name' => 'بررسی فایل آپلود شده توسط مدیر', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 7, 'name' => 'بررسی راه دسترسی آپلود شده توسط مدیر', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 8, 'name' => 'ارسال ضمانت نامه توسط کاربر', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 8, 'name' => 'دریافت عرصه و عیان نهایی', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 9, 'name' => 'ارسال به پنجره واحد ( نیاز به راه دسترسی)', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 9, 'name' => 'ارسال به پنجره واحد ( نیاز به راه دسترسی)', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 10, 'name' => 'امکان پذیر نمی باشد', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 10, 'name' => 'امکان پذیر نمی باشد', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 11, 'name' => 'ارسال به پنجره واحد (بدون نیاز به راه دسترسی)', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 11, 'name' => 'ارسال به پنجره واحد (بدون نیاز به راه دسترسی)', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 12, 'name' => 'بازبینی فایل بارگذاری شده', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 12, 'name' => 'بازبینی راه دسترسی بارگذاری شده', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 13, 'name' => 'تائید عرصه و اعیان ارسال شده توسط اداره حریم', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 13, 'name' => 'تائید عرصه و اعیان ارسال شده توسط اداره حریم', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 14, 'name' => 'تائید عرصه و اعیان ارسال شده توسط معاون', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 14, 'name' => 'تائید عرصه و اعیان ارسال شده توسط معاون', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 15, 'name' => 'تائید عرصه و اعیان ارسال شده توسط مدیر', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 15, 'name' => 'تائید عرصه و اعیان ارسال شده توسط مدیر', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
['id' => 16, 'name' => 'مخالفت با درخواست', 'created_at' => now(), 'updated_at' => now(),],
|
['id' => 16, 'name' => 'مخالفت با درخواست', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
|
['id' => 17, 'name' => 'اتمام فرایند', 'created_at' => now(), 'updated_at' => now(),],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -546,12 +546,12 @@ Route::prefix('harim')
|
|||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/', 'index')->name('index');
|
Route::get('/', 'index')->name('index');
|
||||||
Route::post('/reject_request/{harim}', 'rejectRequest')->name('rejectRequest');
|
Route::post('/reject_request/{harim}', 'rejectRequest')->name('rejectRequest');
|
||||||
|
Route::post('/refer_request/{harim}', 'referRequest')->name('referRequest');
|
||||||
Route::post('/need_road_access/{harim}', 'needRoadAccess')->name('needRoadAccess');
|
Route::post('/need_road_access/{harim}', 'needRoadAccess')->name('needRoadAccess');
|
||||||
Route::post('/without_road_access/{harim}', 'withoutRoadAccess')->name('withoutRoadAccess');
|
Route::post('/without_road_access/{harim}', 'withoutRoadAccess')->name('withoutRoadAccess');
|
||||||
Route::post('/file_accepted/{harim}', 'fileAccepted')->name('fileAccepted');
|
Route::post('/file_accepted/{harim}', 'fileAccepted')->name('fileAccepted');
|
||||||
Route::post('/file_rejected/{harim}', 'fileRejected')->name('fileRejected');
|
Route::post('/file_rejected/{harim}', 'fileRejected')->name('fileRejected');
|
||||||
Route::get('/{harim}', 'show')->name('show');
|
Route::get('/{harim}', 'show')->name('show');
|
||||||
Route::post('/refer_request/{harim}', 'referRequest')->name('referRequest');
|
|
||||||
Route::post('/computing_payment/{harim}', 'computingPayment')->name('computingPayment');
|
Route::post('/computing_payment/{harim}', 'computingPayment')->name('computingPayment');
|
||||||
Route::post('/refer_to_city/{harim}', 'referToCity')->name('referToCity');
|
Route::post('/refer_to_city/{harim}', 'referToCity')->name('referToCity');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user