Copropiedad Integral | Parking module administration

in #utopian-io6 years ago (edited)

Repository

Copropiedad Integral repository

Copropiedad Integral has been created to provide condos (condominiums, horizontal property, co-properties) managers with the necessary tools to manage administration and communication with co-owners and leaseholders in a simple and safe way.

New Features

A condo is a type of real estate divided into several units that are each separately owned, surrounded by common areas jointly owned. One of the common areas that co-owners must share is the parking area. In this update, I have added a way to allow administrators to manage the parking lots assigned to each unit (Apartment, house, office). In other words, I have added the CRUD (create, read, update, and delete) functionalities that allow condominiums administrator to manage the parking lots module.

Create and read parking lots functionalities.

In the unit (Apartment, office, house) detail, I have added a new section called parking lots. Only condominium administrators can access this view.


Screen Shot 2018-06-22 at 11.20.47 AM.png

By clicking the "Add parking lot" button, the following form will be displayed:


Screen Shot 2018-06-22 at 11.22.14 AM.png

The "number - ID" field must be unique. Is not possible to register two parking lots with the same number. The "parking lot type" field is to select if the parking lot is owned by the unit, or if the parking lot is leased, because in some cases, a resident can have more than one vehicle, and there is only a parking lot owner by the unit. In these cases, the unit resident must lease a parking lot owned by another person.

Created parking lots will be visible in the unit detail page:


Screen Shot 2018-06-22 at 11.25.46 AM.png

Detailed code changes can be found in this commit.

Update parking lots.

Created parking lots can be easily updated by the condominium administrators. In the parking lots list assigned to an unit, visible in the unit detail, administrator can click the "Edit" button:


Screen Shot 2018-06-22 at 11.25.46 AM.png

By clicking this button, users will be redirected to the parking lot edit form:


Screen Shot 2018-06-22 at 11.27.10 AM.png

After to edit a parking lot, administrators will be redirected to the unit detail.

Detailed code changes can be found in this commit

Delete parking lots.

Created parking lots can be easily deleted by the condominium administrators. In the parking lots list assigned to an unit, visible in the unit detail, administrator can click the "Delete" button:


Screen Shot 2018-06-22 at 11.25.46 AM.png

By clicking this button, administrators will be redirected to the delete parking lot confirm view:


Screen Shot 2018-06-22 at 11.29.54 AM.png

Users must confirm if they are sure about delete a parking lot definitely. By clicking the "Yes, delete definitely" button, the parking lot will be removed and the user will be redirected to the unit detail.

Detailed code changes can be found in this commit

Roadmap

With the help of the company http://www.servisolucionesph.com/, we have designed a group of basic functionalities to implement in next days:

  1. parking information.
  2. pet information management.
  3. Vehicles information management.
  4. Domestic worker information management.
  5. Authorized visitors information management.
  6. Owner and leaseholders data update.
  7. Make a reservation for rent Social Hall or Auditoriums.
  8. Generate financial and administrative reports for consultation at the Ordinary or Extraordinary Assembly.
  9. Information Documents (Cleaning Awareness, Recycling Campaigns, Portfolio Collection, documents of Coexistence).
  10. Attach fixed documents of the co-ownership for permanent consultation (Coexistence Manual, Horizontal Property Regulation, Administration Attention Schedules, Rental Schedules, Rental Costs ...).
  11. Providers database.
  12. Online voting.
  13. Sending of Mass Collection Accounts through e-mail.

These activities has been added to our public trello board.

How to contribute?

Copropiedad Integral 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.

If you want to contribute, please join my Discord

GitHub Account

https://github.com/aaquirogal

PR


Have happy days ✌

Sort:  

Thanks for the contribution, @kit.andres! The ParkingLot classes seem to share some functions, so I was wondering if there isn't a better way to do implement them to prevent this (I am not sure, just thinking out loud!)?

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


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

Hi @amosbastian. I took your recommendation to make a code refactoring of the buildings application views. therefore, I have taken the views.py file and I have split this into different files, depending on the specific modules that are being worked on. Here is the commit for these changes. This if to avoid a very long file (thousands of lines) with different modules functionalities. There are still many pending modules that should be included in this section.

Trying to find parts of code that can be reduced to common functions to reduce repetitive code, I have found that the process of the formsets (owners formset and leaseholders formset) in the Unit form, and in the update unit form can be reduced to a common function. In this commit are the code changes related to this update.

About the shared functions in the ParkingLot classes, I suppose you're talking about the def test_func(self):, or about the get_object(self, queryset=None): functions, per example. I tried to find a way to reduce it. All the classes defined in the ParkingLots module are inheriting their structure from the Django generic views (CreateView, UpdateView, DeleteView). These methods are inherited from Django, and have some specific function. Per example, the def test_func(self):should be overwritten to define the user permission. If this method returns False or None, a 403 forbidden error will be raised. The get_object(self, queryset=None): method is used for example, in an UpdateView to define the object that must be instanced in the form, in a DetailView to define the object that we want to show, and in a DeleteView to define the object that we want to delete. So, they are methods that must be defined in each class view. A way to reduce it could be to create a new class and define there the common methods in our classes, and define the classes inheriting from this new class, but I think that it only will be practical if our classes inherit from the same Django class based view. Per example if all classes in the ParkingLot module are inherited from the UpdateForm class, but all ParkingLot classes are inherited from different classes. Also, in this methods there are variables that depends of the url parameters, and the parameters are different in some views.

I can't find an efficient way to reduce it, but I will be ready to listen to all suggestions ;). Thank you sr, now the code is much better and more organized.

Hey @kit.andres
Here's a tip for your valuable feedback! @Utopian-io loves and incentivises informative comments.

Contributing on Utopian
Learn how to contribute on our website.

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

Vote for Utopian Witness!

Hey @kit.andres
Thanks for contributing on Utopian.
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.

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

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.19
TRX 0.16
JST 0.032
BTC 63891.49
ETH 2753.67
USDT 1.00
SBD 2.66