Mobile app behavior
The mobile app Expense list always displays the createdAt date. If a user has entered an expenseDate for a given expense, the expectation from the user is to see expenseDate displayed in the list rather than the createdAt date.
|
<Text className="text-xs text-slate-600"> |
|
{expense.createdAt.toLocaleDateString('en-US', { |
|
dateStyle: 'medium', |
|
})} |
|
</Text> |
Web app behavior
The web app correctly displays the expenseDate.
https://github.com/spliit-app/spliit-web/blob/5c9002e15ce0bcfb7d8efda7a4d348f89e29ff83/src/app/groups/%5BgroupId%5D/expenses/expense-list.tsx#L51-L59
function getGroupedExpensesByDate(expenses: ExpensesType) {
const today = dayjs()
return expenses.reduce((result: { [key: string]: ExpensesType }, expense) => {
const expenseGroup = getExpenseGroup(dayjs(expense.expenseDate), today)
result[expenseGroup] = result[expenseGroup] ?? []
result[expenseGroup].push(expense)
return result
}, {})
}
Mobile app behavior
The mobile app Expense list always displays the
createdAtdate. If a user has entered anexpenseDatefor a given expense, the expectation from the user is to seeexpenseDatedisplayed in the list rather than thecreatedAtdate.spliit-mobile/app/(tabs)/[groupId]/(tabs)/index.tsx
Lines 148 to 152 in bf1f087
Web app behavior
The web app correctly displays the
expenseDate.https://github.com/spliit-app/spliit-web/blob/5c9002e15ce0bcfb7d8efda7a4d348f89e29ff83/src/app/groups/%5BgroupId%5D/expenses/expense-list.tsx#L51-L59