QueryJane || Close job offers - Edit job offers.
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.
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:
Job offer detail:
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:
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:
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:
Job offer detail:
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:
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:
The Apply
button will be disabled in the closed job offers:
Active job offer:
Closed job offer:
The detailed code changes related to this feature can be found in this commit and in this PR.
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
Hey @kit.andres I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
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]