Skip to content

Commit edc4f21

Browse files
committed
commit6
1 parent b1a9cdf commit edc4f21

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

src/app/plat/listplat/listplat.component.ts

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,49 @@ generatePdf(p){
232232
this.formattedDate = formatDate(myDate, format, locale);
233233

234234
console.log(p);
235-
const documentDefinition = { content:'date:'+ "\n"+this.formattedDate+ "\n"+ 'nom restaurant : '+ "\n" + p.resto + "\n" +"nom plat demander : "+ "\n"+ p.name + "\n"+" de categorie : "+ "\n"+p.categorie + "", };
235+
/* const documentDefinition = { header: 'date:'+ "\n"+this.formattedDate, content:[{text:'nom restaurant : '+ "\n" + p.resto + "\n" +"nom plat demander : "+ "\n"+ p.name + "\n"+" de categorie : "+ "\n"+p.categorie + "",fontSize:16,alignemnt:'center',color: '#047886',style: 'sectionHeader'} ],styles: {
236+
sectionHeader: {
237+
bold: true,
238+
decoration: 'underline',
239+
fontSize: 14,
240+
margin: [0, 15, 0, 15] ,
241+
color : '#047886' ,
242+
243+
}
244+
}
245+
246+
};*/
247+
248+
249+
const documentDefinition = { header: 'date:'+ "\n"+this.formattedDate, content:[
250+
{ text : 'Order Details'
251+
},
252+
{
253+
table: {
254+
headerRows: 1,
255+
widths: ['*', 'auto', 'auto', 'auto'],
256+
body: [
257+
['Resto', 'Name plat', 'Name Category'],
258+
[ p.resto , p.name , p.categorie]
259+
260+
261+
]
262+
263+
264+
}
265+
}
266+
],
267+
268+
269+
270+
271+
};
272+
273+
274+
275+
276+
277+
236278
pdfMake.createPdf(documentDefinition).open();
237279
pdfMake.createPdf(documentDefinition).download();
238280
}

0 commit comments

Comments
 (0)