refactor: update pricing input handling to use PriceInput component
- Replaced raw input fields for pricing with PriceInput component across various forms and modals to ensure consistent formatting and accessibility. - Updated tests to reflect changes in pricing input handling, ensuring values are displayed in toman with proper formatting. - Enhanced accessibility by adding aria-labels and aria-invalid attributes to PriceInput components. - Adjusted UI elements to improve layout and user experience, particularly in forms related to service items and scheduling. - Changed labels from "نمایش در نوبتدهی" to "نمایش در نوبتدهی آنلاین" for clarity.
This commit is contained in:
@@ -40,6 +40,7 @@ import Modal from "../components/ui/Modal";
|
||||
import PageHeader from "../components/ui/PageHeader";
|
||||
import Pagination from "../components/ui/Pagination";
|
||||
import SearchableSelect from "../components/ui/SearchableSelect";
|
||||
import PriceInput from "../components/ui/PriceInput";
|
||||
import PatientRecordInfoForm from "../components/PatientRecordInfoForm";
|
||||
import { usePermissions } from "../hooks/usePermissions";
|
||||
import {
|
||||
@@ -1470,8 +1471,10 @@ function MyPatientsPageInner() {
|
||||
>
|
||||
<div className="field">
|
||||
<label>قیمت ویزیت (تومان)</label>
|
||||
<input
|
||||
{...numericField(form.register("visit_price_rials"))}
|
||||
<PriceInput
|
||||
value={watchVisit || ''}
|
||||
onChange={(v) => form.setValue("visit_price_rials", v)}
|
||||
ariaLabel="قیمت ویزیت (تومان)"
|
||||
/>
|
||||
</div>
|
||||
<div className="field">
|
||||
|
||||
Reference in New Issue
Block a user