feat(工作台): 细化计划进展工时证据
关键改动: - 支持需求覆盖和调研方向开始工作记录 - 日报按计划记录开始时间和进度下次开始时间计算证据 - 更新版本编辑校验、项目展示和 workflow 说明 Co-Authored-By: Codex GPT-5 <codex@openai.com>
This commit is contained in:
@@ -26,6 +26,12 @@ export interface NewVersionFormState {
|
||||
submitting: boolean;
|
||||
}
|
||||
|
||||
export interface VersionEditFormState {
|
||||
versionNumber: string;
|
||||
expectedReleaseDate: string;
|
||||
submitting: boolean;
|
||||
}
|
||||
|
||||
export const VERSION_DEVELOPMENT_TYPE_OPTIONS: VersionDevelopmentTypeOption[] = [
|
||||
makeDevelopmentTypeOption('agile', '敏捷迭代', '适合常规双周迭代', [
|
||||
{ key: 'product_design', label: '产品设计', workDays: 2 },
|
||||
@@ -60,6 +66,27 @@ export function canSubmitNewVersionForm(state: NewVersionFormState): boolean {
|
||||
);
|
||||
}
|
||||
|
||||
export function canSubmitVersionEditForm(state: VersionEditFormState): boolean {
|
||||
return Boolean(
|
||||
state.versionNumber.trim() &&
|
||||
state.expectedReleaseDate &&
|
||||
!state.submitting,
|
||||
);
|
||||
}
|
||||
|
||||
export function getEditableVersionNumber(projectName: string, versionName: string): string {
|
||||
const exactPrefix = `${projectName}V`;
|
||||
if (projectName && versionName.toLowerCase().startsWith(exactPrefix.toLowerCase())) {
|
||||
return versionName.slice(exactPrefix.length);
|
||||
}
|
||||
const match = versionName.match(/V([\d.]+)$/i);
|
||||
return match?.[1] ?? versionName;
|
||||
}
|
||||
|
||||
export function buildVersionName(projectName: string, versionNumber: string): string {
|
||||
return `${projectName}V${versionNumber.trim()}`;
|
||||
}
|
||||
|
||||
export function getVersionDevelopmentTypeOption(type: VersionDevelopmentType): VersionDevelopmentTypeOption | undefined {
|
||||
return VERSION_DEVELOPMENT_TYPE_OPTIONS.find((option) => option.key === type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user