diff --git a/client/src/mobile/screens/dashboard/MNewTripSheet.tsx b/client/src/mobile/screens/dashboard/MNewTripSheet.tsx index 6ad544620..6908d7c9a 100644 --- a/client/src/mobile/screens/dashboard/MNewTripSheet.tsx +++ b/client/src/mobile/screens/dashboard/MNewTripSheet.tsx @@ -7,6 +7,8 @@ import { useToast } from '../../../components/shared/Toast' import { normalizeImageFile } from '../../../utils/convertHeic' import { getApiErrorMessage } from '../../../types' import { CustomDatePicker } from '../../../components/shared/CustomDateTimePicker' +import CustomSelect from '../../../components/shared/CustomSelect' +import { currenciesWith, SYMBOLS } from '../../../components/Budget/BudgetPanel.constants' import type { DashboardTrip } from '../../../pages/dashboard/dashboardModel' import type { Trip, TripCreateRequest } from '@trek/shared' import MSheet from '../../components/MSheet' @@ -57,6 +59,7 @@ export default function MNewTripSheet({ open, trip, onClose, onSave, onCoverUpda const [description, setDescription] = useState('') const [startDate, setStartDate] = useState('') const [endDate, setEndDate] = useState('') + const [currency, setCurrency] = useState('EUR') const [error, setError] = useState('') const [isSaving, setIsSaving] = useState(false) const [coverPreview, setCoverPreview] = useState(null) @@ -74,6 +77,7 @@ export default function MNewTripSheet({ open, trip, onClose, onSave, onCoverUpda setDescription(trip?.description || '') setStartDate(trip?.start_date || '') setEndDate(trip?.end_date || '') + setCurrency(trip?.currency || 'EUR') setCoverPreview(trip?.cover_image || null) setPendingCoverFile(null) setPendingUnsplashUrl(null) @@ -109,6 +113,7 @@ export default function MNewTripSheet({ open, trip, onClose, onSave, onCoverUpda description: description.trim() || null, start_date: startDate || null, end_date: endDate || null, + currency, ...(!startDate && !endDate && !isEditing ? { day_count: 7 } : {}), }) const created = result ? result.trip : undefined @@ -290,6 +295,19 @@ export default function MNewTripSheet({ open, trip, onClose, onSave, onCoverUpda
{t('dashboard.noDateHint')}
)} +
+ {t('dashboard.currency')} + { if (canEditTrip) setCurrency(String(v)) }} + disabled={!canEditTrip} + searchable + size="sm" + options={currenciesWith(currency).map(c => ({ value: c, label: `${c} (${SYMBOLS[c] || c})` }))} + style={{ width: '100%', marginTop: 5 }} + /> +
+ {canUploadCover && (