Files
tripwithbonus/frontend/app/constants/index.ts
2025-05-21 17:36:10 +03:00

70 lines
2.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import avatar from '../../public/images/avatar.png'
import belarusIcon from '../../public/images/belarus.png'
import russiaIcon from '../../public/images/russia.png'
import { CargoType, TransportType } from '../types'
const userImg = avatar
const blIcon = belarusIcon
const ruIcon = russiaIcon
export const routes = 12845
export const data = [
{
id: 1123,
username: 'John Doe',
userImg: userImg,
start_point: 'Минск',
country_from: 'Беларусь',
end_point: 'Москва',
country_to: 'Россия',
cargo_type: 'Документы',
user_request: 'Нужен перевозчик',
user_comment: 'Нужно перевезти документы из Минска в Москву',
country_from_icon: blIcon,
country_to_icon: ruIcon,
country_from_code: 'BY',
country_to_code: 'RU',
moving_type: 'Авиатранспорт',
estimated_date: new Date(2025, 4, 15),
},
{
id: 2423,
username: 'John Doe',
userImg: userImg,
start_point: 'Минск',
country_from: 'Беларусь',
end_point: 'Москва',
country_to: 'Россия',
cargo_type: 'Документы',
user_request: 'Могу перевезти',
user_comment: 'Нужно перевезти документы из Минска в Москву',
moving_type: 'Автоперевозка',
estimated_date: new Date(2025, 5, 18),
country_from_icon: blIcon,
country_to_icon: ruIcon,
country_from_code: 'BY',
country_to_code: 'RU',
day_out: new Date(2025, 5, 21),
day_in: new Date(2025, 5, 25),
},
]
export const cargo_types: CargoType[] = ['letter', 'package', 'passenger', 'parcel', 'cargo']
export const cargo_type_translations: Record<CargoType, string> = {
letter: 'Письмо или Документы',
package: 'Посылка (до 30кг)',
passenger: 'Попутчик',
parcel: 'Бандероль (до 5кг)',
cargo: 'Груз (свыше 30 кг)',
}
export const transport_types: TransportType[] = ['road', 'avia', 'both']
export const transport_translations: Record<TransportType, string> = {
road: 'Авто',
avia: 'Авиа',
both: 'Любой',
}