@ -20,7 +20,7 @@ export default {
} ,
} ,
sauverScientifique : function ( ) {
sauverScientifique : function ( ) {
/ / T O D O : c o m m e d a n s a j o u t
/ / T O D O : c o m m e d a n s a j o u t
/ / T O D O
/ / T O D O c o m m e n t t r o u v e r l ' e n d p o i n t d e p u i s L i s t e . v u e ?
/ / f e t c h ( " l o c a l h o s t / a p i / v 1 / s c i e n t i f i q u e s " , { m e t h o d : " P U T " , b o d y : J S O N . s t r i n g i f y ( d o n n e e s ) } )
/ / f e t c h ( " l o c a l h o s t / a p i / v 1 / s c i e n t i f i q u e s " , { m e t h o d : " P U T " , b o d y : J S O N . s t r i n g i f y ( d o n n e e s ) } )
console . log ( this . champs )
console . log ( this . champs )
this . changerModeEdition ( )
this . changerModeEdition ( )
@ -43,10 +43,10 @@ export default {
<!-- TODO : changer le type si c 'est un nombre, date (voir si on peut parse la date), objet (bouton qui ouvre une popup qui propose de changer les champs de l' objet ) -- >
<!-- TODO : changer le type si c 'est un nombre, date (voir si on peut parse la date), objet (bouton qui ouvre une popup qui propose de changer les champs de l' objet ) -- >
< td v-for ="cleChamp in Object.keys(champs)" >
< td v-for ="cleChamp in Object.keys(champs)" >
<!-- TODO : aria label , comment trouver les noms des colonnes depuis Liste . vue -- >
< input class = "form-control" type = "text" v-model ="champs[cleChamp]" >
< input class = "form-control" type = "text" v-model ="champs[cleChamp]" >
< / td >
< / td >
< td >
< td >
<!-- TODO : aussi faire this . modeEdition = ! this . modeEdition dans sauverScientifique -- >
< button class = "btn btn-success" v -on :click ="sauverScientifique()" > Sauvegarder < / button >
< button class = "btn btn-success" v -on :click ="sauverScientifique()" > Sauvegarder < / button >
< button class = "btn btn-secondary" v -on :click ="annuler()" > Annuler < / button >
< button class = "btn btn-secondary" v -on :click ="annuler()" > Annuler < / button >
< / td >
< / td >