QueryJane | Companies rating system

in #utopian-io7 years ago

Repository

https://github.com/roadhousestudio/queryjane_app

QueryJane is a web application developed with Django that allows to connect with companies and experts in different sectors of the cannabis industry. Beta version is available here.


Screen Shot 2018-02-03 at 10.23.10 PM.png

New Features

This new feature is a rating system that allows users to leave a feedback about registered companies. This is a typical "five stars" bases feedback. Only users that are not administrators of a company can score it. Take a look to the new model:

source


Screen Shot 2018-05-06 at 10.23.33 AM.png

When a user scores a company, a new instance of this model is created.

I have created a custom permission to allow only some users to score companies:

source


Screen Shot 2018-05-06 at 10.00.17 AM.png

As you can see, non-authenticated users and company administrators can't add a score to a company, and if a user has added a feedback previously about a company, he can't add a new feedback to the same company.

I have integrated rateyo, a jQuery star rating plugin. When an authenticated user visits a company detail page, he will see given rating by the users, and the new button "Rate this company":


Screen Shot 2018-05-06 at 10.28.05 AM.png

By clicking the "Rate this company" button, a modal with the starts plugin form will be displayed:


Screen Shot 2018-05-06 at 10.29.56 AM.png

Here, user can add his rating score for the company and it will be submitted using ajax to the following view:

source


Screen Shot 2018-05-06 at 10.32.23 AM.png

Here, a new instance of the CompanyScore model is created, and a response with a custom message and the new company score rating is sent back.

The new total company rating is immediately updated once the user has submitted the stars form.

If our user scores the company with 5 stars, the score rating below the company picture is updated:


Screen Shot 2018-05-06 at 10.37.55 AM.png

If other user rate the same company with 1 star, the new score average is updated in the ajax response:


Screen Shot 2018-05-06 at 10.40.02 AM.png

Code changed related to this feature can be found in this PULL REQUEST

Proof of Work Done

Github account: https://github.com/aaquirogal



Screen Shot 2018-02-03 at 10.23.10 PM.png


How to contribute?

QueryJane has been developed using the Django framework. You can fork the project, and run it locally is very easy. Follow the steps described in the open source repository installation guide. The project has been configured using Docker. you only need to install Docker and follow these steps.

Future work.

Take a look to our public trello board. This is the easiest way to know our roadmap.

The project needs some Front end adjustments as priority work now, I have been talking with @cunigarro about it. He will work in some specific sections: Gulp optimization, static files compression and minor adjustments in the front end.

I'll be a bit inactive on the development side now. There is only some backend pending features, that I will include in one new pull request next days and I will be sharing with you. I will focus in some legal requirements next days, and, after that I will create a new task request in the graphics category, to integrate a new member to the project from the Utopian community. These final requirements will allow us make the jump from the beta version to the official version.

If you want to contribute, please join my Discord.


Have happy days ✌

Sort:  

Thanks for the contribution. It has been approved.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Hey @kit.andres

We're already looking forward to your next contribution!

Contributing on Utopian

Learn how to contribute on our website or by watching this tutorial on Youtube.

Utopian Witness!

Vote for Utopian Witness! We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.

Want to chat? Join us on Discord https://discord.gg/h52nFrV

Consider companies where people get pressured to upvote their own company and gets fired afterwards. Like two or three months later. This happens a lot on platforms like kununu etc. Shouldn't they be able to adjust their rating? Or did I missed something?

Hi. Yes, you're right. Users should be able to adjust their rating. I will take care of this in next days. Thank you so much for your feedback.

Cool. Hope you did not missunderstood my post. It was meant to be a constructive criticism but my english isn't that good so it may sound a bit wierd ;)

Coin Marketplace

STEEM 0.22
TRX 0.27
JST 0.041
BTC 103752.36
ETH 3842.24
SBD 3.32