├── Images ├── GSMS01.jpeg ├── GSMS02.jpeg └── Backend.jpeg ├── Grocery Store Management System ├── backend │ ├── __pycache__ │ │ ├── uom_dao.cpython-311.pyc │ │ ├── orders_dao.cpython-311.pyc │ │ ├── products_dao.cpython-311.pyc │ │ └── sql_connection.cpython-311.pyc │ ├── sql_connection.py │ ├── uom_dao.py │ ├── products_dao.py │ ├── server.py │ └── orders_dao.py └── ui │ ├── images │ └── alan-alves-yUtPwsEau8I-unsplash.jpg │ ├── js │ ├── custom │ │ ├── dashboard.js │ │ ├── common.js │ │ ├── order.js │ │ └── manage-product.js │ └── packages │ │ └── bootstrap.min.js │ ├── css │ ├── sidebar-menu.css │ └── style.css │ ├── index.html │ ├── manage-product.html │ └── order.html └── README.md /Images/GSMS01.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharudattaGhute/Grocery-Management-System/HEAD/Images/GSMS01.jpeg -------------------------------------------------------------------------------- /Images/GSMS02.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharudattaGhute/Grocery-Management-System/HEAD/Images/GSMS02.jpeg -------------------------------------------------------------------------------- /Images/Backend.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharudattaGhute/Grocery-Management-System/HEAD/Images/Backend.jpeg -------------------------------------------------------------------------------- /Grocery Store Management System/backend/__pycache__/uom_dao.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharudattaGhute/Grocery-Management-System/HEAD/Grocery Store Management System/backend/__pycache__/uom_dao.cpython-311.pyc -------------------------------------------------------------------------------- /Grocery Store Management System/backend/__pycache__/orders_dao.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharudattaGhute/Grocery-Management-System/HEAD/Grocery Store Management System/backend/__pycache__/orders_dao.cpython-311.pyc -------------------------------------------------------------------------------- /Grocery Store Management System/ui/images/alan-alves-yUtPwsEau8I-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharudattaGhute/Grocery-Management-System/HEAD/Grocery Store Management System/ui/images/alan-alves-yUtPwsEau8I-unsplash.jpg -------------------------------------------------------------------------------- /Grocery Store Management System/backend/__pycache__/products_dao.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharudattaGhute/Grocery-Management-System/HEAD/Grocery Store Management System/backend/__pycache__/products_dao.cpython-311.pyc -------------------------------------------------------------------------------- /Grocery Store Management System/backend/__pycache__/sql_connection.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharudattaGhute/Grocery-Management-System/HEAD/Grocery Store Management System/backend/__pycache__/sql_connection.cpython-311.pyc -------------------------------------------------------------------------------- /Grocery Store Management System/backend/sql_connection.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | import mysql.connector 3 | 4 | __cnx = None 5 | 6 | def get_sql_connection(): 7 | print("Opening mysql connection") 8 | global __cnx 9 | 10 | if __cnx is None: 11 | __cnx = mysql.connector.connect(user='your_username', password='your_password',host="127.0.0.1", database='grocery_store') 12 | 13 | return __cnx 14 | 15 | -------------------------------------------------------------------------------- /Grocery Store Management System/backend/uom_dao.py: -------------------------------------------------------------------------------- 1 | 2 | def get_uoms(connection): 3 | cursor = connection.cursor() 4 | query = ("select * from uom") 5 | cursor.execute(query) 6 | response = [] 7 | for (uom_id, uom_name) in cursor: 8 | response.append({ 9 | 'uom_id': uom_id, 10 | 'uom_name': uom_name 11 | }) 12 | return response 13 | 14 | 15 | if __name__ == '__main__': 16 | from sql_connection import get_sql_connection 17 | 18 | connection = get_sql_connection() 19 | # print(get_all_products(connection)) 20 | print(get_uoms(connection)) -------------------------------------------------------------------------------- /Grocery Store Management System/ui/js/custom/dashboard.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | //Json data by api call for order table 3 | $.get(ordersListApiUrl, function (response) { 4 | if(response) { 5 | var table = ''; 6 | var totalCost = 0; 7 | $.each(response, function(index, orders) { 8 | totalCost += parseFloat(orders.total); 9 | table += '
| Name | 58 |Unit | 59 |Price Per Unit | 60 |Action | 61 | 62 | 63 | 64 | 65 |
|---|