@extends('layouts.app') @section('title', '專案管理設定') @section('content')

專案管理設定

管理員
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Tab 導覽 --}} @php $perms = [ 'perm_manage' => ['icon' => 'bi-gear-fill', 'label' => '管理專案', 'desc' => '修改設定、管理成員'], 'perm_view_docs' => ['icon' => 'bi-file-earmark-text', 'label' => '查看文件', 'desc' => '查看文件'], 'perm_edit_docs' => ['icon' => 'bi-pencil-square', 'label' => '編輯文件', 'desc' => '新增、編輯、刪除文件(需同時勾選查看文件)'], 'perm_manage_issues' => ['icon' => 'bi-bug-fill', 'label' => '管理議題', 'desc' => '新增、編輯議題'], 'perm_close_issues' => ['icon' => 'bi-check-circle-fill', 'label' => '結束議題', 'desc' => '可將議題設為已完成/已解決/已拒絕等結束狀態'], 'perm_upload_files' => ['icon' => 'bi-paperclip', 'label' => '上傳附件', 'desc' => '上傳、刪除附件'], 'perm_view_roadmap' => ['icon' => 'bi-map', 'label' => '查看合約', 'desc' => '查看合約版本與里程碑'], 'perm_manage_roadmap' => ['icon' => 'bi-map-fill', 'label' => '管理合約', 'desc' => '新增、編輯、刪除合約版本(需同時勾選查看合約)'], 'perm_view_gitlab' => ['icon' => 'bi-git', 'label' => '查看 GitLab', 'desc' => '查看 GitLab 整合頁'], 'perm_view_gantt' => ['icon' => 'bi-bar-chart-steps', 'label' => '甘特圖', 'desc' => '查看甘特圖'], 'perm_view_calendar' => ['icon' => 'bi-calendar3', 'label' => '行事曆', 'desc' => '查看行事曆'], 'perm_log_time' => ['icon' => 'bi-clock-history', 'label' => '記錄工時', 'desc' => '新增、查看工時紀錄'], 'perm_view_members' => ['icon' => 'bi-people', 'label' => '查看成員', 'desc' => '查看專案成員列表'], ]; $colors = ['primary'=>'藍','secondary'=>'灰','success'=>'綠','danger'=>'紅','warning'=>'黃','info'=>'青','dark'=>'黑']; @endphp
{{-- ═══ 角色 & 權限 ════════════════════════════════════════════ --}}
全域角色({{ $roles->count() }})
@foreach($roles as $role) @endforeach
角色名稱權限操作
{{ $role->label }} @if($role->is_default)預設@endif @foreach($perms as $key => $p) @if($role->$key) {{ $p['label'] }} @endif @endforeach @if(!$role->perm_manage && !$role->perm_view_docs && !$role->perm_edit_docs && !$role->perm_manage_issues && !$role->perm_close_issues && !$role->perm_upload_files && !$role->perm_view_roadmap && !$role->perm_manage_roadmap && !$role->perm_view_gitlab && !$role->perm_view_gantt && !$role->perm_view_calendar && !$role->perm_log_time && !$role->perm_view_members) 無任何權限 @endif @if(!$role->is_default)
@csrf @method('DELETE')
@endif
新增角色
@csrf
@foreach($perms as $key=>$p)
@endforeach
{{-- ═══ 群組管理 ════════════════════════════════════════════════ --}}
使用者群組({{ $userGroups->count() }})
@if($userGroups->isEmpty())
尚未建立任何群組。
@else
    @foreach($userGroups as $grp)
  • {{ $grp->name }} @if($grp->description) {{ $grp->description }} @endif
    {{ $grp->users->count() }} 人 {{ $grp->projects->count() }} 專案
    @csrf @method('DELETE')
  • @endforeach
@endif

群組說明

  • 可將多位成員集合成一個群組
  • 群組加入專案時,成員自動加為專案成員
  • 新增群組成員後,該成員也會自動加入群組所在的所有專案
  • 移除群組與專案的關聯,不影響已加入的個別成員
{{-- ── 群組詳細管理(inline)─────────────────────────────────── --}}
{{-- 左:成員 --}}
成員(0 人)
  • 尚無成員
{{-- 右:專案 --}}
已加入專案(0 個)
@php $gdpTypeBadge = ['產品'=>'bg-info','開發'=>'bg-primary','維護'=>'bg-success','保固'=>'bg-warning text-dark','結束'=>'bg-secondary']; @endphp
@foreach($allProjects as $p) @endforeach
已選 0 個
  • 尚未加入任何專案
{{-- /群組詳細管理 --}}
{{-- ═══ 議題類型 ════════════════════════════════════════════════ --}}
議題類型({{ $trackers->count() }})
@foreach($trackers as $t) @endforeach
名稱顏色狀態操作
{{ $t->label }} {{ $colors[$t->color] ?? $t->color }} {!! $t->is_active ? '啟用' : '停用' !!}
@csrf @method('DELETE')
新增類型
@csrf
{{-- ═══ 議題狀態 ════════════════════════════════════════════════ --}}
議題狀態({{ $statuses->count() }})
@foreach($statuses as $s) @php $allowedRoles = $s->allowed_roles ?? []; @endphp @endforeach
名稱屬性可使用角色狀態操作
{{ $s->label }}@if($s->is_default)預設@endif @if($s->is_closed)已關閉@else開放中@endif @if(empty($allowedRoles)) 所有人 @else @foreach($roles->whereIn('slug', $allowedRoles) as $r) {{ $r->label }} @endforeach @endif {!! $s->is_active ? '啟用' : '停用' !!} @if(!$s->is_default)
@csrf @method('DELETE')
@endif
新增狀態
@csrf
@foreach($roles as $r)
@endforeach
{{-- ═══ 優先度 ══════════════════════════════════════════════════ --}}
優先度({{ $priorities->count() }})
@foreach($priorities as $p) @endforeach
名稱顏色狀態操作
{{ $p->label }}@if($p->is_default)預設@endif {{ $colors[$p->color] ?? $p->color }} {!! $p->is_active ? '啟用' : '停用' !!} @if(!$p->is_default)
@csrf @method('DELETE')
@endif
新增優先度
@csrf
{{-- ═══ 工時活動 ════════════════════════════════════════════════ --}}
工時活動類型({{ $activities->count() }})
@foreach($activities as $a) @endforeach
名稱狀態操作
{{ $a->label }}@if($a->is_default)預設@endif {!! $a->is_active ? '啟用' : '停用' !!} @if(!$a->is_default)
@csrf @method('DELETE')
@endif
新增活動
@csrf
{{-- ── 文件分類 ── --}}
文件分類({{ $docCategories->count() }})
@forelse($docCategories as $cat) @empty @endforelse
名稱操作
{{ $cat->name }}
@csrf @method('DELETE')
尚無分類
新增分類
@csrf
{{-- ── 文件樣板 ── --}}
文件樣板({{ $docTemplates->count() }})
@forelse($docTemplates as $tpl) @empty @endforelse
樣板名稱說明分類操作
{{ $tpl->name }} {{ $tpl->description ?? '—' }} {{ $tpl->category?->name ?? '—' }}
@csrf @method('DELETE')
尚無樣板
新增樣板
@csrf
{{-- ═══ 開發工具 ════════════════════════════════════════════════ --}}
開發工具選項({{ $devTools->count() }})
@foreach($devTools as $dt) @endforeach
名稱狀態操作
{{ $dt->label }} @if($dt->is_active) 啟用 @else 停用 @endif
@csrf @method('DELETE')
新增開發工具
@csrf
{{-- ═══ 開發類型 ════════════════════════════════════════════════ --}}
專案開發類型({{ $projectTypes->count() }})
@foreach($projectTypes as $pt) @endforeach
名稱適用範圍標籤色狀態操作
{{ $pt->label }} @if($pt->scope === 'both') 兩者共用 @elseif($pt->scope === 'product') 僅產品 @else 僅專案 @endif {{ $pt->color }} @if($pt->is_active) 啟用 @else 停用 @endif
@csrf @method('DELETE')
新增開發類型
@csrf
{{-- 編輯開發類型 Modal --}} {{-- 編輯開發工具 Modal --}} {{-- 通知設定 ════════════════════════════════════════════════ --}}
議題通知設定
@csrf

設定系統在哪些事件發生時,自動寄送 Email 及推播通知給相關人員。

指派通知
notify_issue_assigned ? 'checked' : '' }}>
notify_issue_reassigned ? 'checked' : '' }}>

狀態變更通知
notify_status_change ? 'checked' : '' }} onchange="document.getElementById('statusSlugsBlock').style.display=this.checked?'':'none'">

勾選後才發送通知的目標狀態(空白 = 所有狀態皆通知):

@foreach($statuses as $status)
slug, $notificationSetting->notify_status_slugs ?? []) ? 'checked' : '' }}>
@endforeach

留言通知
notify_comment ? 'checked' : '' }}>
通知說明
  • 通知對象為被指派的成員,不包含操作者本人。
  • 系統同時發送 Email平台推播(需啟用瀏覽器通知)。
  • 狀態變更通知與留言通知,僅在議題有指派成員時才會觸發。
  • Email 發送失敗不影響議題操作,錯誤會記錄至系統 Log。
{{-- /tab-content --}}
{{-- ── 文件分類編輯 Modal ── --}} {{-- ── 文件樣板編輯 Modal ── --}} {{-- ═══ 角色編輯 Modal ══════════════════════════════════════════════ --}} {{-- ═══ Tracker 編輯 Modal ══════════════════════════════════════════ --}} {{-- ═══ Status 編輯 Modal ═══════════════════════════════════════════ --}} {{-- ═══ Priority 編輯 Modal ════════════════════════════════════════ --}} {{-- ═══ Activity 編輯 Modal ════════════════════════════════════════ --}} {{-- ═══ 使用者群組 Modal ════════════════════════════════════════════ --}} {{-- 新增群組 Modal --}} @endsection @push('scripts') @endpush