add permission

This commit is contained in:
2025-04-23 11:45:01 +03:30
parent c29738f96c
commit 717b268f76
4 changed files with 10 additions and 19 deletions

View File

@@ -212,7 +212,7 @@ class SafetyAndPrivacyController extends Controller
$status_id = SafetyAndPrivacyStatus::CONFIRM->value;
$safetyAndPrivacy->update([
'status' => SafetyAndPrivacyStatus::CONFIRM->value,
'status' => $status_id,
'status_fa' => SafetyAndPrivacyStatus::name($status_id),
]);
@@ -239,7 +239,7 @@ class SafetyAndPrivacyController extends Controller
$safetyAndPrivacy->update([
'is_finished' => 1,
'final_description' => $request->final_description,
'status' => SafetyAndPrivacyStatus::PENDING->value,
'status' => $status_id,
'status_fa' => SafetyAndPrivacyStatus::name($status_id),
]);

View File

@@ -22,8 +22,8 @@ class SafetyAndPrivacyTableService
{
$user = auth()->user();
$fields = ['id','lat','lon', 'province_fa', 'edare_shahri_name',
'recognize_picture','action_picture','created_at','step', 'final_description',
$fields = [
'id','lat','lon', 'recognize_picture','action_picture','created_at','step', 'final_description',
'info_fa', 'activity_date_time', 'action_picture_document_upload_date', 'judiciary_document_upload_date',
'step_fa', 'axis_type_id', 'axis_type_name', 'action_date', 'is_finished', 'status_fa', 'supervisor_description'
];

View File

@@ -42,14 +42,6 @@
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
کد یکتا
</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
استان
</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
اداره
</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
مورد مشاهده شده
@@ -85,8 +77,6 @@
@foreach ($data as $item)
<tr>
<td style="border: 1px solid black;text-align: center;">{{ $item['id'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['province_fa'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['edare_shahri_name'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['info_fa'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['axis_type_name'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['created_at'] ? verta($item['created_at'])->format('Y/n/j H:i:s') : '-' }}</td>

View File

@@ -338,14 +338,15 @@ Route::prefix('safety_and_privacy')
->controller(SafetyAndPrivacyController::class)
->group(function () {
Route::get('/operator_index', 'operatorIndex')->name('operatorIndex')
->middleware('permission:show-safety-and-privacy-operator-cartable|show-safety-and-privacy-operator-cartable-province|show-safety-and-privacy-operator-cartable-edarate-shahri');
->middleware('permission:show-safety-and-privacy-operator-cartable-edarate-shahri');
Route::get('/supervisor_index', 'supervisorIndex')->name('supervisorIndex')
->middleware('permission:show-safety-and-privacy-operator-cartable|show-safety-and-privacy-operator-cartable-province|show-safety-and-privacy-operator-cartable-edarate-shahri');
->middleware('permission:show-safety-and-privacy-operator-cartable|show-safety-and-privacy-operator-cartable-province');
Route::get('/operator_excel_report', 'operatorExcelReport')->name('operatorExcelReport')
->middleware('permission:show-safety-and-privacy-operator-cartable|show-safety-and-privacy-operator-cartable-province|show-safety-and-privacy-operator-cartable-edarate-shahri');
Route::post('/first_step_store', 'firstStepStore')->name('firstStepStore')
->middleware(['validate-store-access', 'permission:add-safety-and-privacy']);
->middleware('permission:show-safety-and-privacy-operator-cartable-edarate-shahri');
Route::get('/supervisor_excel_report', 'supervisorExcelReport')->name('supervisorExcelReport')
->middleware('permission:show-safety-and-privacy-operator-cartable|show-safety-and-privacy-operator-cartable-province');
Route::post('/first_step_store', 'firstStepStore')->name('firstStepStore')->middleware(['validate-store-access', 'permission:add-safety-and-privacy']);
Route::get('/sub_items', 'subItems')->name('subItems');
Route::get('/map', 'map')->name('map');
Route::post('/second_step_store/{safetyAndPrivacy}', 'secondStepStore')->name('secondStepStore')->middleware(['validate-store-access','permission:add-safety-and-privacy']);