feat(cashier): add full-screen cashier teller workstation dashboard
- Add Transaction Entry screen with full account details panel (personal info, joint holders, nominees, KYC, balances) - Role-based layout: CASHIER role hides nav/sidebar/ticker, redirects to /cashier/transaction-entry on login - Denomination entry with opening/closing position preview (notes first then coins, stepper +/- round button inputs) - Auto-fetch savings/current/FD/RD accounts with associations, client KYC, nominees, addresses, family members (S/D/W/H/O) - Submit deposit/withdrawal via POST /transactions with denominationBreakdown - Cashier position auto-loads for CASHIER role (no filter dropdowns) - Pagination added to cash-history tabs and currency-exchange-detail - Cashier menu simplified for cashier role permissions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c8e9ab8f84
commit
9094b9a0eb
@@ -8,7 +8,8 @@
|
||||
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { map, catchError } from 'rxjs/operators';
|
||||
|
||||
/** HTTP service for the Cashier menu features. */
|
||||
@Injectable({ providedIn: 'root' })
|
||||
@@ -24,8 +25,9 @@ export class CashierService {
|
||||
createCashExchange(data: any): Observable<any> {
|
||||
return this.http.post('/cashexchange', data);
|
||||
}
|
||||
getCashExchanges(): Observable<any[]> {
|
||||
return this.http.get<any[]>('/cashexchange');
|
||||
getCashExchanges(offset = 0, limit = 20): Observable<any> {
|
||||
const params = new HttpParams().set('offset', offset).set('limit', limit);
|
||||
return this.http.get<any>('/cashexchange', { params });
|
||||
}
|
||||
getCashExchange(id: number): Observable<any> {
|
||||
return this.http.get(`/cashexchange/${id}`);
|
||||
@@ -49,8 +51,9 @@ export class CashierService {
|
||||
createCashTransfer(data: any): Observable<any> {
|
||||
return this.http.post('/cashtransfer', data);
|
||||
}
|
||||
getCashTransfers(): Observable<any[]> {
|
||||
return this.http.get<any[]>('/cashtransfer');
|
||||
getCashTransfers(offset = 0, limit = 20): Observable<any> {
|
||||
const params = new HttpParams().set('offset', offset).set('limit', limit);
|
||||
return this.http.get<any>('/cashtransfer', { params });
|
||||
}
|
||||
getCashTransferById(id: number): Observable<any> {
|
||||
return this.http.get(`/cashtransfer/${id}`);
|
||||
@@ -63,8 +66,9 @@ export class CashierService {
|
||||
createCashSettlement(data: any): Observable<any> {
|
||||
return this.http.post('/cashsettlement', data);
|
||||
}
|
||||
getCashSettlements(): Observable<any[]> {
|
||||
return this.http.get<any[]>('/cashsettlement');
|
||||
getCashSettlements(offset = 0, limit = 20): Observable<any> {
|
||||
const params = new HttpParams().set('offset', offset).set('limit', limit);
|
||||
return this.http.get<any>('/cashsettlement', { params });
|
||||
}
|
||||
getCashSettlementById(id: number): Observable<any> {
|
||||
return this.http.get(`/cashsettlement/${id}`);
|
||||
@@ -77,8 +81,9 @@ export class CashierService {
|
||||
createInterCashierTransfer(data: any): Observable<any> {
|
||||
return this.http.post('/cashintercashier', data);
|
||||
}
|
||||
getInterCashierTransfers(): Observable<any[]> {
|
||||
return this.http.get<any[]>('/cashintercashier');
|
||||
getInterCashierTransfers(offset = 0, limit = 20): Observable<any> {
|
||||
const params = new HttpParams().set('offset', offset).set('limit', limit);
|
||||
return this.http.get<any>('/cashintercashier', { params });
|
||||
}
|
||||
getInterCashierById(id: number): Observable<any> {
|
||||
return this.http.get(`/cashintercashier/${id}`);
|
||||
@@ -157,6 +162,15 @@ export class CashierService {
|
||||
return this.http.get('/cashreconciliation/expected/me', { params });
|
||||
}
|
||||
|
||||
// ── Current cashier identity ──
|
||||
// Returns cashierId + cashierName for the logged-in user, or null if not a cashier.
|
||||
getCurrentCashierInfo(): Observable<{ cashierId: number; cashierName: string } | null> {
|
||||
return this.getCashierPositionForMe().pipe(
|
||||
map((pos: any) => (pos?.cashierId ? { cashierId: pos.cashierId, cashierName: pos.cashierName ?? '' } : null)),
|
||||
catchError(() => of(null))
|
||||
);
|
||||
}
|
||||
|
||||
// ── Payment Types ──
|
||||
getPaymentTypes(): Observable<any[]> {
|
||||
return this.http.get<any[]>('/paymenttypes');
|
||||
|
||||
Reference in New Issue
Block a user