From 5ab18adea6cc455957728766ada220ea17754b40 Mon Sep 17 00:00:00 2001 From: VARUN Date: Wed, 5 Feb 2025 12:54:35 +0530 Subject: [PATCH] settings.py --- skyonnweb/skyonnweb/settings.py | 4 +- skyonnweb/templates/user/Messages.html | 111 +++++++----------------- skyonnweb/templates/user/dashboard.html | 18 ++++ skyonnweb/user/models.py | 2 +- 4 files changed, 54 insertions(+), 81 deletions(-) diff --git a/skyonnweb/skyonnweb/settings.py b/skyonnweb/skyonnweb/settings.py index b9b47c1..9862a75 100644 --- a/skyonnweb/skyonnweb/settings.py +++ b/skyonnweb/skyonnweb/settings.py @@ -70,7 +70,7 @@ TEMPLATES = [ }, }, ] -WSGI_APPLICATION = 'skyonnweb.wsgi.application' +# WSGI_APPLICATION = 'skyonnweb.wsgi.application' # Database @@ -82,7 +82,7 @@ DATABASES = { 'NAME': 'skyonn4', 'USER': 'root', 'PASSWORD': '', - 'HOST': '34.93.75.170', + 'HOST': 'localhost', 'PORT': '3306', 'OPTIONS': { 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", diff --git a/skyonnweb/templates/user/Messages.html b/skyonnweb/templates/user/Messages.html index 2504bc2..842010b 100644 --- a/skyonnweb/templates/user/Messages.html +++ b/skyonnweb/templates/user/Messages.html @@ -209,47 +209,23 @@ input { outline: none; } - - - - - - - - - - - - - - - - - - - - - - - - .compose-button.discard:hover { background-color: red; } -/* Style for the whole button */ .sidebar__compose { text-transform: capitalize; color: gray; padding: 15px; border-radius: 20px; background-color: white; - display: flex; /* Flexbox ensures horizontal alignment */ - align-items: center; /* Vertically aligns items */ + display: flex; + align-items: center; cursor: pointer; outline: none; border: none; + color:black; box-shadow: 0px 2px 5px -2px rgba(0, 0, 0, 0.75); } @@ -257,7 +233,8 @@ input { .sidebar__compose .material-icons { margin-right: 8px; /* Add space between the icon and text */ vertical-align: middle; /* Ensures the icon is vertically aligned with text */ - font-size: 20px; /* You can adjust the size of the icon here */ + font-size: 26px; + color:black; } /* Style for the hover effect */ @@ -339,7 +316,10 @@ cursor:pointer; .email-input-container { position: relative; /* The dropdown will be positioned relative to this container */ } - +.emailRow:hover { + border-top: 1px solid whitesmoke; + box-shadow: 0 4px 4px -2px rgba(0, 0, 0, 0.24); +} #BackToInboxButton { margin-bottom: 10px; background: none; @@ -421,21 +401,15 @@ cursor:pointer;
{% csrf_token %} - -
+
+
- -
- -
- -
-
- - -

Messages

+
+
+
+

Messages

- diff --git a/skyonnweb/templates/user/dashboard.html b/skyonnweb/templates/user/dashboard.html index 80ba3de..4b7763d 100644 --- a/skyonnweb/templates/user/dashboard.html +++ b/skyonnweb/templates/user/dashboard.html @@ -348,6 +348,24 @@ a { // messages // +document.addEventListener('DOMContentLoaded', function() { + const userId = document.getElementById('user_id').value; + fetch(`/unread_message_count/?user_id=${encodeURIComponent(userId)}`) + .then(response => { + if (!response.ok) { + throw new Error(`HTTP error! Status: ${response.status}`); + } + return response.json(); + }) + .then(data => { + console.log("unread count", data); + return data + }) + .catch(error => { + console.error('Error fetching main message ID:', error); + }); +}) + function findMainMessageId(message_id) { console.log(message_id); const userId = document.getElementById('user_id').value; diff --git a/skyonnweb/user/models.py b/skyonnweb/user/models.py index 412e6f2..365174a 100644 --- a/skyonnweb/user/models.py +++ b/skyonnweb/user/models.py @@ -77,7 +77,7 @@ class JobPosting(models.Model): StartDate = models.DateField(null=True) CloseDate = models.DateField(null=True) - BudgetMin = models.CharField(max_length=20,null=True) + BudgetMin = models.DecimalField(max_length=20,null=True) timePeriod = models.CharField(max_length=20,null=True,blank=True) minAmount = models.CharField(max_length=20,null=True) maxAmount = models.CharField(max_length=20,null=True)