Terminplaner: Warnung im Dialog, wenn K16 mit den Unterlagen nicht rausging
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
72eedeb59c
commit
878a530bd7
3 files changed
+20
-4
No files matched your search
@@ -6,7 +6,7 @@ import { copyText } from '../CopyableCredential'
|
||||
import { getFunktionen, setFeature, getTermineAnleitung } from '../../lib/teamApi'
|
||||
import {
|
||||
FUNKTIONEN, ZUSTAND, AKTION_LABEL, funktionOf, aktionen, mergeFunktion, siteKeyOf, abgeschaltetText,
|
||||
hindernisText, panelModell, anleitungOffen, textformNoetig, textformAnsicht, textformBereit,
|
||||
hindernisText, panelModell, anleitungOffen, textformNoetig, textformAnsicht, textformBereit, speicherStatus,
|
||||
} from '../../lib/funktionenView'
|
||||
import { CHANNELS, channelLabel } from '../../lib/analyseView'
|
||||
import { berlinYmd } from '../../lib/format'
|
||||
@@ -186,17 +186,17 @@ export default function CustomerFunktionen({ customerId }) {
|
||||
setStatus(null)
|
||||
try {
|
||||
const mitTextform = textformNoetig(key, action, termine)
|
||||
const { projects: changed } = await setFeature(customerId, key, {
|
||||
const antwort = await setFeature(customerId, key, {
|
||||
projectId, action, note: note.trim(),
|
||||
...(mitTextform ? { textformDate: textform.date, textformChannel: textform.channel } : {}),
|
||||
})
|
||||
// Die Antwort enthaelt das ganze Projekt; uebernommen wird nur die geaenderte Funktion
|
||||
const updated = changed?.[0]
|
||||
const updated = antwort?.projects?.[0]
|
||||
if (updated) setProjects((list) => mergeFunktion(list, updated.projectId, key, updated))
|
||||
setConfirm(null)
|
||||
setNote('')
|
||||
setTextform(LEERE_TEXTFORM)
|
||||
setStatus({ ok: true, text: 'Gespeichert.' })
|
||||
setStatus(speicherStatus(antwort))
|
||||
} catch (err) {
|
||||
setConfirm(null)
|
||||
setStatus({ ok: false, text: err.message })
|
||||
|
||||
Reference in new issue
Block a user