feat: Ajout des modes de paiements + création d'une commande dans le

back permettant d'initialiser des données de test (pour les tarifs)
This commit is contained in:
N3WT DE COMPET
2025-02-12 15:13:15 +01:00
parent 23203c0397
commit 0c5e3aa098
12 changed files with 299 additions and 44 deletions

View File

@ -3,7 +3,7 @@ import FeesSection from '@/components/Structure/Tarification/FeesSection';
import DiscountsSection from '@/components/Structure/Tarification/DiscountsSection';
import PaymentPlanSelector from '@/components/PaymentPlanSelector';
import PaymentModeSelector from '@/components/PaymentModeSelector';
import { BE_SCHOOL_FEE_URL, BE_SCHOOL_DISCOUNT_URL, BE_SCHOOL_PAYMENT_PLAN_URL } from '@/utils/Url';
import { BE_SCHOOL_FEE_URL, BE_SCHOOL_DISCOUNT_URL, BE_SCHOOL_PAYMENT_PLAN_URL, BE_SCHOOL_PAYMENT_MODE_URL } from '@/utils/Url';
import { set } from 'lodash';
const FeesManagement = ({ registrationDiscounts,
@ -18,6 +18,10 @@ const FeesManagement = ({ registrationDiscounts,
setRegistrationPaymentPlans,
tuitionPaymentPlans,
setTuitionPaymentPlans,
registrationPaymentModes,
setRegistrationPaymentModes,
tuitionPaymentModes,
setTuitionPaymentModes,
handleCreate,
handleEdit,
handleDelete }) => {
@ -75,13 +79,14 @@ const FeesManagement = ({ registrationDiscounts,
type={0}
/>
</div>
{/* <div className="col-span-1">
<div className="col-span-1 p-6 rounded-lg shadow-inner mt-4">
<PaymentModeSelector
formData={formRegistrationData}
setFormData={setFormRegistrationData}
fieldName="paymentRegistrationMode"
paymentModes={registrationPaymentModes}
setPaymentModes={setRegistrationPaymentModes}
handleEdit={(id, updatedData) => handleEdit(`${BE_SCHOOL_PAYMENT_MODE_URL}`, id, updatedData, setRegistrationPaymentModes)}
type={0}
/>
</div> */}
</div>
</div>
</div>
<div className="bg-white p-2 rounded-lg shadow-md">
@ -117,6 +122,14 @@ const FeesManagement = ({ registrationDiscounts,
type={1}
/>
</div>
<div className="col-span-1 p-6 rounded-lg shadow-inner mt-4">
<PaymentModeSelector
paymentModes={tuitionPaymentModes}
setPaymentModes={setTuitionPaymentModes}
handleEdit={(id, updatedData) => handleEdit(`${BE_SCHOOL_PAYMENT_MODE_URL}`, id, updatedData, setTuitionPaymentModes)}
type={1}
/>
</div>
</div>
</div>
</div>