Vorname/Nachname für Mitarbeiter, Aufgaben-Duplizierung, Zeitstrahl im Zeitplan
- employees: name-Feld in first_name/last_name aufgeteilt (Schema, API, Formular, alle Namensanzeigen) - Aufgaben können mit neuem Start-/Enddatum dupliziert werden (POST /api/tasks/:id/duplicate übernimmt Name, Stunden, Status und Zuweisungen 1:1, nur die Termine ändern sich) - Zeitplan zeigt jetzt einen Zeitstrahl mit Kalenderwochen und Tagesnummern oberhalb der Projekt-Balken
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
import { reactive } from 'vue';
|
||||
import { store } from './store.js';
|
||||
|
||||
const newEmployee = reactive({ name: '', email: '', role: '', weekly_capacity_hours: 40 });
|
||||
const newEmployee = reactive({ first_name: '', last_name: '', email: '', role: '', weekly_capacity_hours: 40 });
|
||||
|
||||
async function addEmployee() {
|
||||
if (!newEmployee.name) return;
|
||||
if (!newEmployee.first_name || !newEmployee.last_name) return;
|
||||
await store.createEmployee({ ...newEmployee });
|
||||
Object.assign(newEmployee, { name: '', email: '', role: '', weekly_capacity_hours: 40 });
|
||||
Object.assign(newEmployee, { first_name: '', last_name: '', email: '', role: '', weekly_capacity_hours: 40 });
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -15,7 +15,8 @@ async function addEmployee() {
|
||||
<div class="panel-section">
|
||||
<h2>Neuer Mitarbeiter</h2>
|
||||
<div class="form-row">
|
||||
<input v-model="newEmployee.name" placeholder="Name" />
|
||||
<input v-model="newEmployee.first_name" placeholder="Vorname" />
|
||||
<input v-model="newEmployee.last_name" placeholder="Nachname" />
|
||||
<input v-model="newEmployee.email" placeholder="E-Mail" />
|
||||
<input v-model="newEmployee.role" placeholder="Rolle" />
|
||||
<input v-model.number="newEmployee.weekly_capacity_hours" type="number" style="width: 100px" placeholder="Std/Woche" />
|
||||
@@ -28,7 +29,8 @@ async function addEmployee() {
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Vorname</th>
|
||||
<th>Nachname</th>
|
||||
<th>E-Mail</th>
|
||||
<th>Rolle</th>
|
||||
<th>Kapazität (Std/Woche)</th>
|
||||
@@ -37,7 +39,8 @@ async function addEmployee() {
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="e in store.employees" :key="e.id">
|
||||
<td>{{ e.name }}</td>
|
||||
<td>{{ e.first_name }}</td>
|
||||
<td>{{ e.last_name }}</td>
|
||||
<td>{{ e.email }}</td>
|
||||
<td>{{ e.role }}</td>
|
||||
<td>{{ e.weekly_capacity_hours }}</td>
|
||||
|
||||
Reference in New Issue
Block a user