debug code

This commit is contained in:
2025-08-04 12:06:18 +03:30
parent 07d8202469
commit ab6d6f2cb0
15 changed files with 18 additions and 16 deletions

View File

@@ -22,7 +22,7 @@ class GeneralManagerController extends Controller
$user = auth()->user();
$query = Harim::query()
->where('state_id','=',HarimStates::Baresi_Imeni_Rah_Tavasot_Modir_Kol->value)
->where('edare_shahri_id', '=', $user->edarate_shahri_id)
->where('edareh_shahri_id', '=', $user->edarate_shahri_id)
->with('histories:expert_description');
$data = DataTableFacade::run(

View File

@@ -23,7 +23,7 @@ class HarimOfficeController extends Controller
$user = auth()->user();
$query = Harim::query()
->where('state_id','=',HarimStates::Baresi_Imeni_Rah_Tavasot_Daftar_Harim->value)
->where('edare_shahri_id', '=', $user->edarate_shahri_id)
->where('edareh_shahri_id', '=', $user->edarate_shahri_id)
->with('expert_description');
$data = DataTableFacade::run(
$query,

View File

@@ -22,7 +22,7 @@ class ProvinceOfficeController extends Controller
$user = auth()->user();
$query = Harim::query()
->where('state_id','=',HarimStates::Baresi_Edare_Shahrestan->value)
->where('edare_shahri_id', '=', $user->edarate_shahri_id);
->where('edareh_shahri_id', '=', $user->edarate_shahri_id);
$data = DataTableFacade::run(
$query,

View File

@@ -22,7 +22,7 @@ class TechnicalDeputyController extends Controller
$user = auth()->user();
$query = Harim::query()
->where('state_id', '=', HarimStates::Baresi_Imeni_Rah_Tavasot_Moaven->value)
->where('edare_shahri_id', '=', $user->edarate_shahri_id)
->where('edareh_shahri_id', '=', $user->edarate_shahri_id)
->with('histories:expert_description');
$data = DataTableFacade::run(

View File

@@ -12,7 +12,7 @@ class ConfirmRequest extends FormRequest
*/
public function authorize(): bool
{
return $this->harim->edare_shahri_id == auth()->user()->edarate_shahri_id &&
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
$this->harim->state_id == HarimStates::Baresi_Imeni_Rah_Tavasot_Moaven->value;
}

View File

@@ -12,7 +12,7 @@ class RejectRequest extends FormRequest
*/
public function authorize(): bool
{
return $this->harim->edare_shahri_id == auth()->user()->edarate_shahri_id &&
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
$this->harim->state_id == HarimStates::Baresi_Imeni_Rah_Tavasot_Moaven->value;
}

View File

@@ -12,7 +12,7 @@ class ConfirmRequest extends FormRequest
*/
public function authorize(): bool
{
return $this->harim->edare_shahri_id == auth()->user()->edarate_shahri_id &&
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
$this->harim->state_id == HarimStates::Baresi_Imeni_Rah_Tavasot_Modir_Kol->value;
}

View File

@@ -12,7 +12,7 @@ class RejectRequest extends FormRequest
*/
public function authorize(): bool
{
return $this->harim->edare_shahri_id == auth()->user()->edarate_shahri_id &&
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
$this->harim->state_id == HarimStates::Baresi_Imeni_Rah_Tavasot_Modir_Kol->value; }
/**

View File

@@ -12,7 +12,7 @@ class NoRequest extends FormRequest
*/
public function authorize(): bool
{
return $this->harim->edare_shahri_id == auth()->user()->edarate_shahri_id &&
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
$this->harim->state_id == HarimStates::Baresi_Imeni_Rah_Tavasot_Daftar_Harim->value;
}

View File

@@ -12,7 +12,7 @@ class YesRequest extends FormRequest
*/
public function authorize(): bool
{
return $this->harim->edare_shahri_id == auth()->user()->edarate_shahri_id &&
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
$this->harim->state_id == HarimStates::Baresi_Imeni_Rah_Tavasot_Daftar_Harim->value;
}

View File

@@ -12,7 +12,7 @@ class FeedBackRequest extends FormRequest
*/
public function authorize(): bool
{
return $this->harim->edare_shahri_id == auth()->user()->edarate_shahri_id &&
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
$this->harim->state_id == HarimStates::Baresi_Edare_Shahrestan->value;
}

View File

@@ -10,7 +10,6 @@ class Harim extends Model
{
use HasFactory;
protected $guarded = [];
protected $table = 'harim';
public function histories(): HasMany
{

View File

@@ -48,8 +48,8 @@ class HarimFactory extends Factory
'plan_group' => $this->faker->name,
'plan_title' => $this->faker->title,
'address' => $this->faker->address,
'file' => $this->faker->file,
'polygon' => $this->faker->numerify(),
'file' => $this->faker->name,
'polygon' => json_encode($this->faker->numerify()),
];
}
}

View File

@@ -38,7 +38,10 @@ return new class extends Migration
$table->string('plan_title');
$table->string('address');
$table->string('file');
$table->polygon('polygon');
$table->json('polygon');
$table->boolean('need_road_access')->nullable();
$table->integer('final_decision')->nullable();
$table->string('final_description')->nullable();
$table->timestamps();
});
}

View File

@@ -18,7 +18,7 @@ class HarimStateSeeder extends Seeder
['id' => 2, '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' => 5, 'name' => 'رد به دلیل ایمنی راه', 'created_at' => now(), 'updated_at' => now(),],
['id' => 5, 'name' => 'ارسال به پنجره واحد', 'created_at' => now(), 'updated_at' => now(),],
]);
}
}