mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 09:59:02 +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 {
|
||||
note: FNote;
|
||||
ignoredAttributes?: string[];
|
||||
}
|
||||
|
||||
export default function PromotedAttributesDisplay({ note }: PromotedAttributesDisplayProps) {
|
||||
export default function PromotedAttributesDisplay({ note, ignoredAttributes }: PromotedAttributesDisplayProps) {
|
||||
const promotedDefinitionAttributes = note.getPromotedDefinitionAttributes();
|
||||
|
||||
return (
|
||||
@ -15,6 +16,7 @@ export default function PromotedAttributesDisplay({ note }: PromotedAttributesDi
|
||||
const value = note.getLabelValue(name);
|
||||
const friendlyName = def?.promotedAlias ?? name;
|
||||
if (!value) return null;
|
||||
if (ignoredAttributes && ignoredAttributes.includes(name)) return null;
|
||||
|
||||
return (
|
||||
<div key={attr.name} className="promoted-attribute">
|
||||
|
||||
@ -16,7 +16,7 @@ export default class BoardApi {
|
||||
private byColumn: ColumnMap | undefined,
|
||||
public columns: string[],
|
||||
private parentNote: FNote,
|
||||
private statusAttribute: string,
|
||||
readonly statusAttribute: string,
|
||||
private viewConfig: BoardViewData,
|
||||
private saveConfig: (newConfig: BoardViewData) => void,
|
||||
private setBranchIdToEdit: (branchId: string | undefined) => void
|
||||
|
||||
@ -109,7 +109,7 @@ export default function Card({
|
||||
title={t("board_view.edit-note-title")}
|
||||
onClick={handleEdit}
|
||||
/>
|
||||
<PromotedAttributesDisplay note={note} />
|
||||
<PromotedAttributesDisplay note={note} ignoredAttributes={[api.statusAttribute]} />
|
||||
</>
|
||||
) : (
|
||||
<TitleEditor
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user