mikeymicrophone / commissulator

Commissulator is a set of tools that help Real Estate Agents working with Citi Pads in Manhattan streamline their paperwork.
Other
3 stars 4 forks source link

Pie chart of commission split within the team #8

Closed mikeymicrophone closed 5 years ago

mikeymicrophone commented 5 years ago

A commission is divided between all the agents who assist on a deal. The portion that each one gets is configured based on their role and involvement, and what package of roles is in use for that deal.

The deal page shows the various stages of how the deal gets broken down, and how much the agents get paid. The labels on this page need to be closer to the numbers, and we'd like to have a pie chart comparing the payouts.

A great charting library using HTML5, SVG, or JS should be brought to the task. Pie charts are a good place to start but not the only ones of interest.

The commission has two types of attached agents. Agents on this team are attached via assists, and agents can also be named as co-brokers and saved in the record. Right now the agents on the team are the only ones in the pie chart. Making that flip back and forth would be even better. But that will possibly lead into the refactor of how co-brokers are stored, and how the split is configured.

mikeymicrophone commented 5 years ago
screen shot 2018-10-26 at 3 31 40 pm

This is the current display of the payment breakdown.

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.025 ETH (5.11 USD @ $204.49/ETH) attached to it.

kuhnchris commented 5 years ago

Do you want to have this as reusable as, to say, use d3.js, or is it fine if you use some SVG wrappers? Also, what features are neccessary? For example you could draw a simple piechart with HTML5 , or use a library like https://canvasjs.com/docs/charts/chart-types/html5-pie-chart/ or https://www.chartjs.org/docs/latest/charts/doughnut.html ...

Let me know! -Chris

mikeymicrophone commented 5 years ago

Chris, thanks for jumping in with multiple suggested options. Those look like very plausible libraries.

Our need is for a small amount of reusability. We might have 5 charts throughout the site.

I can see that both of those latter options provide a good display of the figures on hover. Do you think that one or the other is a better choice for integration into Rails?

kuhnchris commented 5 years ago

I think either is fine, especially if it's just UI you want to display. On that note, I did a quick google search and found a rails component for ChartJs, but not for CanvasJS, so if you want to keep the logic in one place you might go with Chart JS.

Example: https://github.com/airblade/chartjs-ror

mikeymicrophone commented 5 years ago

I agree with that. That library looks like a great choice. Consider it approved!

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 3 months, 2 weeks ago. Please review their action plans below:

1) kuhnchris has started work.

As discussed on the github thread, adding ChartJS

Learn more on the Gitcoin Issue Details page.

kuhnchris commented 5 years ago

So, do you have any mock-up how you want this output to look like, since you wrote right now only part of the data is displayed, is there anything special you want to see?

mikeymicrophone commented 5 years ago

I do not. You have a free hand to update the layout, as long as the chart is there to display all the figures returned by this method. https://github.com/mikeymicrophone/commissulator/blob/master/app/models/deal.rb#L29

mikeymicrophone commented 5 years ago

Note the instructions here as well. https://github.com/mikeymicrophone/commissulator/wiki

mikeymicrophone commented 5 years ago

I don't think any credentials are needed for this task. I expect that you will be able to create an environment file, create a credential file, and run the app from there. However, if you need an AWS credential, you can either put one in or contact me to update your credential file.

kuhnchris commented 5 years ago

Hi there - I currently set up a docker container to help me dev. For some reason the "fabricate commisions" is broken, everything else is working... and sadly, whenever I try to add a Commision itself I get an error about address not being valid. image image

Also, the Rollbar API key seems to be hardcoded into the sources somewhere.

mikeymicrophone commented 5 years ago

I think you did not run rake db:seed

Noted about Rollbar.

I can’t get you a credential tonight. Try this. Comment out the Rollbar initialization in the initializer. I can make it work but I want to know how easily it can be deactivated.

On Friday, October 26, 2018, KuhnChris notifications@github.com wrote:

Hi there - I currently set up a docker container to help me dev. For some reason the "fabricate commisions" is broken, everything else is working... and sadly, whenever I try to add a Commision itself I get an error about address not being valid. [image: image] https://user-images.githubusercontent.com/761911/47594582-54ff7500-d97c-11e8-9849-1423542f60ba.png [image: image] https://user-images.githubusercontent.com/761911/47594600-6052a080-d97c-11e8-9dbd-6f6a85926979.png

Also, the Rollbar API key seems to be hardcoded into the sources somewhere.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mikeymicrophone/commissulator/issues/8#issuecomment-433556360, or mute the thread https://github.com/notifications/unsubscribe-auth/AAANc28CVy8i4Y3Cf97TnEU0HStmhS2dks5uo4fUgaJpZM4X25il .

kuhnchris commented 5 years ago

I did run db:seed, but apparently it does not seed the commisions.

Also, trying to make a manual registration causes a failed route exception. image

But I found a way to go to a deal via Toggle -> Assists -> some deal. Now I can start working on this issue. Is there any css/image styling tho? Since all the pages are default white unstyled.

image

Thanks!

kuhnchris commented 5 years ago

I got the basic gist down now - something like this? You want to have the legend always shown? Shall I remove the listing below? Should I show the "icons" (lead, interview, show, close) in the circles aswell? Want me to only show the agent break-out, or also the costs (Inbound commision, ...)? In the same chart or separated? image

Thanks!

mikeymicrophone commented 5 years ago

That looks great. Make a pull request and I'll award the bounty.

mikeymicrophone commented 5 years ago

The js include was not committed to the js manifest. Just FYI. Thanks and I hope you are interested in staying engaged to add more charts, etc! This is exactly the type of help that I wanted, and this type of visual stimulation will be a tremendous asset to the team.

kuhnchris commented 5 years ago

Hi there - sure, happy to commit some more for you. I also prepared a docker branch on my fork, so you can actually have people setup their own Docker environment to try/play/test/dev. I didn't include the manifest on purpose, because if the chartjs will be updated it will automatically pull the new manifest from the source. The easiest would be to simply re-load the gems from the bundle, as I added the chartjs-ror in the Gemfile. ;-)

All the best Chris

gitcoinbot commented 5 years ago

⚡️ A tip worth 0.00000 ETH has been granted to @spiegeleixxl for this issue from @mikeymicrophone. ⚡️

Nice work @spiegeleixxl! Your tip has automatically been deposited in the ETH address we have on file.

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 0.025 ETH (5.13 USD @ $205.05/ETH) attached to this issue has been approved & issued to @spiegeleixxl.

mikeymicrophone commented 5 years ago

Saving this here for reference. https://twitter.com/jayvanbavel/status/1060543214665564161