admin
Some checks are pending
Deploy Admin Panel / Deploy Admin Panel (push) Waiting to run
Deploy Admin Panel / Admin Panel Verification (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions

This commit is contained in:
Dmitry 2025-12-14 23:01:01 +03:00
parent 0cfd5f4524
commit 28a0062015
2 changed files with 12 additions and 4 deletions

View file

@ -262,13 +262,17 @@ export function BulkCardEditor({ images, onComplete, onCancel }: BulkCardEditorP
<Label htmlFor="packId">Pack ID (optional)</Label>
<Select
value={currentCard.packId || undefined}
onValueChange={(value: string) => handleFieldChange('packId', value || '')}
onValueChange={(value: string) => {
// If "none" is selected, clear the packId
const packId = value === '__none__' ? '' : value
handleFieldChange('packId', packId)
}}
>
<SelectTrigger>
<SelectValue placeholder="Select a pack (optional)" />
</SelectTrigger>
<SelectContent>
<SelectItem value="">None</SelectItem>
<SelectItem value="__none__">None</SelectItem>
{packsData && packsData.length > 0 ? (
packsData.map((pack) => (
<SelectItem key={pack.id} value={pack.id}>

View file

@ -367,13 +367,17 @@ export default function CardsPage() {
<Label htmlFor="packId">Pack ID (optional)</Label>
<Select
value={formData.packId || undefined}
onValueChange={(value: string) => setFormData(prev => ({ ...prev, packId: value || '' }))}
onValueChange={(value: string) => {
// If "none" is selected, clear the packId
const packId = value === '__none__' ? '' : value
setFormData(prev => ({ ...prev, packId }))
}}
>
<SelectTrigger>
<SelectValue placeholder="Select a pack (optional)" />
</SelectTrigger>
<SelectContent>
<SelectItem value="">None</SelectItem>
<SelectItem value="__none__">None</SelectItem>
{packsData?.items && packsData.items.length > 0 ? (
packsData.items.map((pack) => (
<SelectItem key={pack.id} value={pack.id}>