Bulk update category order and improve number formatting

Category order is now updated via a bulk API endpoint instead of individual requests, improving efficiency. Number formatting in pricing tiers form now avoids cursor jumping by only formatting decimals when necessary.
This commit is contained in:
NotII
2025-10-02 04:17:27 +01:00
parent be952509a1
commit d1f3e6b214
2 changed files with 11 additions and 4 deletions

View File

@@ -21,7 +21,9 @@ export const PricingTiers = ({
handleAddTier,
}: PricingTiersProps) => {
const formatNumber = (num: number) => {
return Number(num.toFixed(2)).toString();
// Only format to 2 decimal places if the number has decimal places
// This prevents cursor jumping when user types whole numbers
return num % 1 === 0 ? num.toString() : num.toFixed(2);
};
const formatTotal = (num: number) => {