UI alignment in Finance forms.
This commit is contained in:
parent
86039552c8
commit
219161f15e
@ -237,30 +237,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
</h5>
|
</h5>
|
||||||
<form id="expenseForm" onSubmit={handleSubmit(onSubmit)}>
|
<form id="expenseForm" onSubmit={handleSubmit(onSubmit)}>
|
||||||
<div className="row my-2 text-start">
|
<div className="row my-2 text-start">
|
||||||
{/* <div className="col-md-6">
|
<div className="col-12 col-md-6">
|
||||||
<Label className="form-label" required>
|
|
||||||
Select Project
|
|
||||||
</Label>
|
|
||||||
<select
|
|
||||||
className="form-select form-select-sm"
|
|
||||||
{...register("projectId")}
|
|
||||||
>
|
|
||||||
<option value="">Select Project</option>
|
|
||||||
{projectLoading ? (
|
|
||||||
<option>Loading...</option>
|
|
||||||
) : (
|
|
||||||
projectNames?.map((project) => (
|
|
||||||
<option key={project.id} value={project.id}>
|
|
||||||
{project.name}
|
|
||||||
</option>
|
|
||||||
))
|
|
||||||
)}
|
|
||||||
</select>
|
|
||||||
{errors.projectId && (
|
|
||||||
<small className="danger-text">{errors.projectId.message}</small>
|
|
||||||
)}
|
|
||||||
</div> */}
|
|
||||||
<div className="col-12 col-md-6 mb-2">
|
|
||||||
<SelectProjectField
|
<SelectProjectField
|
||||||
label="Project"
|
label="Project"
|
||||||
required
|
required
|
||||||
@ -283,7 +260,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
Expense Category
|
Expense Category
|
||||||
</Label>
|
</Label>
|
||||||
<select
|
<select
|
||||||
className="form-select form-select-sm"
|
className="form-select "
|
||||||
id="expenseCategoryId"
|
id="expenseCategoryId"
|
||||||
{...register("expenseCategoryId")}
|
{...register("expenseCategoryId")}
|
||||||
>
|
>
|
||||||
@ -314,7 +291,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
Payment Mode
|
Payment Mode
|
||||||
</Label>
|
</Label>
|
||||||
<select
|
<select
|
||||||
className="form-select form-select-sm"
|
className="form-select "
|
||||||
id="paymentModeId"
|
id="paymentModeId"
|
||||||
{...register("paymentModeId")}
|
{...register("paymentModeId")}
|
||||||
>
|
>
|
||||||
@ -338,33 +315,22 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-12 col-md-6 text-start">
|
<div className="col-12 col-md-6 text-start">
|
||||||
{/* <Label className="form-label" required>
|
|
||||||
Paid By{" "}
|
|
||||||
</Label> */}
|
|
||||||
{/* <EmployeeSearchInput
|
|
||||||
control={control}
|
|
||||||
name="paidById"
|
|
||||||
projectId={null}
|
|
||||||
forAll={true}
|
|
||||||
/> */}
|
|
||||||
|
|
||||||
<AppFormController
|
<AppFormController
|
||||||
name="paidById"
|
name="paidById"
|
||||||
|
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<SelectEmployeeServerSide
|
<SelectEmployeeServerSide
|
||||||
label="Paid By" required
|
label="Paid By" required
|
||||||
value={field.value}
|
value={field.value}
|
||||||
onChange={field.onChange}
|
onChange={field.onChange}
|
||||||
isFullObject={false} // because using ID
|
isFullObject={false}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="row my-2 text-start">
|
<div className="row my-2 text-start mb-4">
|
||||||
<div className="col-md-6">
|
<div className="col-md-6">
|
||||||
<Label htmlFor="transactionDate" className="form-label" required>
|
<Label htmlFor="transactionDate" className="form-label" required>
|
||||||
Transaction Date
|
Transaction Date
|
||||||
@ -374,6 +340,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
className="w-100"
|
className="w-100"
|
||||||
control={control}
|
control={control}
|
||||||
maxDate={new Date()}
|
maxDate={new Date()}
|
||||||
|
size="md"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{errors.transactionDate && (
|
{errors.transactionDate && (
|
||||||
@ -390,7 +357,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
id="amount"
|
id="amount"
|
||||||
className="form-control form-control-sm"
|
className="form-control "
|
||||||
min="1"
|
min="1"
|
||||||
step="0.01"
|
step="0.01"
|
||||||
inputMode="decimal"
|
inputMode="decimal"
|
||||||
@ -402,7 +369,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="row my-2 text-start">
|
<div className="row my-2 text-start mb-4">
|
||||||
<div className="col-md-6">
|
<div className="col-md-6">
|
||||||
<Label htmlFor="supplerName" className="form-label" required>
|
<Label htmlFor="supplerName" className="form-label" required>
|
||||||
Supplier Name/Transporter Name/Other
|
Supplier Name/Transporter Name/Other
|
||||||
@ -410,7 +377,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="supplerName"
|
id="supplerName"
|
||||||
className="form-control form-control-sm"
|
className="form-control "
|
||||||
{...register("supplerName")}
|
{...register("supplerName")}
|
||||||
/>
|
/>
|
||||||
{errors.supplerName && (
|
{errors.supplerName && (
|
||||||
@ -427,7 +394,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="location"
|
id="location"
|
||||||
className="form-control form-control-sm"
|
className="form-control "
|
||||||
{...register("location")}
|
{...register("location")}
|
||||||
/>
|
/>
|
||||||
{errors.location && (
|
{errors.location && (
|
||||||
@ -435,7 +402,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="row my-2 text-start">
|
<div className="row my-2 text-start mb-4">
|
||||||
<div className="col-md-6">
|
<div className="col-md-6">
|
||||||
<label htmlFor="statusId" className="form-label ">
|
<label htmlFor="statusId" className="form-label ">
|
||||||
Transaction ID
|
Transaction ID
|
||||||
@ -443,7 +410,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="transactionId"
|
id="transactionId"
|
||||||
className="form-control form-control-sm"
|
className="form-control "
|
||||||
min="1"
|
min="1"
|
||||||
{...register("transactionId")}
|
{...register("transactionId")}
|
||||||
/>
|
/>
|
||||||
@ -460,7 +427,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="gstNumber"
|
id="gstNumber"
|
||||||
className="form-control form-control-sm"
|
className="form-control "
|
||||||
min="1"
|
min="1"
|
||||||
{...register("gstNumber")}
|
{...register("gstNumber")}
|
||||||
/>
|
/>
|
||||||
@ -469,13 +436,13 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="row">
|
<div className="row mb-4">
|
||||||
<div className="col-md-6 text-start ">
|
<div className="col-md-6 text-start ">
|
||||||
<Label htmlFor="currencyId" className="form-label" required>
|
<Label htmlFor="currencyId" className="form-label" required>
|
||||||
Select Currency
|
Select Currency
|
||||||
</Label>
|
</Label>
|
||||||
<select
|
<select
|
||||||
className="form-select form-select-sm"
|
className="form-select "
|
||||||
id="currencyId"
|
id="currencyId"
|
||||||
{...register("currencyId")}
|
{...register("currencyId")}
|
||||||
>
|
>
|
||||||
@ -497,14 +464,14 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{expenseCategory?.noOfPersonsRequired && (
|
{expenseCategory?.noOfPersonsRequired && (
|
||||||
<div className="col-md-6 text-start">
|
<div className="col-md-6 text-start">
|
||||||
<Label className="form-label" required>
|
<Label className="form-label" required>
|
||||||
No. of Persons
|
No. of Persons
|
||||||
</Label>
|
</Label>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
id="noOfPersons"
|
id="noOfPersons"
|
||||||
className="form-control form-control-sm"
|
className="form-control "
|
||||||
{...register("noOfPersons")}
|
{...register("noOfPersons")}
|
||||||
inputMode="numeric"
|
inputMode="numeric"
|
||||||
/>
|
/>
|
||||||
@ -517,14 +484,14 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="row my-2 text-start">
|
<div className="row my-2 text-start mb-4">
|
||||||
<div className="col-md-12">
|
<div className="col-md-12">
|
||||||
<Label htmlFor="description" className="form-label" required>
|
<Label htmlFor="description" className="form-label" required>
|
||||||
Description
|
Description
|
||||||
</Label>
|
</Label>
|
||||||
<textarea
|
<textarea
|
||||||
id="description"
|
id="description"
|
||||||
className="form-control form-control-sm"
|
className="form-control "
|
||||||
{...register("description")}
|
{...register("description")}
|
||||||
rows="2"
|
rows="2"
|
||||||
></textarea>
|
></textarea>
|
||||||
@ -536,7 +503,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="row my-2 text-start">
|
<div className="row my-4 text-start">
|
||||||
<div className="col-md-12">
|
<div className="col-md-12">
|
||||||
<Label className="form-label" required>
|
<Label className="form-label" required>
|
||||||
Upload Bill{" "}
|
Upload Bill{" "}
|
||||||
|
|||||||
@ -239,7 +239,7 @@ function ManagePaymentRequest({ closeModal, requestToEdit = null }) {
|
|||||||
Select Project
|
Select Project
|
||||||
</Label> */}
|
</Label> */}
|
||||||
{/* <select
|
{/* <select
|
||||||
className="form-select form-select-sm"
|
className="form-select "
|
||||||
{...register("projectId")}
|
{...register("projectId")}
|
||||||
disabled={
|
disabled={
|
||||||
data?.recurringPayment?.isVariable && !isDraft && !isProcessed
|
data?.recurringPayment?.isVariable && !isDraft && !isProcessed
|
||||||
@ -282,7 +282,7 @@ function ManagePaymentRequest({ closeModal, requestToEdit = null }) {
|
|||||||
Expense Category
|
Expense Category
|
||||||
</Label>
|
</Label>
|
||||||
<select
|
<select
|
||||||
className="form-select form-select-sm"
|
className="form-select "
|
||||||
id="expenseCategoryId"
|
id="expenseCategoryId"
|
||||||
{...register("expenseCategoryId")}
|
{...register("expenseCategoryId")}
|
||||||
disabled={
|
disabled={
|
||||||
@ -311,7 +311,7 @@ function ManagePaymentRequest({ closeModal, requestToEdit = null }) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Title and Advance Payment */}
|
{/* Title and Advance Payment */}
|
||||||
<div className="row my-2 text-start">
|
<div className="row mt-n2 text-start">
|
||||||
<div className="col-md-6">
|
<div className="col-md-6">
|
||||||
<Label htmlFor="title" className="form-label" required>
|
<Label htmlFor="title" className="form-label" required>
|
||||||
Title
|
Title
|
||||||
@ -319,7 +319,7 @@ function ManagePaymentRequest({ closeModal, requestToEdit = null }) {
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="title"
|
id="title"
|
||||||
className="form-control form-control-sm"
|
className="form-control "
|
||||||
{...register("title")}
|
{...register("title")}
|
||||||
disabled={
|
disabled={
|
||||||
data?.recurringPayment?.isVariable && !isDraft && !isProcessed
|
data?.recurringPayment?.isVariable && !isDraft && !isProcessed
|
||||||
@ -330,7 +330,7 @@ function ManagePaymentRequest({ closeModal, requestToEdit = null }) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="col-md-6 ">
|
<div className="col-md-6">
|
||||||
<Label htmlFor="isAdvance" className="form-label">
|
<Label htmlFor="isAdvance" className="form-label">
|
||||||
Is Advance Payment
|
Is Advance Payment
|
||||||
</Label>
|
</Label>
|
||||||
@ -343,7 +343,7 @@ function ManagePaymentRequest({ closeModal, requestToEdit = null }) {
|
|||||||
data?.recurringPayment?.isVariable && !isDraft && !isProcessed
|
data?.recurringPayment?.isVariable && !isDraft && !isProcessed
|
||||||
}
|
}
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<div className="d-flex align-items-center gap-3">
|
<div className="d-flex align-items-center gap-3 mt-3">
|
||||||
<div className="form-check d-flex flex-row m-0 gap-2">
|
<div className="form-check d-flex flex-row m-0 gap-2">
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
@ -387,6 +387,7 @@ function ManagePaymentRequest({ closeModal, requestToEdit = null }) {
|
|||||||
control={control}
|
control={control}
|
||||||
minDate={new Date()}
|
minDate={new Date()}
|
||||||
className="w-100"
|
className="w-100"
|
||||||
|
size="md"
|
||||||
disabled={
|
disabled={
|
||||||
data?.recurringPayment?.isVariable && !isDraft && !isProcessed
|
data?.recurringPayment?.isVariable && !isDraft && !isProcessed
|
||||||
}
|
}
|
||||||
@ -404,7 +405,7 @@ function ManagePaymentRequest({ closeModal, requestToEdit = null }) {
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
id="amount"
|
id="amount"
|
||||||
className="form-control form-control-sm"
|
className="form-control "
|
||||||
min="1"
|
min="1"
|
||||||
step="0.01"
|
step="0.01"
|
||||||
inputMode="decimal"
|
inputMode="decimal"
|
||||||
@ -429,6 +430,7 @@ function ManagePaymentRequest({ closeModal, requestToEdit = null }) {
|
|||||||
setValue("payee", val, { shouldValidate: true })
|
setValue("payee", val, { shouldValidate: true })
|
||||||
}
|
}
|
||||||
error={errors.payee?.message}
|
error={errors.payee?.message}
|
||||||
|
size="md"
|
||||||
disabled={
|
disabled={
|
||||||
data?.recurringPayment?.isVariable && !isDraft && !isProcessed
|
data?.recurringPayment?.isVariable && !isDraft && !isProcessed
|
||||||
}
|
}
|
||||||
@ -458,7 +460,7 @@ function ManagePaymentRequest({ closeModal, requestToEdit = null }) {
|
|||||||
</Label>
|
</Label>
|
||||||
<select
|
<select
|
||||||
id="currencyId"
|
id="currencyId"
|
||||||
className="form-select form-select-sm"
|
className="form-select "
|
||||||
{...register("currencyId")}
|
{...register("currencyId")}
|
||||||
disabled={
|
disabled={
|
||||||
data?.recurringPayment?.isVariable && !isDraft && !isProcessed
|
data?.recurringPayment?.isVariable && !isDraft && !isProcessed
|
||||||
@ -490,7 +492,7 @@ function ManagePaymentRequest({ closeModal, requestToEdit = null }) {
|
|||||||
</Label>
|
</Label>
|
||||||
<textarea
|
<textarea
|
||||||
id="description"
|
id="description"
|
||||||
className="form-control form-control-sm"
|
className="form-control "
|
||||||
{...register("description")}
|
{...register("description")}
|
||||||
rows="2"
|
rows="2"
|
||||||
disabled={
|
disabled={
|
||||||
|
|||||||
@ -165,7 +165,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
<div className="row my-2 text-start">
|
<div className="row my-2 text-start">
|
||||||
<div className="col-md-6">
|
<div className="col-md-6">
|
||||||
{/* <select
|
{/* <select
|
||||||
className="form-select form-select-sm"
|
className="form-select"
|
||||||
{...register("projectId")}
|
{...register("projectId")}
|
||||||
>
|
>
|
||||||
<option value="">Select Project</option>
|
<option value="">Select Project</option>
|
||||||
@ -201,7 +201,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
Expense Category
|
Expense Category
|
||||||
</Label>
|
</Label>
|
||||||
<select
|
<select
|
||||||
className="form-select form-select-sm"
|
className="form-select"
|
||||||
id="expenseCategoryId"
|
id="expenseCategoryId"
|
||||||
{...register("expenseCategoryId")}
|
{...register("expenseCategoryId")}
|
||||||
>
|
>
|
||||||
@ -227,7 +227,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Title and Is Variable */}
|
{/* Title and Is Variable */}
|
||||||
<div className="row my-2 text-start">
|
<div className="row my-2 text-start mt-n2">
|
||||||
<div className="col-md-6">
|
<div className="col-md-6">
|
||||||
<Label htmlFor="title" className="form-label" required>
|
<Label htmlFor="title" className="form-label" required>
|
||||||
Title
|
Title
|
||||||
@ -235,7 +235,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="title"
|
id="title"
|
||||||
className="form-control form-control-sm"
|
className="form-control "
|
||||||
{...register("title")}
|
{...register("title")}
|
||||||
placeholder="Enter title"
|
placeholder="Enter title"
|
||||||
/>
|
/>
|
||||||
@ -244,7 +244,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="col-md-6 mt-2">
|
<div className="col-md-6">
|
||||||
<div className="d-flex justify-content-start align-items-center text-nowrap gap-2">
|
<div className="d-flex justify-content-start align-items-center text-nowrap gap-2">
|
||||||
<Label htmlFor="isVariable" className="form-label mb-0" required>
|
<Label htmlFor="isVariable" className="form-label mb-0" required>
|
||||||
Payment Type
|
Payment Type
|
||||||
@ -273,7 +273,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
control={control}
|
control={control}
|
||||||
defaultValue={defaultRecurringExpense.isVariable ?? false}
|
defaultValue={defaultRecurringExpense.isVariable ?? false}
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<div className="d-flex align-items-center gap-3 mt-1">
|
<div className="d-flex align-items-center gap-3 mt-2">
|
||||||
<div className="form-check">
|
<div className="form-check">
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
@ -326,6 +326,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
control={control}
|
control={control}
|
||||||
minDate={new Date()}
|
minDate={new Date()}
|
||||||
className="w-100"
|
className="w-100"
|
||||||
|
size="md"
|
||||||
/>
|
/>
|
||||||
{errors.strikeDate && (
|
{errors.strikeDate && (
|
||||||
<small className="danger-text">{errors.strikeDate.message}</small>
|
<small className="danger-text">{errors.strikeDate.message}</small>
|
||||||
@ -339,7 +340,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
id="amount"
|
id="amount"
|
||||||
className="form-control form-control-sm"
|
className="form-control "
|
||||||
min="1"
|
min="1"
|
||||||
step="0.01"
|
step="0.01"
|
||||||
inputMode="decimal"
|
inputMode="decimal"
|
||||||
@ -353,7 +354,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Payee and Currency */}
|
{/* Payee and Currency */}
|
||||||
<div className="row my-2 text-start">
|
<div className="row my-2 text-start mt-3">
|
||||||
<div className="col-md-6">
|
<div className="col-md-6">
|
||||||
<Label htmlFor="payee" className="form-label" required>
|
<Label htmlFor="payee" className="form-label" required>
|
||||||
Payee (Supplier Name/Transporter Name/Other)
|
Payee (Supplier Name/Transporter Name/Other)
|
||||||
@ -366,6 +367,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
}
|
}
|
||||||
error={errors.payee?.message}
|
error={errors.payee?.message}
|
||||||
placeholder="Select or enter payee"
|
placeholder="Select or enter payee"
|
||||||
|
size="md"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -375,7 +377,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
</Label>
|
</Label>
|
||||||
<select
|
<select
|
||||||
id="currencyId"
|
id="currencyId"
|
||||||
className="form-select form-select-sm"
|
className="form-select"
|
||||||
{...register("currencyId")}
|
{...register("currencyId")}
|
||||||
>
|
>
|
||||||
<option value="">Select Currency</option>
|
<option value="">Select Currency</option>
|
||||||
@ -397,7 +399,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Frequency To and Status Id */}
|
{/* Frequency To and Status Id */}
|
||||||
<div className="row my-2 text-start">
|
<div className="row my-2 text-start mt-n2">
|
||||||
<div className="col-md-6">
|
<div className="col-md-6">
|
||||||
<div className="d-flex justify-content-start align-items-center gap-2">
|
<div className="d-flex justify-content-start align-items-center gap-2">
|
||||||
<Label htmlFor="frequency" className="form-label mb-0" required>
|
<Label htmlFor="frequency" className="form-label mb-0" required>
|
||||||
@ -419,7 +421,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
|
|
||||||
<select
|
<select
|
||||||
id="frequency"
|
id="frequency"
|
||||||
className="form-select form-select-sm mt-1"
|
className="form-select mt-1"
|
||||||
{...register("frequency", { valueAsNumber: true })}
|
{...register("frequency", { valueAsNumber: true })}
|
||||||
>
|
>
|
||||||
<option value="">Select Frequency</option>
|
<option value="">Select Frequency</option>
|
||||||
@ -441,7 +443,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
</Label>
|
</Label>
|
||||||
<select
|
<select
|
||||||
id="statusId"
|
id="statusId"
|
||||||
className="form-select form-select-sm"
|
className="form-select"
|
||||||
{...register("statusId")}
|
{...register("statusId")}
|
||||||
>
|
>
|
||||||
<option value="">Select Status</option>
|
<option value="">Select Status</option>
|
||||||
@ -488,7 +490,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
id="paymentBufferDays"
|
id="paymentBufferDays"
|
||||||
className="form-control form-control-sm mt-1"
|
className="form-control mt-1"
|
||||||
min="0"
|
min="0"
|
||||||
step="1"
|
step="1"
|
||||||
{...register("paymentBufferDays", { valueAsNumber: true })}
|
{...register("paymentBufferDays", { valueAsNumber: true })}
|
||||||
@ -526,6 +528,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
control={control}
|
control={control}
|
||||||
minDate={StrikeDate}
|
minDate={StrikeDate}
|
||||||
className="w-100 mt-1"
|
className="w-100 mt-1"
|
||||||
|
size="md"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{errors.endDate && (
|
{errors.endDate && (
|
||||||
@ -568,7 +571,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
|
|||||||
</Label>
|
</Label>
|
||||||
<textarea
|
<textarea
|
||||||
id="description"
|
id="description"
|
||||||
className="form-control form-control-sm"
|
className="form-control "
|
||||||
{...register("description")}
|
{...register("description")}
|
||||||
rows="2"
|
rows="2"
|
||||||
></textarea>
|
></textarea>
|
||||||
|
|||||||
@ -4,6 +4,7 @@ const InputSuggestions = ({
|
|||||||
organizationList = [],
|
organizationList = [],
|
||||||
value,
|
value,
|
||||||
onChange,
|
onChange,
|
||||||
|
size = "sm",
|
||||||
error,
|
error,
|
||||||
disabled = false,
|
disabled = false,
|
||||||
}) => {
|
}) => {
|
||||||
@ -27,7 +28,7 @@ const InputSuggestions = ({
|
|||||||
return (
|
return (
|
||||||
<div className="mb-3 position-relative">
|
<div className="mb-3 position-relative">
|
||||||
<input
|
<input
|
||||||
className="form-control form-control-sm"
|
className={`form-control form-control-${size}`}
|
||||||
value={value}
|
value={value}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
onBlur={() => setTimeout(() => setShowSuggestions(false), 150)}
|
onBlur={() => setTimeout(() => setShowSuggestions(false), 150)}
|
||||||
@ -58,8 +59,7 @@ const InputSuggestions = ({
|
|||||||
transition: "background-color 0.2s",
|
transition: "background-color 0.2s",
|
||||||
}}
|
}}
|
||||||
onMouseDown={() => handleSelectSuggestion(org)}
|
onMouseDown={() => handleSelectSuggestion(org)}
|
||||||
className={`dropdown-item ${
|
className={`dropdown-item ${org === value ? "active" : ""
|
||||||
org === value ? "active" : ""
|
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{org}
|
{org}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user