feat: parallel VIN decode (pcat+emex) + member since in profile settings

- Refactor VIN decode chain to launch PartsCatalogs and EMEX in parallel;
  EMEX is race-capped at 3 s — if it doesn't resolve in time, PL24 takes over
- Decision tree: pcat=1 → use pcat; else await EMEX result; else PL24; else candidates
- Add "Member Since" (Kayıt Tarihi) field to profile settings, sourced from user.createdAt
- Add createdAt to auth store User interface

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Sase Dev
2026-03-06 20:31:20 +00:00
parent 24c8f066d5
commit 9d2e534e56
5 changed files with 135 additions and 120 deletions

View File

@@ -201,6 +201,19 @@ export function SettingsContent() {
onChange={(e) => setPhone(e.target.value)}
/>
</div>
{user?.createdAt && (
<div className="space-y-2">
<Label>{t("settings.profile.memberSince")}</Label>
<Input
value={new Date(user.createdAt).toLocaleDateString("tr-TR", {
day: "numeric",
month: "long",
year: "numeric",
})}
disabled
/>
</div>
)}
<Button type="submit" disabled={savingProfile}>
{savingProfile ? t("common.saving") : t("common.save")}
</Button>

View File

@@ -257,6 +257,7 @@
"email": "Email",
"phone": "Phone",
"phonePlaceholder": "+90 5xx xxx xx xx",
"memberSince": "Member Since",
"updated": "Profile updated.",
"updateFailed": "Failed to update profile."
},

View File

@@ -257,6 +257,7 @@
"email": "E-posta",
"phone": "Telefon",
"phonePlaceholder": "+90 5xx xxx xx xx",
"memberSince": "Kayıt Tarihi",
"updated": "Profil güncellendi.",
"updateFailed": "Profil güncellenirken hata oluştu."
},

View File

@@ -7,6 +7,7 @@ interface User {
image: string | null;
role: string;
referralCode: string | null;
createdAt: string | Date | null;
}
interface AuthState {