Conversation
…ment and database migration.
…h_hu`, and pre-fill default month values for both languages.
…dated navigation, and refined global layout.
…e` component and utilize it on the payout info page.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR adds a new “Kifizetési időpontok / Payout dates” page backed by Payload CMS, including a new payout-periods collection with an “active period” concept and the necessary schema/migrations.
Changes:
- Add
PayoutPeriodscollection (with hook to enforce a single active period) and register it in Payload config / generated types. - Add CMS query helper (
getActivePayoutPeriod) and a new localized page rendering payout tables + static informational content. - Add DB migrations and i18n dictionary entries; add a navigation item pointing to the new page.
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/payload.config.ts | Registers the new PayoutPeriods collection in Payload. |
| src/payload-types.ts | Updates generated types to include payout-periods. |
| src/migrations/index.ts | Registers new migrations in the migration list. |
| src/migrations/20260210_212659_add_payout_periods.ts | Creates payout period tables + relation column; rollback logic needs fixes. |
| src/migrations/20260210_212659_add_payout_periods.json | Generated schema snapshot for the above migration. |
| src/migrations/20260210_215940_add_payout_periods_and_months.ts | Renames month → month_hu and adds month_en; rollback logic needs fixes. |
| src/migrations/20260210_215940_add_payout_periods_and_months.json | Generated schema snapshot for the above migration. |
| src/lib/payload-cms.ts | Adds getActivePayoutPeriod() helper for the new page. |
| src/dictionaries/hu.json | Adds Hungarian strings for the payout page (contains a small typo). |
| src/dictionaries/en.json | Adds English strings for the payout page. |
| src/collections/PayoutPeriods.ts | Introduces the payout-periods collection + hook to deactivate other active docs. |
| src/app/(app)/components/navigation-items.ts | Adds a nav item for the payout page. |
| src/app/(app)/[lang]/layout.tsx | Wraps Navbar+children in a flex container (layout structure change). |
| src/app/(app)/[lang]/kifizetesi-idopontok/page.tsx | New payout info page fetching the active period and rendering content. |
| src/app/(app)/[lang]/kifizetesi-idopontok/components/PayoutTable.tsx | New table component for rendering semester payout rows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <table className="w-full text-left text-lg"> | ||
| <tbody className="divide-y"> | ||
| {payouts?.map((payout, index) => ( | ||
| <tr key={index} className="hover:bg-muted/50 transition-colors"> | ||
| <td className="px-6 py-4 text-muted-foreground text-center font-medium"> | ||
| {index + 1}. | ||
| </td> | ||
| <td className="px-6 py-4 font-medium capitalize"> | ||
| {lang === "hu" ? payout.month_hu : payout.month_en} | ||
| </td> |
There was a problem hiding this comment.
Using the array index as the React key can cause incorrect row reuse when items are inserted/reordered. The CMS array items include an id field (Payload typically provides it for array rows), so prefer a stable identifier for the row key (e.g., payout.id) with a fallback only if it’s missing.
No description provided.