Feat: Выбор типа получателя в заявке

 Select: Пользователь/Группа/Организация
 Динамическое переключение полей
 Валидация выбора получателя
 Убрано поле Организация из info блока

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
mirivlad
2026-04-02 09:51:30 +08:00
co-authored by Qwen-Coder
parent 3f0039712d
commit b313d96bfc
3 changed files with 88 additions and 36 deletions
@@ -80,9 +80,14 @@ class CourseRequestController extends Controller
DB::beginTransaction();
try {
// Берём organization_id из первого элемента или null
$firstItem = reset($items);
$organizationId = $firstItem['organization_id'] ?? null;
// Берём organization_id из ПЕРВОГО элемента у которого он есть
$organizationId = null;
foreach ($items as $item) {
if (!empty($item['organization_id'])) {
$organizationId = $item['organization_id'];
break;
}
}
// Создаём заявку
$courseRequest = CourseRequest::create([