@myrjfa/state 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/actions/actions.d.ts +6 -6
- package/dist/lib/actions/auth.d.ts +23 -19
- package/dist/lib/actions/auth.d.ts.map +1 -1
- package/dist/lib/actions/auth.js +24 -5
- package/dist/lib/actions/fetcher.d.ts.map +1 -1
- package/dist/lib/actions/fetcher.js +15 -8
- package/dist/lib/actions.d.ts +12 -12
- package/dist/lib/actions.d.ts.map +1 -1
- package/dist/lib/actions.js +3 -1
- package/dist/lib/authSessionManager.d.ts.map +1 -1
- package/dist/lib/authSessionManager.js +77 -13
- package/dist/lib/authSessionPolicy.d.ts +34 -0
- package/dist/lib/authSessionPolicy.d.ts.map +1 -1
- package/dist/lib/authSessionPolicy.js +52 -0
- package/dist/lib/models/authorization.d.ts +4 -3
- package/dist/lib/models/authorization.d.ts.map +1 -1
- package/dist/lib/models/authorization.js +4 -1
- package/dist/lib/models/blog.d.ts +4 -4
- package/dist/lib/models/discount.d.ts +52 -52
- package/dist/lib/models/notifications.d.ts +2 -2
- package/dist/lib/models/opportunities/freelance.d.ts +34 -34
- package/dist/lib/models/opportunities/internship.d.ts +34 -34
- package/dist/lib/models/opportunities/job.d.ts +34 -34
- package/dist/lib/models/opportunities/opportunity.d.ts +34 -34
- package/dist/lib/models/opportunities/volunteerJob.d.ts +34 -34
- package/dist/lib/models/package.d.ts +16 -16
- package/dist/lib/models/portfolio.d.ts +2 -2
- package/dist/lib/models/pricing.d.ts +12 -12
- package/dist/lib/models/review.d.ts +2 -2
- package/dist/lib/models/stay.d.ts +18 -18
- package/dist/lib/models/travelPackage.d.ts +36 -36
- package/dist/lib/models/user.d.ts +12 -12
- package/dist/lib/userAtom.d.ts +126 -25
- package/dist/lib/userAtom.d.ts.map +1 -1
- package/dist/lib/userAtom.js +79 -45
- package/package.json +1 -1
- package/dist/lib/actions/adminDashboard.d.ts +0 -4
- package/dist/lib/actions/adminDashboard.d.ts.map +0 -1
- package/dist/lib/actions/adminDashboard.js +0 -29
- package/dist/lib/actions/adventure.d.ts +0 -104
- package/dist/lib/actions/adventure.d.ts.map +0 -1
- package/dist/lib/actions/adventure.js +0 -203
- package/dist/lib/actions/application.d.ts +0 -35
- package/dist/lib/actions/application.d.ts.map +0 -1
- package/dist/lib/actions/application.js +0 -573
- package/dist/lib/actions/blog.d.ts +0 -61
- package/dist/lib/actions/blog.d.ts.map +0 -1
- package/dist/lib/actions/blog.js +0 -762
- package/dist/lib/actions/brand.d.ts +0 -83
- package/dist/lib/actions/brand.d.ts.map +0 -1
- package/dist/lib/actions/brand.js +0 -28
- package/dist/lib/actions/companion.d.ts +0 -174
- package/dist/lib/actions/companion.d.ts.map +0 -1
- package/dist/lib/actions/companion.js +0 -276
- package/dist/lib/actions/event.d.ts +0 -178
- package/dist/lib/actions/event.d.ts.map +0 -1
- package/dist/lib/actions/event.js +0 -214
- package/dist/lib/actions/guide.d.ts +0 -55
- package/dist/lib/actions/guide.d.ts.map +0 -1
- package/dist/lib/actions/guide.js +0 -128
- package/dist/lib/actions/hostDashboard.d.ts +0 -122
- package/dist/lib/actions/hostDashboard.d.ts.map +0 -1
- package/dist/lib/actions/hostDashboard.js +0 -329
- package/dist/lib/actions/location.d.ts +0 -141
- package/dist/lib/actions/location.d.ts.map +0 -1
- package/dist/lib/actions/location.js +0 -113
- package/dist/lib/actions/notifications.d.ts +0 -91
- package/dist/lib/actions/notifications.d.ts.map +0 -1
- package/dist/lib/actions/notifications.js +0 -83
- package/dist/lib/actions/opportunity.d.ts +0 -44
- package/dist/lib/actions/opportunity.d.ts.map +0 -1
- package/dist/lib/actions/opportunity.js +0 -318
- package/dist/lib/actions/package.d.ts +0 -85
- package/dist/lib/actions/package.d.ts.map +0 -1
- package/dist/lib/actions/package.js +0 -167
- package/dist/lib/actions/place.d.ts +0 -191
- package/dist/lib/actions/place.d.ts.map +0 -1
- package/dist/lib/actions/place.js +0 -57
- package/dist/lib/actions/portfolio.d.ts +0 -65
- package/dist/lib/actions/portfolio.d.ts.map +0 -1
- package/dist/lib/actions/portfolio.js +0 -62
- package/dist/lib/actions/property.d.ts +0 -17
- package/dist/lib/actions/property.d.ts.map +0 -1
- package/dist/lib/actions/property.js +0 -16
- package/dist/lib/actions/rental.d.ts +0 -87
- package/dist/lib/actions/rental.d.ts.map +0 -1
- package/dist/lib/actions/rental.js +0 -205
- package/dist/lib/actions/review.d.ts +0 -8
- package/dist/lib/actions/review.d.ts.map +0 -1
- package/dist/lib/actions/review.js +0 -102
- package/dist/lib/actions/room.d.ts +0 -39
- package/dist/lib/actions/room.d.ts.map +0 -1
- package/dist/lib/actions/room.js +0 -74
- package/dist/lib/actions/stay.d.ts +0 -97
- package/dist/lib/actions/stay.d.ts.map +0 -1
- package/dist/lib/actions/stay.js +0 -138
- package/dist/lib/actions/travelPackage.d.ts +0 -104
- package/dist/lib/actions/travelPackage.d.ts.map +0 -1
- package/dist/lib/actions/travelPackage.js +0 -487
- package/dist/lib/data/adventureDummyData.d.ts +0 -3
- package/dist/lib/data/adventureDummyData.d.ts.map +0 -1
- package/dist/lib/data/adventureDummyData.js +0 -138
- package/dist/lib/data/adventureFormPage.d.ts +0 -28
- package/dist/lib/data/adventureFormPage.d.ts.map +0 -1
- package/dist/lib/data/adventureFormPage.js +0 -58
- package/dist/lib/data/companionDummyData.d.ts +0 -99
- package/dist/lib/data/companionDummyData.d.ts.map +0 -1
- package/dist/lib/data/companionDummyData.js +0 -203
- package/dist/lib/data/destinations.d.ts +0 -14
- package/dist/lib/data/destinations.d.ts.map +0 -1
- package/dist/lib/data/destinations.js +0 -203
- package/dist/lib/data/eventFormPage.d.ts +0 -38
- package/dist/lib/data/eventFormPage.d.ts.map +0 -1
- package/dist/lib/data/eventFormPage.js +0 -56
- package/dist/lib/data/eventsDummyData.d.ts +0 -54
- package/dist/lib/data/eventsDummyData.d.ts.map +0 -1
- package/dist/lib/data/eventsDummyData.js +0 -586
- package/dist/lib/data/guideDummyData.d.ts +0 -3
- package/dist/lib/data/guideDummyData.d.ts.map +0 -1
- package/dist/lib/data/guideDummyData.js +0 -66
- package/dist/lib/data/opportunityFormData.d.ts +0 -13
- package/dist/lib/data/opportunityFormData.d.ts.map +0 -1
- package/dist/lib/data/opportunityFormData.js +0 -62
- package/dist/lib/data/opportunityFormPage.d.ts +0 -12
- package/dist/lib/data/opportunityFormPage.d.ts.map +0 -1
- package/dist/lib/data/opportunityFormPage.js +0 -33
- package/dist/lib/data/packageDummyData.d.ts +0 -3
- package/dist/lib/data/packageDummyData.d.ts.map +0 -1
- package/dist/lib/data/packageDummyData.js +0 -56
- package/dist/lib/data/rentalDummyData.d.ts +0 -3
- package/dist/lib/data/rentalDummyData.d.ts.map +0 -1
- package/dist/lib/data/rentalDummyData.js +0 -382
- package/dist/lib/data/rentalFormPage.d.ts +0 -11
- package/dist/lib/data/rentalFormPage.d.ts.map +0 -1
- package/dist/lib/data/rentalFormPage.js +0 -86
- package/dist/lib/data/staysDummyData.d.ts +0 -72
- package/dist/lib/data/staysDummyData.d.ts.map +0 -1
- package/dist/lib/data/staysDummyData.js +0 -694
- package/dist/lib/data/storeDummyData.d.ts +0 -33
- package/dist/lib/data/storeDummyData.d.ts.map +0 -1
- package/dist/lib/data/storeDummyData.js +0 -336
- package/dist/lib/data/travelPackageFormData.d.ts +0 -19
- package/dist/lib/data/travelPackageFormData.d.ts.map +0 -1
- package/dist/lib/data/travelPackageFormData.js +0 -51
- package/dist/lib/data/travelPackageFormPage.d.ts +0 -22
- package/dist/lib/data/travelPackageFormPage.d.ts.map +0 -1
- package/dist/lib/data/travelPackageFormPage.js +0 -40
- package/dist/lib/data/vehicleData.d.ts +0 -2
- package/dist/lib/data/vehicleData.d.ts.map +0 -1
- package/dist/lib/data/vehicleData.js +0 -187
- package/dist/lib/data/vehicleModels.d.ts +0 -2
- package/dist/lib/data/vehicleModels.d.ts.map +0 -1
- package/dist/lib/data/vehicleModels.js +0 -128
- package/dist/lib/hooks/usePersistentDraftState.d.ts +0 -20
- package/dist/lib/hooks/usePersistentDraftState.d.ts.map +0 -1
- package/dist/lib/hooks/usePersistentDraftState.js +0 -47
- package/dist/lib/models/forms.d.ts +0 -384
- package/dist/lib/models/forms.d.ts.map +0 -1
- package/dist/lib/models/forms.js +0 -121
- package/dist/lib/pricingActions.d.ts +0 -13
- package/dist/lib/pricingActions.d.ts.map +0 -1
- package/dist/lib/pricingActions.js +0 -16
- package/dist/lib/utils/entitySubmission.d.ts +0 -21
- package/dist/lib/utils/entitySubmission.d.ts.map +0 -1
- package/dist/lib/utils/entitySubmission.js +0 -10
- package/dist/lib/utils/imageUpload.d.ts +0 -4
- package/dist/lib/utils/imageUpload.d.ts.map +0 -1
- package/dist/lib/utils/imageUpload.js +0 -36
- package/dist/lib/utils/tileConverters.d.ts +0 -8
- package/dist/lib/utils/tileConverters.d.ts.map +0 -1
- package/dist/lib/utils/tileConverters.js +0 -59
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
const volunteerExcludedFields = new Set([
|
|
2
|
-
"workMode",
|
|
3
|
-
"compensationType",
|
|
4
|
-
"compensationAmount",
|
|
5
|
-
"compensationCurrency",
|
|
6
|
-
"compensationFrequency",
|
|
7
|
-
]);
|
|
8
|
-
const hasChanged = (initialValues, key, value) => {
|
|
9
|
-
if (!initialValues)
|
|
10
|
-
return true;
|
|
11
|
-
return JSON.stringify(initialValues[key]) !== JSON.stringify(value);
|
|
12
|
-
};
|
|
13
|
-
const appendArraySequence = (formData, key, items) => {
|
|
14
|
-
if (!items.length)
|
|
15
|
-
return;
|
|
16
|
-
formData.append(key, "start");
|
|
17
|
-
items.forEach((item) => formData.append(key, item));
|
|
18
|
-
formData.append(key, "end");
|
|
19
|
-
};
|
|
20
|
-
export function buildOpportunityFormData(values, { status, initialValues = null, includeCompensationType = false, skipEmptyScalars = false, }) {
|
|
21
|
-
const formData = new FormData();
|
|
22
|
-
const compensation = {};
|
|
23
|
-
const isVolunteer = values.opportunityType === "volunteer";
|
|
24
|
-
Object.entries(values).forEach(([key, value]) => {
|
|
25
|
-
if (!hasChanged(initialValues, key, value))
|
|
26
|
-
return;
|
|
27
|
-
if (volunteerExcludedFields.has(key)) {
|
|
28
|
-
if (!isVolunteer) {
|
|
29
|
-
if (key === "compensationType" && includeCompensationType)
|
|
30
|
-
compensation.type = value;
|
|
31
|
-
else if (key === "compensationAmount")
|
|
32
|
-
compensation.amount = value;
|
|
33
|
-
else if (key === "compensationCurrency")
|
|
34
|
-
compensation.currency = value;
|
|
35
|
-
else if (key === "compensationFrequency")
|
|
36
|
-
compensation.frequency = value;
|
|
37
|
-
}
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
if (key === "questions" && Array.isArray(value)) {
|
|
41
|
-
if (value.length > 0) {
|
|
42
|
-
formData.append(key, JSON.stringify({ question: "start", answer: "start" }));
|
|
43
|
-
value.forEach((item) => formData.append(key, JSON.stringify(item)));
|
|
44
|
-
formData.append(key, JSON.stringify({ question: "end", answer: "end" }));
|
|
45
|
-
}
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (Array.isArray(value)) {
|
|
49
|
-
appendArraySequence(formData, key, value);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
if (skipEmptyScalars && (value === "" || value == null))
|
|
53
|
-
return;
|
|
54
|
-
formData.append(key, value);
|
|
55
|
-
});
|
|
56
|
-
if (!isVolunteer && Object.keys(compensation).length > 0) {
|
|
57
|
-
formData.append("compensation", JSON.stringify(compensation));
|
|
58
|
-
}
|
|
59
|
-
formData.append("status", status);
|
|
60
|
-
return formData;
|
|
61
|
-
}
|
|
62
|
-
export { volunteerExcludedFields };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { UseFormReturn } from "react-hook-form";
|
|
2
|
-
import type { Opportunity } from "../models/opportunities/opportunity";
|
|
3
|
-
import type { OpportunityFormValues } from "../models/forms";
|
|
4
|
-
export type OpportunityInitialValues = {
|
|
5
|
-
skills: string[];
|
|
6
|
-
facilities: string[];
|
|
7
|
-
responsibilities: string[];
|
|
8
|
-
images: string[];
|
|
9
|
-
};
|
|
10
|
-
export declare function getOpportunityInitialValues(data: Partial<Opportunity>): OpportunityInitialValues;
|
|
11
|
-
export declare function resetOpportunityForm(form: UseFormReturn<OpportunityFormValues>, data: Partial<Opportunity>): void;
|
|
12
|
-
//# sourceMappingURL=opportunityFormPage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"opportunityFormPage.d.ts","sourceRoot":"","sources":["../../../src/lib/data/opportunityFormPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,GACzB,wBAAwB,CAO1B;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,aAAa,CAAC,qBAAqB,CAAC,EAC1C,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,QAyB3B"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export function getOpportunityInitialValues(data) {
|
|
2
|
-
return {
|
|
3
|
-
skills: data.skills || [],
|
|
4
|
-
facilities: data.facilities || [],
|
|
5
|
-
responsibilities: data.responsibilities || [],
|
|
6
|
-
images: data.images || [],
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
export function resetOpportunityForm(form, data) {
|
|
10
|
-
form.reset({
|
|
11
|
-
opportunityType: data.opportunityType || "volunteer",
|
|
12
|
-
title: data.title || "",
|
|
13
|
-
description: data.description || "",
|
|
14
|
-
categoryId: data.categoryId || "",
|
|
15
|
-
city: data.city || "",
|
|
16
|
-
country: data.country || "",
|
|
17
|
-
state: data.state || "",
|
|
18
|
-
address: data.address || "",
|
|
19
|
-
workMode: data.workMode ?? "onsite",
|
|
20
|
-
compensationType: data.compensation?.type ?? "free",
|
|
21
|
-
compensationAmount: data.compensation?.amount ?? undefined,
|
|
22
|
-
compensationCurrency: data.compensation?.currency ?? "INR",
|
|
23
|
-
compensationFrequency: data.compensation?.frequency ?? "monthly",
|
|
24
|
-
availableFrom: data.availableFrom ? new Date(data.availableFrom) : new Date(),
|
|
25
|
-
minDuration: data.minDuration || 1,
|
|
26
|
-
maxDuration: data.maxDuration || 3,
|
|
27
|
-
urgent: data.urgent || false,
|
|
28
|
-
peopleRequired: data.peopleRequired || 1,
|
|
29
|
-
questions: data.questions || [],
|
|
30
|
-
hostingType: data.hostingType || "",
|
|
31
|
-
adminApproval: data.adminApproval ?? true,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"packageDummyData.d.ts","sourceRoot":"","sources":["../../../src/lib/data/packageDummyData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,eAAO,MAAM,gBAAgB,EAAE,SAAS,EA4DvC,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export const packageDummyData = [
|
|
2
|
-
{
|
|
3
|
-
slug: "luxury-kerala-backwaters-houseboat",
|
|
4
|
-
image: "https://images.pexels.com/photos/962512/pexels-photo-962512.jpeg",
|
|
5
|
-
title: "Luxury Kerala Backwaters & Houseboat",
|
|
6
|
-
description: "5 Nights / 6 Days covering Kochi, Munnar, Thekkady, and Alleppey. Experience the serene backwaters in a premium houseboat.",
|
|
7
|
-
location: "Kochi, Kerala",
|
|
8
|
-
date: new Date("2025-05-15"),
|
|
9
|
-
rating: 4.9,
|
|
10
|
-
price: 35000,
|
|
11
|
-
currency: "INR",
|
|
12
|
-
tileType: "packages",
|
|
13
|
-
duration: 6,
|
|
14
|
-
difficultyLevel: "easy",
|
|
15
|
-
host: {
|
|
16
|
-
name: "Kerala Travels",
|
|
17
|
-
image: "https://images.pexels.com/photos/1722198/pexels-photo-1722198.jpeg",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
slug: "rajasthan-royal-heritage-tour",
|
|
22
|
-
image: "https://images.pexels.com/photos/3581369/pexels-photo-3581369.jpeg",
|
|
23
|
-
title: "Rajasthan Royal Heritage Tour",
|
|
24
|
-
description: "7 Nights / 8 Days exploring Jaipur, Jodhpur, and Udaipur. Stay in authentic palace hotels and experience Rajputana hospitality.",
|
|
25
|
-
location: "Jaipur, Rajasthan",
|
|
26
|
-
date: new Date("2025-06-01"),
|
|
27
|
-
rating: 4.8,
|
|
28
|
-
price: 45000,
|
|
29
|
-
currency: "INR",
|
|
30
|
-
tileType: "packages",
|
|
31
|
-
duration: 8,
|
|
32
|
-
difficultyLevel: "easy",
|
|
33
|
-
host: {
|
|
34
|
-
name: "Rajasthan Royals",
|
|
35
|
-
image: "https://images.pexels.com/photos/733872/pexels-photo-733872.jpeg",
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
slug: "le-ladakh-adventure-circuit",
|
|
40
|
-
image: "https://images.pexels.com/photos/3802510/pexels-photo-3802510.jpeg",
|
|
41
|
-
title: "Leh-Ladakh Adventure Circuit",
|
|
42
|
-
description: "9 Nights / 10 Days across Manali, Leh, Nubra Valley, and Pangong Lake. An ultimate road trip for adventure seekers.",
|
|
43
|
-
location: "Leh, Ladakh",
|
|
44
|
-
date: new Date("2025-07-10"),
|
|
45
|
-
rating: 4.9,
|
|
46
|
-
price: 55000,
|
|
47
|
-
currency: "INR",
|
|
48
|
-
tileType: "packages",
|
|
49
|
-
duration: 10,
|
|
50
|
-
difficultyLevel: "hard",
|
|
51
|
-
host: {
|
|
52
|
-
name: "Ladakh Adventures",
|
|
53
|
-
image: "https://images.pexels.com/photos/2379005/pexels-photo-2379005.jpeg",
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rentalDummyData.d.ts","sourceRoot":"","sources":["../../../src/lib/data/rentalDummyData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,eAAO,MAAM,eAAe,EAAE,SAAS,EA0YtC,CAAC"}
|
|
@@ -1,382 +0,0 @@
|
|
|
1
|
-
export const rentalDummyData = [
|
|
2
|
-
{
|
|
3
|
-
slug: "royal-enfield-himalayan-manali",
|
|
4
|
-
image: "https://images.pexels.com/photos/2607554/pexels-photo-2607554.jpeg",
|
|
5
|
-
title: "Royal Enfield Himalayan 411",
|
|
6
|
-
description: "Ideal for mountain terrain. Comes with panniers, helmet, and full insurance. Self-drive only.",
|
|
7
|
-
location: "Manali, Himachal Pradesh",
|
|
8
|
-
date: new Date("2025-01-10"),
|
|
9
|
-
rating: 4.7,
|
|
10
|
-
price: 1800,
|
|
11
|
-
currency: "INR",
|
|
12
|
-
tileType: "rentals",
|
|
13
|
-
vehicleType: "bike",
|
|
14
|
-
duration: 1,
|
|
15
|
-
host: {
|
|
16
|
-
name: "Himachal Rides",
|
|
17
|
-
image: "https://images.pexels.com/photos/1722198/pexels-photo-1722198.jpeg",
|
|
18
|
-
},
|
|
19
|
-
seatingCapacity: 2,
|
|
20
|
-
driverOption: "self-drive",
|
|
21
|
-
fuelType: "petrol",
|
|
22
|
-
transmission: "manual",
|
|
23
|
-
cancellationPolicy: "Free cancellation up to 48 hours before pickup.",
|
|
24
|
-
lastServiceDate: new Date("2024-12-15").toISOString(),
|
|
25
|
-
homeDeliveryAvailable: false,
|
|
26
|
-
payAtPickup: true,
|
|
27
|
-
completedTrips: 110,
|
|
28
|
-
reviewCount: 25,
|
|
29
|
-
brand: "Royal Enfield",
|
|
30
|
-
model: "Himalayan 411",
|
|
31
|
-
depositAmount: 5000,
|
|
32
|
-
distanceLimit: "120 km/day",
|
|
33
|
-
weeklyPrice: 2000,
|
|
34
|
-
fifteenDaysPrice: 4000,
|
|
35
|
-
monthlyPrice: 7500,
|
|
36
|
-
pickupPoints: [
|
|
37
|
-
{
|
|
38
|
-
name: "Mall Road Showroom",
|
|
39
|
-
address: "12 Mall Road, Manali",
|
|
40
|
-
lat: 32.2396,
|
|
41
|
-
lng: 77.1887,
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
name: "Manali Bus Stand",
|
|
45
|
-
address: "Private Bus Stand, Manali",
|
|
46
|
-
lat: 32.238,
|
|
47
|
-
lng: 77.187,
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
slug: "swift-dzire-goa-self-drive",
|
|
53
|
-
image: "https://images.pexels.com/photos/170811/pexels-photo-170811.jpeg",
|
|
54
|
-
title: "Maruti Swift Dzire – AC",
|
|
55
|
-
description: "Perfect for beach drives. Unlimited km, GPS included. Petrol, automatic transmission.",
|
|
56
|
-
location: "Panaji, Goa",
|
|
57
|
-
date: new Date("2025-02-15"),
|
|
58
|
-
rating: 4.5,
|
|
59
|
-
price: 2200,
|
|
60
|
-
currency: "INR",
|
|
61
|
-
tileType: "rentals",
|
|
62
|
-
vehicleType: "car",
|
|
63
|
-
duration: 1,
|
|
64
|
-
host: {
|
|
65
|
-
name: "Goa Wheels",
|
|
66
|
-
image: "https://images.pexels.com/photos/1545743/pexels-photo-1545743.jpeg",
|
|
67
|
-
},
|
|
68
|
-
seatingCapacity: 5,
|
|
69
|
-
driverOption: "self-drive",
|
|
70
|
-
fuelType: "petrol",
|
|
71
|
-
transmission: "automatic",
|
|
72
|
-
cancellationPolicy: "Non-refundable if cancelled within 24 hours.",
|
|
73
|
-
lastServiceDate: new Date("2025-01-05").toISOString(),
|
|
74
|
-
homeDeliveryAvailable: true,
|
|
75
|
-
homeDeliveryPrice: 400,
|
|
76
|
-
payAtPickup: true,
|
|
77
|
-
completedTrips: 269,
|
|
78
|
-
reviewCount: 14,
|
|
79
|
-
brand: "Maruti",
|
|
80
|
-
model: "Swift Dzire",
|
|
81
|
-
depositAmount: 10000,
|
|
82
|
-
distanceLimit: "150 km/day",
|
|
83
|
-
weeklyPrice: 12000,
|
|
84
|
-
fifteenDaysPrice: 24000,
|
|
85
|
-
monthlyPrice: 40000,
|
|
86
|
-
pickupPoints: [
|
|
87
|
-
{
|
|
88
|
-
name: "Dabolim Airport",
|
|
89
|
-
address: "Airport Terminal, Goa",
|
|
90
|
-
lat: 15.3803,
|
|
91
|
-
lng: 73.8344,
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
name: "Panaji Main Hub",
|
|
95
|
-
address: "Panaji Bus Stand, Goa",
|
|
96
|
-
lat: 15.4909,
|
|
97
|
-
lng: 73.8278,
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
slug: "activa-125-mysore",
|
|
103
|
-
image: "https://images.pexels.com/photos/1413412/pexels-photo-1413412.jpeg",
|
|
104
|
-
title: "Honda Activa 125 – City Scooter",
|
|
105
|
-
description: "Comfortable city scooter, fuel-efficient and easy to ride. Storage basket included.",
|
|
106
|
-
location: "Mysore, Karnataka",
|
|
107
|
-
date: new Date("2025-01-25"),
|
|
108
|
-
rating: 4.3,
|
|
109
|
-
price: 450,
|
|
110
|
-
currency: "INR",
|
|
111
|
-
tileType: "rentals",
|
|
112
|
-
vehicleType: "scooty",
|
|
113
|
-
duration: 1,
|
|
114
|
-
host: {
|
|
115
|
-
name: "Mysore Scooters",
|
|
116
|
-
image: "https://images.pexels.com/photos/697509/pexels-photo-697509.jpeg",
|
|
117
|
-
},
|
|
118
|
-
seatingCapacity: 2,
|
|
119
|
-
driverOption: "self-drive",
|
|
120
|
-
fuelType: "petrol",
|
|
121
|
-
transmission: "automatic",
|
|
122
|
-
cancellationPolicy: "Cancel anytime.",
|
|
123
|
-
homeDeliveryAvailable: true,
|
|
124
|
-
homeDeliveryPrice: 50,
|
|
125
|
-
payAtPickup: true,
|
|
126
|
-
completedTrips: 45,
|
|
127
|
-
reviewCount: 3,
|
|
128
|
-
brand: "Honda",
|
|
129
|
-
model: "Activa 125",
|
|
130
|
-
depositAmount: 1000,
|
|
131
|
-
distanceLimit: "No distance limit",
|
|
132
|
-
weeklyPrice: 2500,
|
|
133
|
-
fifteenDaysPrice: 4800,
|
|
134
|
-
monthlyPrice: 9000,
|
|
135
|
-
pickupPoints: [
|
|
136
|
-
{
|
|
137
|
-
name: "Mysore Palace Gate",
|
|
138
|
-
address: "Mysore Palace South Gate",
|
|
139
|
-
lat: 12.3051,
|
|
140
|
-
lng: 76.6551,
|
|
141
|
-
},
|
|
142
|
-
],
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
slug: "innova-crysta-jaipur",
|
|
146
|
-
image: "https://images.pexels.com/photos/3764984/pexels-photo-3764984.jpeg",
|
|
147
|
-
title: "Toyota Innova Crysta – 7 Seater",
|
|
148
|
-
description: "Spacious SUV ideal for family trips. With driver option available. AC, music system, comfortable seats.",
|
|
149
|
-
location: "Jaipur, Rajasthan",
|
|
150
|
-
date: new Date("2025-03-01"),
|
|
151
|
-
rating: 4.8,
|
|
152
|
-
price: 4500,
|
|
153
|
-
currency: "INR",
|
|
154
|
-
tileType: "rentals",
|
|
155
|
-
vehicleType: "suv",
|
|
156
|
-
duration: 1,
|
|
157
|
-
host: {
|
|
158
|
-
name: "Rajputana Cabs",
|
|
159
|
-
image: "https://images.pexels.com/photos/733872/pexels-photo-733872.jpeg",
|
|
160
|
-
},
|
|
161
|
-
seatingCapacity: 7,
|
|
162
|
-
driverOption: "both",
|
|
163
|
-
fuelType: "diesel",
|
|
164
|
-
transmission: "manual",
|
|
165
|
-
cancellationPolicy: "Free cancellation 7 days before.",
|
|
166
|
-
lastServiceDate: new Date("2025-02-12").toISOString(),
|
|
167
|
-
homeDeliveryAvailable: true,
|
|
168
|
-
homeDeliveryPrice: 0,
|
|
169
|
-
payAtPickup: true,
|
|
170
|
-
completedTrips: 87,
|
|
171
|
-
reviewCount: 2,
|
|
172
|
-
brand: "Toyota",
|
|
173
|
-
model: "Innova Crysta",
|
|
174
|
-
depositAmount: 15000,
|
|
175
|
-
distanceLimit: "No distance limit",
|
|
176
|
-
weeklyPrice: 4000,
|
|
177
|
-
fifteenDaysPrice: 8000,
|
|
178
|
-
monthlyPrice: 14000,
|
|
179
|
-
pickupPoints: [
|
|
180
|
-
{
|
|
181
|
-
name: "Jaipur Railway Station",
|
|
182
|
-
address: "Station Road, Jaipur",
|
|
183
|
-
lat: 26.9196,
|
|
184
|
-
lng: 75.788,
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
name: "Jaipur Airport",
|
|
188
|
-
address: "Terminal 2, Jaipur",
|
|
189
|
-
lat: 26.8289,
|
|
190
|
-
lng: 75.8056,
|
|
191
|
-
},
|
|
192
|
-
],
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
slug: "hero-splendor-varanasi",
|
|
196
|
-
image: "https://images.pexels.com/photos/5220751/pexels-photo-5220751.jpeg",
|
|
197
|
-
title: "Hero Splendor Plus – City Bike",
|
|
198
|
-
description: "Lightweight and fuel-efficient bike for city exploration. Easy parking, great mileage.",
|
|
199
|
-
location: "Varanasi, Uttar Pradesh",
|
|
200
|
-
date: new Date("2025-01-05"),
|
|
201
|
-
rating: 4.1,
|
|
202
|
-
price: 350,
|
|
203
|
-
currency: "INR",
|
|
204
|
-
tileType: "rentals",
|
|
205
|
-
vehicleType: "bike",
|
|
206
|
-
duration: 1,
|
|
207
|
-
host: {
|
|
208
|
-
name: "Ganga Bikes",
|
|
209
|
-
image: "https://images.pexels.com/photos/1681010/pexels-photo-1681010.jpeg",
|
|
210
|
-
},
|
|
211
|
-
seatingCapacity: 2,
|
|
212
|
-
driverOption: "self-drive",
|
|
213
|
-
fuelType: "petrol",
|
|
214
|
-
transmission: "manual",
|
|
215
|
-
homeDeliveryAvailable: false,
|
|
216
|
-
payAtPickup: true,
|
|
217
|
-
completedTrips: 110,
|
|
218
|
-
reviewCount: 25,
|
|
219
|
-
distanceLimit: "120 km/day",
|
|
220
|
-
weeklyPrice: 2000,
|
|
221
|
-
fifteenDaysPrice: 4000,
|
|
222
|
-
monthlyPrice: 7500,
|
|
223
|
-
pickupPoints: [
|
|
224
|
-
{
|
|
225
|
-
name: "Dashashwamedh Ghat",
|
|
226
|
-
address: "Ghat Road, Varanasi",
|
|
227
|
-
lat: 25.306,
|
|
228
|
-
lng: 83.0075,
|
|
229
|
-
},
|
|
230
|
-
],
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
slug: "mahindra-thar-ladakh",
|
|
234
|
-
image: "https://images.pexels.com/photos/3802510/pexels-photo-3802510.jpeg",
|
|
235
|
-
title: "Mahindra Thar 4x4 – Off-Road",
|
|
236
|
-
description: "Built for Ladakh's rough terrain. 4WD, diesel, helmet and emergency kit included. Minimum 3 days.",
|
|
237
|
-
location: "Leh, Ladakh",
|
|
238
|
-
date: new Date("2025-04-10"),
|
|
239
|
-
rating: 4.9,
|
|
240
|
-
price: 5500,
|
|
241
|
-
currency: "INR",
|
|
242
|
-
tileType: "rentals",
|
|
243
|
-
vehicleType: "suv",
|
|
244
|
-
duration: 3,
|
|
245
|
-
host: {
|
|
246
|
-
name: "Ladakh Adventures",
|
|
247
|
-
image: "https://images.pexels.com/photos/2379005/pexels-photo-2379005.jpeg",
|
|
248
|
-
},
|
|
249
|
-
seatingCapacity: 4,
|
|
250
|
-
driverOption: "self-drive",
|
|
251
|
-
fuelType: "diesel",
|
|
252
|
-
transmission: "manual",
|
|
253
|
-
cancellationPolicy: "Strict. 50% refund only.",
|
|
254
|
-
lastServiceDate: new Date("2025-03-20").toISOString(),
|
|
255
|
-
homeDeliveryAvailable: true,
|
|
256
|
-
homeDeliveryPrice: 800,
|
|
257
|
-
pickupPoints: [
|
|
258
|
-
{
|
|
259
|
-
name: "Kushok Bakula Rimpochee Airport",
|
|
260
|
-
address: "Leh Airport, Ladakh",
|
|
261
|
-
lat: 34.136,
|
|
262
|
-
lng: 77.5456,
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
name: "Main Bazaar",
|
|
266
|
-
address: "Leh Market, Ladakh",
|
|
267
|
-
lat: 34.1642,
|
|
268
|
-
lng: 77.5848,
|
|
269
|
-
},
|
|
270
|
-
],
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
slug: "trek-cycle-rishikesh",
|
|
274
|
-
image: "https://images.pexels.com/photos/100582/pexels-photo-100582.jpeg",
|
|
275
|
-
title: "Trek Mountain Cycle – Riverside",
|
|
276
|
-
description: "Explore Rishikesh riverside trails on a high-quality mountain bike. Helmet and lock included.",
|
|
277
|
-
location: "Rishikesh, Uttarakhand",
|
|
278
|
-
date: new Date("2025-02-20"),
|
|
279
|
-
rating: 4.4,
|
|
280
|
-
price: 300,
|
|
281
|
-
currency: "INR",
|
|
282
|
-
tileType: "rentals",
|
|
283
|
-
vehicleType: "cycle",
|
|
284
|
-
duration: 1,
|
|
285
|
-
host: {
|
|
286
|
-
name: "Rishikesh Cycles",
|
|
287
|
-
image: "https://images.pexels.com/photos/415829/pexels-photo-415829.jpeg",
|
|
288
|
-
},
|
|
289
|
-
seatingCapacity: 1,
|
|
290
|
-
driverOption: "self-drive",
|
|
291
|
-
fuelType: "hybrid",
|
|
292
|
-
transmission: "manual",
|
|
293
|
-
homeDeliveryAvailable: false,
|
|
294
|
-
pickupPoints: [
|
|
295
|
-
{
|
|
296
|
-
name: "Laxman Jhula Hub",
|
|
297
|
-
address: "Laxman Jhula, Rishikesh",
|
|
298
|
-
lat: 30.1228,
|
|
299
|
-
lng: 78.3262,
|
|
300
|
-
},
|
|
301
|
-
],
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
slug: "tesla-model3-bengaluru",
|
|
305
|
-
image: "https://images.pexels.com/photos/3729464/pexels-photo-3729464.jpeg",
|
|
306
|
-
title: "Tesla Model 3 – Electric",
|
|
307
|
-
description: "Experience luxury electric driving in Bangalore. Zero emissions, autopilot, full charge guaranteed.",
|
|
308
|
-
location: "Bengaluru, Karnataka",
|
|
309
|
-
date: new Date("2025-03-15"),
|
|
310
|
-
rating: 4.6,
|
|
311
|
-
price: 7000,
|
|
312
|
-
currency: "INR",
|
|
313
|
-
tileType: "rentals",
|
|
314
|
-
vehicleType: "electric-car",
|
|
315
|
-
duration: 1,
|
|
316
|
-
host: {
|
|
317
|
-
name: "EV Rides India",
|
|
318
|
-
image: "https://images.pexels.com/photos/774909/pexels-photo-774909.jpeg",
|
|
319
|
-
},
|
|
320
|
-
seatingCapacity: 5,
|
|
321
|
-
driverOption: "self-drive",
|
|
322
|
-
fuelType: "electric",
|
|
323
|
-
transmission: "automatic",
|
|
324
|
-
cancellationPolicy: "24h fully refundable.",
|
|
325
|
-
lastServiceDate: new Date("2025-02-28").toISOString(),
|
|
326
|
-
homeDeliveryAvailable: true,
|
|
327
|
-
homeDeliveryPrice: 1000,
|
|
328
|
-
pickupPoints: [
|
|
329
|
-
{
|
|
330
|
-
name: "Kempegowda Int. Airport",
|
|
331
|
-
address: "KIAL Rd, Bengaluru",
|
|
332
|
-
lat: 13.1986,
|
|
333
|
-
lng: 77.7066,
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
name: "Indiranagar Core",
|
|
337
|
-
address: "100ft Road, Indiranagar",
|
|
338
|
-
lat: 12.9784,
|
|
339
|
-
lng: 77.6408,
|
|
340
|
-
},
|
|
341
|
-
],
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
slug: "force-traveller-12-seater-delhi",
|
|
345
|
-
image: "https://images.pexels.com/photos/385997/pexels-photo-385997.jpeg",
|
|
346
|
-
title: "Force Traveller – 12 Seater",
|
|
347
|
-
description: "Perfect for group tours and family trips. Pushback seats, AC, music system, and large luggage space. Professional driver included.",
|
|
348
|
-
location: "Delhi, NCR",
|
|
349
|
-
date: new Date("2025-04-01"),
|
|
350
|
-
rating: 4.7,
|
|
351
|
-
price: 3500,
|
|
352
|
-
currency: "INR",
|
|
353
|
-
tileType: "rentals",
|
|
354
|
-
vehicleType: "tempo-traveller",
|
|
355
|
-
duration: 1,
|
|
356
|
-
host: {
|
|
357
|
-
name: "Safe Travels Delhi",
|
|
358
|
-
image: "https://images.pexels.com/photos/415829/pexels-photo-415829.jpeg",
|
|
359
|
-
},
|
|
360
|
-
seatingCapacity: 12,
|
|
361
|
-
driverOption: "with-driver",
|
|
362
|
-
fuelType: "diesel",
|
|
363
|
-
transmission: "manual",
|
|
364
|
-
cancellationPolicy: "48 hours strict.",
|
|
365
|
-
homeDeliveryAvailable: true,
|
|
366
|
-
homeDeliveryPrice: 300,
|
|
367
|
-
pickupPoints: [
|
|
368
|
-
{
|
|
369
|
-
name: "New Delhi Railway Station",
|
|
370
|
-
address: "Paharganj side, NDLS",
|
|
371
|
-
lat: 28.6429,
|
|
372
|
-
lng: 77.2191,
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
name: "IGI Airport T3",
|
|
376
|
-
address: "Terminal 3, New Delhi",
|
|
377
|
-
lat: 28.5562,
|
|
378
|
-
lng: 77.1,
|
|
379
|
-
},
|
|
380
|
-
],
|
|
381
|
-
},
|
|
382
|
-
];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { RentalFormValues } from "../models/forms";
|
|
2
|
-
export type LocationData = {
|
|
3
|
-
latitude: number;
|
|
4
|
-
longitude: number;
|
|
5
|
-
address: string;
|
|
6
|
-
city: string;
|
|
7
|
-
};
|
|
8
|
-
export declare function getDefaultRentalFormValues(): Partial<RentalFormValues>;
|
|
9
|
-
export declare function hydrateRentalForm(rental: any): Partial<RentalFormValues>;
|
|
10
|
-
export declare function getRentalLocationData(rental: any): LocationData | null;
|
|
11
|
-
//# sourceMappingURL=rentalFormPage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rentalFormPage.d.ts","sourceRoot":"","sources":["../../../src/lib/data/rentalFormPage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wBAAgB,0BAA0B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAoCtE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAoCxE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,GAAG,YAAY,GAAG,IAAI,CAWtE"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { createSinglePricing } from "../models/pricing";
|
|
2
|
-
export function getDefaultRentalFormValues() {
|
|
3
|
-
return {
|
|
4
|
-
title: "",
|
|
5
|
-
description: "",
|
|
6
|
-
vehicleType: "",
|
|
7
|
-
brand: "",
|
|
8
|
-
model: "",
|
|
9
|
-
year: undefined,
|
|
10
|
-
city: "",
|
|
11
|
-
state: "",
|
|
12
|
-
address: "",
|
|
13
|
-
mapLink: "",
|
|
14
|
-
pricing: createSinglePricing({
|
|
15
|
-
currency: "INR",
|
|
16
|
-
finalBasePrice: 0,
|
|
17
|
-
originalBasePrice: 0,
|
|
18
|
-
description: "Daily rental",
|
|
19
|
-
}),
|
|
20
|
-
weeklyPrice: undefined,
|
|
21
|
-
monthlyPrice: undefined,
|
|
22
|
-
depositAmount: 0,
|
|
23
|
-
inventoryCount: undefined,
|
|
24
|
-
seatingCapacity: undefined,
|
|
25
|
-
fuelPolicy: "full-to-full",
|
|
26
|
-
driverOption: "self-drive",
|
|
27
|
-
damagePolicy: "",
|
|
28
|
-
cancellationPolicy: "",
|
|
29
|
-
instantBook: false,
|
|
30
|
-
homeDeliveryAvailable: false,
|
|
31
|
-
homeDeliveryPrice: 0,
|
|
32
|
-
distanceLimit: "No distance limit",
|
|
33
|
-
operatingHoursStart: "09:00",
|
|
34
|
-
operatingHoursEnd: "21:00",
|
|
35
|
-
fuelType: "",
|
|
36
|
-
transmission: "",
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
export function hydrateRentalForm(rental) {
|
|
40
|
-
return {
|
|
41
|
-
title: rental.title || "",
|
|
42
|
-
description: rental.description || "",
|
|
43
|
-
vehicleType: rental.vehicleType || "car",
|
|
44
|
-
brand: rental.brand || "",
|
|
45
|
-
model: rental.model || "",
|
|
46
|
-
year: rental.year || undefined,
|
|
47
|
-
city: rental.city || "",
|
|
48
|
-
state: rental.state || "",
|
|
49
|
-
address: rental.address || "",
|
|
50
|
-
mapLink: "",
|
|
51
|
-
pricing: rental.pricing || createSinglePricing({
|
|
52
|
-
currency: "INR",
|
|
53
|
-
finalBasePrice: 0,
|
|
54
|
-
basePrice: 0,
|
|
55
|
-
description: "Daily rental",
|
|
56
|
-
}),
|
|
57
|
-
weeklyPrice: rental.weeklyPrice || undefined,
|
|
58
|
-
monthlyPrice: rental.monthlyPrice || undefined,
|
|
59
|
-
depositAmount: rental.depositAmount || 0,
|
|
60
|
-
inventoryCount: rental.inventoryCount || 1,
|
|
61
|
-
fuelType: rental.fuelType || "",
|
|
62
|
-
transmission: rental.transmission || "",
|
|
63
|
-
seatingCapacity: rental.seatingCapacity || 4,
|
|
64
|
-
fuelPolicy: rental.fuelPolicy || "full-to-full",
|
|
65
|
-
driverOption: rental.driverOption || "self-drive",
|
|
66
|
-
damagePolicy: rental.damagePolicy || "",
|
|
67
|
-
cancellationPolicy: rental.cancellationPolicy || "",
|
|
68
|
-
instantBook: rental.instantBook || false,
|
|
69
|
-
homeDeliveryAvailable: rental.homeDeliveryAvailable || false,
|
|
70
|
-
homeDeliveryPrice: rental.homeDeliveryPrice || 0,
|
|
71
|
-
distanceLimit: rental.distanceLimit || "No distance limit",
|
|
72
|
-
operatingHoursStart: rental.operatingHours?.start || "09:00",
|
|
73
|
-
operatingHoursEnd: rental.operatingHours?.end || "21:00",
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
export function getRentalLocationData(rental) {
|
|
77
|
-
if (!rental.location?.coordinates) {
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
return {
|
|
81
|
-
latitude: rental.location.coordinates[1],
|
|
82
|
-
longitude: rental.location.coordinates[0],
|
|
83
|
-
address: rental.address || "",
|
|
84
|
-
city: rental.city || "",
|
|
85
|
-
};
|
|
86
|
-
}
|