Add worship leaders functionality: Introduce worship leaders management by adding routes, controllers, and CSV import capabilities. Update worship management UI to support .csv file uploads for worship services, enhancing data handling and user experience.
All checks were successful
Deploy miriamgemeinde / deploy (push) Successful in 7s

This commit is contained in:
Torsten Schulz (local)
2026-04-29 18:04:05 +02:00
parent a2b1ebdb97
commit 7f01c004c8
11 changed files with 635 additions and 8 deletions

View File

@@ -15,13 +15,13 @@
<div v-if="showImportSection" class="import-section">
<h3>Gottesdienste importieren</h3>
<div class="import-content">
<label for="import-file">Datei auswählen (.doc, .docx):</label>
<label for="import-file">Datei auswählen (.doc, .docx, .csv):</label>
<input
type="file"
id="import-file"
ref="fileInput"
@change="handleFileSelect"
accept=".doc,.docx"
accept=".doc,.docx,.csv"
/>
<div v-if="selectedFile" class="selected-file">
Ausgewählte Datei: {{ selectedFile.name }}
@@ -730,13 +730,13 @@ export default {
handleFileSelect(event) {
const file = event.target.files[0];
if (file) {
// Validierung: Nur .doc und .docx Dateien erlauben
const allowedExtensions = ['.doc', '.docx'];
// Validierung: .docx (alt) oder .csv (neu) erlauben
const allowedExtensions = ['.doc', '.docx', '.csv'];
const fileName = file.name.toLowerCase();
const isValidFile = allowedExtensions.some(ext => fileName.endsWith(ext));
if (!isValidFile) {
alert('Bitte wählen Sie nur .doc oder .docx Dateien aus.');
alert('Bitte wählen Sie eine .doc/.docx oder .csv Datei aus.');
event.target.value = '';
this.selectedFile = null;
return;
@@ -758,7 +758,12 @@ export default {
formData.append('file', this.selectedFile);
try {
const response = await axios.post('/worships/import', formData, {
const fileName = this.selectedFile.name.toLowerCase();
const endpoint = fileName.endsWith('.csv')
? '/worships/import/nbr-csv'
: '/worships/import';
const response = await axios.post(endpoint, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},