Our state of the art Gantt chart


Post by mv2022 »

In the pdf export, is there a way to send additional data like a project number to the API using the fetchOption?

      fetchOptions: {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${Token.id_token}`
        }
      },  
Attachments
payload.PNG
payload.PNG (7.48 KiB) Viewed 175 times

Post by alex.l »

The easiest way I see is to use https://bryntum.com/docs/gantt/api/Gantt/feature/export/PdfExport#event-beforePdfExport

    listeners : {
        beforePdfExport({ config }) {
            config.client.features.pdfExport.fetchOptions.reportNumber = 'Very first';
        }
    },

All the best,
Alex


Post Reply