feat(governance): implement 5-stage task lifecycle and CEO approval state machine
This commit is contained in:
1 parent
8bf1843b9b
commit
dd90ab0f4c
3 files changed
+73
-15
No files matched your search
@@ -25,7 +25,7 @@ interface DepartmentTask {
|
||||
department: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
status: 'BACKLOG' | 'IN_PROGRESS' | 'IN_REVIEW' | 'APPROVED' | 'DEPLOYING' | 'DONE';
|
||||
status: 'TODO' | 'IN_PROGRESS' | 'TEST' | 'DONE' | 'BACKLOG' | 'IN_REVIEW' | 'APPROVED' | 'DEPLOYING';
|
||||
priority: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
||||
assignee: string;
|
||||
acceptanceCriteria?: string;
|
||||
@@ -101,18 +101,16 @@ export default function TasksManagementPage() {
|
||||
|
||||
const getStatusBadge = (status: string) => {
|
||||
switch (status) {
|
||||
case 'TODO':
|
||||
case 'BACKLOG':
|
||||
return <span className="px-2 py-0.5 rounded-full text-[10px] font-black bg-gray-100 text-gray-700 border border-gray-200">بکلاگ (Backlog)</span>;
|
||||
return <span className="px-2 py-0.5 rounded-full text-[10px] font-black bg-gray-100 text-gray-700 border border-gray-200">۱. صف اقدام (TODO)</span>;
|
||||
case 'IN_PROGRESS':
|
||||
return <span className="px-2 py-0.5 rounded-full text-[10px] font-black bg-blue-100 text-blue-800 border border-blue-200 animate-pulse">در حال انجام (In Progress)</span>;
|
||||
return <span className="px-2 py-0.5 rounded-full text-[10px] font-black bg-blue-100 text-blue-800 border border-blue-200 animate-pulse">۲. در حال توسعه (IN_PROGRESS)</span>;
|
||||
case 'TEST':
|
||||
case 'IN_REVIEW':
|
||||
return <span className="px-2 py-0.5 rounded-full text-[10px] font-black bg-amber-100 text-amber-800 border border-amber-200">در انتظار بررسی (Review)</span>;
|
||||
case 'APPROVED':
|
||||
return <span className="px-2 py-0.5 rounded-full text-[10px] font-black bg-indigo-100 text-indigo-800 border border-indigo-200">تایید شده (Approved)</span>;
|
||||
case 'DEPLOYING':
|
||||
return <span className="px-2 py-0.5 rounded-full text-[10px] font-black bg-purple-100 text-purple-800 border border-purple-200">درحال استقرار (Deploying)</span>;
|
||||
return <span className="px-2 py-0.5 rounded-full text-[10px] font-black bg-amber-100 text-amber-800 border border-amber-200">۳. تست استیج و QA (TEST)</span>;
|
||||
case 'DONE':
|
||||
return <span className="px-2 py-0.5 rounded-full text-[10px] font-black bg-emerald-100 text-emerald-800 border border-emerald-200">تکمیل شده (Done)</span>;
|
||||
return <span className="px-2 py-0.5 rounded-full text-[10px] font-black bg-emerald-100 text-emerald-800 border border-emerald-200">۴. مستقر پروداکشن (DONE)</span>;
|
||||
default:
|
||||
return <span>{status}</span>;
|
||||
}
|
||||
@@ -207,7 +205,10 @@ export default function TasksManagementPage() {
|
||||
className="w-full px-3 py-2 text-xs bg-gray-50 border border-gray-200 rounded-xl focus:bg-white focus:outline-none focus:border-purple-500 font-bold text-gray-700"
|
||||
>
|
||||
<option value="ALL">همه وضعیتها</option>
|
||||
<option value="BACKLOG">بکلاگ (Backlog)</option>
|
||||
<option value="TODO">۱. صف اقدام (TODO)</option>
|
||||
<option value="IN_PROGRESS">۲. در حال اجرا (IN_PROGRESS)</option>
|
||||
<option value="TEST">۳. تست و QA (TEST)</option>
|
||||
<option value="DONE">۴. تکمیل شده (DONE)</option>
|
||||
<option value="IN_PROGRESS">در حال انجام (In Progress)</option>
|
||||
<option value="IN_REVIEW">در انتظار بررسی (Review)</option>
|
||||
<option value="APPROVED">تایید شده (Approved)</option>
|
||||
@@ -339,7 +340,7 @@ export default function TasksManagementPage() {
|
||||
<div className="pt-2">
|
||||
<label className="block text-xs font-black text-gray-700 mb-2">تغییر وضعیت تسک به:</label>
|
||||
<div className="grid grid-cols-3 gap-2">
|
||||
{['BACKLOG', 'IN_PROGRESS', 'IN_REVIEW', 'APPROVED', 'DEPLOYING', 'DONE'].map((st) => (
|
||||
{['TODO', 'IN_PROGRESS', 'TEST', 'DONE'].map((st) => (
|
||||
<button
|
||||
key={st}
|
||||
type="button"
|
||||
|
||||
Reference in new issue
Block a user