feat: 알림음 시스템 - FCM 발송 UI 타입 드롭다운 추가

- 알림 타입 선택 드롭다운 추가 (6개 타입)
- channel_id 검증 로직 추가
- sound_key 파라미터 제거

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-01-07 20:10:19 +09:00
parent 85d50e9d8b
commit 8e1f39defe
2 changed files with 20 additions and 21 deletions

View File

@@ -97,10 +97,9 @@ public function sendPush(Request $request): View
'tenant_id' => 'nullable|integer|exists:tenants,id',
'user_id' => 'nullable|integer',
'platform' => 'nullable|string|in:android,ios,web',
'channel_id' => 'nullable|string|max:50',
'channel_id' => 'nullable|string|in:push_default,push_urgent,push_payment,push_sales_order,push_purchase_order,push_contract',
'type' => 'nullable|string|max:50',
'url' => 'nullable|string|max:500',
'sound_key' => 'nullable|string|max:50',
]);
// API 서버로 발송 요청
@@ -111,10 +110,9 @@ public function sendPush(Request $request): View
'tenant_id' => $request->get('tenant_id'),
'user_id' => $request->get('user_id'),
'platform' => $request->get('platform'),
'channel_id' => $request->get('channel_id'),
'channel_id' => $request->get('channel_id', 'push_default'),
'type' => $request->get('type'),
'url' => $request->get('url'),
'sound_key' => $request->get('sound_key'),
]),
auth()->id()
);

View File

@@ -93,6 +93,20 @@ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none foc
placeholder="알림 내용"
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">알림 타입</label>
<select name="channel_id"
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
<option value="push_default">📢 일반 알림</option>
<option value="push_urgent">🚨 긴급 알림 (신규업체 등록)</option>
<option value="push_payment">💰 결제 알림</option>
<option value="push_sales_order">📦 수주 알림</option>
<option value="push_purchase_order">🛒 발주 알림</option>
<option value="push_contract">📝 계약 알림</option>
</select>
<p class="mt-1 text-xs text-gray-500">알림 타입에 따라 다른 알림음이 재생됩니다.</p>
</div>
</div>
<hr class="my-6">
@@ -102,18 +116,12 @@ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none foc
<summary class="cursor-pointer text-sm font-medium text-gray-700">고급 설정</summary>
<div class="mt-4 space-y-4 pl-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">채널 ID</label>
<input type="text"
name="channel_id"
value="push_default"
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">알림 타입</label>
<label class="block text-sm font-medium text-gray-700 mb-1">데이터 타입</label>
<input type="text"
name="type"
placeholder="예: notice, event"
placeholder="예: notice, event, order"
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
<p class="mt-1 text-xs text-gray-500">앱에서 알림 클릭 처리할 데이터 타입</p>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">딥링크 URL</label>
@@ -121,14 +129,7 @@ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none foc
name="url"
placeholder="예: /notices/123"
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">사운드 </label>
<input type="text"
name="sound_key"
value="default"
placeholder="예: default, alarm"
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
<p class="mt-1 text-xs text-gray-500"> 이동할 경로 (선택)</p>
</div>
</div>
</details>