4 Commits

5 changed files with 82 additions and 57 deletions

View File

@@ -213,9 +213,9 @@ und dieses Projekt adhäriert zu [Semantic Versioning](https://semver.org/lang/d
- Klickbare Links für Telefonnummern, E-Mail-Adressen und Adressen - Klickbare Links für Telefonnummern, E-Mail-Adressen und Adressen
- Docker-Container für einfache Installation und Deployment - Docker-Container für einfache Installation und Deployment
## [1.2.18] - 2024-03-19 ## [1.2.19] - 2024-03-19
### Geändert ### Geändert
- Version auf 1.2.18 aktualisiert - Version auf 1.2.19 aktualisiert
## [1.2.17] - 2024-03-19 ## [1.2.18] - 2024-03-19
# ... existing code ... # ... existing code ...

View File

@@ -19,7 +19,7 @@ Eine einfache und effiziente Kundensuche für medisoftware Kunden.
## Version ## Version
Aktuelle Version: 1.2.18 Aktuelle Version: 1.2.19
## Installation ## Installation

2
app.py
View File

@@ -15,7 +15,7 @@ import markdown2
app = Flask(__name__, static_folder='static') app = Flask(__name__, static_folder='static')
app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY', 'dev') app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY', 'dev')
app.config['ALLOWED_IP_RANGES'] = os.getenv('ALLOWED_IP_RANGES', '192.168.0.0/16,10.0.0.0/8').split(',') app.config['ALLOWED_IP_RANGES'] = os.getenv('ALLOWED_IP_RANGES', '192.168.0.0/16,10.0.0.0/8').split(',')
app.config['VERSION'] = '1.2.18' app.config['VERSION'] = '1.2.19'
app.config['DATABASE'] = 'data/customers.db' app.config['DATABASE'] = 'data/customers.db'
app.config['DATABASE_TIMEOUT'] = 20 app.config['DATABASE_TIMEOUT'] = 20
app.config['DATABASE_POOL_SIZE'] = 5 app.config['DATABASE_POOL_SIZE'] = 5

View File

@@ -11,12 +11,20 @@
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<link href="{{ url_for('static', filename='css/styles.css') }}" rel="stylesheet"> <link href="{{ url_for('static', filename='css/styles.css') }}" rel="stylesheet">
<style>
.logo {
width: 200px;
height: auto;
margin: 0 auto;
display: block;
}
</style>
</head> </head>
<body> <body>
<div class="main-content"> <div class="main-content">
<div class="container"> <div class="container">
<div class="d-flex justify-content-between align-items-center mb-4"> <div class="position-relative mb-4">
<div class="dropdown"> <div class="dropdown position-absolute start-0">
<button class="btn btn-link text-dark" type="button" id="menuButton" data-bs-toggle="dropdown" aria-expanded="false"> <button class="btn btn-link text-dark" type="button" id="menuButton" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-list fs-4"></i> <i class="bi bi-list fs-4"></i>
</button> </button>
@@ -38,10 +46,12 @@
</li> </li>
</ul> </ul>
</div> </div>
<div class="text-center">
<a href="https://medisoftware.de" target="_blank" rel="noopener noreferrer"> <a href="https://medisoftware.de" target="_blank" rel="noopener noreferrer">
<img src="{{ url_for('static', filename='medisoftware_logo_rb_200.png') }}" alt="medisoftware Logo" class="img-fluid" style="max-width: 200px;"> <img src="{{ url_for('static', filename='medisoftware_logo_rb_200.png') }}" alt="medisoftware Logo" class="img-fluid logo">
</a> </a>
</div> </div>
</div>
<div class="search-container"> <div class="search-container">
<h1 class="text-center mb-4">Kundensuche</h1> <h1 class="text-center mb-4">Kundensuche</h1>

View File

@@ -5,71 +5,91 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>medisoftware Kundensuche - CSV Upload</title> <title>medisoftware Kundensuche - CSV Upload</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<style> <style>
body { body {
min-height: 100vh; background-color: #f8f9fa;
display: flex;
flex-direction: column;
margin: 0;
padding: 0;
} }
.main-content { .main-content {
flex: 1 0 auto;
padding: 2rem 0; padding: 2rem 0;
margin-bottom: 4rem;
} }
.footer { .logo {
flex-shrink: 0; width: 200px;
text-align: center; height: auto;
padding: 1rem; margin: 0 auto;
background-color: #f8f9fa; display: block;
border-top: 1px solid #dee2e6; }
width: 100%; .upload-container {
position: fixed; background-color: white;
bottom: 0; padding: 2rem;
left: 0; border-radius: 10px;
z-index: 100; box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.form-label {
font-weight: 500;
}
.alert {
margin-bottom: 1rem;
} }
</style> </style>
</head> </head>
<body> <body>
<div class="container mt-5"> <div class="main-content">
<div class="text-center mb-4"> <div class="container">
<img src="{{ url_for('static', filename='medisoftware_logo_rb_200.png') }}" alt="medisoftware Logo" class="img-fluid" style="max-width: 200px;"> <div class="position-relative mb-4">
<div class="dropdown position-absolute start-0">
<button class="btn btn-link text-dark" type="button" id="menuButton" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-list fs-4"></i>
</button>
<ul class="dropdown-menu" aria-labelledby="menuButton">
<li>
<a class="dropdown-item" href="{{ url_for('index') }}">
<i class="bi bi-house"></i> Home
</a>
</li>
<li>
<a class="dropdown-item" href="{{ url_for('upload') }}">
<i class="bi bi-cloud-upload"></i> CSV-Dateien hochladen
</a>
</li>
<li>
<a class="dropdown-item" href="{{ url_for('readme') }}">
<i class="bi bi-book"></i> README
</a>
</li>
</ul>
</div> </div>
<div class="text-center">
<a href="https://medisoftware.de" target="_blank" rel="noopener noreferrer">
<img src="{{ url_for('static', filename='medisoftware_logo_rb_200.png') }}" alt="medisoftware Logo" class="img-fluid logo">
</a>
</div>
</div>
<div class="upload-container">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-6"> <div class="col-md-6">
<div class="card"> <h2 class="text-center mb-4">CSV-Dateien hochladen</h2>
<div class="card-header">
<h2 class="text-center mb-0">CSV Upload</h2>
</div>
<div class="card-body">
{% if error %} {% if error %}
<div class="alert alert-danger" role="alert"> <div class="alert alert-danger">{{ error }}</div>
{{ error }}
</div>
{% endif %} {% endif %}
{% if success %} {% if success %}
<div class="alert alert-success" role="alert"> <div class="alert alert-success">{{ success }}</div>
{{ success }}
</div>
{% endif %} {% endif %}
<form method="POST" enctype="multipart/form-data"> <form method="POST" enctype="multipart/form-data">
<div class="mb-3"> <div class="mb-3">
<label for="customers_snk" class="form-label">SNK Kunden (customers_snk.csv)</label> <label for="medisoft_file" class="form-label">MEDISOFT CSV-Datei</label>
<input type="file" class="form-control" id="customers_snk" name="customers_snk" accept=".csv" required> <input type="file" class="form-control" id="medisoft_file" name="medisoft_file" accept=".csv">
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="customers" class="form-label">MEDISOFT Kunden (customers.csv)</label> <label for="mediconsult_file" class="form-label">MEDICONSULT CSV-Datei</label>
<input type="file" class="form-control" id="customers" name="customers" accept=".csv" required> <input type="file" class="form-control" id="mediconsult_file" name="mediconsult_file" accept=".csv">
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="password" class="form-label">Passwort</label> <label for="password" class="form-label">Passwort</label>
<input type="password" class="form-control" id="password" name="password" required> <input type="password" class="form-control" id="password" name="password" required>
</div> </div>
<div class="d-grid gap-2"> <div class="d-grid">
<button type="submit" class="btn btn-primary">Dateien hochladen</button> <button type="submit" class="btn btn-primary">Dateien hochladen</button>
<a href="{{ url_for('index') }}" class="btn btn-secondary">Zurück zur Suche</a>
</div> </div>
</form> </form>
</div> </div>
@@ -77,11 +97,6 @@
</div> </div>
</div> </div>
</div> </div>
<footer class="footer"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<div class="footer-content">
Proudly made with ❤️ and 🍺 by <a href="https://www.medisoftware.de" target="_blank" class="footer-link">medisoftware</a>
<div style="font-size: 0.8em;">Version: {{ version }}</div>
</div>
</footer>
</body> </body>
</html> </html>