-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: payload custom components for RowLabels and CustomSelect migrate
- Loading branch information
Showing
8 changed files
with
68 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
|
||
import { CustomSelectKind as CustomSelectKind_9dcf769af922a51107998c78ff4db18a } from '~/payload/components/CustomSelectKind' | ||
import { OfferRowLabel as OfferRowLabel_96c0a6bbcec834bdb17d8993615131f7 } from '~/payload/components/RowLabels' | ||
import { OrderRowLabel as OrderRowLabel_96c0a6bbcec834bdb17d8993615131f7 } from '~/payload/components/RowLabels' | ||
|
||
export const importMap = { | ||
|
||
"~/payload/components/CustomSelectKind#CustomSelectKind": CustomSelectKind_9dcf769af922a51107998c78ff4db18a, | ||
"~/payload/components/RowLabels#OfferRowLabel": OfferRowLabel_96c0a6bbcec834bdb17d8993615131f7, | ||
"~/payload/components/RowLabels#OrderRowLabel": OrderRowLabel_96c0a6bbcec834bdb17d8993615131f7 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"use client"; | ||
|
||
import { useRowLabel } from "@payloadcms/ui"; | ||
|
||
export const OfferRowLabel = () => { | ||
const { data, rowNumber } = useRowLabel<{ | ||
name?: string; | ||
available?: boolean; | ||
}>(); | ||
|
||
return ( | ||
<div>{`${data.available ? "🟢" : "🔴"} ${(rowNumber ?? 0) + 1}. ${data.name ?? ""}`}</div> | ||
); | ||
}; | ||
|
||
export const OrderRowLabel = () => { | ||
const { data } = useRowLabel<{ | ||
article_reference?: string; | ||
article_quantity?: number; | ||
}>(); | ||
|
||
return ( | ||
<div>{`${data.article_reference ?? ""} (x${data.article_quantity ?? 0})`}</div> | ||
); | ||
}; |