Coder Social home page Coder Social logo

ccit-portal's Introduction

CCIT Portal

Contains the Complaint Portal for Internet Related Problems in BPHC.

Contributing

See CONTRIBUTING.md.

ccit-portal's People

Contributors

aviral14 avatar kushagra-0801 avatar 0xvikas avatar dependabot[bot] avatar iamkroot avatar

Stargazers

Manohar Reddy avatar

Watchers

James Cloos avatar Pranjal Gupta avatar

ccit-portal's Issues

Issue with Bhavan name

1.The register complaint form is not sending bhavan name to the backend.It just sends the room number.
2.Display Bhavan name to users and staff at all places with the complaints.
3.Don't display urgency and urgency reason to users while showing them their complaints.

Bug: Problems in Templates

Code Quality Issues

  1. Tags are not balanced
  2. Inheritance is not used
  3. Reverse lookup is not used in many places
  4. Url field in unblock request form does not call the checkurl function
  5. Id attribute is same for a lot of elements
  6. Client side validation is sorely missing
  7. Input type time and date are not supported in firefox and need to be changed to some other form.
  8. Complaint resolution by staff and list of complaints of user, both are different things, and need to stay different
  9. There are a lot of junk files, like login1.html, login11.html, previous-request-old.html etc

Bug:Forms not getting submitted

In the html and js files the values for category Wifi should be WF(given in the models) and likewise.
Apply these changes for the unblock request form also

Error while Resolving tickets as staff

Request information:
image

Environment:

Request Method: POST
Request URL: http://localhost:8000/complaints/resolve-tickets/

Django Version: 2.2.4
Python Version: 3.7.2
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.google',
'users',
'complaints',
'pages',
'widget_tweaks']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']

Traceback:

File "C:\Users\deepak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\handlers\exception.py" in inner
34. response = get_response(request)

File "C:\Users\deepak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\handlers\base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)

File "C:\Users\deepak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\handlers\base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "C:\Users\deepak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\auth\decorators.py" in _wrapped_view
21. return view_func(request, *args, **kwargs)

File "C:\Users\deepak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\auth\decorators.py" in _wrapped_view
21. return view_func(request, *args, **kwargs)

File "C:\Users\deepak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\auth\decorators.py" in _wrapped_view
21. return view_func(request, *args, **kwargs)

File "C:\Users\deepak\Downloads\ccit\ccit-portal\complaints\views.py" in handle_complaint
95. form_obj.save()

File "C:\Users\deepak\Downloads\ccit\ccit-portal\complaints\models.py" in save
65. self.avail_start_time.hour + 1,

Exception Type: AttributeError at /complaints/resolve-tickets/
Exception Value: 'NoneType' object has no attribute 'hour'

Update models.py

1.Set proper category names to be displayed to the user and also to be stored in the database.
2.Remove CATEGORY_4

Codebase is not PEP8 Compliant

The current code deviates from the PEP8 Guidelines in some cases (class names, line length exceeding 88 chars, etc.) Run the project files through black formatter, and go through PEP8.

Bug: Multiple issues

  1. Navbar is broken on some pages
  2. URL helper function (the one that adds a protocol in its absence) is not working
  3. HTML is broken on a lot of pages
  4. Remarks to user is an editable text field
  5. Cancel button appears above the table in user's my complaints
  6. My complaints does not show the url unblock requests.

Issues with validations both in frontend and backend

1.Complaints at odd times eg 2 am to 6 am being accepted.
2.Complaints with Sundays and saturdays as availbility days being accepted.
3.Complaints with avail_time on the same day before filing the complaint being accepted.

Minor Fixes required in frontend

1.The pop up hides the validation error messages.
To fix this make it such that the pop up comes up when the user selects the complaint category.
2.There is no validation in the frontend that the room number must be an integer field.
3.For the staff and nucleus members it still displays 'My complaints' in the All complaints Tab

[bugs] Issues with backend validations

1.No complaint can be cancelled,resolved etc as there is a bug in validation
2.Improper validation message is shown when user fills up the unblock request form incorrectly.

New changes in frontend

  1. Create a separate tab for URL unblock requests.
  2. Add Issue taken up by option.
  3. Add Verify option for nucleus team.
  4. Change Tab names for staff ( My Complaints to All complaints etc.)

Change client side regex to match the one used in the backend

  1. The regex used in main.js to validate contact number is different from the one used in backend. Change the one in main.js to match the PHONE_REGEX in Complaint model.
  2. The function checking for protocol presence in url only checks for http and https. Change it to check for any protocol (just check for ://, don't worry if the protocol is valid or not).
  3. There are some useless comments in ('#option').change. Remove them.

Bad Handling of issues

1.No message when staff/nucleus performs some action
2.Wrong Sorting of Unblock Requests
3.No proper display of who cancelled the issue to the user

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.