Skip to content

Conversation

@betsyecastro
Copy link
Contributor

@betsyecastro betsyecastro commented Sep 3, 2025

Adds support in the profile-students view for downloading both individual and multiple student applications. The "Download" option allows downloading a single application, while "Download Student Applications" enables exporting filtered applications by filing status in Excel or PDF formats to address issue #187

The job that generates the PDF file in the background, receives a PdfGeneratorService - an implementation of the PdfGenerationContract interface to support multiple PDF generation methods Browsershot, AWS Lambda, and container-based).

image

Replaces PR #192.

@betsyecastro betsyecastro self-assigned this Sep 3, 2025
@betsyecastro betsyecastro added the ✨ enhancement New feature or request label Sep 3, 2025
@betsyecastro betsyecastro force-pushed the bulk-export-student-apps-pdf branch from b05ac6f to 9b3f3de Compare September 25, 2025 22:42
@betsyecastro betsyecastro marked this pull request as ready for review September 26, 2025 14:58
@betsyecastro betsyecastro requested a review from wunc September 26, 2025 14:58
@betsyecastro betsyecastro added the 🔧 env-changes Requires .env changes label Sep 26, 2025
@shukla-m shukla-m self-requested a review November 12, 2025 22:05
@betsyecastro betsyecastro added the 📦️ dependencies Update, change, or remove a dependency label Nov 25, 2025
@betsyecastro betsyecastro force-pushed the bulk-export-student-apps-pdf branch from 8ba4fce to dc5330d Compare December 1, 2025 23:01
@betsyecastro betsyecastro force-pushed the bulk-export-student-apps-pdf branch from dc5330d to a13215e Compare December 1, 2025 23:02
Copy link

@shukla-m shukla-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @betsyecastro, this works great! I tested both bulk PDF downloads (with and without filters) and individual PDF download and everything seems to work as expected. I added a few comments for minor changes. Let me know if you have any questions. Thanks.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is app\Jobs\CleanupPdfFiles.php being used anywhere? It looks like app\Console\Commands\CleanUpPdfFiles.php is used in Kernel.php, but I didn't see this file being used anywhere, unless I missed it.

{
public function generate(array $payload): PdfGenerationResult
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the LambdaPdfHelper implementation included here for future reference, since we are not currently using lambda?
Also, do we need the commented lines below for Pdf::view() invocation?


namespace App\Http\Controllers;

use App\Profile;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the following imports are not being used and can be removed: Profile, Student, Model, Storage.

use App\Helpers\Contracts\PdfGenerationHelperContract;
use App\Helpers\LambdaPdfHelper;
use App\Macros\CollectionMacros;
use App\Services\PdfGenerationService;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like PdfGenerationService and Log are not being used in this file so the imports can be removed.

}

$this->app->bind(PdfGenerationHelperContract::class, function () {
if (config('pdf.driver') === 'lambda') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this code for future reference in case we use lambda at some point?

*/

'default' => env('QUEUE_DRIVER', 'sync'),
'default' => env('QUEUE_DRIVER', 'database'),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible and if it makes sense, could you please add a comment on why it was changed from sync to database? It might be helpful for future reference. Thanks.

use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use App\Events\PdfReady;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the following imports are not being used and can be removed: PdfReady, Student, URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦️ dependencies Update, change, or remove a dependency ✨ enhancement New feature or request 🔧 env-changes Requires .env changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants