first commit

This commit is contained in:
mrtoine 2025-09-20 13:18:04 +02:00
commit e6c52820cd
227 changed files with 16156 additions and 0 deletions

View file

@ -0,0 +1,137 @@
{% extends 'layouts/base.html' %}
{% block title %}Suite Consultance - Créer une proposition{% endblock %}
{% block module_name %}propositions{% endblock %}
{% block content %}
<div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="h2 text-propositions">Créer une proposition commerciale</h1>
<a href="{{ url_for('propositions') }}" class="btn btn-outline-propositions">
<i class="fas fa-arrow-left"></i> Retour aux propositions
</a>
</div>
<div class="card">
<div class="card-body">
<form method="POST" action="{{ url_for('create_proposition') }}">
<div class="row g-3">
<!-- Informations client -->
<div class="col-12">
<h5 class="border-bottom pb-2 mb-3">Informations client</h5>
</div>
<div class="col-md-6">
<div class="mb-3">
<label for="client_name" class="form-label">Nom du client *</label>
<input type="text" class="form-control" id="client_name" name="client_name" value="{{ form_data.client_name if form_data is defined and form_data.client_name else '' }}" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="email" class="form-control" id="email" name="email" value="{{ form_data.email if form_data is defined and form_data.email else '' }}">
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label for="telephone" class="form-label">Téléphone</label>
<input type="tel" class="form-control" id="telephone" name="telephone" value="{{ form_data.telephone if form_data is defined and form_data.telephone else '' }}">
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label for="adresse" class="form-label">Adresse</label>
<input type="text" class="form-control" id="adresse" name="adresse" value="{{ form_data.adresse if form_data is defined and form_data.adresse else '' }}">
</div>
</div>
<!-- Informations projet -->
<div class="col-12">
<h5 class="border-bottom pb-2 mb-3 mt-3">Informations projet</h5>
</div>
<div class="col-md-6">
<div class="mb-3">
<label for="project_name" class="form-label">Nom du projet *</label>
<input type="text" class="form-control" id="project_name" name="project_name" value="{{ form_data.project_name if form_data is defined and form_data.project_name else '' }}" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label for="project_type" class="form-label">Type de projet</label>
<input type="text" class="form-control" id="project_type" name="project_type" value="{{ form_data.project_type if form_data is defined and form_data.project_type else '' }}">
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label for="deadline" class="form-label">Délai de livraison</label>
<input type="date" class="form-control" id="deadline" name="deadline" value="{{ form_data.deadline if form_data is defined and form_data.deadline else '' }}">
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label for="budget" class="form-label">Budget estimé</label>
<input type="text" class="form-control" id="budget" name="budget" value="{{ form_data.budget if form_data is defined and form_data.budget else '' }}">
</div>
</div>
<div class="col-12">
<div class="mb-3">
<label for="project_description" class="form-label">Description du projet</label>
<textarea class="form-control" id="project_description" name="project_description" rows="3">{{ form_data.project_description if form_data is defined and form_data.project_description else '' }}</textarea>
</div>
</div>
<div class="col-12">
<div class="mb-3">
<label for="features" class="form-label">Fonctionnalités principales</label>
<textarea class="form-control" id="features" name="features" rows="3" placeholder="Fonctionnalité 1, Fonctionnalité 2, ...">{{ form_data.features if form_data is defined and form_data.features and not form_data.features is iterable else '' }}</textarea>
<small class="form-text text-muted">Séparez les fonctionnalités par des virgules</small>
</div>
</div>
<!-- Informations complémentaires -->
<div class="col-12">
<h5 class="border-bottom pb-2 mb-3 mt-3">Informations complémentaires</h5>
</div>
<div class="col-md-6">
<div class="mb-3">
<label for="payment_terms" class="form-label">Conditions de paiement</label>
<input type="text" class="form-control" id="payment_terms" name="payment_terms" value="{{ form_data.payment_terms if form_data is defined and form_data.payment_terms else '' }}">
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label for="contact_info" class="form-label">Coordonnées</label>
<input type="text" class="form-control" id="contact_info" name="contact_info" value="{{ form_data.contact_info if form_data is defined and form_data.contact_info else '' }}">
</div>
</div>
<div class="col-12">
<div class="mb-3">
<label for="additional_info" class="form-label">Informations additionnelles</label>
<textarea class="form-control" id="additional_info" name="additional_info" rows="3">{{ form_data.additional_info if form_data is defined and form_data.additional_info else '' }}</textarea>
</div>
</div>
<div class="col-12 mt-3">
<button type="submit" class="btn btn-primary">
<i class="fas fa-file-download"></i> Générer la proposition
</button>
<a href="{{ url_for('propositions') }}" class="btn btn-outline-secondary">
Annuler
</a>
</div>
</div>
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,58 @@
{% extends 'layouts/base.html' %}
{% block title %}Suite Consultance - Propositions{% endblock %}
{% block module_name %}propositions{% endblock %}
{% block content %}
<div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="h2 text-propositions">Propositions commerciales</h1>
<a href="{{ url_for('create_proposition') }}" class="btn btn-propositions">
<i class="fas fa-plus"></i> Nouvelle proposition
</a>
</div>
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Client</th>
<th>Date de création</th>
<th>Fichier</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% if propositions %}
{% for proposition in propositions %}
<tr>
<td>{{ proposition.client_name }}</td>
<td>{{ proposition.date }}</td>
<td>{{ proposition.filename }}</td>
<td>
<div class="btn-group" role="group">
<a href="{{ url_for('download_file', filename='propositions/' + proposition.filename) }}" class="btn btn-sm btn-propositions" title="Télécharger">
<i class="fas fa-download"></i>
</a>
<button class="btn btn-sm btn-info" title="Envoyer par email">
<i class="fas fa-envelope"></i>
</button>
<button class="btn btn-sm btn-danger" title="Supprimer">
<i class="fas fa-trash-alt"></i>
</button>
</div>
</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="4" class="text-center">Aucune proposition trouvée</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}