mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-13 06:24:54 +10:00
Feature: Implement a new custom section type: summary (#2657)
* feat: add summaryItemSchema for custom summary section type * feat: add CreateSummaryItemDialog and UpdateSummaryItemDialog * feat: register summary item dialog types in store * feat: route summary item dialogs in manager * feat: add SummaryItem render component * feat: handle summary type in renderItemByType and hide title for summary sections * feat: handle summary type in sidebar helpers * feat: add summary to custom section type options * fix: update type definitions to support CustomSectionType for summary sections * chore: extract new i18n strings for summary section * style: apply biome formatting fixes * chore: remove TODO.md file containing outdated feature specifications
This commit is contained in:
@@ -86,6 +86,12 @@ export const baseItemSchema = z.object({
|
||||
hidden: z.boolean().describe("Whether to hide the item from the resume."),
|
||||
});
|
||||
|
||||
export const summaryItemSchema = baseItemSchema.extend({
|
||||
content: z.string().describe("The rich text content of the summary item. This should be a HTML-formatted string."),
|
||||
});
|
||||
|
||||
export type SummaryItem = z.infer<typeof summaryItemSchema>;
|
||||
|
||||
export const awardItemSchema = baseItemSchema.extend({
|
||||
title: z.string().min(1).describe("The title of the award."),
|
||||
awarder: z.string().describe("The awarder of the award."),
|
||||
@@ -288,6 +294,7 @@ export type SectionData<T extends SectionType = SectionType> = z.infer<typeof se
|
||||
export type SectionItem<T extends SectionType = SectionType> = SectionData<T>["items"][number];
|
||||
|
||||
export const sectionTypeSchema = z.enum([
|
||||
"summary",
|
||||
"profiles",
|
||||
"experience",
|
||||
"education",
|
||||
@@ -302,7 +309,10 @@ export const sectionTypeSchema = z.enum([
|
||||
"references",
|
||||
]);
|
||||
|
||||
export type CustomSectionType = z.infer<typeof sectionTypeSchema>;
|
||||
|
||||
export const customSectionItemSchema = z.union([
|
||||
summaryItemSchema,
|
||||
profileItemSchema,
|
||||
experienceItemSchema,
|
||||
educationItemSchema,
|
||||
|
||||
Reference in New Issue
Block a user