Initial commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
Projekt - Erstellen
|
||||
{% endblock %}
|
||||
|
||||
{% block header_title %}
|
||||
Projekt erstellen
|
||||
{% endblock %}
|
||||
|
||||
{% block header_description %}
|
||||
Ein neues Projekt erstellen
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
|
||||
<form method="post" enctype="multipart/form-data" class="space-y-4">
|
||||
{% csrf_token %}
|
||||
|
||||
{{ form.as_p }}
|
||||
|
||||
<button class="btn btn-save">
|
||||
Speichern
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,43 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
Projekt - Archiviert
|
||||
{% endblock %}
|
||||
|
||||
{% block header_title %}
|
||||
Archivierte Projekte
|
||||
{% endblock %}
|
||||
|
||||
{% block header_description %}
|
||||
Abgeschlossene und deaktivierte Projekte
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if memberships %}
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
{% for m in memberships %}
|
||||
<a href="{% url 'projects:overview' m.project.id %}"
|
||||
class="p-6 rounded-xl shadow hover:shadow-lg transition block text-white"
|
||||
style="background: linear-gradient(135deg, {{ m.project.color }}, {{ m.project.color }}cc);">
|
||||
<h2 class="text-xl font-bold">
|
||||
{{ m.project.name }}
|
||||
</h2>
|
||||
<p class="text-sm mt-2">
|
||||
Rolle: {{ m.get_role_display }}
|
||||
</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
|
||||
<div class="bg-yellow-100 border border-yellow-300 rounded-xl p-6">
|
||||
Keine archivierten Projekte vorhanden.
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,42 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ project.name }} - Informationen
|
||||
{% endblock %}
|
||||
|
||||
{% block header_title %}
|
||||
Ansprechpartner hinzufügen
|
||||
{% endblock %}
|
||||
|
||||
{% block header_description %}
|
||||
Neuen Ansprechpartner für das Projekt anlegen
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
<div class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
|
||||
<form method="post" class="space-y-4">
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
{{ form.as_p }}
|
||||
|
||||
<div class="mt-6 flex gap-2">
|
||||
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn mt-4 btn-save">
|
||||
Speichern
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,249 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ project.name }} - Informationen
|
||||
{% endblock %}
|
||||
|
||||
{% block header_title %}
|
||||
Projektinformationen
|
||||
{% endblock %}
|
||||
|
||||
{% block header_description %}
|
||||
Standorte & Ansprechpartner
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="mb-8">
|
||||
<div class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
<div class="flex flex-col sm:flex-row sm:justify-between sm:items-center gap-4">
|
||||
<div>
|
||||
<h2 class="text-xl font-bold">Aktionen</h2>
|
||||
<p class="text-slate-400 text-sm mt-1">Standorte und Ansprechpartner hinzufügen</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col sm:flex-row gap-2">
|
||||
<a href="{% url 'projects:location_add' project.id %}" class="btn btn-add">+ Standort</a>
|
||||
<a href="{% url 'projects:contact_add' project.id %}" class="btn btn-add">+ Ansprechpartner</a>
|
||||
<a href="{% url 'projects:worker_add' project.id %}" class="btn btn-add">+ Mitarbeiter</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="mb-8">
|
||||
<div class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
|
||||
<h2 class="text-xl font-bold mb-2">Allgemein</h2>
|
||||
|
||||
<form method="post" enctype="multipart/form-data" action="{% url 'projects:edit' project.id %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" value="update_project">
|
||||
|
||||
<div class="grid md:grid-cols-2 gap-4">
|
||||
|
||||
{% for field in form %}
|
||||
<div>
|
||||
<label class="block text-sm font-medium mb-1">
|
||||
{{ field.label }}
|
||||
</label>
|
||||
|
||||
{{ field }}
|
||||
|
||||
{% if field.errors %}
|
||||
<div class="text-red-600 text-sm mt-1">
|
||||
{{ field.errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
<button type="submit"
|
||||
class="btn mt-4 btn-save">
|
||||
Speichern
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid grid-cols-1 gap-5 mb-8">
|
||||
|
||||
<!-- Mitarbeiter -->
|
||||
<div class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
|
||||
<h2 class="text-xl font-bold mb-3">
|
||||
Mitarbeiter
|
||||
</h2>
|
||||
|
||||
{% for worker in workers %}
|
||||
|
||||
<div class="bg-slate-100 dark:bg-slate-700 rounded-xl p-3 mb-2 flex justify-between">
|
||||
|
||||
<div>
|
||||
<div class="font-medium">{{ worker.user.get_full_name|default:worker.user.username }}</div>
|
||||
<div class="text-slate-400 text-sm">{{ worker.user.email }}</div>
|
||||
<div class="text-slate-400 text-sm">Rolle: {{ worker.get_role_display }}</div>
|
||||
</div>
|
||||
|
||||
{% if worker.role != "owner" %}
|
||||
<form method="post" action="{% url 'projects:worker_delete' project.id worker.id %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" value="delete_worker">
|
||||
<input type="hidden" name="worker_id" value="{{ worker.id }}">
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-delete">
|
||||
Löschen
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% empty %}
|
||||
<div class="bg-yellow-100 border border-yellow-300 rounded-xl p-6">
|
||||
Keine Mitarbeiter vorhanden
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-5">
|
||||
|
||||
<!-- Standorte -->
|
||||
<div class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
|
||||
<h2 class="text-xl font-bold mb-3">
|
||||
Standorte
|
||||
</h2>
|
||||
|
||||
{% for location in locations %}
|
||||
|
||||
<div class="bg-slate-100 dark:bg-slate-700 rounded-xl p-3 mb-2 flex justify-between">
|
||||
<div>
|
||||
<div class="font-medium">
|
||||
{{ location.location.name }}
|
||||
</div>
|
||||
|
||||
<div class="text-slate-400 text-sm">
|
||||
{{ location.location.street }}
|
||||
</div>
|
||||
|
||||
<div class="text-slate-400 text-sm">
|
||||
{{ location.location.zip_code }} {{ location.location.city }}
|
||||
</div>
|
||||
|
||||
<div class="text-slate-400 text-sm">
|
||||
{{ location.location.country }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form method="post" action="{% url 'projects:location_delete' project.id location.id %}">
|
||||
{% csrf_token %}
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
name="action"
|
||||
value="delete_location">
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
name="location_id"
|
||||
value="{{ location.id }}">
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-delete">
|
||||
Löschen
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% empty %}
|
||||
|
||||
<div class="bg-white dark:bg-slate-800 border border-orange-500 rounded-xl p-6 text-orange-500">
|
||||
Keine Standorte vorhanden
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Ansprechpartner -->
|
||||
<div class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
|
||||
<h2 class="text-xl font-bold mb-3">
|
||||
Ansprechpartner
|
||||
</h2>
|
||||
|
||||
{% for contact in contacts %}
|
||||
|
||||
<div class="bg-slate-100 dark:bg-slate-700 rounded-xl p-3 mb-2 flex justify-between">
|
||||
<div>
|
||||
<div class="font-medium">
|
||||
{{ contact.contact.first_name }} {{ contact.contact.last_name }}
|
||||
</div>
|
||||
|
||||
{% if contact.contact.company %}
|
||||
<div class="text-slate-400 text-sm">
|
||||
{{ contact.contact.company }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if contact.contact.phone %}
|
||||
<div class="text-slate-400 text-sm">
|
||||
{{ contact.contact.phone }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if contact.contact.email %}
|
||||
<div class="text-slate-400 text-sm">
|
||||
{{ contact.contact.email }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<form method="post" action="{% url 'projects:contact_delete' project.id contact.id %}">
|
||||
{% csrf_token %}
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
name="action"
|
||||
value="delete_contact">
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
name="contact_id"
|
||||
value="{{ contact.id }}">
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-delete">
|
||||
Löschen
|
||||
</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
{% empty %}
|
||||
|
||||
<div class="bg-white dark:bg-slate-800 border border-orange-500 rounded-xl p-6 text-orange-500">
|
||||
Keine Ansprechpartner vorhanden
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,42 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ project.name }} - Informationen
|
||||
{% endblock %}
|
||||
|
||||
{% block header_title %}
|
||||
Standort hinzufügen
|
||||
{% endblock %}
|
||||
|
||||
{% block header_description %}
|
||||
Neuen Projektstandort anlegen
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
|
||||
<form method="post" class="space-y-4">
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
{{ form.as_p }}
|
||||
|
||||
<div class="mt-6 flex gap-2">
|
||||
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn mt-4 btn-save">
|
||||
Speichern
|
||||
</button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,80 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ project.name }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block header_title %}
|
||||
{{ project.name }}
|
||||
{% endblock %}
|
||||
|
||||
{% block header_description %}
|
||||
Projektübersicht und Module
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<!-- MODULE GRID -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-8">
|
||||
|
||||
<!-- FINANZEN -->
|
||||
<a href="{% url 'finance:overview' project.id %}" class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
<div class="text-2xl mb-2">💰</div>
|
||||
<h2 class="text-xl font-bold">Finanzen</h2>
|
||||
<p class="text-slate-400 text-sm mt-1">Einnahmen & Ausgaben</p>
|
||||
</a>
|
||||
|
||||
<!-- KASSE -->
|
||||
<a href="" class="relative p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
<div class="absolute top-3 right-3 text-xs font-semibold px-2 py-1 rounded-full text-white" style="background-color: {{ company_settings.color }};">
|
||||
In Arbeit
|
||||
</div>
|
||||
<div class="text-2xl mb-2">🏦</div>
|
||||
<h2 class="text-xl font-bold">Kasse</h2>
|
||||
<p class="text-slate-400 text-sm mt-1">Buchungen vornehmen</p>
|
||||
</a>
|
||||
|
||||
<!-- ZEITERFASSUNG -->
|
||||
<a href="{% url 'time_tracking:overview' project.id %}" class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
<div class="text-2xl mb-2">⏱</div>
|
||||
<h2 class="text-xl font-bold">Zeiterfassung</h2>
|
||||
<p class="text-slate-400 text-sm mt-1">Arbeitszeiten der Helfer</p>
|
||||
</a>
|
||||
|
||||
<!-- DOKUMENTE -->
|
||||
<a href="{% url 'documents:overview' project.id %}" class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
<div class="text-2xl mb-2">📁</div>
|
||||
<h2 class="text-xl font-bold">Dokumente</h2>
|
||||
<p class="text-slate-400 text-sm mt-1">Dateien & Bilder</p>
|
||||
</a>
|
||||
|
||||
<!-- LISTE -->
|
||||
<a href="{% url 'inventory:overview' project.id %}" class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
<div class="text-2xl mb-2">🛒</div>
|
||||
<h2 class="text-xl font-bold">Pack-/Einkaufsliste</h2>
|
||||
<p class="text-slate-400 text-sm mt-1">Vorhandenen & benötigtes Material</p>
|
||||
</a>
|
||||
|
||||
<!-- Projektinformationen -->
|
||||
<a href="{% url 'projects:info' project.id %}" class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
<div class="text-2xl mb-2">ℹ️</div>
|
||||
<h2 class="text-xl font-bold">Projektinformationen</h2>
|
||||
<p class="text-slate-400 text-sm mt-1">Standorte & Ansprechpartner</p>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- OPTIONAL INFO BOX -->
|
||||
<div class="p-6 rounded-xl shadow mb-8 bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
|
||||
<h2 class="text-xl font-bold">
|
||||
Zusammenfassung
|
||||
</h2>
|
||||
|
||||
<p class="text-slate-400 text-sm mt-1">
|
||||
folgt
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,46 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
|
||||
{% block title %}
|
||||
{{ project.name }} - Informationen
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block header_title %}
|
||||
Mitarbeiter hinzufügen
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block header_description %}
|
||||
Benutzer zum Projekt hinzufügen
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
|
||||
<form method="post" class="space-y-4">
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
{{ form.as_p }}
|
||||
|
||||
<div class="mt-6 flex gap-2">
|
||||
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn mt-4 btn-save">
|
||||
Speichern
|
||||
</button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user