mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-04-05 12:41:27 +00:00
fix: Mise en page sur absence de frais ou de tarifs lors de la création d'un DI
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import React, { useState, useRef, useEffect } from 'react';
|
import React, { useState, useRef, useEffect } from 'react';
|
||||||
import { User, Mail } from 'lucide-react';
|
import { User, Mail, Info } from 'lucide-react';
|
||||||
import InputTextIcon from '@/components/Form/InputTextIcon';
|
import InputTextIcon from '@/components/Form/InputTextIcon';
|
||||||
import ToggleSwitch from '@/components/Form/ToggleSwitch';
|
import ToggleSwitch from '@/components/Form/ToggleSwitch';
|
||||||
import Button from '@/components/Form/Button';
|
import Button from '@/components/Form/Button';
|
||||||
@ -43,6 +43,23 @@ import { FE_ADMIN_SUBSCRIPTIONS_URL } from '@/utils/Url';
|
|||||||
import { getSecureFileUrl } from '@/utils/fileUrl';
|
import { getSecureFileUrl } from '@/utils/fileUrl';
|
||||||
import { useNotification } from '@/context/NotificationContext';
|
import { useNotification } from '@/context/NotificationContext';
|
||||||
|
|
||||||
|
function NoInfoAlert({ message }) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="w-full rounded border border-orange-300 bg-orange-50 px-4 py-3 text-orange-800"
|
||||||
|
role="alert"
|
||||||
|
>
|
||||||
|
<div className="flex items-start gap-3">
|
||||||
|
<Info className="mt-0.5 h-4 w-4 shrink-0" />
|
||||||
|
<div className="text-sm leading-6">
|
||||||
|
<span className="font-semibold">Information :</span>{' '}
|
||||||
|
<span>{message}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export default function CreateSubscriptionPage() {
|
export default function CreateSubscriptionPage() {
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
studentLastName: '',
|
studentLastName: '',
|
||||||
@ -1003,16 +1020,7 @@ export default function CreateSubscriptionPage() {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<p
|
<NoInfoAlert message="Aucune réduction n'a été créée sur les frais d'inscription." />
|
||||||
className="bg-orange-100 border border-orange-400 text-orange-700 px-4 py-3 rounded relative"
|
|
||||||
role="alert"
|
|
||||||
>
|
|
||||||
<strong className="font-bold">Information</strong>
|
|
||||||
<span className="block sm:inline">
|
|
||||||
Aucune réduction n'a été créée sur les frais
|
|
||||||
d'inscription.
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1028,15 +1036,7 @@ export default function CreateSubscriptionPage() {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<p
|
<NoInfoAlert message="Aucun frais d'inscription n'a été créé." />
|
||||||
className="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative"
|
|
||||||
role="alert"
|
|
||||||
>
|
|
||||||
<strong className="font-bold">Attention!</strong>
|
|
||||||
<span className="block sm:inline">
|
|
||||||
Aucun frais d'inscription n'a été créé.
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
)}
|
)}
|
||||||
</SectionTitle>
|
</SectionTitle>
|
||||||
|
|
||||||
@ -1067,16 +1067,7 @@ export default function CreateSubscriptionPage() {
|
|||||||
handleDiscountSelection={handleTuitionDiscountSelection}
|
handleDiscountSelection={handleTuitionDiscountSelection}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<p
|
<NoInfoAlert message="Aucune réduction n'a été créée sur les frais de scolarité." />
|
||||||
className="bg-orange-100 border border-orange-400 text-orange-700 px-4 py-3 rounded relative"
|
|
||||||
role="alert"
|
|
||||||
>
|
|
||||||
<strong className="font-bold">Information</strong>
|
|
||||||
<span className="block sm:inline">
|
|
||||||
Aucune réduction n'a été créée sur les frais de
|
|
||||||
scolarité.
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1092,15 +1083,7 @@ export default function CreateSubscriptionPage() {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<p
|
<NoInfoAlert message="Aucun frais de scolarité n'a été créé." />
|
||||||
className="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative"
|
|
||||||
role="alert"
|
|
||||||
>
|
|
||||||
<strong className="font-bold">Attention!</strong>
|
|
||||||
<span className="block sm:inline">
|
|
||||||
Aucun frais de scolarité n'a été créé.
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
)}
|
)}
|
||||||
</SectionTitle>
|
</SectionTitle>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user