Update ERP configuration and line item handling
This commit is contained in:
@@ -8,14 +8,13 @@ export interface NumberInputProps {
|
||||
placeholder?: string;
|
||||
className?: string;
|
||||
inputClassName?: string;
|
||||
align?: "right" | "center" | "left"; // تنظیم جهت متن و اعداد (پیشفرض: راستچین)
|
||||
showWords?: boolean; // نمایش معادل فارسی زیر input
|
||||
align?: "right" | "center" | "left";
|
||||
showWords?: boolean;
|
||||
inputMode?: "numeric" | "decimal" | undefined;
|
||||
maxDecimals?: number; // حداکثر رقم اعشار
|
||||
maxDecimals?: number;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
// ورودی عددی با فرمتدهی خودکار (groupCommas) و نمایش کلمات فارسی
|
||||
export function NumberInput({
|
||||
value,
|
||||
onChange,
|
||||
@@ -28,7 +27,6 @@ export function NumberInput({
|
||||
maxDecimals,
|
||||
disabled = false,
|
||||
}: NumberInputProps) {
|
||||
// فرمت با رعایت حداکثر اعشار (گرد کردن)
|
||||
const formatValue = (n: number): string => {
|
||||
let v = n;
|
||||
if (maxDecimals != null) {
|
||||
@@ -75,7 +73,7 @@ export function NumberInput({
|
||||
type="text"
|
||||
disabled={disabled}
|
||||
className={cn(
|
||||
"num-input h-9 w-full rounded-lg border border-line bg-panel px-3 py-1 text-sm text-ink shadow-xs transition-colors placeholder:text-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 disabled:cursor-not-allowed disabled:opacity-60",
|
||||
"num-input h-9 w-full rounded-lg border border-line bg-panel px-3 py-1 text-xs font-normal text-ink shadow-xs transition-colors placeholder:text-xs placeholder:font-normal placeholder:text-muted/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 disabled:cursor-not-allowed disabled:opacity-60",
|
||||
alignClass,
|
||||
inputClassName,
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user