Added #8414 - acceptance sign in place - #18884
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Complexity | 1 medium |
🟢 Metrics 32 complexity · 0 duplication
Metric Results Complexity 32 Duplication 0
TIP This summary will be updated as you push new changes. Give us feedback
|
I did some brief testing so far and it works as expected (more testing to do). Only quickly scanned the changes but is the only signal that an acceptance was "sign in place" that the action log shows the actor is the admin and the target is the user? I feel like we should note that in the database. We've been bit in the past where we want to implement a feature but are missing some data from the past that would make it 100% easier to do. |
|
working on it |
|
still working on it, still have to go through some of the other items than assets, but looks good so far ...back at it in the am |
|
@marcusmoore I think I mentioned that in the PR description (novel that it was). I don’t mind it only because it makes it clear that it was a sign in place, and perhaps more importantly, which admin used it. The acceptance itself is a separate action log entry, so the admin being the one who did it seems kind of okay? I’m definitely willing to argue about that tho. I went back and forth, so I can easily be convinced that I’m wrong. |
|
One thing I noticed here - we have a Part of me wonders if we should just remove that from the admin settings. :-/ |
|
Okay, now I'm confusing myself lol We kind of have 3 different levels of "acceptance". I think the "Require signature" one in admin settings means you have to actually sign for the thing, versus just accepting the EULA without a signature. Whew. |
|
I've tested all the possibilities you had in the description, everything looks like it is working as intended I thought I had put my comment in last night already, I finished it yesterday |
Okay, this definitely needs some additional testing, but this should introduce the ability to check a checkbox on the checkout screen which adds in an interstitial that lets the user sign during the checkout process.
I had initially written this so that the full acceptance attribution would go to the signing user, but I decided that having the admin be the "actor" here with the target being the signing user and the item being the thing they're signing for kinda makes more sense, since you'll know that was an in-place acceptance/signing, but the EULA still shows up under the users' EULAs - and because it still ties it back to the admin who allowed the sign in place, so there's still accountability if an admin is trying to get froggy.
If you do check the "sign in place" checkbox, it will remember the state. I chose this because if your workflow tends to need sign-in-place, you probably want that most of the time, and it would be tedious and error prone to have to check that box every time.
It will also remember the state of the redirect you've picked in the actual "Go to" dropdown next to the checkout save button, so that after the item has been accepted or rejected, you still continue on to the final destination you wanted to be in.
It will also skip the "You have been assigned an item" email, since they're standing right there and they know they've been assigned a thing.
This will require some pretty extensive testing, but I think this gets us pretty close to the original ask.
There's some dumb variable stuff that PHPstorm encouraged me to do that I don't love but kinda didn't want to fight with my IDE about. (
$currentUseralways beingauth()->user()seemed like it made it extraneous to be, but PHPStorm insisted it was because of type enforcement. Sure, okay. Fine.)Things to Test
Fixes #8414 and #3750