@@ -32,7 +32,7 @@ const generateCSV = (
3232) : string => {
3333 let output = "" ;
3434 let headers =
35- "Namn,Email,Matpreferens,Phaddergrupp,Betalad mängd,Köpdatum,Payment Intent id" ;
35+ "Namn,StilID, Email,Matpreferens,Phaddergrupp,Betalad mängd,Köpdatum,Payment Intent id" ;
3636 for ( const question of ticket . shoppable . questions ) {
3737 headers += `,${ question . title . replace ( "," , " " ) } ` ;
3838 }
@@ -48,6 +48,7 @@ const generateCSV = (
4848 const name = member
4949 ? `${ member . firstName } ${ member . lastName } ` . replace ( "," , " " )
5050 : "Anonym användare" ;
51+ const stilId = member ? member . studentId : "Anonym användare" ;
5152 const email = member
5253 ? "Finns inte"
5354 : ( consumable . externalCustomerEmail ?. replace ( "," , " " ) ?? "Finns inte" ) ;
@@ -62,7 +63,7 @@ const generateCSV = (
6263 const phadderGroup = member
6364 ? ( member ?. phadderGroup ?. name . replace ( "," , " " ) ?? "" )
6465 : "Anonym användare" ;
65- let row = `${ name } ,${ email } ,${ foodPreference } ,${ phadderGroup } ,${ paidAmount } ,${ dayjs (
66+ let row = `${ name } ,${ stilId } , ${ email } ,${ foodPreference } ,${ phadderGroup } ,${ paidAmount } ,${ dayjs (
6667 consumable . purchasedAt ,
6768 ) . format ( "YYYY-MM-DD HH:mm:ss" ) } ,${
6869 consumable . stripeIntentId ?. replace ( "," , " " ) ?? "N/A"
0 commit comments