feat:신용평가 그룹 메뉴 및 조회 페이지 추가

- 신용평가 그룹 메뉴 추가 (MngMenuSeeder)
- 신용평가 조회 하위 메뉴 추가
- CreditController 생성
- 신용평가 조회 페이지 뷰 생성

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
pro
2026-01-22 19:11:45 +09:00
parent 30a61fff81
commit f5f8f81173
4 changed files with 141 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Http\Controllers\Credit;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\View\View;
/**
* 신용평가 컨트롤러
*/
class CreditController extends Controller
{
/**
* 신용평가 조회 페이지
* HTMX 요청 시 전체 페이지 리로드 (스크립트 로딩을 위해)
*/
public function inquiry(Request $request): View|Response
{
if ($request->header('HX-Request')) {
return response('', 200)->header('HX-Redirect', route('credit.inquiry.index'));
}
return view('credit.inquiry.index');
}
}

View File

@@ -615,6 +615,30 @@ protected function seedMainMenus(): void
'options' => ['route_name' => 'barobill.usage.index', 'section' => 'main'],
]);
// ========================================
// 신용평가 그룹
// ========================================
$creditGroup = $this->createMenu([
'name' => '신용평가',
'url' => '#',
'icon' => 'shield-check',
'sort_order' => $sortOrder++,
'options' => [
'section' => 'main',
'meta' => ['group_id' => 'credit-group'],
],
]);
$creditSubOrder = 0;
$this->createMenu([
'parent_id' => $creditGroup->id,
'name' => '신용평가 조회',
'url' => '/credit/inquiry',
'icon' => 'search',
'sort_order' => $creditSubOrder++,
'options' => ['route_name' => 'credit.inquiry.index', 'section' => 'main'],
]);
// ========================================
// 시스템 그룹
// ========================================

View File

@@ -0,0 +1,81 @@
@extends('layouts.app')
@section('title', '신용평가 조회')
@section('content')
<div class="flex flex-col h-full">
<!-- 페이지 헤더 -->
<div class="flex flex-col sm:flex-row sm:justify-between sm:items-center gap-4 mb-6 flex-shrink-0">
<div>
<h1 class="text-2xl font-bold text-gray-800">신용평가 조회</h1>
<p class="text-sm text-gray-500 mt-1">기업 신용평가 정보를 조회합니다</p>
</div>
</div>
<!-- 조회 -->
<div class="bg-white rounded-lg shadow-sm p-6 mb-6 flex-shrink-0">
<form id="inquiryForm" class="flex flex-wrap gap-4 items-end">
<!-- 사업자번호 입력 -->
<div class="flex-1 min-w-[200px]">
<label class="block text-sm font-medium text-gray-700 mb-1">사업자번호</label>
<input type="text"
name="biz_no"
id="bizNoInput"
placeholder="000-00-00000"
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 class="flex-1 min-w-[200px]">
<label class="block text-sm font-medium text-gray-700 mb-1">상호명</label>
<input type="text"
name="corp_name"
id="corpNameInput"
placeholder="회사명 입력"
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>
<button type="submit" class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-2 rounded-lg transition flex items-center gap-2">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
</svg>
조회
</button>
</div>
</form>
</div>
<!-- 조회 결과 영역 -->
<div id="result-container" class="bg-white rounded-lg shadow-sm flex-1 min-h-0 overflow-auto">
<!-- 초기 안내 메시지 -->
<div class="flex flex-col items-center justify-center h-full text-gray-400 p-12">
<svg class="w-16 h-16 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
</svg>
<p class="text-lg font-medium">신용평가 조회</p>
<p class="text-sm mt-1">사업자번호 또는 상호명을 입력하여 조회하세요</p>
</div>
</div>
</div>
@endsection
@push('scripts')
<script>
document.getElementById('inquiryForm').addEventListener('submit', function(e) {
e.preventDefault();
const bizNo = document.getElementById('bizNoInput').value.trim();
const corpName = document.getElementById('corpNameInput').value.trim();
if (!bizNo && !corpName) {
showToast('사업자번호 또는 상호명을 입력해주세요.', 'warning');
return;
}
// TODO: 신용평가 조회 API 연동
showToast('신용평가 조회 기능은 준비 중입니다.', 'info');
});
</script>
@endpush

View File

@@ -279,6 +279,15 @@
Route::get('/config', [\App\Http\Controllers\Barobill\BarobillController::class, 'config'])->name('config.index');
});
/*
|--------------------------------------------------------------------------
| 신용평가 Routes
|--------------------------------------------------------------------------
*/
Route::prefix('credit')->name('credit.')->group(function () {
Route::get('/inquiry', [\App\Http\Controllers\Credit\CreditController::class, 'inquiry'])->name('inquiry.index');
});
// 대시보드
Route::get('/dashboard', function () {
return view('dashboard.index');