QueryJane || Close job offers - Edit job offers.

in #utopian-io7 years ago (edited)

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-26 at 11.58.56 PM.png

In order to finish the basic company administration module, I have added two new functionalities to manage the job offers section. Let me show you.


New Features

Users can edit job offers.

Now company administrators can edit created job offers. Administrator can edit a job offer by clicking the Edit job offer button in the "Job offers list" section in the company administration module, and by clicking the Edit job offer button in the "job offer detail" view.

Job offers list for in the administration module:


Screen Shot 2018-02-27 at 12.18.22 AM.png

Job offer detail:


Screen Shot 2018-02-27 at 12.19.29 AM.png

Only company administrators have permission to access the "Job offers list" view in the administration module. But, the "Job offer detail" view is visible for all users, authenticated and non-authenticated users. For this reason, to prevent any user to view the Edit job offer view, I have created a special permission used to show/hide the link and to manage post or get request to the "Edit job offer" view. Take a view to the permission code:


Screen Shot 2018-02-27 at 12.25.44 AM.png

It prevents from non-authenticated users to access job offer edit function, prevents to edit inactive job offers and allows only company administrators to access views protected with this permission.

Take a look to the job offer edit form:


Screen Shot 2018-02-27 at 12.30.39 AM.png

To implement it, I have used the generic class-based views provided by Django, specifically the UpdateView class, that allows to generate a basic editing form of an existing object. Country and city fields are integrated with the typeahead.js library.

Detailed changes related to this feature can be found in this commit.

Close job offers.

Company administrators can change job offers status from active to closed. If a job offer is closed, users can no longer apply. At the same way that the "Edit job offer" button, "Close job offer" button has been added in the "Job offers list" section in the company administration module, and in the "job offer detail" view.

Job offers list:


Screen Shot 2018-02-27 at 12.48.36 AM.png

Job offer detail:


Screen Shot 2018-02-27 at 12.49.31 AM.png

I have integrated jquery-confirm, a very nice library that allows to create confirmation dialogs before executing an action using Javascript. By clicking the Close job offer button, users will see the following confirmation message:


Screen Shot 2018-02-27 at 12.52.52 AM.png

By clicking the CLOSE button in the confirmation dialog, an ajax request will be sent to the server and the related job offer will be closed. In other words, the job offer status will be changed from active to inactive. Job offer status is always displayed:


Screen Shot 2018-02-27 at 12.55.56 AM.png


Screen Shot 2018-02-27 at 12.56.55 AM.png

The Apply button will be disabled in the closed job offers:

Active job offer:


Screen Shot 2018-02-27 at 12.59.44 AM.png

Closed job offer:


Screen Shot 2018-02-27 at 1.00.26 AM.png

The detailed code changes related to this feature can be found in this commit and in this PR.



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.

  • Activate Spanish site.
  • Users dashboard with latest updates.
  • Advertising campaign.

If you want to contribute, please join my Discord.


Have happy days ✌



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Hey @kit.andres I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Thank you for the contribution. It has been approved.

You can contact us on Discord.

[utopian-moderator]

Coin Marketplace

STEEM 0.19
TRX 0.18
JST 0.034
BTC 89118.52
ETH 3131.33
USDT 1.00
SBD 2.76