Amélioration
This commit is contained in:
1 parent
014adaf22e
commit
37f9f8b8a7
2 files changed
+17
-10
No files matched your search
@@ -165,8 +165,8 @@ router.get('/', (req, res) => {
|
|||||||
b.*,
|
b.*,
|
||||||
CASE b.type
|
CASE b.type
|
||||||
WHEN 'normal' THEN b.inv_nom_projet
|
WHEN 'normal' THEN b.inv_nom_projet
|
||||||
WHEN 'bonus_parrainage' THEN '— Bonus Parrainage'
|
WHEN 'bonus_parrainage' THEN '— Bonus Parrainage' || CASE WHEN NULLIF(b.notes, '') IS NOT NULL THEN ' — ' || b.notes ELSE '' END
|
||||||
WHEN 'bonus_plateforme' THEN '— Bonus Plateforme'
|
WHEN 'bonus_plateforme' THEN '— Bonus Plateforme' || CASE WHEN NULLIF(b.notes, '') IS NOT NULL THEN ' — ' || b.notes ELSE '' END
|
||||||
ELSE b.inv_nom_projet
|
ELSE b.inv_nom_projet
|
||||||
END AS nom_projet,
|
END AS nom_projet,
|
||||||
p.nom AS plateforme_nom,
|
p.nom AS plateforme_nom,
|
||||||
|
|||||||
@@ -137,8 +137,8 @@ export default function RembFormModal({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{!locked && isBonus && (
|
{!locked && isBonus && (
|
||||||
<div style={{ gridColumn: 'span 2' }}>
|
<div>
|
||||||
<label>Plateforme associée (bonus)</label>
|
<label>Plateforme associée</label>
|
||||||
<select value={form.bonus_plateforme_id} onChange={e => {
|
<select value={form.bonus_plateforme_id} onChange={e => {
|
||||||
const plat = plateformes.find(p => String(p.id) === e.target.value);
|
const plat = plateformes.find(p => String(p.id) === e.target.value);
|
||||||
onFormPatch({ bonus_plateforme_id: e.target.value, bonus_investisseur_id: plat?.investisseur_id ? String(plat.investisseur_id) : '' });
|
onFormPatch({ bonus_plateforme_id: e.target.value, bonus_investisseur_id: plat?.investisseur_id ? String(plat.investisseur_id) : '' });
|
||||||
@@ -148,6 +148,13 @@ export default function RembFormModal({
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{!locked && isBonus && (
|
||||||
|
<div>
|
||||||
|
<label>Date *</label>
|
||||||
|
<input type="date" required value={form.date_remb || ''}
|
||||||
|
onChange={e => onFieldChange('date_remb', e.target.value)} />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* ── Champs remboursement normal ── */}
|
{/* ── Champs remboursement normal ── */}
|
||||||
{!isBonus && (<>
|
{!isBonus && (<>
|
||||||
@@ -264,16 +271,16 @@ export default function RembFormModal({
|
|||||||
{/* ── Bonus (mode non verrouillé uniquement) ── */}
|
{/* ── Bonus (mode non verrouillé uniquement) ── */}
|
||||||
{!locked && isBonus && (
|
{!locked && isBonus && (
|
||||||
<div>
|
<div>
|
||||||
<label>Date *</label>
|
<label>Montant (€)</label>
|
||||||
<input type="date" required value={form.date_remb || ''}
|
<input type="number" step="0.01" value={form.cashback ?? 0}
|
||||||
onChange={e => onFieldChange('date_remb', e.target.value)} />
|
onChange={e => onFieldChange('cashback', e.target.value)} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{!locked && isBonus && (
|
{!locked && isBonus && (
|
||||||
<div style={{ gridColumn: 'span 2' }}>
|
<div style={{ gridColumn: 'span 2' }}>
|
||||||
<label>Montant (€)</label>
|
<label>Projet / Commentaire</label>
|
||||||
<input type="number" step="0.01" value={form.cashback ?? 0}
|
<input type="text" placeholder="Nom du projet sollicité par le filleul…" value={form.notes || ''}
|
||||||
onChange={e => onFieldChange('cashback', e.target.value)} />
|
onChange={e => onFieldChange('notes', e.target.value)} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user