fix(number-fields): избегаем потери точности длинных чисел
- number-поля теперь рендерятся как text + inputMode=numeric, чтобы браузер не округлял значения через input type=number - пробелы при вставке в number-поля удаляются - бэкенд нормализует значения number-полей в строку перед сохранением - добавлен хелпер normalizeFieldValueForStorage Closes: искажение расчётного счёта и других длинных числовых полей
This commit is contained in:
37
client/src/components/AddBookmarkFAB.tsx
Normal file
37
client/src/components/AddBookmarkFAB.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import { Plus } from 'lucide-react';
|
||||
import { useLocation } from 'wouter';
|
||||
import { CreateBookmarkModal } from '@/components/CreateBookmarkModal';
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
const BOOKMARKABLE_PATHS = [
|
||||
'/forms/',
|
||||
'/tasks/',
|
||||
'/dashboard',
|
||||
'/kanban/',
|
||||
'/reports/',
|
||||
'/home',
|
||||
];
|
||||
|
||||
export function AddBookmarkFAB() {
|
||||
const [location] = useLocation();
|
||||
|
||||
const isBookmarkable = BOOKMARKABLE_PATHS.some((path) => location === path || location.startsWith(path));
|
||||
if (!isBookmarkable) return null;
|
||||
|
||||
const currentUrl = typeof window !== 'undefined' ? window.location.pathname + window.location.search : location;
|
||||
|
||||
return (
|
||||
<CreateBookmarkModal
|
||||
defaultUrl={currentUrl}
|
||||
trigger={
|
||||
<Button
|
||||
size="icon"
|
||||
className="fixed bottom-16 right-4 z-40 rounded-full shadow-lg md:hidden"
|
||||
aria-label="Добавить закладку"
|
||||
>
|
||||
<Plus className="w-5 h-5" />
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user