chore: update
This commit is contained in:
Vendored
-1510
File diff suppressed because one or more lines are too long
Vendored
+1510
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Omnex — Plateforme de gestion de commandes & livraison</title>
|
||||
<meta name="description" content="Déployez en un clic une démo complète de la plateforme de gestion de commandes et de livraison." />
|
||||
<script type="module" crossorigin src="/assets/index-B44IZlvi.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-iTNViNPy.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -44,6 +44,12 @@ export function CreateDemoModal({ isOpen, onClose, onCreated }: CreateDemoModalP
|
||||
const [nowPaymentsApiKey, setNowPaymentsApiKey] = useState('')
|
||||
const [nowPaymentsIpnSecret, setNowPaymentsIpnSecret] = useState('')
|
||||
|
||||
const [enableTomTom, setEnableTomTom] = useState(false)
|
||||
const [tomtomApiKey, setTomtomApiKey] = useState('')
|
||||
const [tomtomApiKey1, setTomtomApiKey1] = useState('')
|
||||
const [tomtomApiKey2, setTomtomApiKey2] = useState('')
|
||||
const [tomtomApiKey3, setTomtomApiKey3] = useState('')
|
||||
|
||||
const [enableLBTelegram, setEnableLBTelegram] = useState(false)
|
||||
const [lbBot1Username, setLbBot1Username] = useState('')
|
||||
const [lbBot1Token, setLbBot1Token] = useState('')
|
||||
@@ -68,6 +74,11 @@ export function CreateDemoModal({ isOpen, onClose, onCreated }: CreateDemoModalP
|
||||
setEnableNowPayments(false)
|
||||
setNowPaymentsApiKey('')
|
||||
setNowPaymentsIpnSecret('')
|
||||
setEnableTomTom(false)
|
||||
setTomtomApiKey('')
|
||||
setTomtomApiKey1('')
|
||||
setTomtomApiKey2('')
|
||||
setTomtomApiKey3('')
|
||||
setEnableLBTelegram(false)
|
||||
setLbBot1Username('')
|
||||
setLbBot1Token('')
|
||||
@@ -104,6 +115,10 @@ export function CreateDemoModal({ isOpen, onClose, onCreated }: CreateDemoModalP
|
||||
toast({ status: 'warning', title: 'Au moins un bot (username) requis pour le load-balancer' })
|
||||
return
|
||||
}
|
||||
if (enableTomTom && !tomtomApiKey.trim()) {
|
||||
toast({ status: 'warning', title: 'La clé API TomTom principale est requise' })
|
||||
return
|
||||
}
|
||||
|
||||
const params: CreateDemoParams = {
|
||||
username: username.trim(),
|
||||
@@ -117,6 +132,14 @@ export function CreateDemoModal({ isOpen, onClose, onCreated }: CreateDemoModalP
|
||||
...(storageDriver === 's3'
|
||||
? { s3Bucket: s3Bucket.trim(), s3Endpoint: s3Endpoint.trim() }
|
||||
: {}),
|
||||
...(enableTomTom
|
||||
? {
|
||||
tomtomApiKey: tomtomApiKey.trim(),
|
||||
tomtomApiKey1: tomtomApiKey1.trim() || undefined,
|
||||
tomtomApiKey2: tomtomApiKey2.trim() || undefined,
|
||||
tomtomApiKey3: tomtomApiKey3.trim() || undefined,
|
||||
}
|
||||
: {}),
|
||||
...(enableLBTelegram
|
||||
? {
|
||||
lbBot1Username: lbBot1Username.trim() || undefined,
|
||||
@@ -258,6 +281,61 @@ export function CreateDemoModal({ isOpen, onClose, onCreated }: CreateDemoModalP
|
||||
</Stack>
|
||||
)}
|
||||
|
||||
{/* --- TomTom (GPS livreur) --- */}
|
||||
<FormControl isDisabled={submitting}>
|
||||
<HStack justify="space-between">
|
||||
<FormLabel mb={0}>TomTom (GPS livreur)</FormLabel>
|
||||
<Switch
|
||||
isChecked={enableTomTom}
|
||||
onChange={(e) => setEnableTomTom(e.target.checked)}
|
||||
/>
|
||||
</HStack>
|
||||
</FormControl>
|
||||
{enableTomTom && (
|
||||
<Stack spacing={3} pl={3} borderLeftWidth="2px" borderColor="primary.500">
|
||||
<Text fontSize="xs" color="gray.500">
|
||||
Géocodage, itinéraire et ETA des livreurs. Jusqu'à 4 clés — le backend bascule
|
||||
automatiquement sur la suivante si une clé atteint son quota.
|
||||
</Text>
|
||||
<FormControl isRequired isDisabled={submitting}>
|
||||
<FormLabel fontSize="sm">Clé API TomTom (principale)</FormLabel>
|
||||
<PasswordInput
|
||||
placeholder="clé API TomTom"
|
||||
value={tomtomApiKey}
|
||||
onChange={(e) => setTomtomApiKey(e.target.value)}
|
||||
autoComplete="off"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormControl isDisabled={submitting}>
|
||||
<FormLabel fontSize="sm">Clé API TomTom #2 (optionnelle)</FormLabel>
|
||||
<PasswordInput
|
||||
placeholder="clé de secours"
|
||||
value={tomtomApiKey1}
|
||||
onChange={(e) => setTomtomApiKey1(e.target.value)}
|
||||
autoComplete="off"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormControl isDisabled={submitting}>
|
||||
<FormLabel fontSize="sm">Clé API TomTom #3 (optionnelle)</FormLabel>
|
||||
<PasswordInput
|
||||
placeholder="clé de secours"
|
||||
value={tomtomApiKey2}
|
||||
onChange={(e) => setTomtomApiKey2(e.target.value)}
|
||||
autoComplete="off"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormControl isDisabled={submitting}>
|
||||
<FormLabel fontSize="sm">Clé API TomTom #4 (optionnelle)</FormLabel>
|
||||
<PasswordInput
|
||||
placeholder="clé de secours"
|
||||
value={tomtomApiKey3}
|
||||
onChange={(e) => setTomtomApiKey3(e.target.value)}
|
||||
autoComplete="off"
|
||||
/>
|
||||
</FormControl>
|
||||
</Stack>
|
||||
)}
|
||||
|
||||
{/* --- Load-balancer Telegram (multi-bots) --- */}
|
||||
<FormControl isDisabled={submitting}>
|
||||
<HStack justify="space-between">
|
||||
|
||||
@@ -75,6 +75,10 @@ export interface CreateDemoParams {
|
||||
storageDriver: StorageDriver
|
||||
s3Bucket?: string
|
||||
s3Endpoint?: string
|
||||
tomtomApiKey?: string
|
||||
tomtomApiKey1?: string
|
||||
tomtomApiKey2?: string
|
||||
tomtomApiKey3?: string
|
||||
lbBot1Username?: string
|
||||
lbBot1Token?: string
|
||||
lbBot2Username?: string
|
||||
@@ -177,6 +181,10 @@ export const api = {
|
||||
...(params.storageDriver === 's3'
|
||||
? { s3_bucket: params.s3Bucket, s3_endpoint: params.s3Endpoint }
|
||||
: {}),
|
||||
...(params.tomtomApiKey ? { tomtom_api_key: params.tomtomApiKey } : {}),
|
||||
...(params.tomtomApiKey1 ? { tomtom_api_key_1: params.tomtomApiKey1 } : {}),
|
||||
...(params.tomtomApiKey2 ? { tomtom_api_key_2: params.tomtomApiKey2 } : {}),
|
||||
...(params.tomtomApiKey3 ? { tomtom_api_key_3: params.tomtomApiKey3 } : {}),
|
||||
...(params.lbBot1Username ? { lb_bot1_username: params.lbBot1Username, lb_bot1_token: params.lbBot1Token } : {}),
|
||||
...(params.lbBot2Username ? { lb_bot2_username: params.lbBot2Username, lb_bot2_token: params.lbBot2Token } : {}),
|
||||
...(params.lbStrategy ? { lb_strategy: params.lbStrategy } : {}),
|
||||
|
||||
Reference in New Issue
Block a user