# Staff Filtering Guide - What You Can See

## Quick Reference

This guide explains what data each staff member can see in the system based on their role.

---

## 👑 Admin / Superuser

### What You See:
- **ALL** clients across **ALL** branches
- **ALL** loans across **ALL** branches
- **ALL** transactions and reports

### Branch Selector:
- You can use the branch selector to filter data by specific branch
- This is **optional** - you can view all branches at once

### Example:
- Total clients: 68 (all branches)
- Select "Nairobi Branch": Shows only Nairobi clients
- Select "Main Branch": Shows only Main Branch clients

---

## 👨‍💼 Loan Officer / Team Leader

### What You See:
- **ONLY** clients assigned to your portfolio
- **ONLY** loans for your assigned clients
- **ONLY** repayments from your clients
- **ONLY** applications from your clients

### Branch Selector:
- You can further filter your portfolio by branch
- You will **never** see clients from other loan officers

### Example:
If you have 15 clients assigned to you:
- Dashboard shows: 15 clients, their loans, and repayments
- Another loan officer's 20 clients: **NOT VISIBLE** to you
- Branch filter: Shows only your clients in that branch

### Portfolio Assignment:
Your clients are assigned to you by an admin. To see a client:
1. Client must be assigned to you as portfolio manager
2. Client must be active in the system

---

## 📋 Secretary

### What You See:
- **ONLY** data from your assigned branch
- **ALL** clients in your branch (regardless of portfolio manager)
- **ALL** loans in your branch
- **ALL** transactions in your branch

### Branch Selector:
- Automatically set to your branch
- You cannot view other branches

### Example:
If you're assigned to "Mombasa Branch":
- You see all Mombasa clients (30 clients)
- You see all Mombasa loans
- You **cannot** see Nairobi or Main Branch data

---

## 🔍 Auditor

### What You See:
- **ONLY** data from your assigned branch
- **ALL** clients in your branch
- **ALL** loans and transactions in your branch
- **ALL** reports for your branch

### Branch Selector:
- Automatically set to your branch
- You cannot view other branches

### Example:
If you're assigned to "Nairobi Branch":
- You see all Nairobi data for auditing
- You **cannot** see other branches
- All reports show only Nairobi data

---

## 📊 Dashboard Sections - What's Filtered

### Portfolio Overview
- **Active Loans**: Only loans you can see
- **Portfolio Value**: Total value of your visible loans
- **Outstanding**: Outstanding amount from your visible loans
- **Collection Rate**: Based on your visible data

### Loans Due Today
- Shows only loans from your branch/portfolio that are due today

### Delinquent Loans
- Shows only overdue loans you have access to
- Categorized by: 1-30 days, 31-60 days, 60+ days

### Processing Fees
- Shows processing fees from loans you can see
- Current month data only

### Interest Income
- Shows interest from loans you can see
- Current month data only

### Registration Fees
- Shows registration fees from clients you can see
- Current month data only

### Customer Requests
- Shows requests from clients you can see
- Pending, In Progress, Resolved

### Completed Loans
- Shows completed loans you have access to
- This month and all-time totals

### Client Growth
- Shows client growth for your visible clients
- Weekly, monthly, yearly breakdown

---

## 🔄 How Branch Filtering Works

### For Admins:
```
All Data → [Select Branch] → Branch Data
```

### For Loan Officers:
```
Your Portfolio → [Select Branch] → Your Portfolio in That Branch
```

### For Secretaries/Auditors:
```
Your Branch Data (Fixed)
```

---

## ❓ Common Questions

### Q: Why can't I see a specific client?
**A:** Check:
1. **Loan Officer**: Is the client assigned to your portfolio?
2. **Secretary/Auditor**: Is the client in your branch?
3. **All**: Is the client active in the system?

### Q: Why do my numbers differ from my colleague's?
**A:** Each staff member sees different data based on their role:
- Loan officers see only their portfolio
- Secretaries see only their branch
- Admins see everything

### Q: Can I see clients from other branches?
**A:** 
- **Admin**: Yes, use the branch selector
- **Loan Officer**: Only if they're in your portfolio
- **Secretary/Auditor**: No, only your branch

### Q: How do I know which branch I'm viewing?
**A:** Look at the top of the page:
```
Current Branch: [Branch Name] 🔍 Zoom
```

### Q: Can I change my branch?
**A:** 
- **Admin**: Yes, use the branch selector dropdown
- **Loan Officer**: Yes, to filter your portfolio
- **Secretary/Auditor**: No, you're locked to your branch

---

## 🎯 Best Practices

### For Loan Officers:
1. Regularly review your portfolio dashboard
2. Focus on your assigned clients
3. Use branch filter to organize your work by location
4. Contact admin if you need clients reassigned

### For Secretaries:
1. Monitor all branch activities
2. Ensure data accuracy for your branch
3. Report any discrepancies to branch manager
4. Keep branch records up to date

### For Auditors:
1. Review all branch transactions regularly
2. Generate reports for your branch
3. Verify data integrity
4. Report issues to management

### For Admins:
1. Use branch filter to focus on specific branches
2. Monitor overall system performance
3. Ensure proper client assignments
4. Review cross-branch analytics

---

## 🛠️ Troubleshooting

### Issue: I see no data
**Check:**
1. Do you have clients assigned? (Loan Officers)
2. Is your branch set correctly? (Secretaries/Auditors)
3. Are there any active clients/loans in your scope?
4. Contact your system administrator

### Issue: Numbers seem wrong
**Check:**
1. Are you viewing the correct branch?
2. Is the date range correct?
3. Are filters applied correctly?
4. Refresh the page and try again

### Issue: Can't access a report
**Check:**
1. Do you have permission for that report?
2. Is there data available for your scope?
3. Try a different date range
4. Contact your administrator

---

## 📞 Support

If you have questions about what you can see:
1. Check this guide first
2. Verify your role and branch assignment
3. Contact your branch manager
4. Contact system administrator

---

## 🔐 Security Note

The filtering system ensures:
- Data privacy between branches
- Portfolio confidentiality
- Proper access control
- Audit trail compliance

**Never share your login credentials** - each staff member should have their own account with appropriate access levels.
