Skip to content

Commit 1690d3c

Browse files
alexpmicheletclaude
andcommitted
fix(uber-direct): aligne les labels FR du formulaire sur le dashboard Uber officiel
Alex screenshotait son dashboard Uber Direct : la nomenclature officielle FR est « Identifiant du client » (= customer_id, UUID dans l'URL), « Identifiant client » (= client_id de l'OAuth, alphanum) et « Secret client » (= client_secret). Notre form affichait les noms techniques bruts (client_id, client_secret, customer_id) — friction quand le restaurateur copie-colle depuis Uber et cherche « client_id » qu'il ne voit nulle part. Changements : - Labels passent à la nomenclature FR Uber (Identifiant du client / Identifiant client / Secret client / Clé de signature webhook), avec le nom technique entre parenthèses pour lever l'ambiguïté. - Réordonné customer_id en PREMIER (cohérent avec l'ordre dashboard Uber : application > customer_id > client_id > secret). - Placeholders réalistes (UUID pour customer_id, alphanum pour client_id). - Helper text « UUID visible dans api.uber.com/v1/customers/<ici>/... » pour qu'Alex/le gérant sache où regarder côté Uber. - Bloc résultat probe aligné aussi (« Authentification OAuth », « Identifiant du client reconnu », « Clé de signature webhook »). Tests : 1 case ajustée pour les nouveaux labels probe. 18/18 green. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 9f168eb commit 1690d3c

2 files changed

Lines changed: 53 additions & 25 deletions

File tree

apps/admin/src/app/(app)/t/[tenantId]/parametres/uber-direct/uber-direct-settings-view.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,9 @@ describe("UberDirectSettingsView — probe block", () => {
410410
const block = findBySlot(tree, "uber-settings-probe-result");
411411
expect(block).not.toBeNull();
412412
const text = allText(block);
413-
expect(text).toMatch(/OAuth client-credentials/i);
414-
expect(text).toMatch(/customer_id reconnu/i);
415-
expect(text).toMatch(/Webhook signing key/i);
413+
expect(text).toMatch(/Authentification OAuth/i);
414+
expect(text).toMatch(/Identifiant du client reconnu/i);
415+
expect(text).toMatch(/Cl[ée] de signature webhook/i);
416416
expect(text).toContain("cust_test_123");
417417
});
418418

apps/admin/src/app/(app)/t/[tenantId]/parametres/uber-direct/uber-direct-settings-view.tsx

Lines changed: 50 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -217,30 +217,66 @@ export function UberDirectSettingsView(
217217
</Card>
218218

219219
{/* Form — toujours visible (création ET rotation). On ne pré-remplit
220-
jamais les valeurs stockées : pour modifier, il faut tout re-saisir. */}
220+
jamais les valeurs stockées : pour modifier, il faut tout re-saisir.
221+
Labels alignés sur la nomenclature OFFICIELLE Uber Direct FR
222+
(dashboard Uber → API credentials), avec le nom technique
223+
(`customer_id` / `client_id` / `client_secret`) entre parenthèses
224+
pour lever l'ambiguïté « Identifiant client » vs
225+
« Identifiant DU client » côté Uber. */}
221226
<Card data-slot="uber-settings-form">
222227
<CardHeader>
223228
<CardTitle>Credentials Uber Direct</CardTitle>
224229
<CardDescription>
225-
Récupérables sur le dashboard Uber Direct du restaurant (Settings →
226-
Developer → API credentials). Les valeurs sont chiffrées côté
227-
serveur (envelope encryption) — on ne les ré-affiche jamais en
228-
clair.
230+
Récupérables sur le dashboard Uber Direct du restaurant (section API
231+
credentials). Les valeurs sont chiffrées côté serveur (envelope
232+
encryption) — on ne les ré-affiche jamais en clair.
229233
</CardDescription>
230234
</CardHeader>
231235
<CardContent className="flex flex-col gap-3">
232236
<div className="flex flex-col gap-1.5">
233-
<Label htmlFor="uber-settings-client-id">client_id</Label>
237+
<Label htmlFor="uber-settings-customer-id">
238+
Identifiant du client{" "}
239+
<span className="text-xs text-muted-foreground">
240+
(customer_id)
241+
</span>
242+
</Label>
243+
<Input
244+
id="uber-settings-customer-id"
245+
data-slot="uber-settings-customer-id"
246+
value={form.customerId}
247+
onChange={(e) => onFormChange("customerId", e.target.value)}
248+
autoComplete="off"
249+
placeholder="a32bdddd-6566-5028-9a83-1c48037f551b"
250+
/>
251+
<p className="text-xs text-muted-foreground">
252+
UUID du restaurant chez Uber. Visible dans l&apos;URL
253+
d&apos;exemple côté Uber :{" "}
254+
<code className="font-mono">
255+
api.uber.com/v1/customers/&lt;ici&gt;/deliveries
256+
</code>
257+
</p>
258+
</div>
259+
<div className="flex flex-col gap-1.5">
260+
<Label htmlFor="uber-settings-client-id">
261+
Identifiant client{" "}
262+
<span className="text-xs text-muted-foreground">(client_id)</span>
263+
</Label>
234264
<Input
235265
id="uber-settings-client-id"
236266
data-slot="uber-settings-client-id"
237267
value={form.clientId}
238268
onChange={(e) => onFormChange("clientId", e.target.value)}
239269
autoComplete="off"
270+
placeholder="0XgWA4ZpWH3ooTA4Ltzmo_GdOGd1MPHO"
240271
/>
241272
</div>
242273
<div className="flex flex-col gap-1.5">
243-
<Label htmlFor="uber-settings-client-secret">client_secret</Label>
274+
<Label htmlFor="uber-settings-client-secret">
275+
Secret client{" "}
276+
<span className="text-xs text-muted-foreground">
277+
(client_secret)
278+
</span>
279+
</Label>
244280
<Input
245281
id="uber-settings-client-secret"
246282
data-slot="uber-settings-client-secret"
@@ -250,20 +286,12 @@ export function UberDirectSettingsView(
250286
autoComplete="off"
251287
/>
252288
</div>
253-
<div className="flex flex-col gap-1.5">
254-
<Label htmlFor="uber-settings-customer-id">customer_id</Label>
255-
<Input
256-
id="uber-settings-customer-id"
257-
data-slot="uber-settings-customer-id"
258-
value={form.customerId}
259-
onChange={(e) => onFormChange("customerId", e.target.value)}
260-
autoComplete="off"
261-
/>
262-
</div>
263289
<div className="flex flex-col gap-1.5">
264290
<Label htmlFor="uber-settings-webhook-key">
265-
webhook_signing_key{" "}
266-
<span className="text-xs text-muted-foreground">(optionnel)</span>
291+
Clé de signature webhook{" "}
292+
<span className="text-xs text-muted-foreground">
293+
(webhook_signing_key, optionnel)
294+
</span>
267295
</Label>
268296
<Input
269297
id="uber-settings-webhook-key"
@@ -342,16 +370,16 @@ export function UberDirectSettingsView(
342370
className="mt-2 flex flex-col gap-1.5 rounded border border-slate-200 bg-white p-3 text-sm"
343371
>
344372
<ProbeLine
345-
label="OAuth client-credentials"
373+
label="Authentification OAuth (client_id + secret)"
346374
ok={probeResult.tokenObtained}
347375
/>
348376
<ProbeLine
349-
label="customer_id reconnu"
377+
label="Identifiant du client reconnu (customer_id)"
350378
ok={probeResult.customerReachable}
351379
detail={probeResult.customerId}
352380
/>
353381
<ProbeLine
354-
label="Webhook signing key renseignée"
382+
label="Clé de signature webhook renseignée"
355383
ok={probeResult.hasWebhookSigningKey}
356384
detail={
357385
probeResult.hasWebhookSigningKey ? "présente" : "absente"

0 commit comments

Comments
 (0)