share certificate and share product maker checker

This commit is contained in:
2026-07-27 13:57:49 +05:30
parent d0536dbb11
commit 0c99dc3686
47 changed files with 2790 additions and 245 deletions
@@ -420,6 +420,14 @@ export class AuthenticationService {
return false;
}
/** Returns true when the logged-in user has the "Cashier" role. */
hasCashierRole(): boolean {
const creds = this.getCredentials();
if (!creds || !creds.roles) return false;
const roleNames: string[] = (creds.roles as any[]).map((r) => (r.name || r.role || '').toLowerCase().trim());
return roleNames.some((n) => n === 'cashier');
}
/**
* Sets the user credentials.
*