changed pay dialog
This commit is contained in:
1 parent
18e7c03e76
commit
61a0995ea4
14 files changed
+1103
-670
No files matched your search
@@ -32,9 +32,11 @@ interface StepDef {
|
||||
id: string;
|
||||
titleKey: string;
|
||||
titleFallback: string;
|
||||
shortLabelKey: string;
|
||||
shortLabel: string;
|
||||
icon: LucideIcon;
|
||||
subtitle: string;
|
||||
subtitleKey: string;
|
||||
subtitleFallback: string;
|
||||
validate: (form: BranchFormData, mode: "create" | "edit", t: (key: string, fallback?: string) => string) => FlatErrors;
|
||||
}
|
||||
|
||||
@@ -43,27 +45,33 @@ const STEPS: StepDef[] = [
|
||||
id: "basic",
|
||||
titleKey: "branches.steps.basic",
|
||||
titleFallback: "Esasy maglumatlar",
|
||||
shortLabelKey: "branches.steps.basic.shortLabel",
|
||||
shortLabel: "Esasy",
|
||||
icon: Building2,
|
||||
subtitle: "Ady, unikal belgisi, welayaty",
|
||||
subtitleKey: "branches.steps.basic.subtitle",
|
||||
subtitleFallback: "Ady, unikal belgisi, welaýaty",
|
||||
validate: (form, mode, t) => validateStep(0, form, mode, t),
|
||||
},
|
||||
{
|
||||
id: "address",
|
||||
titleKey: "branches.steps.address",
|
||||
titleFallback: "Salgy we habarlaşmak",
|
||||
shortLabelKey: "branches.steps.address.shortLabel",
|
||||
shortLabel: "Salgy",
|
||||
icon: MapPin,
|
||||
subtitle: "Salgy, telefonlar",
|
||||
subtitleKey: "branches.steps.address.subtitle",
|
||||
subtitleFallback: "Salgy, telefonlar",
|
||||
validate: (form, mode, t) => validateStep(1, form, mode, t),
|
||||
},
|
||||
{
|
||||
id: "billing",
|
||||
titleKey: "branches.steps.billing",
|
||||
titleFallback: "Billing maglumatlary",
|
||||
shortLabelKey: "branches.steps.billing.shortLabel",
|
||||
shortLabel: "Billing",
|
||||
icon: CreditCard,
|
||||
subtitle: "Ulanyjy ady we parollar",
|
||||
subtitleKey: "branches.steps.billing.subtitle",
|
||||
subtitleFallback: "Ulanyjy ady we parollar",
|
||||
validate: (form, mode, t) => validateStep(2, form, mode, t),
|
||||
},
|
||||
];
|
||||
@@ -110,7 +118,7 @@ function StepBasic({ form, errors, set, t, provinceSelect }: StepContentProps) {
|
||||
required
|
||||
value={form.uniqueCode}
|
||||
onChange={(v) => set("uniqueCode", v)}
|
||||
placeholder="ORG-XXX-XXXX"
|
||||
placeholder={t("branches.fields.uniqueCodePlaceholder", "ORG-XXX-XXXX")}
|
||||
error={errors.uniqueCode}
|
||||
/>
|
||||
<FormInput
|
||||
@@ -119,7 +127,7 @@ function StepBasic({ form, errors, set, t, provinceSelect }: StepContentProps) {
|
||||
required
|
||||
value={form.region}
|
||||
onChange={(v) => set("region", v)}
|
||||
placeholder="Aşgabat şäheri"
|
||||
placeholder={t("branches.fields.regionPlaceholder", "Aşgabat şäheri")}
|
||||
error={errors.region}
|
||||
/>
|
||||
</div>
|
||||
@@ -128,7 +136,7 @@ function StepBasic({ form, errors, set, t, provinceSelect }: StepContentProps) {
|
||||
<InfiniteSelect
|
||||
label={t("branches.fields.district", "Etrap")}
|
||||
required
|
||||
placeholder={t("branches.fields.district", "Etrap saýlaň")}
|
||||
placeholder={t("branches.fields.districtPlaceholder", "Etrap saýlaň")}
|
||||
{...provinceSelect}
|
||||
error={provinceSelect.error ?? errors.provinceId}
|
||||
value={form.provinceId}
|
||||
@@ -165,7 +173,7 @@ function StepAddress({ form, errors, set, t }: StepContentProps) {
|
||||
required
|
||||
value={form.phoneNumbers}
|
||||
onChange={(v) => set("phoneNumbers", v)}
|
||||
placeholder="+99312998877, +99365123456"
|
||||
placeholder={t("branches.fields.phoneNumbersPlaceholder", "+99312998877, +99365123456")}
|
||||
error={errors.phoneNumbers}
|
||||
/>
|
||||
</div>
|
||||
@@ -445,8 +453,8 @@ export function BranchForm({ mode, initialData }: BranchFormProps) {
|
||||
|
||||
return {
|
||||
id: s.id,
|
||||
title: t(s.titleKey) || s.titleFallback,
|
||||
subtitle: s.subtitle,
|
||||
title: t(s.titleKey, s.titleFallback),
|
||||
subtitle: t(s.subtitleKey, s.subtitleFallback),
|
||||
icon: s.icon,
|
||||
status: isActive ? "active" : hasErrors ? "error" : isDone ? "done" : "idle",
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user