phpvms icon indicating copy to clipboard operation
phpvms copied to clipboard

Put reason in for rejecting PIREP

Open joshhicks1 opened this issue 4 years ago • 6 comments

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 Screen Shot 2020-05-22 at 12 41 47 pm

joshhicks1 avatar May 22 '20 02:05 joshhicks1

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?

nabeelio avatar May 22 '20 02:05 nabeelio

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 :)

joshhicks1 avatar May 22 '20 02:05 joshhicks1

That makes sense, just checking. I think I'll need to do both anyway. I'm just trying to prioritize

nabeelio avatar May 22 '20 02:05 nabeelio

Thanks again, keep up the great work :)

joshhicks1 avatar May 22 '20 02:05 joshhicks1

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

nabeelio avatar May 22 '20 03:05 nabeelio

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])])

avs-code avatar Jun 18 '23 07:06 avs-code