Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a note text area to asset acceptances/declines #14451

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from

Conversation

Godmartinz
Copy link
Collaborator

@Godmartinz Godmartinz commented Mar 18, 2024

Description

Adds a note text area to allow a user to give more detail when accepting/decling an asset. The note is saved in the checkout_acceptances table.

It only appears if you select the decline radio button.
image

The mail notification also reflects the notes shared by the user when declined
image

The mail notification also reflects the notes shared by the user when accepted
image

The notes are also reflected in the action log
image

Fixes #[SC-25074]

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [ x] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • PHP version:
  • MySQL version
  • Webserver version
  • OS version

Checklist:

Copy link

what-the-diff bot commented Mar 18, 2024

PR Summary

  • Addition of a New Field for the Checkout Acceptance Model
    A field labeled 'declined_msg' has been inserted into the database table of CheckoutAcceptance. This will be employed to record any supplementary notes or remarks when a checkout acceptance is declined.

  • Updates on the Acceptance Controller
    The 'declined_msg' is also included in the set of data being sent to the view via the AcceptanceController.

  • Enhancements on the Acceptance Asset Declined Notification
    Simultaneously, adjustments have been made to the AcceptanceAssetDeclinedNotification to encompass the mentioned 'declined_msg' in its constructor and mailing methodologies. This message will be included in the notification template as well.

  • Implementation of New Migration
    A new migration has been brought to life to include the 'declined_msg' column in the checkout_acceptances database table.

  • Embedding a New Translation Key
    A fresh translation key for 'decline_msg' is added to the general.php language file, facilitating multilingual support.

  • Changes in the Blade PHP View
    create.blade.php view has been fitted with a new textarea input 'declined_msg'. This input will only appear when the 'declined' checkbox is marked.

  • Updates on the Email Template
    The asset-acceptance.blade.php email template has been amended to consist of the declined message, should there be one.

@Godmartinz Godmartinz marked this pull request as ready for review March 18, 2024 17:50
@Godmartinz Godmartinz requested a review from snipe as a code owner March 18, 2024 17:50
@Godmartinz Godmartinz changed the title Add decline note to acceptance Adds a decline note text area to declined assets Mar 18, 2024
@marcusmoore
Copy link
Collaborator

I'll help out with those sqlite test failures.

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

One change should fix the failing tests.

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

One question for @snipe / @uberbrady (who know databases better than I do) and a couple notes that don't need to hold up the PR.

(Marking as "request changes" just so the red is more noticeable)

@snipe
Copy link
Owner

snipe commented Mar 20, 2024

This looks good - should we maybe consider making this slightly more generic, so it's just a note, not specifically a declined note? I can't think of a reason why you'd want a note with an acceptance, but since we're already doing all the work anyway, we could probably just make it a note, regardless of whether it's a decline or acceptance. (Also can we make that text area width be the width of that panel?)

Copy link
Owner

@snipe snipe left a comment

Choose a reason for hiding this comment

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

A few questions/comments in the previous comment.

@Godmartinz
Copy link
Collaborator Author

Godmartinz commented Mar 21, 2024

@snipe changes have been applied. 👍

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

Changing it a generic note makes sense to me. A couple things to address though.

resources/views/account/accept/create.blade.php Outdated Show resolved Hide resolved
resources/views/account/accept/create.blade.php Outdated Show resolved Hide resolved
@snipe snipe marked this pull request as draft March 26, 2024 19:23
@Godmartinz Godmartinz marked this pull request as ready for review March 27, 2024 18:59
Copy link

This pull request has been linked to Shortcut Story #25074: Add a note to the decline screen.

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

I haven't looked at why yet but notes aren't being stored when an asset is accepted

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

Some changes por favor

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

One more final change...sorry 😅

@Godmartinz Godmartinz changed the title Adds a decline note text area to declined assets Adds a note text area to asset acceptances/declines Apr 3, 2024
Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

Looks good! 👍🏾

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

Successfully merging this pull request may close these issues.

None yet

3 participants