feat: implement cashier dashboard, dividend dashboards, share accounts views, and checker tasks

This commit is contained in:
2026-08-25 11:20:42 +05:30
parent 7ef75c902d
commit 0b79b0b0d3
77 changed files with 7396 additions and 426 deletions
+18 -4
View File
@@ -183,9 +183,13 @@ export class FooterComponent implements OnInit, OnDestroy {
*/
getConfigurations(): void {
if (this.authenticationService.isAuthenticated()) {
this.systemService
.getConfigurationByName(SettingsService.businessDateConfigName)
.subscribe((configurationData: any) => {
// Reading global configuration needs the READ_CONFIGURATION permission, which teller-style
// roles (cashier, clerk) do not carry. This runs from the footer on every authenticated
// page, so an unpermitted role was greeted by an "Unauthorized Request" modal at login for
// a check it never asked for. The footer only uses this to decide whether to show a
// business date, so a denied read is not an error here — it degrades to the system date.
this.systemService.getConfigurationByName(SettingsService.businessDateConfigName, true).subscribe({
next: (configurationData: any) => {
this.isBusinessDateEnabled = configurationData.enabled;
this.settingsService.setBusinessDateConfig(configurationData.enabled);
if (this.isBusinessDateEnabled) {
@@ -194,7 +198,17 @@ export class FooterComponent implements OnInit, OnDestroy {
this.getConfigurations();
}, 60000);
}
});
},
error: () => {
// No visibility of the config (403) or it is unavailable — leave the business date off
// and stop polling, rather than re-checking once a minute for a read this role will
// never be allowed to make. The stored config is deliberately left untouched: a denied
// read yields no value to record, and overwriting it here would let a cashier's session
// clobber what an authorised user established.
this.isBusinessDateEnabled = false;
clearTimeout(this.timer);
}
});
} else {
clearTimeout(this.timer);
}