feat: recurring deposit enhancements, dashboard, chart, and account view updates

This commit is contained in:
2026-10-12 10:23:10 +05:30
parent 6b0f218b70
commit 2d2eac8d03
69 changed files with 3619 additions and 595 deletions
+9 -1
View File
@@ -226,7 +226,15 @@ export class SettingsService {
* Returns current Business date server
*/
get businessDate(): Date {
return this.dateUtils.convertToDate(localStorage.getItem('mifosXServerDate'), SettingsService.businessDateFormat);
// With business dates switched off the server works on today's date, so the screens must too - the date
// stored from when it was on would otherwise linger. Nothing stored (or unreadable) also falls back to today
// instead of an Invalid Date.
if (this.businessDateConfig === 'false') {
return new Date();
}
const stored = localStorage.getItem('mifosXServerDate');
const date = stored ? this.dateUtils.convertToDate(stored, SettingsService.businessDateFormat) : null;
return date && !isNaN(date.getTime()) ? date : new Date();
}
/**