gabrum avatar

Redirecting Messaged and Admin Functionality in Badgeyay

gabrum

Published: 22 Jun 2018 › Updated: 22 Jun 2018Redirecting Messaged and Admin Functionality in Badgeyay

Redirecting Messaged and Admin Functionality in Badgeyay

Repository

https://github.com/fossasia/badgeyay

About the Project

Badgeyay is a badge generator that allows the user or event manager to create badges without any hassle. All you need to do is provide us with the images and the data that you want on the badges and Badgeyay will do the rest and generate thousands of badges for you within minute(s).

New Features

What new feature(s) did you add?

  • I worked on adding the redirecting feature to the my-badges component of Badgeyay. The my-badges component of badgeyay shows the badges produced by the user. If incase the user has never produced any badges or has just signed up, then the component was coming as blank. Now if the user has zero badges produced then the component shows a redirecting message to the create-badges component. I've also updated the dependencies to avoid future problems.

No message incase of any badges generated
pr976.png

The message is shown in case of 0 badges generated :-
pr976-b.png

  • I also worked on adding the admin functionality to the backend of badgeyay. An admin must be allowed some features like getting all files, statistics of all users registered so far, statistics of the badges produced and much more. I also created a route for registering new admins from the backend.

A screenshot of the register admin api
pr989.png

How did you implement it/them?

  • At first I worked on adding the redirecting message to badgeyay frontend. For that I needed to understand basics of EmberJS. Then I worked my way around models and controllers. Finally I used the handlebars templating engine to create a condition which checks if the badges produced array is empty or not. If it is empty then no badges have been produced and hence the message must be shown.
  • Then I worked on adding the admin functionality to backend. I started off with making SQLAlchemy models alongside the marshmallow_jsonapi schemas for the admin. Then I created a route and incorporated the models and schema into it, thereby completing the registering functionality

Contributions

Pull Requests linked with this work are #976 & #989

My Github Profile : https://github.com/gabru-md

Leave Redirecting Messaged and Admin Functionality in Badgeyay to:

Written by

Read more #utopian-io posts


Best Posts From gabrum

We have not curated any of gabrum's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From gabrum