Feat: computed attributes for months
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import path from 'path'
|
||||
import Papa from 'papaparse'
|
||||
import { writeFile } from 'fs'
|
||||
import {
|
||||
ca,
|
||||
notInvoiced,
|
||||
caPro,
|
||||
caPerso,
|
||||
caPersoUntouch,
|
||||
} from '../../lib/months.js'
|
||||
|
||||
const config = {
|
||||
namespaced: true,
|
||||
@@ -12,68 +19,112 @@ const config = {
|
||||
caProPercentage: 0.5,
|
||||
monthDesc : [
|
||||
{
|
||||
name: 'caTheo',
|
||||
color: '',
|
||||
desc: 'CA "scéances effectuées"',
|
||||
type: 'base',
|
||||
name: 'caTheo',
|
||||
unit: '€',
|
||||
hightlight: true,
|
||||
hightlight: false,
|
||||
output: month => month.caTheo,
|
||||
},
|
||||
{
|
||||
name: 'caRetro',
|
||||
color: '',
|
||||
desc: 'CA "Séances facturées"',
|
||||
type: 'base',
|
||||
name: 'caRetro',
|
||||
unit: '€',
|
||||
hightlight: false,
|
||||
output: month => month.caRetro,
|
||||
},
|
||||
{
|
||||
name: 'caReact',
|
||||
color: '',
|
||||
desc: 'CA "Séances facturées" réactualisé',
|
||||
type: 'base',
|
||||
name: 'caReact',
|
||||
unit: '€',
|
||||
hightlight: true,
|
||||
hightlight: false,
|
||||
output: month => month.caReact,
|
||||
},
|
||||
{
|
||||
name: 'sessionQty',
|
||||
color: '',
|
||||
desc: 'Nombre de séances effectuées',
|
||||
type: 'base',
|
||||
name: 'sessionQty',
|
||||
unit: '',
|
||||
hightlight: false,
|
||||
output: month => month.sessionQty,
|
||||
},
|
||||
{
|
||||
name: 'retro',
|
||||
color: '',
|
||||
desc: 'Montant de la rétrocession',
|
||||
type: 'base',
|
||||
name: 'retro',
|
||||
unit: '€',
|
||||
hightlight: false,
|
||||
output: month => month.retro,
|
||||
},
|
||||
{
|
||||
name: 'remuneration',
|
||||
color: '',
|
||||
desc: 'Rémuneration',
|
||||
type: 'base',
|
||||
name: 'remuneration',
|
||||
unit: '€',
|
||||
hightlight: true,
|
||||
output: month => month.remuneration,
|
||||
},
|
||||
{
|
||||
name: 'proPercentage',
|
||||
color: '',
|
||||
desc: 'Pourcentage du CA pour la partie pro',
|
||||
type: 'base',
|
||||
name: 'proPercentage',
|
||||
unit: '%',
|
||||
hightlight: false,
|
||||
output: month => month.proPercentage,
|
||||
},
|
||||
{
|
||||
name: 'ca',
|
||||
color: '',
|
||||
desc: 'ca',
|
||||
type: 'compute',
|
||||
unit: '€',
|
||||
hightlight: true,
|
||||
output: month => ca(month),
|
||||
},
|
||||
{
|
||||
name: 'notInvoiced',
|
||||
color: '',
|
||||
desc: 'Non facturé',
|
||||
type: 'compute',
|
||||
unit: '€',
|
||||
hightlight: true,
|
||||
output: month => notInvoiced(month),
|
||||
},
|
||||
{
|
||||
name: 'caPro',
|
||||
color: '',
|
||||
desc: 'CA pour le partie pro',
|
||||
type: 'compute',
|
||||
unit: '€',
|
||||
hightlight: false,
|
||||
output: month => caPro(month),
|
||||
},
|
||||
{
|
||||
name: 'caPerso',
|
||||
color: '',
|
||||
desc: 'CA destiné à la rémuneration',
|
||||
type: 'compute',
|
||||
unit: '€',
|
||||
hightlight: false,
|
||||
output: month => caPerso(month),
|
||||
},
|
||||
{
|
||||
name: 'caPersoUntouch',
|
||||
color: '',
|
||||
desc: 'CA destiné à la rémuneration non reversé',
|
||||
type: 'compute',
|
||||
unit: '€',
|
||||
hightlight: false,
|
||||
output: month => caPersoUntouch(month),
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user