Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion messages/ak-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "Atɔnfo a wɔyɛ adwuma",
"INCLUDE_INACTIVE_SELLERS": "Atɔnfo a wogyae adwuma",
"INCLUDE_TEST_SELLERS": "Atɔnfo a wɔregyina nsɔhwɛ mu"
"INCLUDE_TEST_SELLERS": "Atɔnfo a wɔregyina nsɔhwɛ mu",
"INCLUDE_HOLIDAY_SELLERS": "Afehyia Atɔnfo"
},
"CONTACT_MAP_OF_PI": "Kasa kyerɛ Map of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "Atɔnfoɔ a ɔyɛ adwuma",
"INACTIVE_SELLER": "Atɔnfoɔ a wagyae adwuma",
"TEST_SELLER": "Nsɔhwɛ Atɔnfoɔ",
"HOLIDAY_SELLER": "Afehyia Atɔnfo",
"RESTRICTED_SELLER": "Dwadifo a wɔakyiw no"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "البائعون النشطون",
"INCLUDE_INACTIVE_SELLERS": "البائعون غير النشطين",
"INCLUDE_TEST_SELLERS": "البائعون التجريبيون"
"INCLUDE_TEST_SELLERS": "البائعون التجريبيون",
"INCLUDE_HOLIDAY_SELLERS": "بائعو العطلات"
},
"CONTACT_MAP_OF_PI": "اتصل بـ Map of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "بائع نشط",
"INACTIVE_SELLER": "بائع غير نشط",
"TEST_SELLER": "بائع تجريبي",
"HOLIDAY_SELLER": "بائع العطلات",
"RESTRICTED_SELLER": "بائع مقيّد"
}
},
Expand Down
5 changes: 4 additions & 1 deletion messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "Aktives Mitglied Verkäufer",
"INCLUDE_INACTIVE_SELLERS": "Untätig Verkäufer",
"INCLUDE_TEST_SELLERS": "Testverkäufer einschließen"
"INCLUDE_TEST_SELLERS": "Testverkäufer einschließen",
"INCLUDE_HOLIDAY_SELLERS": "Feiertagsverkäufer"

},
"CONTACT_MAP_OF_PI": "Kontaktkarte von Map of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +87,7 @@
"ACTIVE_SELLER": "Aktiver Verkäufer",
"INACTIVE_SELLER": "Inaktiver Verkäufer",
"TEST_SELLER": "Testverkäufer",
"HOLIDAY_SELLER": "Feiertagsverkäufer",
"RESTRICTED_SELLER": "Eingeschränkter Verkäufer"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/en-GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "Active sellers",
"INCLUDE_INACTIVE_SELLERS": "Inactive sellers",
"INCLUDE_TEST_SELLERS": "Test sellers"
"INCLUDE_TEST_SELLERS": "Test sellers",
"INCLUDE_HOLIDAY_SELLERS": "Holiday sellers"
},
"CONTACT_MAP_OF_PI": "Contact Map of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "Active seller",
"INACTIVE_SELLER": "Inactive seller",
"TEST_SELLER": "Test seller",
"HOLIDAY_SELLER": "Holiday seller",
"RESTRICTED_SELLER": "Restricted seller"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "Active sellers",
"INCLUDE_INACTIVE_SELLERS": "Inactive sellers",
"INCLUDE_TEST_SELLERS": "Test sellers"
"INCLUDE_TEST_SELLERS": "Test sellers",
"INCLUDE_HOLIDAY_SELLERS": "Holiday sellers"
},
"CONTACT_MAP_OF_PI": "Contact Map of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "Active seller",
"INACTIVE_SELLER": "Inactive seller",
"TEST_SELLER": "Test seller",
"HOLIDAY_SELLER": "Holiday seller",
"RESTRICTED_SELLER": "Restricted seller"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "Vendedores activos",
"INCLUDE_INACTIVE_SELLERS": "Vendedores inactivos",
"INCLUDE_TEST_SELLERS": "Vendedores de prueba"
"INCLUDE_TEST_SELLERS": "Vendedores de prueba",
"INCLUDE_HOLIDAY_SELLERS": "Vendedores festivos"
},
"CONTACT_MAP_OF_PI": "Contactar a Map of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "Vendedor activo",
"INACTIVE_SELLER": "Vendedor inactivo",
"TEST_SELLER": "Vendedor de prueba",
"HOLIDAY_SELLER": "Vendedor festivo",
"RESTRICTED_SELLER": "Vendedor restringido"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/ewe-BJ.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "Tɔxɛviawo siwo le dɔwɔme",
"INCLUDE_INACTIVE_SELLERS": "Tɔxɛviawo siwo mele dɔwɔme o",
"INCLUDE_TEST_SELLERS": "Tɔxɛviawo ƒe nɔnɔme ɖe sia ɖe"
"INCLUDE_TEST_SELLERS": "Tɔxɛviawo ƒe nɔnɔme ɖe sia ɖe",
"INCLUDE_HOLIDAY_SELLERS": "Ŋkɔkɔeɖe Tɔgbuiwo"
},
"CONTACT_MAP_OF_PI": "Kadodo ƒe Map of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "Nudzrala si le dɔ wɔm",
"INACTIVE_SELLER": "Nudzrala si mele dɔ wɔm o",
"TEST_SELLER": "Dodokpɔ ƒe nudzrala",
"HOLIDAY_SELLER": "Vendedor festivo",
"RESTRICTED_SELLER": "Tɔxɛvia si le dɔwɔme le eme o"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/fon-BJ.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "Zan tó wà do",
"INCLUDE_INACTIVE_SELLERS": "Zan tó mɛ̀ wà do",
"INCLUDE_TEST_SELLERS": "Zan sì wɛ́n"
"INCLUDE_TEST_SELLERS": "Zan sì wɛ́n",
"INCLUDE_HOLIDAY_SELLERS": "Àsìwá Xwéɖeɖe"
},
"CONTACT_MAP_OF_PI": "Do xo sedo Map Of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "Nusatɔ he to nus able-ble",
"INACTIVE_SELLER": "Nǔsátɔ́ e ma ɖò azɔ̌ wà wɛ ǎ é le",
"TEST_SELLER": "Tɛnkpɔn nusatɔ",
"HOLIDAY_SELLER": "Àsìwá Xwéɖeɖe",
"RESTRICTED_SELLER": "Zan tò hùntɔ̀n"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "Vendeurs actifs",
"INCLUDE_INACTIVE_SELLERS": "Vendeurs inactifs",
"INCLUDE_TEST_SELLERS": "Vendeurs de test"
"INCLUDE_TEST_SELLERS": "Vendeurs de test",
"INCLUDE_HOLIDAY_SELLERS": "Vendeurs saisonniers"
},
"CONTACT_MAP_OF_PI": "Contacter Map of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "Vendeur activé",
"INACTIVE_SELLER": "Vendeur desactivé",
"TEST_SELLER": "Vendeur de test",
"HOLIDAY_SELLER": "Vendeur saisonnier",
"RESTRICTED_SELLER": "Vendeur restreint"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/hau-NG.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "Yan kasuwa masu aiki",
"INCLUDE_INACTIVE_SELLERS": "Yan kasuwa marasa aiki",
"INCLUDE_TEST_SELLERS": "Yan kasuwa na gwaji"
"INCLUDE_TEST_SELLERS": "Yan kasuwa na gwaji",
"INCLUDE_HOLIDAY_SELLERS": "Masu sayarwa na hutu"
},
"CONTACT_MAP_OF_PI": "Tuntubi Map of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "Mai siyarwa mai aiki",
"INACTIVE_SELLER": "Mai siyarwa mara aiki",
"TEST_SELLER": "Mai siyarwa gwaji",
"HOLIDAY_SELLER": "Mai sayarwa na hutu",
"RESTRICTED_SELLER": "Mai siyarwa da aka takaita"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "सक्रिय विक्रेता",
"INCLUDE_INACTIVE_SELLERS": "निष्क्रिय विक्रेता",
"INCLUDE_TEST_SELLERS": "टेस्ट विक्रेता"
"INCLUDE_TEST_SELLERS": "टेस्ट विक्रेता",
"INCLUDE_HOLIDAY_SELLERS": "छुट्टियों के विक्रेता"
},
"CONTACT_MAP_OF_PI": "Map of Pi से संपर्क करें",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "सक्रिय विक्रेता",
"INACTIVE_SELLER": "निष्क्रिय विक्रेता",
"TEST_SELLER": "टेस्ट विक्रेता",
"HOLIDAY_SELLER": "छुट्टियों का विक्रेता",
"RESTRICTED_SELLER": "प्रतिबंधित विक्रेता"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "アクティブな販売者を含む",
"INCLUDE_INACTIVE_SELLERS": "非アクティブな販売者を含む",
"INCLUDE_TEST_SELLERS": "テスト販売者を含む"
"INCLUDE_TEST_SELLERS": "テスト販売者を含む",
"INCLUDE_HOLIDAY_SELLERS": "祝日販売者"
},
"CONTACT_MAP_OF_PI": "Map of Pi に連絡",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "アクティブな販売者",
"INACTIVE_SELLER": "非アクティブな販売者",
"TEST_SELLER": "テスト販売者",
"HOLIDAY_SELLER": "祝日販売者",
"RESTRICTED_SELLER": "制限された販売者"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "활동 중인 판매자 포함",
"INCLUDE_INACTIVE_SELLERS": "비활동 중인 판매자 포함",
"INCLUDE_TEST_SELLERS": "테스트 판매자 포함"
"INCLUDE_TEST_SELLERS": "테스트 판매자 포함",
"INCLUDE_HOLIDAY_SELLERS": "휴일 판매자"
},
"CONTACT_MAP_OF_PI": "Map of Pi에 문의",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "활성 판매자",
"INACTIVE_SELLER": "비활성 판매자",
"TEST_SELLER": "테스트 판매자",
"HOLIDAY_SELLER": "휴일 판매자",
"RESTRICTED_SELLER": "제한된 판매자"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "Bao gồm người bán hoạt động",
"INCLUDE_INACTIVE_SELLERS": "Bao gồm người bán không hoạt động",
"INCLUDE_TEST_SELLERS": "Bao gồm người bán thử nghiệm"
"INCLUDE_TEST_SELLERS": "Bao gồm người bán thử nghiệm",
"INCLUDE_HOLIDAY_SELLERS": "Người bán dịp lễ"
},
"CONTACT_MAP_OF_PI": "Liên hệ với Map of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "Người bán hoạt động",
"INACTIVE_SELLER": "Người bán không hoạt động",
"TEST_SELLER": "Người bán thử nghiệm",
"HOLIDAY_SELLER": "Người bán dịp lễ",
"RESTRICTED_SELLER": "Người bán bị hạn chế"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/yor-NG.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "Fi awọn olutaja ti n ṣiṣẹ kun",
"INCLUDE_INACTIVE_SELLERS": "Fi awọn olutaja ti ko n ṣiṣẹ kun",
"INCLUDE_TEST_SELLERS": "Fi awọn olutaja idanwo kun"
"INCLUDE_TEST_SELLERS": "Fi awọn olutaja idanwo kun",
"INCLUDE_HOLIDAY_SELLERS": "Àwọn oníṣòwò àkókò ìsinmi"
},
"CONTACT_MAP_OF_PI": "Olubasọrọ Map of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "Onítajà lọ́wọ́-lọ́wọ́",
"INACTIVE_SELLER": "Onítajà aláì ṣi ṣẹ́mọ́",
"TEST_SELLER": "Idanwo Olutaja",
"HOLIDAY_SELLER": "Oníṣòwò àkókò ìsinmi",
"RESTRICTED_SELLER": "Olutaja to ni idiwọ"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "包含活跃卖家",
"INCLUDE_INACTIVE_SELLERS": "包含非活跃卖家",
"INCLUDE_TEST_SELLERS": "包含测试卖家"
"INCLUDE_TEST_SELLERS": "包含测试卖家",
"INCLUDE_HOLIDAY_SELLERS": "节日卖家"
},
"CONTACT_MAP_OF_PI": "联络 Map of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "活跃卖家",
"INACTIVE_SELLER": "非活跃卖家",
"TEST_SELLER": "测试卖家",
"HOLIDAY_SELLER": "节日卖家",
"RESTRICTED_SELLER": "受限卖家"
}
},
Expand Down
4 changes: 3 additions & 1 deletion messages/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"SEARCH_FILTERS": {
"INCLUDE_ACTIVE_SELLERS": "包含活躍賣家",
"INCLUDE_INACTIVE_SELLERS": "包含非活躍賣家",
"INCLUDE_TEST_SELLERS": "包含測試賣家"
"INCLUDE_TEST_SELLERS": "包含測試賣家",
"INCLUDE_HOLIDAY_SELLERS": "節日賣家"
},
"CONTACT_MAP_OF_PI": "聯絡 Map of Pi",
"VALIDATION": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"ACTIVE_SELLER": "活躍賣家",
"INACTIVE_SELLER": "非活躍賣家",
"TEST_SELLER": "測試賣家",
"HOLIDAY_SELLER": "節日賣家",
"RESTRICTED_SELLER": "受限賣家"
}
},
Expand Down
1 change: 1 addition & 0 deletions public/images/christmas-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/icons/map-of-pi-christmas-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 12 additions & 13 deletions src/components/shared/map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MapContainer, Marker, Popup, TileLayer, useMapEvents } from 'react-leaf
import L, { LatLngExpression, LatLngBounds, LatLngTuple } from 'leaflet';
import _ from 'lodash';

import { ISeller, ISellerWithSettings } from '@/constants/types';
import { ISeller, ISellerWithSettings, SellerType } from '@/constants/types';
import { fetchSellers } from '@/services/sellerApi';

import MapMarkerPopup from './MapMarkerPopup';
Expand Down Expand Up @@ -75,13 +75,18 @@ const Map = ({
popupAnchor: [1, -34],
});

// Define the crosshair icon for the center of the map
const crosshairIcon = new L.Icon({
iconUrl: '/images/icons/crosshair.png',
iconSize: [100, 100],
iconAnchor: [60, 60],
const holidayIcon = L.icon({
iconUrl: '/images/icons/map-of-pi-christmas-icon.png',
iconAnchor: [12, 41],
popupAnchor: [1, -34],
});

const getSellerMarkerIcon = (sellerType?: string) => {
return sellerType === SellerType.holiday_seller
? holidayIcon
: customIcon
};

const [position, setPosition] = useState<L.LatLng | null>(null);
const [sellers, setSellers] = useState<ISellerWithSettings[]>([]);
const [loading, setLoading] = useState(false);
Expand Down Expand Up @@ -329,12 +334,6 @@ const Map = ({
return center === null ? null : <Marker position={center} />;
}

// Define map boundaries
const bounds = L.latLngBounds(
L.latLng(-90, -180), // SW corner
L.latLng(90, 180) // NE corner
);

return (
<>
{loading && <div className="loading">{t('SHARED.LOADING_SCREEN_MESSAGE')}</div>}
Expand Down Expand Up @@ -395,7 +394,7 @@ const Map = ({
<Marker
position={seller.coordinates as LatLngExpression}
key={seller.seller_id}
icon={customIcon}
icon={getSellerMarkerIcon(seller.seller_type)}
eventHandlers={{
click: () => handleMarkerClick(seller.coordinates as LatLngTuple),
}}
Expand Down
7 changes: 6 additions & 1 deletion src/components/shared/sidebar/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ function Sidebar(props: any) {
target: 'include_test_sellers',
title: t('SIDE_NAVIGATION.SEARCH_FILTERS.INCLUDE_TEST_SELLERS'),
},
{
target: 'include_holiday_sellers',
title: t('SIDE_NAVIGATION.SEARCH_FILTERS.INCLUDE_HOLIDAY_SELLERS'),
},
{ target: 'include_trust_level_100', title: 'Trust-o-meter 100%' },
{ target: 'include_trust_level_80', title: 'Trust-o-meter 80%' },
{ target: 'include_trust_level_50', title: 'Trust-o-meter 50%' },
Expand Down Expand Up @@ -124,6 +128,7 @@ function Sidebar(props: any) {
include_active_sellers: false,
include_inactive_sellers: false,
include_test_sellers: false,
include_holiday_sellers: false,
include_trust_level_100: false,
include_trust_level_80: false,
include_trust_level_50: false,
Expand Down Expand Up @@ -557,7 +562,7 @@ function Sidebar(props: any) {
/>
</Link>

{/* THIS IS THE THE SEARCH FILTERS */}
{/* THIS IS THE SEARCH FILTERS */}
<div className="flex flex-col justify-items-center text-center mx-auto gap-2 mt-4">
<ToggleCollapse
header={t('SIDE_NAVIGATION.SEARCH_FILTERS_SUBHEADER')}>
Expand Down
Loading