refactor: update OKR form and edit page to use new CreateKeyResultInput type for improved type safety and clarity
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 6m54s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 6m54s
This commit is contained in:
@@ -5,7 +5,7 @@ import { useRouter, useParams } from 'next/navigation';
|
||||
import Link from 'next/link';
|
||||
import { OKRForm } from '@/components/okrs';
|
||||
import { Card } from '@/components/ui';
|
||||
import type { CreateOKRInput, TeamMember, OKR, KeyResult } from '@/lib/types';
|
||||
import type { CreateOKRInput, CreateKeyResultInput, TeamMember, OKR, KeyResult } from '@/lib/types';
|
||||
|
||||
type OKRWithTeamMember = OKR & {
|
||||
teamMember: {
|
||||
@@ -66,7 +66,7 @@ export default function EditOKRPage() {
|
||||
startDate: Date | string;
|
||||
endDate: Date | string;
|
||||
keyResultsUpdates?: {
|
||||
create?: Array<{ title: string; targetValue: number; unit: string; order: number }>;
|
||||
create?: CreateKeyResultInput[];
|
||||
update?: KeyResultUpdate[];
|
||||
delete?: string[]
|
||||
}
|
||||
@@ -87,7 +87,7 @@ export default function EditOKRPage() {
|
||||
startDate: string;
|
||||
endDate: string;
|
||||
keyResultsUpdates?: {
|
||||
create?: Array<{ title: string; targetValue: number; unit: string; order: number }>;
|
||||
create?: CreateKeyResultInput[];
|
||||
update?: KeyResultUpdate[];
|
||||
delete?: string[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user