japacible / commission-me

Platform for commissioners and buyers to connect and finalize sales.
http://commissionme.herokuapp.com/
4 stars 3 forks source link

Commission Request Page #223

Closed Bejoty closed 10 years ago

Bejoty commented 10 years ago

Putting the finishing touches on the commission settings view.

Settings Request Review Revision (Payment) Progress

Bejoty commented 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?

jbrodhacker commented 10 years ago

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".

jbrodhacker commented 10 years ago

It's easier to diagram out, but my ascii art isn't that great.

Bejoty commented 10 years ago

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?

jbrodhacker commented 10 years ago

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.

Bejoty commented 10 years ago

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 }
jbrodhacker commented 10 years ago

Haha, beat me to posting something similar. Yeah, that's how it is :)

jbrodhacker commented 10 years ago

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.

Bejoty commented 10 years ago

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?

jbrodhacker commented 10 years ago

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".

jbrodhacker commented 10 years ago

By the name of "prompt"

Bejoty commented 10 years ago

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.

Bejoty commented 10 years ago

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.

jbrodhacker commented 10 years ago

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.

jbrodhacker commented 10 years ago

Good :)

Bejoty commented 10 years ago

Wow touch screen. Aaaaack I'm not doing well with this 3hrs of sleep.

Okay then! DEFINITELY got you on the prompt location.

Bejoty commented 10 years ago

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.

jbrodhacker commented 10 years ago

Okay, sounds good!

Bejoty commented 10 years ago

Pushed! Details here #222

Getting the prompt field on the request page next.

jbrodhacker commented 10 years ago

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

Bejoty commented 10 years ago

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

jbrodhacker commented 10 years ago

Okay, just wanted to confirm what was and wasn't implemented :)

Bejoty commented 10 years ago

Alright, that makes this page good to go for flow. On to Review? #172

Bejoty commented 10 years ago

AH WAIT, price. Should that be something I submit, or is server code taking care of the price estimate at this phase?

jbrodhacker commented 10 years ago

Server code will be taking care of the price. I'm working on that now.

Bejoty commented 10 years ago

Fantastic. I'll get started on updating the review page.

jbrodhacker commented 10 years ago

Added "price" to the blob :) 57a02a7

Bejoty commented 10 years ago

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.

Bejoty commented 10 years ago

Page is fully functional! At this point, just need to do some basic form validation: #182