diff --git a/backend/src/assets/css/car-range-filter.css b/backend/src/assets/css/car-range-filter.css
index d25fd2d8d..5fbf3cd3c 100644
--- a/backend/src/assets/css/car-range-filter.css
+++ b/backend/src/assets/css/car-range-filter.css
@@ -12,7 +12,7 @@ div.range-filter div.filter-elements div.filter-element span {
cursor: pointer;
font-size: 12px;
font-weight: 400;
- text-transform: uppercase;
+ /* text-transform: uppercase; */
}
div.range-filter div.filter-actions {
diff --git a/backend/src/common/helper.ts b/backend/src/common/helper.ts
index a26e239f8..49b634bfd 100644
--- a/backend/src/common/helper.ts
+++ b/backend/src/common/helper.ts
@@ -790,3 +790,28 @@ export const downloadURI = (uri: string, name: string = '') => {
link.click()
link.remove()
}
+
+/**
+ * Get car range label.
+ *
+ * @param {string} range
+ * @returns {string}
+ */
+export const getCarRange = (range: bookcarsTypes.CarRange) => {
+ switch (range) {
+ case bookcarsTypes.CarRange.Mini:
+ return strings.CAR_RANGE_MINI
+
+ case bookcarsTypes.CarRange.Midi:
+ return strings.CAR_RANGE_MIDI
+
+ case bookcarsTypes.CarRange.Maxi:
+ return strings.CAR_RANGE_MAXI
+
+ case bookcarsTypes.CarRange.Scooter:
+ return strings.CAR_RANGE_SCOOTER
+
+ default:
+ return ''
+ }
+}
diff --git a/backend/src/components/CarRangeFilter.tsx b/backend/src/components/CarRangeFilter.tsx
index a323a7978..2ecefd9d6 100644
--- a/backend/src/components/CarRangeFilter.tsx
+++ b/backend/src/components/CarRangeFilter.tsx
@@ -3,6 +3,7 @@ import * as bookcarsTypes from ':bookcars-types'
import * as bookcarsHelper from ':bookcars-helper'
import { strings as commonStrings } from '@/lang/common'
import { strings } from '@/lang/car-range-filter'
+import * as helper from '@/common/helper'
import Accordion from './Accordion'
import '@/assets/css/car-range-filter.css'
@@ -219,7 +220,7 @@ const CarRangeFilter = ({
role="button"
tabIndex={0}
>
- {strings.MINI}
+ {helper.getCarRange(bookcarsTypes.CarRange.Mini)}
@@ -229,7 +230,7 @@ const CarRangeFilter = ({
role="button"
tabIndex={0}
>
- {strings.MIDI}
+ {helper.getCarRange(bookcarsTypes.CarRange.Midi)}
@@ -239,7 +240,7 @@ const CarRangeFilter = ({
role="button"
tabIndex={0}
>
- {strings.MAXI}
+ {helper.getCarRange(bookcarsTypes.CarRange.Maxi)}
@@ -249,7 +250,7 @@ const CarRangeFilter = ({
role="button"
tabIndex={0}
>
- {strings.SCOOTER}
+ {helper.getCarRange(bookcarsTypes.CarRange.Scooter)}
diff --git a/backend/src/components/CarRangeList.tsx b/backend/src/components/CarRangeList.tsx
index c1ab0cae8..75a61502e 100644
--- a/backend/src/components/CarRangeList.tsx
+++ b/backend/src/components/CarRangeList.tsx
@@ -6,6 +6,7 @@ import {
SelectChangeEvent
} from '@mui/material'
import * as bookcarsTypes from ':bookcars-types'
+import * as helper from '@/common/helper'
interface CarRangeListProps {
value?: string
@@ -29,7 +30,6 @@ const CarRangeList = ({
}, [carRangeValue])
const handleChange = (e: SelectChangeEvent) => {
- console.log(e.target.value)
const _value = e.target.value || ''
setValue(_value)
@@ -42,10 +42,10 @@ const CarRangeList = ({
{label}
)
diff --git a/backend/src/lang/cars.ts b/backend/src/lang/cars.ts
index 8dc11b96b..99c6e57b8 100644
--- a/backend/src/lang/cars.ts
+++ b/backend/src/lang/cars.ts
@@ -87,6 +87,10 @@ const strings = new LocalizedStrings({
CO2: 'Effet CO2',
COMING_SOON: 'Bientôt Disponible',
FULLY_BOOKED: 'Déjà réservée',
+ CAR_RANGE_MINI: 'Voiture',
+ CAR_RANGE_MIDI: 'SUV',
+ CAR_RANGE_MAXI: 'Fourgon',
+ CAR_RANGE_SCOOTER: 'Scooter',
},
en: {
NEW_CAR: 'New car',
@@ -168,6 +172,10 @@ const strings = new LocalizedStrings({
CO2: 'CO2 effect',
COMING_SOON: 'Coming Soon',
FULLY_BOOKED: 'Fully Booked',
+ CAR_RANGE_MINI: 'Car',
+ CAR_RANGE_MIDI: 'SUV',
+ CAR_RANGE_MAXI: 'Van',
+ CAR_RANGE_SCOOTER: 'Scooter',
},
es: {
NEW_CAR: 'Nuevo coche',
@@ -248,6 +256,10 @@ const strings = new LocalizedStrings({
CO2: 'Efecto CO2',
COMING_SOON: 'Próximamente',
FULLY_BOOKED: 'Ya Reservado',
+ CAR_RANGE_MINI: 'Auto',
+ CAR_RANGE_MIDI: 'Todoterreno',
+ CAR_RANGE_MAXI: 'furgoneta',
+ CAR_RANGE_SCOOTER: 'Scooter',
},
})
diff --git a/frontend/src/assets/css/car-range-filter.css b/frontend/src/assets/css/car-range-filter.css
index d25fd2d8d..5fbf3cd3c 100644
--- a/frontend/src/assets/css/car-range-filter.css
+++ b/frontend/src/assets/css/car-range-filter.css
@@ -12,7 +12,7 @@ div.range-filter div.filter-elements div.filter-element span {
cursor: pointer;
font-size: 12px;
font-weight: 400;
- text-transform: uppercase;
+ /* text-transform: uppercase; */
}
div.range-filter div.filter-actions {
diff --git a/frontend/src/common/helper.ts b/frontend/src/common/helper.ts
index 283e70bb5..43da02316 100644
--- a/frontend/src/common/helper.ts
+++ b/frontend/src/common/helper.ts
@@ -670,3 +670,28 @@ export const verifyReCaptcha = async (token: string): Promise => {
return false
}
}
+
+/**
+ * Get car range label.
+ *
+ * @param {string} range
+ * @returns {string}
+ */
+export const getCarRange = (range: bookcarsTypes.CarRange) => {
+ switch (range) {
+ case bookcarsTypes.CarRange.Mini:
+ return strings.CAR_RANGE_MINI
+
+ case bookcarsTypes.CarRange.Midi:
+ return strings.CAR_RANGE_MIDI
+
+ case bookcarsTypes.CarRange.Maxi:
+ return strings.CAR_RANGE_MAXI
+
+ case bookcarsTypes.CarRange.Scooter:
+ return strings.CAR_RANGE_SCOOTER
+
+ default:
+ return ''
+ }
+}
diff --git a/frontend/src/components/CarRangeFilter.tsx b/frontend/src/components/CarRangeFilter.tsx
index a323a7978..2ecefd9d6 100644
--- a/frontend/src/components/CarRangeFilter.tsx
+++ b/frontend/src/components/CarRangeFilter.tsx
@@ -3,6 +3,7 @@ import * as bookcarsTypes from ':bookcars-types'
import * as bookcarsHelper from ':bookcars-helper'
import { strings as commonStrings } from '@/lang/common'
import { strings } from '@/lang/car-range-filter'
+import * as helper from '@/common/helper'
import Accordion from './Accordion'
import '@/assets/css/car-range-filter.css'
@@ -219,7 +220,7 @@ const CarRangeFilter = ({
role="button"
tabIndex={0}
>
- {strings.MINI}
+ {helper.getCarRange(bookcarsTypes.CarRange.Mini)}
@@ -229,7 +230,7 @@ const CarRangeFilter = ({
role="button"
tabIndex={0}
>
- {strings.MIDI}
+ {helper.getCarRange(bookcarsTypes.CarRange.Midi)}
@@ -239,7 +240,7 @@ const CarRangeFilter = ({
role="button"
tabIndex={0}
>
- {strings.MAXI}
+ {helper.getCarRange(bookcarsTypes.CarRange.Maxi)}
@@ -249,7 +250,7 @@ const CarRangeFilter = ({
role="button"
tabIndex={0}
>
- {strings.SCOOTER}
+ {helper.getCarRange(bookcarsTypes.CarRange.Scooter)}
diff --git a/frontend/src/lang/cars.ts b/frontend/src/lang/cars.ts
index 5a0fe6537..8995ab557 100644
--- a/frontend/src/lang/cars.ts
+++ b/frontend/src/lang/cars.ts
@@ -92,6 +92,10 @@ const strings = new LocalizedStrings({
DETAILS: 'Détails',
FULLY_BOOKED: 'Déjà Réservée',
COMING_SOON: 'Bientôt Disponible',
+ CAR_RANGE_MINI: 'Voiture',
+ CAR_RANGE_MIDI: 'SUV',
+ CAR_RANGE_MAXI: 'Fourgon',
+ CAR_RANGE_SCOOTER: 'Scooter',
},
en: {
NEW_CAR: 'New car',
@@ -175,6 +179,10 @@ const strings = new LocalizedStrings({
DETAILS: 'Details',
FULLY_BOOKED: 'Fully Booked',
COMING_SOON: 'Coming Soon',
+ CAR_RANGE_MINI: 'Car',
+ CAR_RANGE_MIDI: 'SUV',
+ CAR_RANGE_MAXI: 'Van',
+ CAR_RANGE_SCOOTER: 'Scooter',
},
es: {
NEW_CAR: 'Coche nuevo',
@@ -258,6 +266,10 @@ const strings = new LocalizedStrings({
DETAILS: 'Detalles',
FULLY_BOOKED: 'Ya Reservado',
COMING_SOON: 'Próximamente',
+ CAR_RANGE_MINI: 'Auto',
+ CAR_RANGE_MIDI: 'Todoterreno',
+ CAR_RANGE_MAXI: 'furgoneta',
+ CAR_RANGE_SCOOTER: 'Scooter',
}
})
diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx
index 2412bfebc..1db994c1b 100644
--- a/frontend/src/pages/Home.tsx
+++ b/frontend/src/pages/Home.tsx
@@ -25,6 +25,7 @@ import * as bookcarsTypes from ':bookcars-types'
import * as bookcarsHelper from ':bookcars-helper'
import env from '@/config/env.config'
import { strings as commonStrings } from '@/lang/common'
+import { strings as carsStrings } from '@/lang/cars'
import { strings } from '@/lang/home'
import * as UserService from '@/services/UserService'
import * as SupplierService from '@/services/SupplierService'
@@ -64,8 +65,8 @@ const Home = () => {
const [miniPricePday, setMiniPricePday] = useState(40)
const [midiPricePhr, setMidiPricePhr] = useState(3.5)
const [midiPricePday, setMidiPricePday] = useState(50)
- const [maxiPricePhr, setMaxiPricePhr] = useState(3.5)
- const [maxiPricePday, setMaxiPricePday] = useState(50)
+ const [maxiPricePhr, setMaxiPricePhr] = useState(4.5)
+ const [maxiPricePday, setMaxiPricePday] = useState(80)
useEffect(() => {
const init = async () => {
@@ -345,7 +346,7 @@ const Home = () => {
)}
label={strings.MINI}
/> */}
- {strings.MINI}
+ {carsStrings.CAR_RANGE_MINI}
-
{bookcarsHelper.formatPrice(miniPricePhr, commonStrings.CURRENCY, language)}
@@ -394,7 +395,7 @@ const Home = () => {
)}
label={strings.MIDI}
/> */}
- {strings.MIDI}
+ {carsStrings.CAR_RANGE_MIDI}
-
{bookcarsHelper.formatPrice(midiPricePhr, commonStrings.CURRENCY, language)}
@@ -442,7 +443,7 @@ const Home = () => {
)}
label={strings.MAXI}
/> */}
- {strings.MAXI}
+ {carsStrings.CAR_RANGE_MAXI}
-
{bookcarsHelper.formatPrice(maxiPricePhr, commonStrings.CURRENCY, language)}
@@ -488,7 +489,7 @@ const Home = () => {