feat(需求池): 调整需求池布局与详情展示
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
'use client';
|
||||
import { useState, useEffect, useMemo } from 'react';
|
||||
import { X } from 'lucide-react';
|
||||
import type { Requirement, Effort, DictItem, SourceType, SourceTarget } from '@/lib/requirement';
|
||||
import type { Requirement, DictItem, SourceType, SourceTarget } from '@/lib/requirement';
|
||||
import type { Priority } from '@/lib/derive';
|
||||
import { EFFORT_LABEL, SOURCE_TYPE_LABEL, SOURCE_TARGET_LABEL } from '@/lib/requirement';
|
||||
import { SOURCE_TYPE_LABEL, SOURCE_TARGET_LABEL } from '@/lib/requirement';
|
||||
|
||||
interface RequirementModalProps {
|
||||
open: boolean;
|
||||
@@ -22,7 +22,6 @@ interface RequirementModalProps {
|
||||
}
|
||||
|
||||
const PRIORITIES: Priority[] = ['P0', 'P1', 'P2', 'P3', 'P4'];
|
||||
const EFFORTS: Effort[] = ['S', 'M', 'L', 'XL'];
|
||||
const SOURCE_TYPES: SourceType[] = ['customer', 'internal', 'operation', 'aftersale', 'market', 'competitor', 'management'];
|
||||
|
||||
const PRIORITY_COLORS: Record<Priority, string> = {
|
||||
@@ -57,7 +56,6 @@ export function RequirementModal({
|
||||
const [selectedPlatforms, setSelectedPlatforms] = useState<string[]>([]);
|
||||
const [typeId, setTypeId] = useState('');
|
||||
const [priority, setPriority] = useState<Priority>('P2');
|
||||
const [effort, setEffort] = useState<Effort>('M');
|
||||
const [productOwner, setProductOwner] = useState('');
|
||||
const [parentId, setParentId] = useState('');
|
||||
const [versionId, setVersionId] = useState('');
|
||||
@@ -86,7 +84,6 @@ export function RequirementModal({
|
||||
setSelectedPlatforms(initial.platforms || []);
|
||||
setTypeId(initial.typeId || '');
|
||||
setPriority(initial.priority || 'P2');
|
||||
setEffort(initial.effort || 'M');
|
||||
setProductOwner(initial.productOwner || '');
|
||||
setParentId(initial.parentId || '');
|
||||
} else {
|
||||
@@ -100,7 +97,6 @@ export function RequirementModal({
|
||||
setSelectedPlatforms([]);
|
||||
setTypeId('');
|
||||
setPriority('P2');
|
||||
setEffort('M');
|
||||
setProductOwner('');
|
||||
setParentId('');
|
||||
}
|
||||
@@ -129,7 +125,7 @@ export function RequirementModal({
|
||||
platforms: selectedPlatforms,
|
||||
typeId: typeId || undefined,
|
||||
priority,
|
||||
effort,
|
||||
effort: initial?.effort ?? 'M',
|
||||
status: initial?.status ?? 'pending_review',
|
||||
creator: initial?.creator || currentUserName || '系统',
|
||||
parentId: parentId || undefined,
|
||||
|
||||
Reference in New Issue
Block a user