Add membership fee system with disability discount and fix document permissions
Features: - Implement two fee types: entrance fee and annual fee (both NT$1,000) - Add 50% discount for disability certificate holders - Add disability certificate upload in member profile - Integrate disability verification into cashier approval workflow - Add membership fee settings in system admin Document permissions: - Fix hard-coded role logic in Document model - Use permission-based authorization instead of role checks Additional features: - Add announcements, general ledger, and trial balance modules - Add income management and accounting entries - Add comprehensive test suite with factories - Update UI translations to Traditional Chinese 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800 dark:text-gray-200">
|
||||
{{ __('Edit Issue') }} - {{ $issue->issue_number }}
|
||||
編輯任務 - {{ $issue->issue_number }}
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
<!-- Title -->
|
||||
<div>
|
||||
<label for="title" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Title') }} <span class="text-red-500">*</span>
|
||||
標題 <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<input type="text" name="title" id="title" value="{{ old('title', $issue->title) }}" required maxlength="255"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100 @error('title') border-red-300 @enderror"
|
||||
placeholder="{{ __('Brief summary of the issue') }}">
|
||||
placeholder="任務簡述">
|
||||
@error('title')<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>@enderror
|
||||
</div>
|
||||
|
||||
<!-- Description -->
|
||||
<div>
|
||||
<label for="description" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Description') }}
|
||||
描述
|
||||
</label>
|
||||
<textarea name="description" id="description" rows="5"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100"
|
||||
placeholder="{{ __('Detailed description of the issue...') }}">{{ old('description', $issue->description) }}</textarea>
|
||||
placeholder="詳細描述此任務...">{{ old('description', $issue->description) }}</textarea>
|
||||
@error('description')<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>@enderror
|
||||
</div>
|
||||
|
||||
@@ -38,30 +38,30 @@
|
||||
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2">
|
||||
<div>
|
||||
<label for="issue_type" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Issue Type') }} <span class="text-red-500">*</span>
|
||||
任務類型 <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<select name="issue_type" id="issue_type" required
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100 @error('issue_type') border-red-300 @enderror">
|
||||
<option value="">{{ __('Select type...') }}</option>
|
||||
<option value="work_item" @selected(old('issue_type', $issue->issue_type) === 'work_item')>{{ __('Work Item') }}</option>
|
||||
<option value="project_task" @selected(old('issue_type', $issue->issue_type) === 'project_task')>{{ __('Project Task') }}</option>
|
||||
<option value="maintenance" @selected(old('issue_type', $issue->issue_type) === 'maintenance')>{{ __('Maintenance') }}</option>
|
||||
<option value="member_request" @selected(old('issue_type', $issue->issue_type) === 'member_request')>{{ __('Member Request') }}</option>
|
||||
<option value="">選擇類型...</option>
|
||||
<option value="work_item" @selected(old('issue_type', $issue->issue_type) === 'work_item')>工作項目</option>
|
||||
<option value="project_task" @selected(old('issue_type', $issue->issue_type) === 'project_task')>專案任務</option>
|
||||
<option value="maintenance" @selected(old('issue_type', $issue->issue_type) === 'maintenance')>維護</option>
|
||||
<option value="member_request" @selected(old('issue_type', $issue->issue_type) === 'member_request')>會員請求</option>
|
||||
</select>
|
||||
@error('issue_type')<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="priority" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Priority') }} <span class="text-red-500">*</span>
|
||||
優先級 <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<select name="priority" id="priority" required
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100 @error('priority') border-red-300 @enderror">
|
||||
<option value="">{{ __('Select priority...') }}</option>
|
||||
<option value="low" @selected(old('priority', $issue->priority) === 'low')>{{ __('Low') }} ↓</option>
|
||||
<option value="medium" @selected(old('priority', $issue->priority) === 'medium')>{{ __('Medium') }} →</option>
|
||||
<option value="high" @selected(old('priority', $issue->priority) === 'high')>{{ __('High') }} ↑</option>
|
||||
<option value="urgent" @selected(old('priority', $issue->priority) === 'urgent')>{{ __('Urgent') }} ⇈</option>
|
||||
<option value="">選擇優先級...</option>
|
||||
<option value="low" @selected(old('priority', $issue->priority) === 'low')>低 ↓</option>
|
||||
<option value="medium" @selected(old('priority', $issue->priority) === 'medium')>中 →</option>
|
||||
<option value="high" @selected(old('priority', $issue->priority) === 'high')>高 ↑</option>
|
||||
<option value="urgent" @selected(old('priority', $issue->priority) === 'urgent')>緊急 ⇈</option>
|
||||
</select>
|
||||
@error('priority')<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>@enderror
|
||||
</div>
|
||||
@@ -71,11 +71,11 @@
|
||||
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2">
|
||||
<div>
|
||||
<label for="assigned_to_user_id" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Assign To') }}
|
||||
指派給
|
||||
</label>
|
||||
<select name="assigned_to_user_id" id="assigned_to_user_id"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100">
|
||||
<option value="">{{ __('Unassigned') }}</option>
|
||||
<option value="">未指派</option>
|
||||
@foreach($users as $user)
|
||||
<option value="{{ $user->id }}" @selected(old('assigned_to_user_id', $issue->assigned_to_user_id) == $user->id)>{{ $user->name }}</option>
|
||||
@endforeach
|
||||
@@ -84,11 +84,11 @@
|
||||
|
||||
<div>
|
||||
<label for="reviewer_id" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Reviewer') }}
|
||||
審查者
|
||||
</label>
|
||||
<select name="reviewer_id" id="reviewer_id"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100">
|
||||
<option value="">{{ __('None') }}</option>
|
||||
<option value="">無</option>
|
||||
@foreach($users as $user)
|
||||
<option value="{{ $user->id }}" @selected(old('reviewer_id', $issue->reviewer_id) == $user->id)>{{ $user->name }}</option>
|
||||
@endforeach
|
||||
@@ -100,7 +100,7 @@
|
||||
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2">
|
||||
<div>
|
||||
<label for="due_date" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Due Date') }}
|
||||
截止日期
|
||||
</label>
|
||||
<input type="date" name="due_date" id="due_date" value="{{ old('due_date', $issue->due_date?->format('Y-m-d')) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100">
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
<div>
|
||||
<label for="estimated_hours" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Estimated Hours') }}
|
||||
預估時數
|
||||
</label>
|
||||
<input type="number" name="estimated_hours" id="estimated_hours" value="{{ old('estimated_hours', $issue->estimated_hours) }}" step="0.5" min="0"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100">
|
||||
@@ -119,11 +119,11 @@
|
||||
<!-- Member (for member requests) -->
|
||||
<div>
|
||||
<label for="member_id" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Related Member') }}
|
||||
相關會員
|
||||
</label>
|
||||
<select name="member_id" id="member_id"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100">
|
||||
<option value="">{{ __('None') }}</option>
|
||||
<option value="">無</option>
|
||||
@foreach($members as $member)
|
||||
<option value="{{ $member->id }}" @selected(old('member_id', $issue->member_id) == $member->id)>{{ $member->full_name }}</option>
|
||||
@endforeach
|
||||
@@ -133,11 +133,11 @@
|
||||
<!-- Parent Issue (for sub-tasks) -->
|
||||
<div>
|
||||
<label for="parent_issue_id" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Parent Issue') }}
|
||||
父任務
|
||||
</label>
|
||||
<select name="parent_issue_id" id="parent_issue_id"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100">
|
||||
<option value="">{{ __('None (top-level issue)') }}</option>
|
||||
<option value="">無(頂層任務)</option>
|
||||
@foreach($openIssues as $parentIssue)
|
||||
<option value="{{ $parentIssue->id }}" @selected(old('parent_issue_id', $issue->parent_issue_id) == $parentIssue->id)>
|
||||
{{ $parentIssue->issue_number }} - {{ $parentIssue->title }}
|
||||
@@ -149,7 +149,7 @@
|
||||
<!-- Labels -->
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
||||
{{ __('Labels') }}
|
||||
標籤
|
||||
</label>
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 gap-2">
|
||||
@foreach($labels as $label)
|
||||
@@ -170,11 +170,11 @@
|
||||
<div class="flex items-center justify-end gap-x-4 border-t border-gray-200 pt-6 dark:border-gray-700">
|
||||
<a href="{{ route('admin.issues.show', $issue) }}"
|
||||
class="rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 dark:bg-gray-700 dark:text-gray-100 dark:ring-gray-600 dark:hover:bg-gray-600">
|
||||
{{ __('Cancel') }}
|
||||
取消
|
||||
</a>
|
||||
<button type="submit"
|
||||
class="inline-flex justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:bg-indigo-500 dark:hover:bg-indigo-400 dark:focus:ring-offset-gray-800">
|
||||
{{ __('Update Issue') }}
|
||||
更新任務
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user