add pending to status

This commit is contained in:
2025-04-23 09:06:50 +03:30
parent 16c143fa4c
commit 8513ebd728
2 changed files with 5 additions and 1 deletions

View File

@@ -6,12 +6,14 @@ enum SafetyAndPrivacyStatus: int
{
case CONFIRM = 1;
case REJECT = 2;
case PENDING = 3;
public static function name(int $state): string
{
$mapArray = [
1 => 'تایید',
2 => 'عدم تایید',
3 => 'در حال بررسی'
];
return $mapArray[$state];

View File

@@ -127,6 +127,7 @@ class SafetyAndPrivacyController extends Controller
'action_picture' => FileFacade::save($request->action_picture, "safety_and_privacy/{$safetyAndPrivacy->id}/action_picture"),
'action_picture_document_upload_date' => now(),
'action_date' => $request->action_date,
'is_finished' => true
]);
$user->addActivityComplete(1136);
@@ -223,7 +224,8 @@ class SafetyAndPrivacyController extends Controller
{
$safetyAndPrivacy->update([
'is_finished' => $request->is_finished,
'final_description' => $request->final_description
'final_description' => $request->final_description,
'status' => SafetyAndPrivacyStatus::PENDING->value,
]);
return $this->successResponse();