Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/frontend/src/components/editors/NotesEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
const sibling =
mdeInstance?.codemirror.getWrapperElement()?.nextSibling;

if (sibling != null) {
if (sibling != null && editable != false) {

Check warning on line 220 in src/frontend/src/components/editors/NotesEditor.tsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Refactor the code to avoid using this boolean literal.

See more on https://sonarcloud.io/project/issues?id=inventree_InvenTree&issues=AZ36dTbWsrRB7EZG1DTP&open=AZ36dTbWsrRB7EZG1DTP&pullRequest=11880
EasyMDE.togglePreview(mdeInstance);
}
}
Expand Down
8 changes: 7 additions & 1 deletion src/frontend/src/pages/purchasing/PurchaseOrderDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,13 @@
NotesPanel({
model_type: ModelType.purchaseorder,
model_id: order.pk,
has_note: !!order.notes
has_note: !!order.notes,
// TODO @matmair - change API to include a "locked" attribute that we can check here

Check warning on line 414 in src/frontend/src/pages/purchasing/PurchaseOrderDetail.tsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=inventree_InvenTree&issues=AZ36dTgosrRB7EZG1DTS&open=AZ36dTgosrRB7EZG1DTS&pullRequest=11880
editable:
order.status == poStatus.COMPLETE &&
!globalSettings.isSet('PURCHASEORDER_EDIT_COMPLETED_ORDERS')
? false
: undefined
})
];
}, [order, id, user]);
Expand Down
8 changes: 7 additions & 1 deletion src/frontend/src/pages/sales/SalesOrderDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,13 @@
NotesPanel({
model_type: ModelType.salesorder,
model_id: order.pk,
has_note: !!order.notes
has_note: !!order.notes,
// TODO @matmair - change API to include a "locked" attribute that we can check here

Check warning on line 452 in src/frontend/src/pages/sales/SalesOrderDetail.tsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=inventree_InvenTree&issues=AZ36dTfwsrRB7EZG1DTQ&open=AZ36dTfwsrRB7EZG1DTQ&pullRequest=11880
editable:
order.status == soStatus.COMPLETE &&
!globalSettings.isSet('SALESORDER_EDIT_COMPLETED_ORDERS')
? false
: undefined
})
];
}, [order, id, user, soStatus, user]);
Expand Down
Loading