japacible / commission-me

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

Commission template form should update all categories when posted #225

Closed kcorman closed 10 years ago

kcorman commented 10 years ago

Working with @Bejoty on this today, will hopefully be a trivial change.

kcorman commented 10 years ago

@jbrodhacker I told you I'd keep you up to date on this, so here's what's up: I made a few changes here 2126898 on a seperate branch. I'm not going to request a code review until I test it with some client-side code. Thankfully I just finished my AI homework so I may have some time tomorrow evening to look at this. Of course if you feel inclined and @Bejoty finishes client code, feel free to hook it up yourself.

@Bejoty how's the amazon thing going? I hope it worked out! Anyway, would you be able to push any client code changes you make to wip-commissions-template-fix? Then we can test them out and get them working together before merging into wip-commissions

jbrodhacker commented 10 years ago

Okay, thank you for the update! :)

Bejoty commented 10 years ago

Amazon customer service was fantastic, as I have always heard and I had hoped was true. The $350 charge still went through but an refund should be issued within the week.

I committed be044d66612b8b061c6c8337661b0f6a2adf921b before seeing your message about the other branch. Hopefully that's not a problem. The new form format is ready, but since I rearranged everything, the final bit of scripting to update the form names still needs to happen (and I have time tonight).

All adding and removing is functional though, so that's cool. After I get the form name updates working, that will get rid of a LOT of redundant JS code and make it more readable.

Bejoty commented 10 years ago

Submitting the form doesn't update anything at the moment. I want to assume that some server code needs to change, but it could easily be caused by moving the form element from JS to the HTML file.

Either way, it's ready to look at, and I think @kcorman is helping with this side of things?

I can push to your separate branch if that's where the server code is at the moment.

Bejoty commented 10 years ago

Woot! Finally nailed the right syntax to parse the page. I have it all down in pseudo-code right now, and I'll finish this up after dinner. I'm excited to finally have the settings page be dynamic, haha.

Bejoty commented 10 years ago

5a8c055f71ee2b682df7318c75e65c2e2e51aedf

Dynamic updating is a success! Or so I think. Bugs are likely hiding out somewhere. Currently updated on wip-commissions.

kcorman commented 10 years ago

Okay, I updated the controller code again in ae3678f so that it properly grabs the categories and steps. I merged it into wip-commissions and pushed, commit dc3cafc. If anyone feels like testing that would be awesome, otherwise I'll get to it tomorrow morning.

kcorman commented 10 years ago

I gave it a whirl with a few general cases (creating a category, updating a category, etc.) and it seems to function great. I'm actually surprised at how well our code worked together considering that we barely communicated XD. This still needs some edge case testing though.

Also I noticed that the prompt doesn't seem to get pulled on the client side (ie your template has a prompt already but it doesn't show up when you edit your template)

quanc commented 10 years ago

How is the status on this?

Bejoty commented 10 years ago

@kcorman GOOD CATCH! I'll fix that up right now.

Bejoty commented 10 years ago

Actually, I remember this working in an earlier push. I'm currently submitting the prompt with the input name "prompt". Where on the JSON object is this currently sitting?

jbrodhacker commented 10 years ago

When I was looking into this, the front end was only posting one prompt, not all three. I do think that the prompt is being placed in the wrong section on the server side too though (as, if I'm looking at the code right, it's sitting at the same layer in the json as the categories, I could be mistaken though).

Bejoty commented 10 years ago

Yeah, I was grabbing data.categories.prompt before, but that won't make sense now that there's one master form for all categories. I didn't expect the server to be caught up, so we'll just get to that shortly as well.

I'm thinking the prompts will live inside each category in the array (along with the name and the step array).

jbrodhacker commented 10 years ago

That would make the most sense, assuming that each prompt is going to be different

Bejoty commented 10 years ago

Okay, the prompt retrieval now follows that assumption (I think), and pushed to the wip branch for the settings and review JS files. 7463dd3f402295bf2cb94684623d4d16eff0cfc0

quanc commented 10 years ago

What is the status of this?

kcorman commented 10 years ago

This is done.