Skip to content

Commit

Permalink
fix: check if report is expense and change button color
Browse files Browse the repository at this point in the history
  • Loading branch information
BeeMargarida committed Oct 6, 2023
1 parent 3480ced commit ece330f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/ReportActionItem/ReportPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function ReportPreview(props) {
const iouCanceled = ReportUtils.isArchivedRoom(props.chatReport);
const numberOfRequests = ReportActionUtils.getNumberOfMoneyRequests(props.action);
const moneyRequestComment = lodashGet(props.action, 'childLastMoneyRequestComment', '');
const isReportDraft = ReportUtils.isReportDraft(props.iouReport);
const isReportDraft = ReportUtils.isPolicyExpenseChat(props.chatReport) && ReportUtils.isReportDraft(props.iouReport);

const transactionsWithReceipts = ReportUtils.getTransactionsWithReceipts(props.iouReportID);
const numberOfScanningReceipts = _.filter(transactionsWithReceipts, (transaction) => TransactionUtils.isReceiptBeingScanned(transaction)).length;
Expand Down Expand Up @@ -239,8 +239,8 @@ function ReportPreview(props) {
)}
{isReportDraft && (
<Button
success
medium
success={props.iouReport.isOwnPolicyExpenseChat}
text={translate('common.submit')}
style={styles.requestPreviewBox}
onPress={() => IOU.submitReport(props.iouReport)}
Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -2303,7 +2303,7 @@ function navigateToNextPage(iou, iouType, report, path = '') {
}

function submitReport() {
// TODO: this will be done in the future, part of wave 6: drafts
// Will be implemented in https://github.com/Expensify/App/issues/28763
}

export {
Expand Down

0 comments on commit ece330f

Please sign in to comment.