feat: [pm] 프로젝트 진행 관리 시스템 구현
- Models: AdminPmProject, AdminPmTask, AdminPmIssue
- Services: ProjectService, TaskService, IssueService, ImportService
- API Controllers: ProjectController, TaskController, IssueController, ImportController
- FormRequests: Store/Update/BulkAction 요청 검증
- Views: 대시보드, 프로젝트 CRUD, JSON Import 화면
- Routes: API 42개 + Web 6개 엔드포인트
주요 기능:
- 프로젝트/작업/이슈 계층 구조 관리
- 상태 변경, 우선순위, 마감일 추적
- 작업 순서 드래그앤드롭 (reorder API)
- JSON Import로 일괄 등록
- Soft Delete 및 복원
2025-11-28 08:49:30 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests\ProjectManagement;
|
|
|
|
|
|
|
|
|
|
use App\Models\Admin\AdminPmIssue;
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
|
|
|
|
class StoreIssueRequest extends FormRequest
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
|
*/
|
|
|
|
|
public function authorize(): bool
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
|
*/
|
|
|
|
|
public function rules(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'project_id' => 'required|exists:admin_pm_projects,id',
|
|
|
|
|
'task_id' => 'nullable|exists:admin_pm_tasks,id',
|
|
|
|
|
'title' => 'required|string|max:255',
|
|
|
|
|
'description' => 'nullable|string|max:5000',
|
|
|
|
|
'type' => 'nullable|in:'.implode(',', array_keys(AdminPmIssue::getTypes())),
|
|
|
|
|
'status' => 'nullable|in:'.implode(',', array_keys(AdminPmIssue::getStatuses())),
|
2025-12-02 17:49:15 +09:00
|
|
|
'start_date' => 'nullable|date',
|
|
|
|
|
'due_date' => 'nullable|date|after_or_equal:start_date',
|
|
|
|
|
'estimated_hours' => 'nullable|integer|min:0|max:9999',
|
feat: [pm] 프로젝트 진행 관리 시스템 구현
- Models: AdminPmProject, AdminPmTask, AdminPmIssue
- Services: ProjectService, TaskService, IssueService, ImportService
- API Controllers: ProjectController, TaskController, IssueController, ImportController
- FormRequests: Store/Update/BulkAction 요청 검증
- Views: 대시보드, 프로젝트 CRUD, JSON Import 화면
- Routes: API 42개 + Web 6개 엔드포인트
주요 기능:
- 프로젝트/작업/이슈 계층 구조 관리
- 상태 변경, 우선순위, 마감일 추적
- 작업 순서 드래그앤드롭 (reorder API)
- JSON Import로 일괄 등록
- Soft Delete 및 복원
2025-11-28 08:49:30 +09:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get custom attributes for validator errors.
|
|
|
|
|
*/
|
|
|
|
|
public function attributes(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'project_id' => '프로젝트',
|
|
|
|
|
'task_id' => '연결된 작업',
|
|
|
|
|
'title' => '이슈 제목',
|
|
|
|
|
'description' => '이슈 설명',
|
|
|
|
|
'type' => '타입',
|
|
|
|
|
'status' => '상태',
|
2025-12-02 17:49:15 +09:00
|
|
|
'start_date' => '시작일',
|
|
|
|
|
'due_date' => '마감일',
|
|
|
|
|
'estimated_hours' => '예상 시간',
|
feat: [pm] 프로젝트 진행 관리 시스템 구현
- Models: AdminPmProject, AdminPmTask, AdminPmIssue
- Services: ProjectService, TaskService, IssueService, ImportService
- API Controllers: ProjectController, TaskController, IssueController, ImportController
- FormRequests: Store/Update/BulkAction 요청 검증
- Views: 대시보드, 프로젝트 CRUD, JSON Import 화면
- Routes: API 42개 + Web 6개 엔드포인트
주요 기능:
- 프로젝트/작업/이슈 계층 구조 관리
- 상태 변경, 우선순위, 마감일 추적
- 작업 순서 드래그앤드롭 (reorder API)
- JSON Import로 일괄 등록
- Soft Delete 및 복원
2025-11-28 08:49:30 +09:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the error messages for the defined validation rules.
|
|
|
|
|
*/
|
|
|
|
|
public function messages(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'project_id.required' => '프로젝트를 선택해주세요.',
|
|
|
|
|
'project_id.exists' => '존재하지 않는 프로젝트입니다.',
|
|
|
|
|
'task_id.exists' => '존재하지 않는 작업입니다.',
|
|
|
|
|
'title.required' => '이슈 제목은 필수입니다.',
|
|
|
|
|
'title.max' => '이슈 제목은 최대 255자까지 입력 가능합니다.',
|
|
|
|
|
'description.max' => '이슈 설명은 최대 5000자까지 입력 가능합니다.',
|
|
|
|
|
'type.in' => '올바른 타입을 선택해주세요.',
|
|
|
|
|
'status.in' => '올바른 상태를 선택해주세요.',
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Prepare the data for validation.
|
|
|
|
|
*/
|
|
|
|
|
protected function prepareForValidation(): void
|
|
|
|
|
{
|
|
|
|
|
// 기본값 설정
|
|
|
|
|
if (! $this->has('type')) {
|
|
|
|
|
$this->merge(['type' => AdminPmIssue::TYPE_BUG]);
|
|
|
|
|
}
|
|
|
|
|
if (! $this->has('status')) {
|
|
|
|
|
$this->merge(['status' => AdminPmIssue::STATUS_OPEN]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|