add stickers logic

This commit is contained in:
root
2026-03-10 16:40:11 -04:00
parent 3bf4c687da
commit 2e9a391280
17 changed files with 1047 additions and 390 deletions
@@ -0,0 +1,16 @@
<?php
namespace App\Http\Resources\Reports\Stickers;
use Illuminate\Http\Resources\Json\JsonResource;
class StickerClassSectionResource extends JsonResource
{
public function toArray($request): array
{
return [
'class_section_id' => (int) ($this['class_section_id'] ?? 0),
'class_section_name' => (string) ($this['class_section_name'] ?? ''),
];
}
}
@@ -0,0 +1,19 @@
<?php
namespace App\Http\Resources\Reports\Stickers;
use Illuminate\Http\Resources\Json\JsonResource;
class StickerPresetResource extends JsonResource
{
public function toArray($request): array
{
return [
'value' => (string) ($this['value'] ?? ''),
'label' => (string) ($this['label'] ?? ''),
'title' => (string) ($this['title'] ?? ''),
'text' => (string) ($this['text'] ?? ''),
'per_page' => $this['per_page'] ?? null,
];
}
}
@@ -0,0 +1,19 @@
<?php
namespace App\Http\Resources\Reports\Stickers;
use Illuminate\Http\Resources\Json\JsonResource;
class StickerStudentResource extends JsonResource
{
public function toArray($request): array
{
return [
'id' => (int) ($this['id'] ?? 0),
'firstname' => (string) ($this['firstname'] ?? ''),
'lastname' => (string) ($this['lastname'] ?? ''),
'registration_grade' => $this['registration_grade'] ?? null,
'gender' => $this['gender'] ?? null,
];
}
}