Now the quality inspection card shows the status in bold + green if open#6849
Now the quality inspection card shows the status in bold + green if open#6849
Conversation
| field(Status; Rec.Status) | ||
| { | ||
| Editable = false; | ||
| StyleExpr = StatusStyleExpr; |
There was a problem hiding this comment.
Fine.
Just FYI: There is also another pattern that can be handy:
Style = "Favorable";
StyleExpr = Rec.Status = Rec.Status::Open;
The result is the same, but you don't need to code anything
|
@6CRIPT good point regarding Bold for Finished status. Please implement. |
| begin | ||
| IsOpen := Rec.Status = Rec.Status::Open; | ||
|
|
||
| StatusStyleExpr := |
There was a problem hiding this comment.
I suggest case statement, although it would be pretty much the same. On the other hand, please move this code to procedure in table (or codeunit), since it is used on the list page as well.
| CanReopen := RowActionsAreEnabled and not Rec.HasMoreRecentReinspection(); | ||
| CanFinish := RowActionsAreEnabled and (Rec.Status <> Rec.Status::Finished); | ||
| CanCreateReinspection := RowActionsAreEnabled; | ||
| StatusStyleExpr := |
There was a problem hiding this comment.
Should be needed only in OnAfterGetCurrRecord. Remove from OnOpenPage and OnAfterGetRecord.
Hm, another question is existing code in OnOpenPage that probably does nothing (as it is reading Rec). But not issue in scope of this PR.
|

Fixes AB#622626
Now if the Status is "Open" the Quality Inspection Card shows it in bold/green.


However, I was wondering if it makes sense also to propagate this change to the Quality Inspection List, like this:
The commit only includes the Card part (first image), therefore if you want, I can also push the second part to have the same format in the list.
Also Attila and I were wondering if we want the other status to be bold (but not green), not just default. Like for finished in "Sales Order"