Ajout du type Intérêt plateforme pour les remboursements
This commit is contained in:
1 parent
37f9f8b8a7
commit
1bab97b5b3
9 files changed
+248
-66
No files matched your search
@@ -15,7 +15,7 @@ import { fmtEUR } from '../utils/format.js';
|
||||
* en dessous, et se ferme au scroll/resize (repositionnement non géré en direct, comme InvSelect).
|
||||
*
|
||||
* Props :
|
||||
* value : '' | 'BONUS_PARRAINAGE' | 'BONUS_PLATEFORME' | id (string/number)
|
||||
* value : '' | 'BONUS_PARRAINAGE' | 'BONUS_PLATEFORME' | 'INTERETS_PLATEFORME' | id (string/number)
|
||||
* onChange : (value) => void
|
||||
* options : investissementOptions — { id, plateforme_nom, nom_projet, montant_investi }[]
|
||||
*/
|
||||
@@ -29,6 +29,7 @@ export default function InvestissementSelect({ value, onChange, options = [] })
|
||||
const selectedOption = options.find(i => String(i.id) === String(value));
|
||||
const label = value === 'BONUS_PARRAINAGE' ? '🎁 Bonus Parrainage'
|
||||
: value === 'BONUS_PLATEFORME' ? '🏆 Bonus Plateforme'
|
||||
: value === 'INTERETS_PLATEFORME' ? '🏦 Intérêts plateforme'
|
||||
: selectedOption ? `${selectedOption.plateforme_nom} — ${selectedOption.nom_projet} (${fmtEUR(selectedOption.montant_investi)})`
|
||||
: null;
|
||||
|
||||
@@ -123,6 +124,7 @@ export default function InvestissementSelect({ value, onChange, options = [] })
|
||||
<button type="button" style={rowStyle(value === '')} onClick={() => select('')}>—</button>
|
||||
<button type="button" style={rowStyle(value === 'BONUS_PARRAINAGE')} onClick={() => select('BONUS_PARRAINAGE')}>🎁 Bonus Parrainage</button>
|
||||
<button type="button" style={rowStyle(value === 'BONUS_PLATEFORME')} onClick={() => select('BONUS_PLATEFORME')}>🏆 Bonus Plateforme</button>
|
||||
<button type="button" style={rowStyle(value === 'INTERETS_PLATEFORME')} onClick={() => select('INTERETS_PLATEFORME')}>🏦 Intérêts plateforme</button>
|
||||
<div className="cat-select-sep" />
|
||||
{options.map(i => (
|
||||
<button key={i.id} type="button" style={rowStyle(String(value) === String(i.id))} onClick={() => select(String(i.id))}>
|
||||
|
||||
Reference in new issue
Block a user