* закончил окно редактирования карты с назначением номера в архиве

* добавил окно для редактирования выдачи / возврата карты
* раздробил логику хранения карты
This commit is contained in:
brusnitsyn
2025-12-05 18:04:02 +09:00
parent 2dfa45707c
commit 2e1b5a3d0e
17 changed files with 431 additions and 13 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Carbon;
class ArchiveHistoryResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'issue_at' => Carbon::parse($this->issue_at)->format('d.m.Y'),
'return_at' => Carbon::parse($this->return_at)->format('d.m.Y'),
'comment' => $this->comment,
'org_id' => $this->org_id,
'org' => $this->org->name,
'employee_name' => $this->employee_name,
'employee_post' => $this->employee_post,
'has_lost' => $this->has_lost,
];
}
}