Skip to content

Commit

Permalink
fix: hide groundForRefusal when status is not refused (#400)
Browse files Browse the repository at this point in the history
* RM#75117
  • Loading branch information
vhu-axelor authored Feb 9, 2024
1 parent 0e9f110 commit 3776226
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,15 @@ const TimesheetHeader = ({timesheet, statusSelect}: TimesheetHeaderProps) => {
/>
)}
</View>
{!checkNullString(timesheet.groundForRefusal) && (
<Label
message={`${I18n.t('Hr_GroundForRefusal')} : ${
timesheet.groundForRefusal
}`}
type="error"
/>
)}
{statusSelect === Timesheet.statusSelect.Refused &&
!checkNullString(timesheet.groundForRefusal) && (
<Label
message={`${I18n.t('Hr_GroundForRefusal')} : ${
timesheet.groundForRefusal
}`}
type="error"
/>
)}
</View>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ const ExpenseHeader = ({}) => {
? user?.activeCompany?.currency?.symbol
: user?.activeCompany?.currency?.code
}`}</Text>
{!checkNullString(expense?.groundForRefusal) && (
<Label
message={`${I18n.t('Hr_GroundForRefusal')} : ${
expense?.groundForRefusal
}`}
type="error"
/>
)}
{expense.statusSelect === Expense.statusSelect.Refused &&
!checkNullString(expense?.groundForRefusal) && (
<Label
message={`${I18n.t('Hr_GroundForRefusal')} : ${
expense?.groundForRefusal
}`}
type="error"
/>
)}
</View>
);
};
Expand Down

0 comments on commit 3776226

Please sign in to comment.