saved new files
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
py_app/app/__pycache__/warehouse.cpython-312.pyc
Normal file
BIN
py_app/app/__pycache__/warehouse.cpython-312.pyc
Normal file
Binary file not shown.
@@ -0,0 +1,25 @@
|
||||
import mariadb
|
||||
from app.warehouse import get_db_connection
|
||||
from flask import Flask
|
||||
import os
|
||||
|
||||
def create_warehouse_locations_table():
|
||||
conn = get_db_connection()
|
||||
cursor = conn.cursor()
|
||||
cursor.execute('''
|
||||
CREATE TABLE IF NOT EXISTS warehouse_locations (
|
||||
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||
location_code VARCHAR(12) NOT NULL UNIQUE,
|
||||
size INT,
|
||||
description VARCHAR(250)
|
||||
)
|
||||
''')
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
instance_path = os.path.abspath("instance")
|
||||
app = Flask(__name__, instance_path=instance_path)
|
||||
with app.app_context():
|
||||
create_warehouse_locations_table()
|
||||
print("warehouse_locations table created or already exists.")
|
||||
34
py_app/app/templates/main_page_warehouse.html
Normal file
34
py_app/app/templates/main_page_warehouse.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Warehouse Module{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="warehouse-container">
|
||||
<h1>Warehouse Module</h1>
|
||||
<p>This is the page for managing warehouse operations.</p>
|
||||
|
||||
<!-- Row of evenly distributed cards -->
|
||||
<div class="dashboard-container">
|
||||
<!-- Card 1: Store Articles -->
|
||||
<div class="dashboard-card">
|
||||
<h3>Store Articles</h3>
|
||||
<p>Add or update articles in the warehouse inventory.</p>
|
||||
<a href="{{ url_for('main.store_articles') }}" class="btn">Go to Store Articles</a>
|
||||
</div>
|
||||
|
||||
<!-- Card 2: Create Warehouse Locations -->
|
||||
<div class="dashboard-card">
|
||||
<h3>Create Warehouse Locations</h3>
|
||||
<p>Define and manage storage locations in the warehouse.</p>
|
||||
<a href="{{ url_for('main.create_locations') }}" class="btn">Go to Locations</a>
|
||||
</div>
|
||||
|
||||
<!-- Card 3: Warehouse Reports -->
|
||||
<div class="dashboard-card">
|
||||
<h3>Warehouse Reports</h3>
|
||||
<p>View and export warehouse activity and inventory reports.</p>
|
||||
<a href="{{ url_for('main.warehouse_reports') }}" class="btn">Go to Reports</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
6
py_app/app/templates/store_articles.html
Normal file
6
py_app/app/templates/store_articles.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Store Articles{% endblock %}
|
||||
{% block content %}
|
||||
<h2>Store Articles</h2>
|
||||
<p>This is the Store Articles page for the warehouse module.</p>
|
||||
{% endblock %}
|
||||
6
py_app/app/templates/warehouse_reports.html
Normal file
6
py_app/app/templates/warehouse_reports.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Warehouse Reports{% endblock %}
|
||||
{% block content %}
|
||||
<h2>Warehouse Reports</h2>
|
||||
<p>This is the Warehouse Reports page for the warehouse module.</p>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user