Gitea-Projektintegration im Ticket-Frontend dauerhaft einbinden.

Projekt-Zuweisung, README-Anzeige und Admin-API-Hooks ins Repo committen, damit deploy.sh die Änderungen nicht mehr verwirft.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Webklar Deploy
2026-06-08 10:54:46 +00:00
parent 4a2e94bc83
commit 8abf11ad18
14 changed files with 1659 additions and 49 deletions

View File

@@ -1,9 +1,11 @@
import { useState, useEffect, useMemo } from 'react'
import { FaFolder, FaPlus, FaArrowUpRightFromSquare } from 'react-icons/fa6'
import { FaFolder, FaPlus } from 'react-icons/fa6'
import { useWebsiteProjects } from '../hooks/useWebsiteProjects'
import { useCustomers } from '../hooks/useCustomers'
import { useWorkorders } from '../hooks/useWorkorders'
import { createProjectFromTemplate } from '../lib/projectAdminApi'
import PreviewLinkButton from '../components/PreviewLinkButton'
import GiteaLinkButton from '../components/GiteaLinkButton'
function slugify(value) {
return String(value || '')
@@ -128,7 +130,7 @@ export default function ProjectsPage() {
<th>Kunde</th>
<th>Ticket (WOID)</th>
<th>Status</th>
<th>Preview</th>
<th>Links</th>
</tr>
</thead>
<tbody>
@@ -141,13 +143,10 @@ export default function ProjectsPage() {
<td>{project.ticketId ? ticketMap[project.ticketId] || project.ticketId : '-'}</td>
<td>{project.status || '-'}</td>
<td>
{project.previewUrl ? (
<a href={project.previewUrl} target="_blank" rel="noopener noreferrer">
<FaArrowUpRightFromSquare /> Link
</a>
) : (
'-'
)}
<div style={{ display: 'flex', gap: 8 }}>
<PreviewLinkButton href={project.previewUrl} />
<GiteaLinkButton href={project.giteaRepoUrl} />
</div>
</td>
</tr>
))}