Skip to content

Commit 40dbb81

Browse files
committed
feat(board): ignore status attribute
1 parent 62dc570 commit 40dbb81

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

apps/client/src/widgets/attribute_widgets/PromotedAttributesDisplay.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import FNote from "../../entities/fnote";
22

33
interface PromotedAttributesDisplayProps {
44
note: FNote;
5+
ignoredAttributes?: string[];
56
}
67

7-
export default function PromotedAttributesDisplay({ note }: PromotedAttributesDisplayProps) {
8+
export default function PromotedAttributesDisplay({ note, ignoredAttributes }: PromotedAttributesDisplayProps) {
89
const promotedDefinitionAttributes = note.getPromotedDefinitionAttributes();
910

1011
return (
@@ -15,6 +16,7 @@ export default function PromotedAttributesDisplay({ note }: PromotedAttributesDi
1516
const value = note.getLabelValue(name);
1617
const friendlyName = def?.promotedAlias ?? name;
1718
if (!value) return null;
19+
if (ignoredAttributes && ignoredAttributes.includes(name)) return null;
1820

1921
return (
2022
<div key={attr.name} className="promoted-attribute">

apps/client/src/widgets/collections/board/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default class BoardApi {
1616
private byColumn: ColumnMap | undefined,
1717
public columns: string[],
1818
private parentNote: FNote,
19-
private statusAttribute: string,
19+
readonly statusAttribute: string,
2020
private viewConfig: BoardViewData,
2121
private saveConfig: (newConfig: BoardViewData) => void,
2222
private setBranchIdToEdit: (branchId: string | undefined) => void

apps/client/src/widgets/collections/board/card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default function Card({
109109
title={t("board_view.edit-note-title")}
110110
onClick={handleEdit}
111111
/>
112-
<PromotedAttributesDisplay note={note} />
112+
<PromotedAttributesDisplay note={note} ignoredAttributes={[api.statusAttribute]} />
113113
</>
114114
) : (
115115
<TitleEditor

0 commit comments

Comments
 (0)