Closed Bejoty closed 10 years ago
Not too much to worry about at this point, but to make sure I understand what's happening behind the scenes, the commission request object is the one with an "old" and a "new" state, correct? Only one is filled out with this form, and the other is iterated upon review and revision?
Yes, a commission request object has the "old" and "new" state. When this form is filled out and submitted, only the "new" state will have anything, while the old one will be nil (null). When the review and revision process happens, the one that was "new" will be moved to "old", and there will be a new "new" after a single revision. After a second revision, the "old" one will be dropped, the one that was "new" after the first revision will be made "old", and the latest revision will become the "new".
It's easier to diagram out, but my ascii art isn't that great.
Alright, that makes sense. And when the artist sends the revision suggestion and final price (the latter what we just spoke about this morning), is that associated with the current "new" state as well?
When the artist sends the revision suggestion and final price, the "new" state will be the json with the category, all the steps (including final) and their choices, the final step will be the artist's revision, and the price stored will be changed to reflect the artist's revised price.
Okay, feel free to edit this if I have it wrong.
After Request
NEW: { request data; estimated price; customer specification }
OLD: nil
After Review
NEW: { request data; revised price; artist revision suggestion }
OLD: { request data; estimated price; customer specification }
After Revision
NEW: { request data; revised price; new customer specification }
OLD: { request data; revised price; artist revision suggestion }
Haha, beat me to posting something similar. Yeah, that's how it is :)
Posting my example anyways because it was nearly done and it demonstrates everything in the JSON. This is the JSON created when the commission request is created. JSON 1: { "name" : "My commission category", "steps" : [ { "name" : "step 1", "choice" : "line art" }, .... } ] "final" : "With A, B, and C" "price" : "$20" }
This is the JSON that will be created when the artist posts a revision JSON 2: { "name" : "My commission category", "steps" : [ { "name" : "step 1", "choice" : "line art" }, .... } ] "final" : "With just A and B. Maybe D?" "price" : "$17" }
This is the JSON that will be created when the commissioner submits a revision JSON 3: { "name" : "My commission category", "steps" : [ { "name" : "step 1", "choice" : "line art" }, .... } ] "final" : "Alright, A, B, and D" "price" : "$17" }
JSON 1 is "new" until the artist revision comes in. When the artist revision is made, we have JSON 2 as "new" and JSON 1 becomes "old". When the commissioner makes a revision in return, JSON 3 becomes "new" and JSON 2 becomes "old" while JSON 1 drops off the face of the earth.
Oh beautiful. Haha, good we're on the same page then!
I just pushed some clean up code for the request page JS, and added a placeholder paragraph for the artist prompt. Where's the prompt currently living on the settings/template object? Or where is it going to live?
I just pushed an edit to the commission settings controller that added the prompt to the json. It's currently living at the upper level with "name", "steps", and "final".
By the name of "prompt"
Sure that's not the request object? This is going to be the JSON that has the list of categories at its root. Though I may also have just confused myself.
What I do know is that I'm talking about a Settings page implementation on the Request issue, so I'm already not even following my organization, hah.
Er, sorry, I did put it in the right place, ignore the "final" I mentioned. I added the "prompt" at the same level as "name" and "steps" though, which, theoretically, is under the category.
Good :)
Wow touch screen. Aaaaack I'm not doing well with this 3hrs of sleep.
Okay then! DEFINITELY got you on the prompt location.
Pushing a hopefully functional prompt retrieval and submission shortly. I completely rearranged the settings JS file with a new and better format, so the diff will be something to the tune of all of the lines.
Okay, sounds good!
Pushed! Details here #222
Getting the prompt field on the request page next.
So it seems like the added steps and options are not actually being posted (they aren't listed in the params I am getting from the front end as an option-0-2-1).
Yup, that's the bulk of what I need to finish up on the settings page. Not particularly easy scripting....
Just verified that the prompt appears on the request page, and that the final step is successfully stored (by viewing on the review page).
Okay, just wanted to confirm what was and wasn't implemented :)
Alright, that makes this page good to go for flow. On to Review? #172
AH WAIT, price. Should that be something I submit, or is server code taking care of the price estimate at this phase?
Server code will be taking care of the price. I'm working on that now.
Fantastic. I'll get started on updating the review page.
Added "price" to the blob :) 57a02a7
Awesome, I'm going to run for food before the stores close, but I should be back in about a half hour for more fun stuff.
I pushed the review page super quick, so hopefully I didn't miss something broken.
Page is fully functional! At this point, just need to do some basic form validation: #182
Putting the finishing touches on the commission settings view.
Stitch in the Final Stepdisplay prompt from artiststore response in commission objectStore estimated price in commission object (sum of options)Settings Request Review Revision (Payment) Progress