mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
fix: address review feedback on admin pages and backgrounds
- guard config.default_quick_amounts with ?? [] so the edit page survives a cabinet deployed ahead of the bot - roll back the first faq reorder request when the second fails so both questions don't end up with the same display_order - stop overriding the aurora palette in render for the legacy seed colors - add the missing legalPages / displayMode / quickAmounts keys to fa and zh
This commit is contained in:
@@ -521,7 +521,14 @@ function FaqEditor({ onDirtyChange }: { onDirtyChange: (dirty: boolean) => void
|
||||
const reorderMutation = useMutation({
|
||||
mutationFn: async ({ a, b }: { a: FaqPageItem; b: FaqPageItem }) => {
|
||||
await adminLegalPagesApi.updateFaqPage(a.id, { display_order: b.display_order });
|
||||
await adminLegalPagesApi.updateFaqPage(b.id, { display_order: a.display_order });
|
||||
try {
|
||||
await adminLegalPagesApi.updateFaqPage(b.id, { display_order: a.display_order });
|
||||
} catch (err) {
|
||||
await adminLegalPagesApi
|
||||
.updateFaqPage(a.id, { display_order: a.display_order })
|
||||
.catch(() => {});
|
||||
throw err;
|
||||
}
|
||||
},
|
||||
onSuccess: () => {
|
||||
haptic.success();
|
||||
|
||||
@@ -383,7 +383,9 @@ export default function AdminPaymentMethodEdit() {
|
||||
{quickAmountsError && <p className="mt-1 text-xs text-error-400">{quickAmountsError}</p>}
|
||||
<p className="mt-1 text-xs text-dark-500">
|
||||
{t('admin.paymentMethods.quickAmountsHint', {
|
||||
defaults: config.default_quick_amounts.map((kopeks) => kopeks / 100).join(', '),
|
||||
defaults: (config.default_quick_amounts ?? [])
|
||||
.map((kopeks) => kopeks / 100)
|
||||
.join(', '),
|
||||
})}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user