Sidebar: Projekt-Admin entfernt (Admin-Panel abgeschaltet)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
feda436936
commit
36eb55b81b
12 files changed
+12
-45
No files matched your search
@@ -10,7 +10,7 @@ export function sortChats(chats) {
|
||||
})
|
||||
}
|
||||
|
||||
/** Ergebnis des Mail-Hinweises an den Kunden (K17), Texte wie im Admin-Panel. */
|
||||
/** Ergebnis des Mail-Hinweises an den Kunden (K17), Texte wie im frueheren Admin-Panel. */
|
||||
export function noticeText(notice, time) {
|
||||
if (!notice) return ''
|
||||
if (notice.sent) return `E-Mail-Hinweis an ${notice.to} gesendet (${time})`
|
||||
@@ -30,7 +30,7 @@ export function messageMeta(msg, customerName) {
|
||||
const FULL_REFRESH_MS = 10 * 60 * 1000
|
||||
export const needsFullRefresh = (lastFullAt, now) => now - lastFullAt >= FULL_REFRESH_MS
|
||||
|
||||
/** Eindeutige Beschriftung fuer "Neue Nachricht an Kunde…" wie im Admin-Panel: Name · E-Mail · Kd.-Nr. */
|
||||
/** Eindeutige Beschriftung fuer "Neue Nachricht an Kunde…" wie im frueheren Admin-Panel: Name · E-Mail · Kd.-Nr. */
|
||||
export function customerPickLabel(c) {
|
||||
return [c.name, c.email, c.code ? `Kd.-Nr. ${c.code}` : ''].filter(Boolean).join(' · ') || c.$id
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { fmtDate, formatCents } from './format'
|
||||
|
||||
// Uebernahmegutschriften: Texte und Pruefungen wortgleich aus dem Admin-Panel (public/admin.js 535-906).
|
||||
// Uebernahmegutschriften: Texte und Pruefungen wortgleich aus dem frueheren Admin-Panel des Portals.
|
||||
|
||||
export const CREDIT_STATUS = {
|
||||
offen: { tone: 'warn', label: 'Zu prüfen' },
|
||||
|
||||
@@ -38,13 +38,3 @@ export function updateEmployeeWithLogin(employeeId, payload) {
|
||||
export function deleteEmployeeWithLogin(employeeId) {
|
||||
return adminFetch(`/api/admin/employees/${employeeId}`, { method: 'DELETE' })
|
||||
}
|
||||
|
||||
/** Wechsel ins Projekt-Admin ohne zweiten Login: Einmal-Link holen und im selben Tab oeffnen. */
|
||||
export async function openProjectAdmin() {
|
||||
try {
|
||||
const { openUrl } = await adminFetch('/api/admin/switch-link', { method: 'POST', body: {} })
|
||||
window.location.assign(openUrl)
|
||||
} catch {
|
||||
window.location.assign('https://project.webklar.com/login.html')
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Gemeinsame Formate fuer die Bereiche aus dem Admin-Panel (Gutschriften, Angebote, E-Mail-Speicher).
|
||||
// Gemeinsame Formate fuer die Bereiche aus dem frueheren Admin-Panel (Gutschriften, Angebote, E-Mail-Speicher).
|
||||
// Deutsche Zeit (Europe/Berlin), Euro wie Intl de-DE. Rein, unter Node testbar.
|
||||
|
||||
const EURO = new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' })
|
||||
@@ -30,7 +30,7 @@ export function fmtDate(value) {
|
||||
return `${p.day}.${p.month}.${p.year}`
|
||||
}
|
||||
|
||||
/** dd.mm.yy, hh:mm (deutsche Zeit) wie im Admin-Panel; leer -> "–" */
|
||||
/** dd.mm.yy, hh:mm (deutsche Zeit) wie im frueheren Admin-Panel; leer -> "–" */
|
||||
export function fmtDateTime(value) {
|
||||
if (!valid(value)) return value ? String(value) : '–'
|
||||
const p = parts(value, { day: '2-digit', month: '2-digit', year: '2-digit', hour: '2-digit', minute: '2-digit' })
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { berlinYmd, fmtBerlin, fmtDate, fmtYmd, formatCents, PRODUCT_LABEL } from './format'
|
||||
|
||||
// Abo-Angebote: Texte, Rabattende und Formularpruefung wortgleich aus dem Admin-Panel (public/admin.js 984-1317).
|
||||
// Abo-Angebote: Texte, Rabattende und Formularpruefung wortgleich aus dem frueheren Admin-Panel des Portals.
|
||||
// "today" ist der Kalendertag in Deutschland (YYYY-MM-DD) und fuer Tests injizierbar.
|
||||
|
||||
export const OFFER_STATUS = {
|
||||
@@ -52,7 +52,7 @@ export function discountLine(o, today = todayBerlin()) {
|
||||
export const isRunning = (ctx, productKey) => Boolean(ctx?.subscription?.active && ctx.subscription.productKey === productKey)
|
||||
|
||||
/**
|
||||
* Pruefung und Vorschau des Formulars "Neues Angebot" (admin.js renderOfferPreview).
|
||||
* Pruefung und Vorschau des Formulars "Neues Angebot" (wie im frueheren Admin-Panel).
|
||||
* -> { errors, running, saveLabel, previewLines }; Speichern nur ohne errors.
|
||||
*/
|
||||
export function evaluateOfferForm(ctx, f, today = todayBerlin()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { fmtDate } from './format'
|
||||
|
||||
// E-Mail-Speicher (Zusatzspeicher-Aufgaben in konsoleH): Texte wortgleich aus dem Admin-Panel (public/admin.js 908-982).
|
||||
// E-Mail-Speicher (Zusatzspeicher-Aufgaben in konsoleH): Texte wortgleich aus dem frueheren Admin-Panel des Portals.
|
||||
|
||||
const GB_INCLUDED = 5
|
||||
const GB_PER_UNIT = 5
|
||||
|
||||
Reference in new issue
Block a user