Inline-Projektliste: neue Repos, Zuweisen mit Umzug, Preview einschalten, Pushes nachtragen
Implementiert auf TicketProjects.jsx (Paket-E-Inline-Liste) statt des frueheren Dialogs, gemaess Controller-Ruling R3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
56489b8d6d
commit
3e3a9a3bbd
3 files changed
+160
-14
No files matched your search
@@ -23,6 +23,7 @@ import {
|
||||
archiveWebsiteProject,
|
||||
unarchiveWebsiteProject,
|
||||
} from '../lib/projectAdminApi'
|
||||
import { assignSummary } from '../lib/projectAssign'
|
||||
import PreviewLinkButton from '../components/PreviewLinkButton'
|
||||
import GiteaLinkButton from '../components/GiteaLinkButton'
|
||||
|
||||
@@ -246,10 +247,15 @@ export default function ProjectsPage() {
|
||||
const handleAssignCustomer = async (project, customerId) => {
|
||||
setAssignBusyId(project.$id)
|
||||
setNotice('')
|
||||
const r = customerId
|
||||
? await assignProjects([project.$id], { customerId, ticketId: project.ticketId || '' })
|
||||
: await unassignProject(project.$id)
|
||||
if (!r.success) setNotice('Zuordnung fehlgeschlagen: ' + (r.error || 'unbekannt'))
|
||||
if (customerId) {
|
||||
const r = await assignProjects([project.$id], { customerId, ticketId: project.ticketId || '' })
|
||||
const one = r.results[0]
|
||||
const summary = assignSummary(project.projectName, one.ok ? one.result : { error: one.error })
|
||||
setNotice(summary.warnings.length ? `${summary.text} – ${summary.warnings.join(' – ')}` : summary.text)
|
||||
} else {
|
||||
const r = await unassignProject(project.$id)
|
||||
if (!r.success) setNotice('Zuordnung fehlgeschlagen: ' + (r.error || 'unbekannt'))
|
||||
}
|
||||
await fetchAllProjects()
|
||||
setAssignBusyId('')
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user