phpvms
phpvms copied to clipboard
Put reason in for rejecting PIREP
Is your feature request related to a problem? Please describe. When my team rejects PIREPs, it sends an email saying their pirep has been rejected, but doesn't actually give them a reason why - forcing us to email them again
Describe the solution you'd like I would like to make it so when you click reject on a PIREP, it comes up with a textbox where you can input the reason for rejection, so that it emails them saying their pirep has been rejected and puts the reason in the same email.
Additional context
Screenshot of what it did in PHPVMS5
There is a field for comments, if that gets emailed (just realized it doesn't), would that be good enough? Or should there be a dedicated thing for admin comments that gets passed along with an acceptance/rejection?
I personally think it would be better to have both of those. I'd like it to have the rejection comment only so they don't have to get two emails (comment added and pirep rejected) - I feel it would be better just to include it all in one email. Obviously that may be a stretch so if you can only get the comment one working that will be fine :)
That makes sense, just checking. I think I'll need to do both anyway. I'm just trying to prioritize
Thanks again, keep up the great work :)
Just some notes for myself, I'll try do this for the next dev
- Add popup for reason when rejection button is clicked (plain browser
prompt()
is ok for now, or modal with#onclose
for OK) - DB field
rejection_reason NULL DEFAULT ''
(table, model, validations) - Add
rejection_reason
into email templates
I'm currently had this modification in phpvms\resources\views\notifications\mail\pirep\rejected.blade.php
Your PIREP has been rejected
@if($pirep->comments->count() > 0) ## Comments @foreach($pirep->comments as $comment) - {{ $comment->comment }} @endforeach @endif
@component('mail::button', ['url' => route('frontend.pireps.show', [$pirep->id])])