mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 04:02:15 +01:00
Add wait for report with chart
This commit is contained in:
committed by
Constantin Graf
parent
a4d8a02b80
commit
05da595470
@@ -409,6 +409,7 @@ class TimeEntryController extends Controller
|
|||||||
$footerHtml = Blade::render($footerViewFile);
|
$footerHtml = Blade::render($footerViewFile);
|
||||||
$request = Gotenberg::chromium(config('services.gotenberg.url'))
|
$request = Gotenberg::chromium(config('services.gotenberg.url'))
|
||||||
->pdf()
|
->pdf()
|
||||||
|
->waitForExpression("window.status === 'ready'")
|
||||||
->pdfa('PDF/A-3b')
|
->pdfa('PDF/A-3b')
|
||||||
->paperSize('8.27', '11.7') // A4
|
->paperSize('8.27', '11.7') // A4
|
||||||
->footer(Stream::string('footer', $footerHtml))
|
->footer(Stream::string('footer', $footerHtml))
|
||||||
|
|||||||
@@ -37,6 +37,9 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<script>
|
||||||
|
window.status = 'processing';
|
||||||
|
</script>
|
||||||
<script src="echarts.min.js"></script>
|
<script src="echarts.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -190,6 +193,10 @@
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
myChart.on('finished', () => {
|
||||||
|
window.status = 'ready';
|
||||||
|
})
|
||||||
|
|
||||||
// Display the chart using the configuration items and data just specified.
|
// Display the chart using the configuration items and data just specified.
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user