refactored code

This commit is contained in:
Jelaletdin12
2026-09-04 21:26:59 +05:00
parent 5ed4c9a8ec
commit d326361a03
46 changed files with 230 additions and 592 deletions

View File

@@ -485,7 +485,8 @@ export function BranchForm({ mode, initialData }: BranchFormProps) {
onPrev={currentStep > 0 ? handleBack : undefined}
onNext={!isLastStep ? handleNext : undefined}
showSubmit={isLastStep}
onSubmit={isLastStep ? doSubmit : undefined}
saveOnEveryStep={mode === "edit"}
onSubmit={doSubmit}
submitLabel={mode === "create" ? t("branches.actions.create", "Şahamça döret") : t("branches.actions.update", "Täzelemek")}
className="px-5 py-3.5 border-t border-border bg-muted/30"
/>

View File

@@ -588,7 +588,8 @@ export function CardPinForm({ mode, initialData }: CardPinFormProps) {
onNext={!isLastStep ? handleNext : undefined}
nextLabel={t("common.next", "Indiki")}
showSubmit={isLastStep}
onSubmit={isLastStep ? handleSubmit : undefined}
saveOnEveryStep={mode === "edit"}
onSubmit={handleSubmit}
submitLabel={
mode === "create" ? t("cardPin.createBtn", "Kart pin bukja dörediň") : t("cardPin.editBtn", "Kart pin bukja redaktirläň")
}

View File

@@ -752,7 +752,8 @@ export function CardOrderForm({ mode, initialData }: CardOrderFormProps) {
onPrev={currentStep > 0 ? handleBack : undefined}
onNext={!isLastStep ? handleNext : undefined}
showSubmit={isLastStep}
onSubmit={isLastStep ? doSubmit : undefined}
saveOnEveryStep={mode === "edit"}
onSubmit={doSubmit}
submitLabel={mode === "create" ? t("cardOrder.submit", "Kart sargyt dörediň") : t("common.save", "Ýatda sakla")}
loadingLabel={t("common.saving", "Ýüklenilýär...")}
cancelLabel={t("common.cancel", "Ýatyr")}

View File

@@ -624,7 +624,8 @@ export function SberPaymentForm({ mode, initialData }: SberPaymentFormProps) {
onPrev={currentStep > 0 ? handleBack : undefined}
onNext={!isLastStep ? handleNext : undefined}
showSubmit={isLastStep}
onSubmit={isLastStep ? doSubmit : undefined}
saveOnEveryStep={mode === "edit"}
onSubmit={doSubmit}
submitLabel={
mode === "create"
? t("sberPayments.buttons.create", "Sber töleg (talyplar üçin) dörediň")

View File

@@ -673,7 +673,8 @@ export function IntlPaymentForm({ mode, initialData }: IntlPaymentFormProps) {
onPrev={currentStep > 0 ? handleBack : undefined}
onNext={!isLastStep ? handleNext : undefined}
showSubmit={isLastStep}
onSubmit={isLastStep ? doSubmit : undefined}
saveOnEveryStep={mode === "edit"}
onSubmit={doSubmit}
submitLabel={mode === "create" ? t("intlPayment.createBtn", "Dörediň") : t("intlPayment.editBtn", "Redaktirläň")}
/>
</div>