feat(board): ignore status attribute

This commit is contained in:
Elian Doran 2025-11-12 19:09:59 +02:00
parent 62dc570d38
commit 40dbb818c5
No known key found for this signature in database
3 changed files with 5 additions and 3 deletions

View File

@ -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">

View File

@ -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

View File

@ -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