Listen: einheitliche Zeilen-Markierung und kompakte Aktions-Buttons

Alle App-Listen (kundenliste, call_log_liste, kontaktliste, kontaktadresseliste,
TagList) auf das isSelected-Callback der Treetable umgestellt — die Markierung
erfolgt jetzt auf der gesamten <tr>-Zeile via w3-theme-l4 statt per-Zell-Inline-Style.
In der kundenliste sind die 3 Aktions-Buttons (edit, Projekte, Kontakte) kompakt
in einer Zelle zusammengefasst, analog zur projektliste. Auth-Listen unberührt.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
gg committed 2026-09-01 10:45:48 +02:00
1 parent 3e1791d316
commit ad24981a0b
5 files changed
+45 -48

No files matched your search

+10 -11
View File
@@ -77,18 +77,16 @@ export const call_log_liste: m.ClosureComponent = (vnode) => {
const columnmapper: (node: iTreenode) => any[] = (node: iTreenode) => {
let log: iCallLog = node.nodevalue
const isSelected = selectedNode === node
const cellStyle = isSelected ? {backgroundColor: '#e6f7ff'} : {}
return [
m("div", {style: cellStyle}, m("strong", log.kundenName + ": " + log.projektName)),
m("span", {style: cellStyle}, log.datum),
m("span", {style: cellStyle}, log.uhrzeitBeginn),
m("span", {style: cellStyle}, log.dauer + " min"),
m("span", {style: cellStyle}, log.betreff),
m("span", {style: cellStyle}, log.wiedervorlageDatum),
m("span", {style: cellStyle}, log.erledigt ? "Erledigt" : "Offen"),
m("button.w3-button.w3-small", {style: cellStyle, onclick: (e: Event) => editCallLog(log, e)}, m("i.material-icons", "edit"))
m("div", m("strong", log.kundenName + ": " + log.projektName)),
m("span", log.datum),
m("span", log.uhrzeitBeginn),
m("span", log.dauer + " min"),
m("span", log.betreff),
m("span", log.wiedervorlageDatum),
m("span", log.erledigt ? "Erledigt" : "Offen"),
m("button.w3-button.w3-small", {style: {padding: '0 2px'}, onclick: (e: Event) => editCallLog(log, e)}, m("i.material-icons", "edit"))
]
}
@@ -129,7 +127,8 @@ export const call_log_liste: m.ClosureComponent = (vnode) => {
treenodes: treenodes,
columnmapper: columnmapper,
filter: filterFunction,
onRowMarked: handleRowMarked
onRowMarked: handleRowMarked,
isSelected: (node: iTreenode) => node === selectedNode
} as iTreetable,
m(TopbarButton, {onclick: addCallLogRoute, tooltip: "Neue Gesprächsnotiz anlegen"} as iTopbarButton,
m("i.material-icons", "add_call")
+8 -9
View File
@@ -61,16 +61,14 @@ export const kontaktliste: m.ClosureComponent = (vnode) => {
const columnmapper: (node: iTreenode) => any[] = (node: iTreenode) => {
let kontakt: iKontakt = node.nodevalue
const isSelected = selectedNode === node
const cellStyle = isSelected ? {backgroundColor: '#e6f7ff'} : {}
return [
m("div", {style: cellStyle}, m("strong", kontakt.name)),
m("span", {style: cellStyle}, kontakt.position),
m("span", {style: cellStyle}, kontakt.telefon),
m("span", {style: cellStyle}, kontakt.email),
m("span", {style: cellStyle}, kontakt.kundenName),
m("button.w3-button.w3-small", {style: cellStyle, onclick: (e: Event) => editKontakt(kontakt, e)}, m("i.material-icons", "edit"))
m("div", m("strong", kontakt.name)),
m("span", kontakt.position),
m("span", kontakt.telefon),
m("span", kontakt.email),
m("span", kontakt.kundenName),
m("button.w3-button.w3-small", {style: {padding: '0 2px'}, onclick: (e: Event) => editKontakt(kontakt, e)}, m("i.material-icons", "edit"))
]
}
@@ -108,7 +106,8 @@ export const kontaktliste: m.ClosureComponent = (vnode) => {
treenodes: treenodes,
columnmapper: columnmapper,
filter: filterFunction,
onRowMarked: handleRowMarked
onRowMarked: handleRowMarked,
isSelected: (node: iTreenode) => node === selectedNode
} as iTreetable,
m(TopbarButton, {onclick: addKontaktRoute, tooltip: "Neuen Kontakt anlegen"} as iTopbarButton,
m("i.material-icons", "person_add")
+9 -10
View File
@@ -69,17 +69,15 @@ export const kontaktadresseliste: m.ClosureComponent = (vnode) => {
const columnmapper: (node: iTreenode) => any[] = (node: iTreenode) => {
let kontaktadresse: iKontaktadresse = node.nodevalue
const isSelected = selectedNode === node
const cellStyle = isSelected ? {backgroundColor: '#e6f7ff'} : {}
return [
m("div", {style: cellStyle}, m("strong", kontaktadresse.name)),
m("span", {style: cellStyle}, kontaktadresse.firma),
m("span", {style: cellStyle}, kontaktadresse.telefon),
m("span", {style: cellStyle}, kontaktadresse.email),
m("span", {style: cellStyle}, kontaktadresse.ort),
m("span", {style: cellStyle}, kontaktadresse.projektName),
m("button.w3-button.w3-small", {style: cellStyle, onclick: (e: Event) => editKontaktadresse(kontaktadresse, e)}, m("i.material-icons", "edit"))
m("div", m("strong", kontaktadresse.name)),
m("span", kontaktadresse.firma),
m("span", kontaktadresse.telefon),
m("span", kontaktadresse.email),
m("span", kontaktadresse.ort),
m("span", kontaktadresse.projektName),
m("button.w3-button.w3-small", {style: {padding: '0 2px'}, onclick: (e: Event) => editKontaktadresse(kontaktadresse, e)}, m("i.material-icons", "edit"))
]
}
@@ -118,7 +116,8 @@ export const kontaktadresseliste: m.ClosureComponent = (vnode) => {
treenodes: treenodes,
columnmapper: columnmapper,
filter: filterFunction,
onRowMarked: handleRowMarked
onRowMarked: handleRowMarked,
isSelected: (node: iTreenode) => node === selectedNode
} as iTreetable,
m(TopbarButton, {onclick: addKontaktadresseRoute, tooltip: "Neue Kontaktadresse anlegen"} as iTopbarButton,
m("i.material-icons", "person_add")
+12 -11
View File
@@ -115,18 +115,18 @@ export const kundenliste: m.ClosureComponent = (vnode) => {
const columnmapper: (node: iTreenode) => any[] = (node: iTreenode) => {
let kunde: iKunde = node.nodevalue
const isSelected = selectedNode === node
const cellStyle = isSelected ? {backgroundColor: 'lightgray'} : {}
return [
m("div", {style: cellStyle}, m("strong", kunde.name)),
m("span", {style: cellStyle}, kunde.strasse),
m("span", {style: cellStyle}, kunde.plz),
m("span", {style: cellStyle}, kunde.ort),
m("span", {style: cellStyle}, kunde.land),
m("button.w3-button.w3-small", {style: cellStyle, onclick: (e: Event) => editKunde(kunde, e)}, m("i.material-icons", "edit")),
m("button.w3-button.w3-small", {style: cellStyle, onclick: (e: Event) => showProjekte(kunde, e)}, m("i.material-icons", "library_books")),
m("button.w3-button.w3-small", {title: "Kontakte anzeigen", style: cellStyle, onclick: (e: Event) => showKontakte(kunde, e)}, m("i.material-icons", "contact_page"))
m("div", m("strong", kunde.name)),
m("span", kunde.strasse),
m("span", kunde.plz),
m("span", kunde.ort),
m("span", kunde.land),
m("div", {style: {display: 'flex', gap: '0', 'white-space': 'nowrap'}},
m("button.w3-button.w3-small", {style: {padding: '0 2px'}, onclick: (e: Event) => editKunde(kunde, e)}, m("i.material-icons", "edit")),
m("button.w3-button.w3-small", {style: {padding: '0 2px'}, onclick: (e: Event) => showProjekte(kunde, e)}, m("i.material-icons", "library_books")),
m("button.w3-button.w3-small", {title: "Kontakte anzeigen", style: {padding: '0 2px'}, onclick: (e: Event) => showKontakte(kunde, e)}, m("i.material-icons", "contact_page"))
)
]
}
@@ -155,7 +155,8 @@ export const kundenliste: m.ClosureComponent = (vnode) => {
treenodes: treenodes,
columnmapper: columnmapper,
filter: filterFunction,
onRowMarked: handleRowMarked
onRowMarked: handleRowMarked,
isSelected: (node: iTreenode) => node === selectedNode
} as iTreetable,
m(TopbarButton, {onclick: addKundeRoute, tooltip: "Neuen Kunden anlegen"} as iTopbarButton,
m("i.material-icons", "person_add")
+6 -7
View File
@@ -598,11 +598,9 @@ export const TagList: m.ClosureComponent = (vnode) => {
const columnmapper: (node: iTreenode) => any[] = (node: iTreenode) => {
let tag: iTag = node.nodevalue;
const isSelected = selectedNode === node;
const cellStyle = isSelected ? {backgroundColor: 'lightgray'} : {};
return [
m("span", {style: cellStyle},
m("span",
m("span", {
style: {
backgroundColor: tag.color,
@@ -615,9 +613,9 @@ export const TagList: m.ClosureComponent = (vnode) => {
}
}, tag.name)
),
m("span", {style: cellStyle}, tag.description),
m("div", {style: cellStyle},
m("button.w3-button.w3-small", {onclick: (e: Event) => editTag(tag, e)},
m("span", tag.description),
m("div",
m("button.w3-button.w3-small", {style: {padding: '0 2px'}, onclick: (e: Event) => editTag(tag, e)},
m("i.material-icons", "edit")
)
)
@@ -652,7 +650,8 @@ export const TagList: m.ClosureComponent = (vnode) => {
treenodes: treenodes,
columnmapper: columnmapper,
filter: filterFunction,
onRowMarked: handleRowMarked
onRowMarked: handleRowMarked,
isSelected: (node: iTreenode) => node === selectedNode
} as iTreetable
)
)