mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 18:08:56 +01:00
feat(board): ignore status attribute
This commit is contained in:
parent
62dc570d38
commit
40dbb818c5
@ -2,9 +2,10 @@ import FNote from "../../entities/fnote";
|
|||||||
|
|
||||||
interface PromotedAttributesDisplayProps {
|
interface PromotedAttributesDisplayProps {
|
||||||
note: FNote;
|
note: FNote;
|
||||||
|
ignoredAttributes?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function PromotedAttributesDisplay({ note }: PromotedAttributesDisplayProps) {
|
export default function PromotedAttributesDisplay({ note, ignoredAttributes }: PromotedAttributesDisplayProps) {
|
||||||
const promotedDefinitionAttributes = note.getPromotedDefinitionAttributes();
|
const promotedDefinitionAttributes = note.getPromotedDefinitionAttributes();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -15,6 +16,7 @@ export default function PromotedAttributesDisplay({ note }: PromotedAttributesDi
|
|||||||
const value = note.getLabelValue(name);
|
const value = note.getLabelValue(name);
|
||||||
const friendlyName = def?.promotedAlias ?? name;
|
const friendlyName = def?.promotedAlias ?? name;
|
||||||
if (!value) return null;
|
if (!value) return null;
|
||||||
|
if (ignoredAttributes && ignoredAttributes.includes(name)) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={attr.name} className="promoted-attribute">
|
<div key={attr.name} className="promoted-attribute">
|
||||||
|
|||||||
@ -16,7 +16,7 @@ export default class BoardApi {
|
|||||||
private byColumn: ColumnMap | undefined,
|
private byColumn: ColumnMap | undefined,
|
||||||
public columns: string[],
|
public columns: string[],
|
||||||
private parentNote: FNote,
|
private parentNote: FNote,
|
||||||
private statusAttribute: string,
|
readonly statusAttribute: string,
|
||||||
private viewConfig: BoardViewData,
|
private viewConfig: BoardViewData,
|
||||||
private saveConfig: (newConfig: BoardViewData) => void,
|
private saveConfig: (newConfig: BoardViewData) => void,
|
||||||
private setBranchIdToEdit: (branchId: string | undefined) => void
|
private setBranchIdToEdit: (branchId: string | undefined) => void
|
||||||
|
|||||||
@ -109,7 +109,7 @@ export default function Card({
|
|||||||
title={t("board_view.edit-note-title")}
|
title={t("board_view.edit-note-title")}
|
||||||
onClick={handleEdit}
|
onClick={handleEdit}
|
||||||
/>
|
/>
|
||||||
<PromotedAttributesDisplay note={note} />
|
<PromotedAttributesDisplay note={note} ignoredAttributes={[api.statusAttribute]} />
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<TitleEditor
|
<TitleEditor
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user