Oviya commited on
Commit ·
b509c12
1
Parent(s): 0c1769d
revert
Browse filesFiles changed (7)
- src/app/case-details-page/case-details-page.component.css+10-402
- src/app/case-details-page/case-details-page.component.html+24-139
- src/app/case-details-page/case-details-page.component.ts+2-321
- src/app/recordpage/recordpage.component.css+252-368
- src/app/recordpage/recordpage.component.html+3-3
- src/app/recordpage/recordpage.component.ts-2
- src/app/shared/case-store.service.ts-2
123456789415 unmodified lines42542642742842943043143243343443543643743843922 unmodified lines4624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095107 unmodified lines518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870@import '../recordpage/recordpage.component.css';body, html {overflow: auto !important;}body, main.content {background: #f4f6fa;min-height: 100vh;415 unmodified linesmax-width: 320px;}.next-action-col {text-align: left;min-width: 120px;padding-left: 0;padding-right: 0;font-weight: 500;color: #2563eb;}@media (max-width: 700px) {.actions .btn {min-width: 120px;22 unmodified lines}}/* table layout for case details page */.record-table {width: 100%;table-layout: auto;border-collapse: collapse;overflow-x: hidden;box-sizing: border-box;}.record-table th, .record-table td {padding-left: 12px;padding-right: 12px;word-break: break-word;white-space: normal;box-sizing: border-box;border-bottom: 1px solid #e5e7eb; /* consistent row border */}.record-table tr:last-child td {border-bottom: none;}th.actions, td.actions {text-align: left;padding-left: 0;padding-right: 0;}td.actions {vertical-align: middle;}.icon-btn.view {margin: 0;padding: 0;background: none;border: none;cursor: pointer;color: #2563eb;font-size: 1.4em;display: flex;align-items: center;justify-content: flex-start;}.custom-active-cases-label {7 unmodified linesright: 32vw;}.filter-bar select,.filter-bar .filter-date {padding: 6px 18px;border-radius: 6px;border: 1.5px solid #cbd5e1;font-size: 1em;color: #2563eb;background: #fff;font-weight: 600;outline: none;transition: border 0.15s;min-width: 160px;margin-right: 4px;}.filter-bar select:focus,.filter-bar .filter-date:focus {border: 1.5px solid #38bdf8;}.date-group {display: inline-flex;align-items: center;font-family: inherit;color: #a86a00;font-size: 1.08em;font-weight: 500;margin-right: 8px;gap: 2px;}.date-label {margin: 0 4px 0 4px;display: inline-flex;align-items: center;gap: 2px;}.calendar-ico {font-size: 1.1em;margin-left: 2px;vertical-align: middle;}.filter-date {border: none;background: transparent;color: #a86a00;font-size: 1em;font-weight: 600;outline: none;min-width: 90px;margin-left: 2px;}.filter-date::-webkit-input-placeholder { color: #a86a00; }.filter-date:-moz-placeholder { color: #a86a00; }.filter-date::-moz-placeholder { color: #a86a00; }.filter-date:-ms-input-placeholder { color: #a86a00; }.fullpage-details {width: 100vw;min-height: 100vh;background: #f8fafc;padding: 32px 0 32px 0;position: relative;z-index: 1;}.details-content {max-width: 1200px;margin: 0 auto;background: #fff;border-radius: 18px;box-shadow: 0 8px 32px rgba(30,41,59,0.12);padding: 32px 48px;}.btn.back-btn {margin: 0 0 24px 0;background: #64748b;color: #fff;border-radius: 8px;font-weight: 600;font-size: 1.1rem;padding: 10px 28px;border: none;cursor: pointer;}.fullpage-popup-overlay {position: fixed;top: 0; left: 0; right: 0; bottom: 0;width: 100vw;height: 100vh;background: #f8fafc;z-index: 9999;display: flex;align-items: flex-start;justify-content: center;overflow-y: auto;overscroll-behavior: contain;}body.popup-open {overflow: hidden !important;}.fullpage-popup-content {background: #fff;border-radius: 18px;box-shadow: 0 8px 32px rgba(30,41,59,0.18);margin: 40px 0;max-width: 1200px;width: 90vw;min-height: 80vh;padding: 32px 48px;position: relative;}/* --- Section Card Styles --- */.details-section-card {background: #fff;border-radius: 22px;box-shadow: 0 4px 24px rgba(30,41,59,0.10);border-left: 6px solid #38bdf8;border-right: 2px solid #e0f2fe;padding: 32px 36px 32px 36px;margin-bottom: 0;margin-top: 32px;animation: fadeInUp 0.6s cubic-bezier(.23,1.01,.32,1) both;}@keyframes fadeInUp {from { opacity: 0; transform: translateY(32px); }to { opacity: 1; transform: translateY(0); }}.section-title {font-size: 1.5rem;font-weight: 700;color: #2563eb;margin-bottom: 18px;letter-spacing: 0.5px;}.subgroup-pills {display: flex;gap: 18px;margin-bottom: 28px;flex-wrap: wrap;}.subgroup-pills button {background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);color: #fff;font-weight: 700;border: none;border-radius: 22px;padding: 10px 32px;font-size: 1.08em;box-shadow: 0 2px 12px rgba(56,189,248,0.13);cursor: pointer;transition: background 0.18s, box-shadow 0.18s, transform 0.18s;outline: none;margin-bottom: 4px;}.subgroup-pills button.active,.subgroup-pills button:focus {background: linear-gradient(90deg, #38bdf8 0%, #2563eb 100%);box-shadow: 0 4px 16px rgba(56,189,248,0.18);transform: translateY(-2px) scale(1.04);}.fields-table-2col {display: flex;flex-direction: row;gap: 0;margin-top: 8px;margin-bottom: 8px;}.fields-col {display: flex;flex-direction: column;gap: 6px;}.fields-col-labels {min-width: 260px;text-align: left;}.fields-col-values {min-width: 220px;text-align: right;}.field-label {color: #22223b;font-weight: 500;font-size: 1.08em;padding: 2px 0;}.field-value {color: #22223b;font-weight: 700;font-size: 1.08em;padding: 2px 0;letter-spacing: 0.5px;}/* --- Card Container and Title --- */.case-details-title {font-size: 2.2rem;font-weight: 700;color: #22223b;margin-bottom: 32px;margin-left: 8px;display: flex;align-items: center;justify-content: space-between;position: relative;}.btn.close-btn {background: none;color: #64748b;border: none;font-size: 2.2rem;font-weight: 700;cursor: pointer;position: absolute;right: 0;top: 0;line-height: 1;padding: 0 16px;transition: color 0.15s;}.btn.close-btn:hover {color: #2563eb;}.btn.close-btn-bottom {position: absolute;right: 32px;top: 32px;background: #2563eb;color: #fff;border: none;border-radius: 50%;width: 48px;height: 48px;font-size: 2.2rem;font-weight: 700;box-shadow: 0 4px 16px rgba(56,189,248,0.18);cursor: pointer;z-index: 10001;display: flex;align-items: center;justify-content: center;transition: background 0.18s, color 0.18s, box-shadow 0.18s;}.btn.close-btn-bottom:hover {background: #38bdf8;color: #22223b;}.progress-col {text-align: left;min-width: 90px;padding-left: 0;padding-right: 0;}.progress-dot {width: 18px;height: 18px;border-radius: 50%;display: inline-block;margin-right: 6px;vertical-align: middle;box-shadow: 0 2px 8px rgba(56,189,248,0.10);}.progress-dot.blue {background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);}.progress-dot.green {background: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%);}.progress-check {font-size: 1.2em;color: #34d399;background: #d1fae5;border-radius: 4px;padding: 2px 4px;display: inline-block;margin-right: 6px;vertical-align: middle;}.progress-value {font-weight: 700;font-size: 1em;color: #22223b;vertical-align: middle;}.priority-pill {display: inline-flex;align-items: center;font-weight: bold;font-size: 0.98em;padding: 2px 12px 2px 8px;border-radius: 16px;margin-right: 2px;letter-spacing: 0.02em;}.priority-high {background: #fee2e2;color: #b91c1c;}.priority-medium {background: #fef9c3;color: #ca8a04;}.priority-low {background: #dcfce7;color: #15803d;}.evidence-upload-section {margin-top: 32px;padding: 16px;background: #f3f4f6;border-radius: 12px;box-shadow: 0 1px 4px rgba(0,0,0,0.04);}.evidence-upload-section h3 {margin-bottom: 12px;font-size: 1.1em;color: #2563eb;}.evidence-list {margin-top: 10px;}.evidence-file {display: flex;align-items: center;font-size: 0.98em;margin-bottom: 6px;color: #374151;}.evidence-file i {margin-right: 8px;color: #2563eb;}12345415 unmodified lines42142242342442542622 unmodified lines4494504514524534544554564574584594604614624634644654664677 unmodified lines475476477478@import '../recordpage/recordpage.component.css';body, main.content {background: #f4f6fa;min-height: 100vh;415 unmodified linesmax-width: 320px;}@media (max-width: 700px) {.actions .btn {min-width: 120px;22 unmodified lines}}/* Make all table columns equal width */.records {table-layout: fixed;width: 100%;}.records th,.records td {width: 16.66%; /* 6 columns, 100/6 = 16.66% */text-align: center;vertical-align: middle;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}.custom-active-cases-label {7 unmodified linesright: 32vw;}
42 unmodified lines4344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101116 unmodified lines11811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323442 unmodified lines<div class="summary-label">Closed</div><div class="summary-value">{{ closedCases }}</div></div><div class="summary-card review"><div class="summary-label">Pending Review</div><div class="summary-value">{{ reviewCases }}</div></div></div><div class="record-meta" style="padding: 8px 24px 0 24px; color: #6b7280; font-size: 0.98em;">{{ filteredCases.length }} items • Updated a few seconds ago</div><div class="filter-bar"><select [(ngModel)]="filterStatus"><option value="">Status</option><option *ngFor="let status of statusTypes">{{ status }}</option></select><select [(ngModel)]="filterCrimeType"><option value="">Crime Type</option><option *ngFor="let type of crimeTypes">{{ type }}</option></select><button (click)="applyFilters()">Apply</button><button (click)="resetFilters()">Reset</button></div><!-- Table/list view always visible --><table class="record-table"><thead><tr><th>#</th><th>Case ID</th><th>Priority</th><th>Status</th><th>Crime Type</th><th>Date & Time</th><th>Location</th><th>Suspect Name</th><th>Last Updated</th><th class="progress-col">Progress</th><th class="next-action-col">Next Action</th><th class="actions">Actions</th></tr></thead><tbody><tr *ngFor="let c of filteredCases; let i = index"><td>{{ i + 1 }}</td><td class="mono"><a (click)="openDetails(c)" style="cursor:pointer; color:#2563eb; text-decoration:underline;">{{ c.caseId || '—' }}</a></td><td><ng-container [ngSwitch]="getCasePriority(c)"><span *ngSwitchCase="'High'" class="priority-pill priority-high" title="High Priority">🔴 High</span><span *ngSwitchCase="'Medium'" class="priority-pill priority-medium" title="Medium Priority">🟡 Medium</span><span *ngSwitchCase="'Low'" class="priority-pill priority-low" title="Low Priority">🟢 Low</span><span *ngSwitchDefault style="color:#6b7280;">—</span></ng-container></td><td><span class="status-label"[ngClass]="{6 unmodified lines</td><td>{{ c.crime || '—' }}</td><td>{{ c.dateTime ? (c.dateTime | date:'M/d/yyyy HH:mm') : '—' }}</td><td>{{ c.police.address || '—' }}</td><td>{{ c.accused.name || '—' }}</td><td>{{ c.lastUpdated ? (c.lastUpdated | date:'M/d/yyyy HH:mm') : '—' }}</td><td class="progress-col"><ng-container [ngSwitch]="getProgressValue(c)"><ng-container *ngSwitchCase="100"><span class="progress-check">✔</span><span class="progress-value">100%</span></ng-container><ng-container *ngSwitchCase="75"><span class="progress-dot green"></span><span class="progress-value">75%</span></ng-container><ng-container *ngSwitchDefault><span class="progress-dot blue"></span><span class="progress-value">{{ getProgressValue(c) }}%</span></ng-container></ng-container></td><td class="next-action-col">{{ getNextActionMessage(c) }}</td><td class="actions"><button type="button" class="icon-btn view" (click)="openDetails(c)" title="View Case Details" aria-label="View Case Details"><i class="fas fa-eye"></i></button><button *ngIf="isInvestigator()" type="button" class="icon-btn upload" (click)="showEvidencePanel(c)" title="Upload Evidence" aria-label="Upload Evidence"><i class="fas fa-upload"></i></button></td></tr><tr *ngIf="filteredCases.length === 0"><td colspan="12" class="empty">No records found.</td></tr></tbody></table><!-- Evidence Upload Section for Investigators only, below the table --><div *ngIf="isInvestigator() && selectedCase" class="evidence-upload-section"><h3>Upload Evidence for Case: {{ selectedCase.caseId }}</h3><input type="file" multiple (change)="onEvidenceUpload($event)" /><div class="evidence-list" *ngIf="uploadedEvidence.length"><div *ngFor="let file of uploadedEvidence" class="evidence-file"><i class="fas fa-file-upload"></i> {{ file.name }}</div></div></div><!-- Evidence Upload Panel for selected case --><div *ngIf="isInvestigator() && evidencePanelCase && evidencePanelCase.caseId" class="evidence-upload-section"><hr class="evidence-hr" /><div class="evidence-title"><i class="fas fa-folder-open evidence-folder"></i>Evidence Upload for Case: {{ evidencePanelCase.caseId }}</div><hr class="evidence-hr" /><div class="evidence-type-tabs"><button [class.active]="evidenceType === 'Document'" (click)="setEvidenceType('Document')">Document</button><button [class.active]="evidenceType === 'Photo'" (click)="setEvidenceType('Photo')">Photo</button></div><div class="evidence-actions"><label class="evidence-file-label">[Choose File]<input type="file" multiple (change)="onEvidenceFileSelectType($event)" style="display:none;" /></label></div><hr class="evidence-hr" /><div class="evidence-list-block"><div class="evidence-list-title">Uploaded Evidence ({{ evidenceType }}):</div><div *ngFor="let file of evidenceFiles[evidencePanelCase.caseId][evidenceType]" class="evidence-file-row"><i [ngClass]="getEvidenceIcon(file.name)" class="evidence-file-icon"></i><span class="evidence-file-name">{{ file.name }}</span><a class="evidence-view-link" href="#" (click)="viewEvidenceFile(file)">(View)</a></div></div><hr class="evidence-hr" /></div><!-- Full-page overlay for details (no evidence upload here) --><div *ngIf="selectedCase" class="fullpage-popup-overlay"><div class="fullpage-popup-content"><div class="case-details-title">Case Details</div><div class="details-sections"><ng-container *ngFor="let sectionKey of ['crime', 'suspect', 'notes']"><div class="details-section-card"><div class="section-title">{{ sections[sectionKey].title }}</div><div class="subgroup-pills"><button *ngFor="let subgroup of getSubgroups(sectionKey)"[class.active]="selectedSubgroup[sectionKey] === subgroup"(click)="selectSubgroup(sectionKey, subgroup)">{{ subgroup }}</button></div><div class="fields-table-2col"><div class="fields-col fields-col-labels"><div class="field-label" *ngFor="let field of getFieldsForSubgroup(sectionKey, selectedSubgroup[sectionKey])">{{ field }}</div></div><div class="fields-col fields-col-values"><div class="field-value" *ngFor="let field of getFieldsForSubgroup(sectionKey, selectedSubgroup[sectionKey])">{{ getFieldValue(selectedCase, sectionKey, field) }}</div></div></div></div></ng-container></div><button class="btn close-btn-bottom" (click)="closeDetails()" title="Close">×</button></div></div></div><!-- End of record-card -->42 unmodified lines4344454647484950515253545556575859606162636465666768697071726 unmodified lines79808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811942 unmodified lines<div class="summary-label">Closed</div><div class="summary-value">{{ closedCases }}</div></div></div><div class="record-meta" style="padding: 8px 24px 0 24px; color: #6b7280; font-size: 0.98em;">{{ filteredCases.length }} items • Updated a few seconds ago</div><table class="record-table"><thead><tr><th>#</th><th>Case ID</th><th>Status</th><th>Crime Type</th><th>Date & Time</th><th>Location</th><th>Suspect Name</th><th>Last Updated</th><th>Actions</th></tr></thead><tbody><tr *ngFor="let c of filteredCases; let i = index"><td>{{ i + 1 }}</td><td class="mono">{{ c.caseId || '—' }}</td><td><span class="status-label"[ngClass]="{6 unmodified lines</td><td>{{ c.crime || '—' }}</td><td>{{ c.dateTime ? (c.dateTime | date:'M/d/yyyy HH:mm') : '—' }}</td><td>{{ c.police?.address || '—' }}</td><td>{{ c.accused?.name || '—' }}</td><td>{{ c.lastUpdated ? (c.lastUpdated | date:'M/d/yyyy HH:mm') : '—' }}</td><td class="actions"><button type="button" class="icon-btn view" (click)="openDetails(c)" title="View Details"><i class="fas fa-eye"></i></button></td></tr><tr *ngIf="filteredCases.length === 0"><td colspan="9" class="empty">No records found.</td></tr></tbody></table></div><!-- Modal white blur overlay for background --><div class="modal-blur-overlay" *ngIf="showDetails"></div><div class="modal" *ngIf="showDetails" role="dialog" aria-modal="true" aria-labelledby="detailsTitle"><div class="modal-header"><h2 id="detailsTitle">Case Details</h2></div><div class="modal-body" *ngIf="selectedCase as sc"><div class="detail-row"><span>Case ID</span><b>{{ sc.caseId || '—' }}</b></div><div class="detail-row"><span>Status</span><b>{{ sc.status || '—' }}</b></div><div class="detail-row"><span>Crime Type</span><b>{{ sc.crime || '—' }}</b></div><div class="detail-row"><span>Date & Time</span><b>{{ sc.dateTime ? (sc.dateTime | date:'M/d/yyyy HH:mm') : '—' }}</b></div><div class="detail-row"><span>Location</span><b>{{ sc.police.address || '—' }}</b></div><div class="detail-row"><span>Suspect Name</span><b>{{ sc.accused.name || '—' }}</b></div><div class="detail-row"><span>Last Updated</span><b>{{ sc.lastUpdated ? (sc.lastUpdated | date:'M/d/yyyy HH:mm') : '—' }}</b></div><hr /><div class="detail-row"><span>Notes / Explanation</span><b>{{ sc.police.information || '—' }}</b></div></div><div class="modal-footer"><button type="button" class="btn" (click)="closeDetails()">Close</button></div></div>
1 unmodified line234567896 unmodified lines161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172732 unmodified lines7677787980818283848586878889909192939412 unmodified lines1071081091101111121131141151161171181191201211221231241251261271281291301311321333 unmodified lines1371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813821 unmodified lineimport { Router } from '@angular/router';import { CaseStoreService, PoliceCase } from '../shared/case-store.service';type EvidenceType = 'Document' | 'Photo';@Component({selector: 'app-case-details-page',templateUrl: './case-details-page.component.html',6 unmodified linesusername: string = '';q: string = '';filterStatus: string = '';filterCrimeType: string = '';filterDateFrom: string = '';filterDateTo: string = '';sections: any = {crime: {title: 'Crime Details',subgroups: {'Identification & Timing': ['Case ID', 'FIR / Ref #', 'Crime Type', 'Case Category', 'Date & Time (Entry)', 'Occurred From', 'Occurred To', 'Time Reported', 'Time Discovered', 'Country', 'State', 'District', 'Number of Victims', 'Brief Description'],'Location & People': ['Location', 'Jurisdiction / PS', 'Scene Type', 'Reported By', 'Reported Contact', 'Witness Count', 'Victim Name', 'Victim Contact', 'Victim Summary', 'Suspected Offender Known?', 'Suspect Link'],'Offence & Context': ['Legal Sections / Charges', 'Offence Category', 'Offence Description', 'Suspected Motive', 'Confirmed Motive', 'Weapon Involved', 'Property Loss / Damage'],'Evidence & Scene': ['Evidence Collected', 'Forensic Tests Required', 'Scene Condition', 'Photos / Video?', 'CCTV Present?', 'CCTV Sources / IDs', 'Physical Evidence (list)', 'Chain of Custody?', 'Digital Evidence', 'Evidence Storage Reference'],'Operational Notes': ['Investigating Officer', 'Duty Person', 'Supervising Officer', 'Patrol Notes', 'Arrest Made', 'Arrest Location', 'Initial Actions Taken', 'riskLevel', 'Confidentiality'],'Status & Linkage': ['Biometric / Forensic IDs', 'DNA Ref ID', 'Fingerprint ID', 'Case Status', 'Linked Cases', 'arrestCount', 'Case Priority', 'Follow-up Date', 'Court Case ID', 'Next Hearing Date', 'Final Summary'],'Remark': ['Remark']}},suspect: {title: 'Suspect Details',subgroups: {'Identity': ['Suspect ID', 'Suspect Name', 'Alias / Nickname', 'Age', 'Gender', 'Nationality', 'Nationality ID / Passport Number', 'Languages', 'Address', 'Known Aliases', 'Government ID'],'Physical Description': ['Height (cm)', 'Weight (kg)', 'Build', 'Hair Color', 'Eye Color', 'Distinguishing Marks', 'Tattoo Details', 'Scar Details', 'Photo Upload'],'Background': ['Employment', 'Education', 'Occupation', 'Company', 'Workplace Address', 'Marital Status', 'Known Habits', 'Known Financial Details'],'Known Associates': ['Associate Names', 'Gang Affiliation', 'Family Connections', 'Social Media Handles'],'Prior Records': ['Criminal History', 'Prior Arrests', 'Probation/Parole Status'],'Remark': ['Remark']}},notes: {title: 'Evidence and Documents',subgroups: {'Investigation Notes': ['Initial Findings', 'Detailed Notes', 'Status', 'Version History / Updates'],'Evidence Files': ['Evidence Photos', 'Evidence Videos', 'Evidence Documents'],'Links and Recommendation': ['Links to Evidence', 'Final Recommendations'],'Remark': ['Remark']}}};selectedSubgroup: any = {crime: 'Identification & Timing',suspect: 'Identity',notes: 'Investigation Notes'};uploadedEvidence: File[] = [];evidencePanelCase: PoliceCase | null = null;evidenceType: EvidenceType = 'Document';evidenceFiles: { [caseId: string]: { Document: File[]; Photo: File[] } } = {};constructor(private caseStore: CaseStoreService, private router: Router) {}ngOnInit(): void {2 unmodified lines}get filteredCases(): PoliceCase[] {let filtered = this.cases;if (this.filterStatus) {filtered = filtered.filter(c => c.status === this.filterStatus);}if (this.filterCrimeType) {filtered = filtered.filter(c => c.crime === this.filterCrimeType);}// Add date filtering logic here if neededif (!this.q?.trim()) return filtered;const qLower = this.q.trim().toLowerCase();return filtered.filter(c =>(c.caseId || '').toLowerCase().includes(qLower) ||(c.status || '').toLowerCase().includes(qLower) ||(c.crime || '').toLowerCase().includes(qLower) ||12 unmodified linesreturn this.cases.filter(c => c.status === 'Closed').length;}get reviewCases(): number {return this.cases.filter(c => c.status === 'Under Investigation').length;}get statusTypes(): string[] {return Array.from(new Set(this.cases.map(c => c.status).filter(s => !!s))) as string[];}get crimeTypes(): string[] {return Array.from(new Set(this.cases.map(c => c.crime).filter(s => !!s))) as string[];}openDetails(c: PoliceCase): void {this.selectedCase = c;this.showDetails = true;document.body.classList.add('popup-open');}closeDetails(): void {this.showDetails = false;this.selectedCase = null;document.body.classList.remove('popup-open');}goToDetect(): void {3 unmodified linesnavigateHome(): void {this.router.navigate(['/']);}applyFilters() {// No-op: filteredCases getter will use filters}resetFilters() {this.filterStatus = '';this.filterCrimeType = '';this.filterDateFrom = '';this.filterDateTo = '';this.q = '';}getSubgroups(sectionKey: string): string[] {return Object.keys(this.sections[sectionKey].subgroups);}getFieldsForSubgroup(sectionKey: string, subgroup: string): string[] {return this.sections[sectionKey].subgroups[subgroup] || [];}selectSubgroup(sectionKey: string, subgroup: string) {this.selectedSubgroup[sectionKey] = subgroup;}getFieldValue(sc: any, sectionKey: string, field: string): any {// Map field labels to PoliceCase property paths (copied from recordpage.component.ts)const fieldMap: { [key: string]: string | string[] } = {// Crime Details'Case ID': 'caseId','FIR / Ref #': 'firRef','Crime Type': 'crime','Case Category': 'caseCategory','Date & Time (Entry)': 'dateTime','Occurred From': 'occurredFrom','Occurred To': 'occurredTo','Time Reported': 'timeReported','Time Discovered': 'timeDiscovered','Country': 'country','State': 'state','District': 'district','Number of Victims': 'numberOfVictims','Brief Description': 'briefDescription','Location': ['police', 'address'],'Jurisdiction / PS': 'jurisdiction','Scene Type': 'sceneType','Reported By': 'reportedBy','Reported Contact': 'reportedContact','Witness Count': 'witnessCount','Victim Name': 'victimName','Victim Contact': 'victimContact','Victim Summary': 'victimSummary','Suspected Offender Known?': 'suspectedOffenderKnown','Suspect Link': 'suspectLink','Legal Sections / Charges': 'legalSections','Offence Category': 'offenceCategory','Offence Description': 'offenceDescription','Suspected Motive': 'suspectedMotive','Confirmed Motive': 'confirmedMotive','Weapon Involved': 'weaponInvolved','Property Loss / Damage': 'propertyLoss','Evidence Collected': 'evidenceCollected','Forensic Tests Required': 'forensicTestsRequired','Scene Condition': 'sceneCondition','Photos / Video?': 'photosVideo','CCTV Present?': 'cctvPresent','CCTV Sources / IDs': 'cctvSources','Physical Evidence (list)': 'physicalEvidence','Chain of Custody?': 'chainOfCustody','Digital Evidence': 'digitalEvidence','Evidence Storage Reference': 'evidenceStorageReference','Investigating Officer': ['police', 'name'],'Duty Person': ['police', 'dutyPerson'],'Supervising Officer': ['police', 'supervisingOfficer'],'Patrol Notes': ['police', 'patrolNotes'],'Arrest Made': 'arrestMade','Arrest Location': 'arrestLocation','Initial Actions Taken': 'initialActionsTaken','riskLevel': 'riskLevel','Confidentiality': 'confidentiality','Biometric / Forensic IDs': 'biometricIds','DNA Ref ID': 'dnaRefId','Fingerprint ID': 'fingerprintId','Case Status': 'status','Linked Cases': 'linkedCases','arrestCount': 'arrestCount','Case Priority': 'casePriority','Follow-up Date': 'followUpDate','Court Case ID': 'courtCaseId','Next Hearing Date': 'nextHearingDate','Final Summary': 'finalSummary','Remark': 'remark',// Suspect Details'Suspect ID': ['accused', 'suspectId'],'Suspect Name': ['accused', 'name'],'Alias / Nickname': ['accused', 'alias'],'Age': ['accused', 'age'],'Gender': ['accused', 'gender'],'Nationality': ['accused', 'nationality'],'Nationality ID / Passport Number': ['accused', 'passportNumber'],'Languages': ['accused', 'languages'],'Address': ['accused', 'address'],'Known Aliases': ['accused', 'knownAliases'],'Government ID': ['accused', 'governmentId'],'Height (cm)': ['accused', 'height'],'Weight (kg)': ['accused', 'weight'],'Build': ['accused', 'build'],'Hair Color': ['accused', 'hairColor'],'Eye Color': ['accused', 'eyeColor'],'Distinguishing Marks': ['accused', 'distinguishingMarks'],'Tattoo Details': ['accused', 'tattooDetails'],'Scar Details': ['accused', 'scarDetails'],'Photo Upload': ['accused', 'photoUpload'],'Employment': ['accused', 'employment'],'Education': ['accused', 'education'],'Occupation': ['accused', 'occupation'],'Company': ['accused', 'company'],'Workplace Address': ['accused', 'workplaceAddress'],'Marital Status': ['accused', 'maritalStatus'],'Known Habits': ['accused', 'knownHabits'],'Known Financial Details': ['accused', 'knownFinancialDetails'],'Associate Names': ['accused', 'associateNames'],'Gang Affiliation': ['accused', 'gangAffiliation'],'Family Connections': ['accused', 'familyConnections'],'Social Media Handles': ['accused', 'socialMediaHandles'],'Criminal History': ['accused', 'criminalHistory'],'Prior Arrests': ['accused', 'priorArrests'],'Probation/Parole Status': ['accused', 'probationStatus'],// Notes/Evidence'Initial Findings': ['police', 'information'],'Detailed Notes': ['notes', 'detailedNotes'],'Status': 'status','Version History / Updates': ['notes', 'versionHistory'],'Evidence Photos': ['legal', 'evidencePhotos'],'Evidence Videos': ['legal', 'evidenceVideos'],'Evidence Documents': ['legal', 'evidenceDocuments'],'Links to Evidence': ['legal', 'linksToEvidence'],'Final Recommendations': ['legal', 'finalRecommendations'],'Witness Statements': ['legal', 'witnessStatements'],'Confessions': ['legal', 'confessions'],// Audit Fields'Created By': 'createdBy','Creation Date': 'creationDate','Last Updated': 'lastUpdated','Verified By': 'verifiedBy'};const path = fieldMap[field] || field;if (Array.isArray(path)) {let value = sc;for (const p of path) {if (value && value[p] !== undefined) value = value[p];else return '—';}return value !== undefined && value !== null && value !== '' ? value : '—';} else {return sc[path] !== undefined && sc[path] !== null && sc[path] !== '' ? sc[path] : '—';}}getProgressValue(caseObj: any): number {let total = 0, filled = 0;['crime', 'suspect', 'notes'].forEach(sectionKey => {const subgroups = this.getSubgroups(sectionKey);subgroups.forEach(subgroup => {const fields = this.getFieldsForSubgroup(sectionKey, subgroup);total += fields.length;fields.forEach(field => {const value = this.getFieldValue(caseObj, sectionKey, field);if (value && value !== '—') filled++;});});});return total ? Math.round((filled / total) * 100) : 0;}getNextActionMessage(c: any): string {// Example logic based on status and progressconst progress = this.getProgressValue(c);if (c.status === 'Closed' || progress === 100) {return 'Case completed';}if (c.status === 'Under Review' || progress >= 75) {return 'Await supervisor approval';}if (c.status === 'Open' || progress < 75) {return 'Collect evidence';}return '—';}getCasePriority(c: PoliceCase): 'High' | 'Medium' | 'Low' {// Automatic logic based on crime type and statusconst highCrimes = ['Murder', 'Robbery'];const mediumCrimes = ['Theft', 'Assault'];if (highCrimes.includes(c.crime) || c.status === 'Open') {return 'High';}if (mediumCrimes.includes(c.crime) || c.status === 'Under Investigation') {return 'Medium';}return 'Low';}isInvestigator(): boolean {// Simple role check: username contains 'investigator' (customize as needed)return this.username.toLowerCase().includes('investigator');}onEvidenceUpload(event: any): void {const files = Array.from(event.target.files) as File[];this.uploadedEvidence = [...this.uploadedEvidence, ...files];// You can add logic to save evidence to the case or backend here}showEvidencePanel(c: PoliceCase): void {if (!c.caseId) return;this.evidencePanelCase = c;this.evidenceType = 'Document';if (!this.evidenceFiles[c.caseId]) {this.evidenceFiles[c.caseId] = { Document: [], Photo: [] };}}setEvidenceType(type: EvidenceType): void {this.evidenceType = type;}onEvidenceFileSelectType(event: any): void {const files = Array.from(event.target.files) as File[];if (this.evidencePanelCase && this.evidencePanelCase.caseId) {this.evidenceFiles[this.evidencePanelCase.caseId][this.evidenceType].push(...files);}}getEvidenceIcon(filename: string): string {if (filename.match(/\.(jpg|jpeg|png|gif)$/i)) return 'fas fa-camera';if (filename.match(/\.(mp4|avi|mov)$/i)) return 'fas fa-film';if (filename.match(/\.(pdf)$/i)) return 'fas fa-file-pdf';return 'fas fa-file';}viewEvidenceFile(file: File): void {const url = URL.createObjectURL(file);window.open(url, '_blank');}}1 unmodified line2345676 unmodified lines1415161718192 unmodified lines22232425262728293012 unmodified lines43444546474849505152535455563 unmodified lines606162631 unmodified lineimport { Router } from '@angular/router';import { CaseStoreService, PoliceCase } from '../shared/case-store.service';@Component({selector: 'app-case-details-page',templateUrl: './case-details-page.component.html',6 unmodified linesusername: string = '';q: string = '';constructor(private caseStore: CaseStoreService, private router: Router) {}ngOnInit(): void {2 unmodified lines}get filteredCases(): PoliceCase[] {if (!this.q?.trim()) return this.cases;const qLower = this.q.trim().toLowerCase();return this.cases.filter(c =>(c.caseId || '').toLowerCase().includes(qLower) ||(c.status || '').toLowerCase().includes(qLower) ||(c.crime || '').toLowerCase().includes(qLower) ||12 unmodified linesreturn this.cases.filter(c => c.status === 'Closed').length;}openDetails(c: PoliceCase): void {this.selectedCase = c;this.showDetails = true;}closeDetails(): void {this.showDetails = false;this.selectedCase = null;}goToDetect(): void {3 unmodified linesnavigateHome(): void {this.router.navigate(['/']);}}
244 unmodified lines2452462472482492502516 unmodified lines2582592602612622632642652662672682692702712722731 unmodified line27527627727827928028128228328428528643 unmodified lines33033133233333433533633733833934077 unmodified lines41841942042142242342442542642742842943043143243343435 unmodified lines47047147247347447547647747847948048148248348448548648711 unmodified lines49950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355429 unmodified lines5845855865875885895901 unmodified line59259359459559659759811 unmodified lines61061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164216 unmodified lines65966066166266366466566666792 unmodified lines7607617627637647657667677687697707 unmodified lines77877978078178278378478578678778878914 unmodified lines80480580680780880981081181281381410 unmodified lines8258268278288298308318328338345 unmodified lines84084184284384484584684784884914 unmodified lines86486586686786886987087187287326 unmodified lines9009019029039049059069079089099105 unmodified lines9169179189199209219221 unmodified line9249259269279289299309319329339349359364 unmodified lines9419429439449459469476 unmodified lines95495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101176 unmodified lines10881089109010911092109310941095109610972 unmodified lines11001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011513 unmodified lines11551156115711581159116011616 unmodified lines1168116911701171117211731174117511761177117811795 unmodified lines118511861187118811891190119111921193119411951196119711989 unmodified lines12081209121012111212121312141215121612171218121912205 unmodified lines12261227122812291230123112323 unmodified lines12361237123812391240124112427 unmodified lines1250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412852 unmodified lines128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813197 unmodified lines1327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135810 unmodified lines13691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214232 unmodified lines1426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114523 unmodified lines145614571458244 unmodified linesmax-width: 100vw;min-width: 1000px;}.table-wrap {max-width: 100vw;min-height: 400px;6 unmodified lineswidth: 100%;max-width: 100vw;}.table-wrap {min-height: 200px;}.padded-table-wrap {padding-left: 4px;padding-right: 4px;}.records-header-row {flex-direction: column;align-items: stretch;1 unmodified linepadding-left: 4px;padding-right: 4px;}.page-title {text-align: center;margin-right: 0;}.toolbar {position: static;transform: none;43 unmodified lines.records th.actions-col, .records td.actions {color: #fff;text-align: left;padding-left: 18px;padding-right: 18px;width: 1%;white-space: nowrap;}.records tbody tr:last-child td {77 unmodified linesbackground: #e5e7eb;color: #22223b;}.status-open {background: #d1fae5;color: #059669;}.status-under {background: #dbeafe;color: #2563eb;}.status-closed {background: #fee2e2;color: #dc2626;35 unmodified linesborder-color: #805ad5;}.btn.delete {background: #ef4444;color: #fff;border-color: #ef4444;box-shadow: 0 2px 8px #ef444422;transition: background 0.18s, color 0.18s;}.btn.delete:hover {background: #991b1b;color: #fff;}/* Icon buttons */.icon-btn {11 unmodified linesalign-items: center;justify-content: center;}.icon-btn.view {margin: 0;padding: 0 8px;background: none;border: none;cursor: pointer;color: #2563eb;font-size: 1.2em;display: inline-flex;align-items: center;justify-content: center;}.icon-btn.edit {color: #7c3aed;}.icon-btn.delete {color: #ef4444;}.icon-btn:hover {background: #f0f7ff;box-shadow: 0 2px 8px #2563eb22;}.icon-btn.delete:hover {background: #fff0f0;color: #b91c1c;}.icon-btn.edit:hover {background: #f3e8ff;color: #5b21b6;}.icon-btn.view:hover {background: #e0f2fe;color: #0ea5e9;}.icon-btn.verify {color: #22c55e;}.icon-btn.verify:hover {background: #e0ffe6;color: #15803d;}.empty {text-align: center;29 unmodified linesdisplay: flex;flex-direction: column;}.modal-header, .modal-footer {padding: 24px 40px 18px 40px;background: #f8fafc;1 unmodified linefont-size: 1.18rem;color: #23272b;}.modal-body {flex: 1 1 auto;padding: 32px 48px 32px 48px;11 unmodified linesborder-bottom: 1px solid #e5e7eb;}.detail-row:last-child {border-bottom: none;}.detail-row span {color: #2563eb;font-weight: 600;font-size: 1.07em;}.detail-row b {color: #23272b;font-weight: 500;font-size: 1.07em;}.detail-block {margin-top: 18px;margin-bottom: 8px;}.detail-block .label {font-weight: 700;color: #2563eb;margin-bottom: 6px;font-size: 1.09em;}.explain {white-space: pre-wrap;16 unmodified linesmargin-left: 8px;}.btn:hover {background: #e0e7ef;}.records-center {display: flex;92 unmodified linesz-index: 10;}.modern-searchbar-container.compact {width: auto;margin: 0 0 0 24px;align-items: center;}.modern-searchbar-form {display: flex;7 unmodified linesposition: relative;}.modern-searchbar-form.compact {height: 44px;min-width: 260px;width: 320px;padding: 0 8px 0 10px;}.modern-searchbar-icon {display: flex;14 unmodified linesheight: 32px;}.modern-searchbar-input::placeholder {color: #e0e7ef;opacity: 1;font-weight: 400;}.modern-searchbar-btn {background: #fff;10 unmodified linestransition: background 0.18s, color 0.18s;}.modern-searchbar-btn:hover {background: #ede9fe;color: #4f46e5;}.modern-searchbar-form.white-bg {background: #fff !important;5 unmodified linescolor: #23272b !important;}.modern-searchbar-input.white-bg::placeholder {color: #64748b !important;opacity: 1;}.modern-searchbar-icon svg {stroke: #64748b !important;14 unmodified linestransition: background 0.18s, color 0.18s;}.modern-searchbar-btn:hover {background: #38bdf8;color: #fff;}.back-colo {26 unmodified lineswidth: 95vw;justify-content: flex-end;}.modern-searchbar-form.compact {width: 100%;min-width: 0;}}/* Modern UI header styles from infopage */5 unmodified linesz-index: 10;padding-bottom: 0;}.header-inner {display: flex;align-items: center;1 unmodified linepadding: 18px 32px 0 32px;position: relative;}.logo-cluster {display: flex;align-items: center;gap: 18px;}.logo-img-header {width: 54px;height: 54px;4 unmodified linesmargin-top: -6px;margin-bottom: 1vh;}.py-detect-title-header {font-size: 2.1rem;font-family: 'Segoe UI', 'Arial', 'Roboto', sans-serif;6 unmodified linesmargin-bottom: 1.5vh;}.py-detect-title-header .py-letter.p {color: #e3f6ff;text-shadow: 0 0 6px #38bdf8;}.py-detect-title-header .py-letter.y {color: #38bdf8;text-shadow: 0 0 6px #38bdf8;}.py-detect-title-header .py-shape {color: #e3f6ff;background: #e3f6ff;text-shadow: 0 0 6px #38bdf8;box-shadow: 0 0 6px #38bdf8, 0 0 2px #fff;border: 2px solid #23272b;width: 18px;height: 4px;display: inline-block;margin: 0 8px;border-radius: 2px;}.py-detect-title-header .py-letter.d {color: #e3f6ff;text-shadow: 0 0 6px #38bdf8;}.py-detect-title-header .py-letter.e {color: #38bdf8;text-shadow: 0 0 6px #38bdf8;}.py-detect-title-header .py-letter.t {color: #e3f6ff;text-shadow: 0 0 6px #38bdf8;}.py-detect-title-header .py-letter.e2 {color: #38bdf8;text-shadow: 0 0 6px #38bdf8;}.py-detect-title-header .py-letter.c {color: #e3f6ff;text-shadow: 0 0 6px #38bdf8;}.py-detect-title-header .py-letter.t2 {color: #38bdf8;text-shadow: 0 0 6px #38bdf8;}body, main.content {background: #f4f6fa;76 unmodified linescursor: pointer;transition: background 0.18s;}.record-new-btn:hover {background: #1e40af;}.record-table {width: 100%;2 unmodified linesbackground: #fff;}.record-table th, .record-table td {border-bottom: 1.5px solid #e5e7eb;padding: 12px 16px;text-align: left;font-size: 1.05rem;}.record-table th {background: #f4f6fa;color: #222b45;font-weight: 700;}.record-table tr:last-child td {border-bottom: none;}.record-table tr {transition: background 0.15s;}.record-table tr:hover {background: #f1f5f9;}.record-table a {color: #2563eb;text-decoration: underline;cursor: pointer;}.record-table .record-status {font-weight: 500;border-radius: 6px;padding: 2px 10px;background: #f1f5f9;color: #2563eb;font-size: 0.98em;}.vertical-sections {display: flex;flex-direction: column;gap: 32px;}.horizontal-sections {display: flex;flex-direction: column;3 unmodified linesbox-shadow: 0 8px 32px #2563eb22;padding: 32px 0 32px 0;}.section-block {background: rgba(255,255,255,0.98);border-radius: 18px;6 unmodified linesborder-left: 6px solid #38bdf8;transition: box-shadow 0.2s, border 0.2s;}.section-block:hover {box-shadow: 0 8px 32px #2563eb33;border-left: 6px solid #2563eb;}.section-title {font-size: 1.32em;font-weight: 900;5 unmodified linesalign-items: center;gap: 10px;}.subgroup-row {display: flex;flex-direction: row;gap: 36px;overflow-x: auto;}.subgroup-block {min-width: 260px;flex: 1 1 0;9 unmodified linesborder: 1.5px solid #e0e7ef;transition: box-shadow 0.18s, border 0.18s, background 0.18s;}.subgroup-block:hover {box-shadow: 0 4px 16px #38bdf855;border: 1.5px solid #38bdf8;background: #e0f2fe;}.subgroup-title {font-size: 1.11em;font-weight: 700;5 unmodified linesalign-items: center;gap: 8px;}.fields-table {display: flex;flex-direction: column;3 unmodified linesborder-radius: 0;padding: 0;}.field-row {display: flex;flex-direction: row;7 unmodified linestransition: background 0.18s;gap: 32px;}.field-row:last-child {border-bottom: none;}.field-row span {color: #1e293b;font-weight: 700;letter-spacing: 0.2px;min-width: 180px;font-size: 1.08em;margin-right: 32px;text-align: left;display: inline-block;}.field-row b {color: #2563eb;font-weight: 700;word-break: break-word;letter-spacing: 0.1px;font-size: 1.13em;margin-left: 8px;text-align: left;display: inline-block;}.field-row b:hover {color: #0ea5e9;}/* Stylish pills for subgroups */.subgroup-pills {2 unmodified linesgap: 12px;margin-bottom: 18px;}.subgroup-pills button {background: linear-gradient(90deg, #38bdf8 0%, #2563eb 100%);border: none;border-radius: 20px;padding: 7px 22px;font-size: 1em;color: #fff;font-weight: 700;cursor: pointer;box-shadow: 0 2px 8px #2563eb22;transition: background 0.18s, color 0.18s, box-shadow 0.18s;outline: none;}.subgroup-pills button.active,.subgroup-pills button:focus {background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);color: #fff;box-shadow: 0 4px 16px #38bdf855;}.subgroup-pills button:hover {background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 100%);color: #fff;}.field-card {display: flex;7 unmodified lines.section-block {padding: 18px 8vw 12px 8vw;}.subgroup-block {min-width: 180px;padding: 12px 8px 8px 8px;}.field-row span {min-width: 120px;}}@media (max-width: 600px) {.section-block {padding: 10px 2vw 8px 2vw;}.subgroup-block {min-width: 120px;padding: 8px 2px 6px 2px;}.field-row span {min-width: 80px;font-size: 0.98em;}.field-row b {font-size: 1em;}10 unmodified linesborder-radius: 12px;box-shadow: 0 2px 8px #2563eb11;}.filter-bar select {padding: 6px 18px;border-radius: 6px;border: 1.5px solid #cbd5e1;font-size: 1em;color: #2563eb;background: #fff;font-weight: 600;outline: none;transition: border 0.15s;}.filter-bar select:focus {border: 1.5px solid #38bdf8;}.filter-bar button {padding: 6px 18px;border-radius: 6px;border: none;font-size: 1em;font-weight: 700;cursor: pointer;background: #2563eb;color: #fff;transition: background 0.15s;}.filter-bar button:hover {background: #0ea5e9;}.filter-bar button:last-child {background: #f87171;color: #fff;margin-left: 4px;}.filter-bar button:last-child:hover {background: #ef4444;}.analytics-summary {display: flex;gap: 32px;margin: 18px 0 8px 0;}.summary-card {background: #f8fafc;border-radius: 12px;2 unmodified linesmin-width: 120px;text-align: center;}.summary-card .summary-label {font-size: 1em;color: #64748b;font-weight: 600;margin-bottom: 6px;}.summary-card .summary-value {font-size: 2em;font-weight: 900;color: #2563eb;}.summary-card.open .summary-value {color: #059669;}.summary-card.closed .summary-value {color: #dc2626;}.record-meta {color: #64748b;3 unmodified linesfont-weight: 500;letter-spacing: 0.1px;}244 unmodified lines2452462472482492506 unmodified lines2572582592602612622632642652662672682691 unmodified line27127227327427527627727827928043 unmodified lines32432532632732832977 unmodified lines40740840941041141241341441541641741841942035 unmodified lines45645745845946046146246346446546646746846947047147211 unmodified lines48448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052129 unmodified lines5515525535545555561 unmodified line55855956056156256311 unmodified lines57557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660716 unmodified lines62462562662762862963063163292 unmodified lines7257267277287297307317327337347357 unmodified lines74374474574674774874975075175275375414 unmodified lines76977077177277377477577677777877910 unmodified lines7907917927937947957967977987995 unmodified lines80580680780880981081181281381414 unmodified lines82983083183283383483583683783826 unmodified lines8658668678688698708718728738748755 unmodified lines8818828838848858861 unmodified line8888898908918928938948958968978984 unmodified lines9039049059069079086 unmodified lines91591691791891992092192292392492592692792892976 unmodified lines1006100710081009101010111012101310142 unmodified lines101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510663 unmodified lines1070107110721073107410756 unmodified lines10821083108410851086108710881089109010915 unmodified lines1097109810991100110111021103110411051106110711089 unmodified lines111811191120112111221123112411251126112711285 unmodified lines1134113511361137113811393 unmodified lines1143114411451146114711487 unmodified lines115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611872 unmodified lines119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712187 unmodified lines1226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125110 unmodified lines1262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813092 unmodified lines131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313343 unmodified lines13381339134013411342244 unmodified linesmax-width: 100vw;min-width: 1000px;}.table-wrap {max-width: 100vw;min-height: 400px;6 unmodified lineswidth: 100%;max-width: 100vw;}.table-wrap {min-height: 200px;}.padded-table-wrap {padding-left: 4px;padding-right: 4px;}.records-header-row {flex-direction: column;align-items: stretch;1 unmodified linepadding-left: 4px;padding-right: 4px;}.page-title {text-align: center;margin-right: 0;}.toolbar {position: static;transform: none;43 unmodified lines.records th.actions-col, .records td.actions {color: #fff;}.records tbody tr:last-child td {77 unmodified linesbackground: #e5e7eb;color: #22223b;}.status-open {background: #d1fae5;color: #059669;}.status-under {background: #dbeafe;color: #2563eb;}.status-closed {background: #fee2e2;color: #dc2626;35 unmodified linesborder-color: #805ad5;}.btn.delete {background: #ef4444;color: #fff;border-color: #ef4444;box-shadow: 0 2px 8px #ef444422;transition: background 0.18s, color 0.18s;}.btn.delete:hover {background: #991b1b;color: #fff;}/* Icon buttons */.icon-btn {11 unmodified linesalign-items: center;justify-content: center;}.icon-btn.view {color: #2563eb;}.icon-btn.edit {color: #7c3aed;}.icon-btn.delete {color: #ef4444;}.icon-btn:hover {background: #f0f7ff;box-shadow: 0 2px 8px #2563eb22;}.icon-btn.delete:hover {background: #fff0f0;color: #b91c1c;}.icon-btn.edit:hover {background: #f3e8ff;color: #5b21b6;}.icon-btn.view:hover {background: #e0f2fe;color: #0ea5e9;}.icon-btn.verify {color: #22c55e;}.icon-btn.verify:hover {background: #e0ffe6;color: #15803d;}.empty {text-align: center;29 unmodified linesdisplay: flex;flex-direction: column;}.modal-header, .modal-footer {padding: 24px 40px 18px 40px;background: #f8fafc;1 unmodified linefont-size: 1.18rem;color: #23272b;}.modal-body {flex: 1 1 auto;padding: 32px 48px 32px 48px;11 unmodified linesborder-bottom: 1px solid #e5e7eb;}.detail-row:last-child {border-bottom: none;}.detail-row span {color: #2563eb;font-weight: 600;font-size: 1.07em;}.detail-row b {color: #23272b;font-weight: 500;font-size: 1.07em;}.detail-block {margin-top: 18px;margin-bottom: 8px;}.detail-block .label {font-weight: 700;color: #2563eb;margin-bottom: 6px;font-size: 1.09em;}.explain {white-space: pre-wrap;16 unmodified linesmargin-left: 8px;}.btn:hover {background: #e0e7ef;}.records-center {display: flex;92 unmodified linesz-index: 10;}.modern-searchbar-container.compact {width: auto;margin: 0 0 0 24px;align-items: center;}.modern-searchbar-form {display: flex;7 unmodified linesposition: relative;}.modern-searchbar-form.compact {height: 44px;min-width: 260px;width: 320px;padding: 0 8px 0 10px;}.modern-searchbar-icon {display: flex;14 unmodified linesheight: 32px;}.modern-searchbar-input::placeholder {color: #e0e7ef;opacity: 1;font-weight: 400;}.modern-searchbar-btn {background: #fff;10 unmodified linestransition: background 0.18s, color 0.18s;}.modern-searchbar-btn:hover {background: #ede9fe;color: #4f46e5;}.modern-searchbar-form.white-bg {background: #fff !important;5 unmodified linescolor: #23272b !important;}.modern-searchbar-input.white-bg::placeholder {color: #64748b !important;opacity: 1;}.modern-searchbar-icon svg {stroke: #64748b !important;14 unmodified linestransition: background 0.18s, color 0.18s;}.modern-searchbar-btn:hover {background: #38bdf8;color: #fff;}.back-colo {26 unmodified lineswidth: 95vw;justify-content: flex-end;}.modern-searchbar-form.compact {width: 100%;min-width: 0;}}/* Modern UI header styles from infopage */5 unmodified linesz-index: 10;padding-bottom: 0;}.header-inner {display: flex;align-items: center;1 unmodified linepadding: 18px 32px 0 32px;position: relative;}.logo-cluster {display: flex;align-items: center;gap: 18px;}.logo-img-header {width: 54px;height: 54px;4 unmodified linesmargin-top: -6px;margin-bottom: 1vh;}.py-detect-title-header {font-size: 2.1rem;font-family: 'Segoe UI', 'Arial', 'Roboto', sans-serif;6 unmodified linesmargin-bottom: 1.5vh;}.py-detect-title-header .py-letter.p { color: #e3f6ff; text-shadow: 0 0 6px #38bdf8; }.py-detect-title-header .py-letter.y { color: #38bdf8; text-shadow: 0 0 6px #38bdf8; }.py-detect-title-header .py-shape { color: #e3f6ff; background: #e3f6ff; text-shadow: 0 0 6px #38bdf8; box-shadow: 0 0 6px #38bdf8, 0 0 2px #fff; border: 2px solid #23272b; width: 18px; height: 4px; display: inline-block; margin: 0 8px; border-radius: 2px; }.py-detect-title-header .py-letter.d { color: #e3f6ff; text-shadow: 0 0 6px #38bdf8; }.py-detect-title-header .py-letter.e { color: #38bdf8; text-shadow: 0 0 6px #38bdf8; }.py-detect-title-header .py-letter.t { color: #e3f6ff; text-shadow: 0 0 6px #38bdf8; }.py-detect-title-header .py-letter.e2 { color: #38bdf8; text-shadow: 0 0 6px #38bdf8; }.py-detect-title-header .py-letter.c { color: #e3f6ff; text-shadow: 0 0 6px #38bdf8; }.py-detect-title-header .py-letter.t2 { color: #38bdf8; text-shadow: 0 0 6px #38bdf8; }body, main.content {background: #f4f6fa;76 unmodified linescursor: pointer;transition: background 0.18s;}.record-new-btn:hover {background: #1e40af;}.record-table {width: 100%;2 unmodified linesbackground: #fff;}.record-table th, .record-table td {border-bottom: 1.5px solid #e5e7eb;padding: 12px 16px;text-align: left;font-size: 1.05rem;}.record-table th {background: #f4f6fa;color: #222b45;font-weight: 700;}.record-table tr:last-child td {border-bottom: none;}.record-table tr {transition: background 0.15s;}.record-table tr:hover {background: #f1f5f9;}.record-table a {color: #2563eb;text-decoration: underline;cursor: pointer;}.record-table .record-status {font-weight: 500;border-radius: 6px;padding: 2px 10px;background: #f1f5f9;color: #2563eb;font-size: 0.98em;}.vertical-sections {display: flex;flex-direction: column;gap: 32px;}.horizontal-sections {display: flex;flex-direction: column;3 unmodified linesbox-shadow: 0 8px 32px #2563eb22;padding: 32px 0 32px 0;}.section-block {background: rgba(255,255,255,0.98);border-radius: 18px;6 unmodified linesborder-left: 6px solid #38bdf8;transition: box-shadow 0.2s, border 0.2s;}.section-block:hover {box-shadow: 0 8px 32px #2563eb33;border-left: 6px solid #2563eb;}.section-title {font-size: 1.32em;font-weight: 900;5 unmodified linesalign-items: center;gap: 10px;}.subgroup-row {display: flex;flex-direction: row;gap: 36px;overflow-x: auto;}.subgroup-block {min-width: 260px;flex: 1 1 0;9 unmodified linesborder: 1.5px solid #e0e7ef;transition: box-shadow 0.18s, border 0.18s, background 0.18s;}.subgroup-block:hover {box-shadow: 0 4px 16px #38bdf855;border: 1.5px solid #38bdf8;background: #e0f2fe;}.subgroup-title {font-size: 1.11em;font-weight: 700;5 unmodified linesalign-items: center;gap: 8px;}.fields-table {display: flex;flex-direction: column;3 unmodified linesborder-radius: 0;padding: 0;}.field-row {display: flex;flex-direction: row;7 unmodified linestransition: background 0.18s;gap: 32px;}.field-row:last-child {border-bottom: none;}.field-row span {color: #1e293b;font-weight: 700;letter-spacing: 0.2px;min-width: 180px;font-size: 1.08em;margin-right: 32px;text-align: left;display: inline-block;}.field-row b {color: #2563eb;font-weight: 700;word-break: break-word;letter-spacing: 0.1px;font-size: 1.13em;margin-left: 8px;text-align: left;display: inline-block;}.field-row b:hover {color: #0ea5e9;}/* Stylish pills for subgroups */.subgroup-pills {2 unmodified linesgap: 12px;margin-bottom: 18px;}.subgroup-pills button {background: linear-gradient(90deg, #38bdf8 0%, #2563eb 100%);border: none;border-radius: 20px;padding: 7px 22px;font-size: 1em;color: #fff;font-weight: 700;cursor: pointer;box-shadow: 0 2px 8px #2563eb22;transition: background 0.18s, color 0.18s, box-shadow 0.18s;outline: none;}.subgroup-pills button.active,.subgroup-pills button:focus {background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);color: #fff;box-shadow: 0 4px 16px #38bdf855;}.subgroup-pills button:hover {background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 100%);color: #fff;}.field-card {display: flex;7 unmodified lines.section-block {padding: 18px 8vw 12px 8vw;}.subgroup-block {min-width: 180px;padding: 12px 8px 8px 8px;}.field-row span {min-width: 120px;}}@media (max-width: 600px) {.section-block {padding: 10px 2vw 8px 2vw;}.subgroup-block {min-width: 120px;padding: 8px 2px 6px 2px;}.field-row span {min-width: 80px;font-size: 0.98em;}.field-row b {font-size: 1em;}10 unmodified linesborder-radius: 12px;box-shadow: 0 2px 8px #2563eb11;}.filter-bar select {padding: 6px 18px;border-radius: 6px;border: 1.5px solid #cbd5e1;font-size: 1em;color: #2563eb;background: #fff;font-weight: 600;outline: none;transition: border 0.15s;}.filter-bar select:focus {border: 1.5px solid #38bdf8;}.filter-bar button {padding: 6px 18px;border-radius: 6px;border: none;font-size: 1em;font-weight: 700;cursor: pointer;background: #2563eb;color: #fff;transition: background 0.15s;}.filter-bar button:hover {background: #0ea5e9;}.filter-bar button:last-child {background: #f87171;color: #fff;margin-left: 4px;}.filter-bar button:last-child:hover {background: #ef4444;}.analytics-summary {display: flex;gap: 32px;margin: 18px 0 8px 0;}.summary-card {background: #f8fafc;border-radius: 12px;2 unmodified linesmin-width: 120px;text-align: center;}.summary-card .summary-label {font-size: 1em;color: #64748b;font-weight: 600;margin-bottom: 6px;}.summary-card .summary-value {font-size: 2em;font-weight: 900;color: #2563eb;}.summary-card.open .summary-value {color: #059669;}.summary-card.closed .summary-value {color: #dc2626;}.record-meta {color: #64748b;3 unmodified linesfont-weight: 500;letter-spacing: 0.1px;}
109 unmodified lines110111112113114115116117118109 unmodified lines</td><td>{{ c.crime || '—' }}</td><td>{{ c.dateTime ? (c.dateTime | date:'M/d/yyyy HH:mm') : '—' }}</td><td>{{ c.police.address || '—' }}</td><td>{{ c.police.name || '—' }}</td><td>{{ c.accused.name || '—' }}</td><td>{{ c.reportedBy || '—' }}</td><td>{{ c.lastUpdated ? (c.lastUpdated | date:'M/d/yyyy HH:mm') : '—' }}</td><td>{{ c.verifiedBy || '—' }}</td>109 unmodified lines110111112113114115116117118109 unmodified lines</td><td>{{ c.crime || '—' }}</td><td>{{ c.dateTime ? (c.dateTime | date:'M/d/yyyy HH:mm') : '—' }}</td><td>{{ c.police?.address || '—' }}</td><td>{{ c.police?.name || '—' }}</td><td>{{ c.accused?.name || '—' }}</td><td>{{ c.reportedBy || '—' }}</td><td>{{ c.lastUpdated ? (c.lastUpdated | date:'M/d/yyyy HH:mm') : '—' }}</td><td>{{ c.verifiedBy || '—' }}</td>
284 unmodified lines285286287288289290291292293294295296297298284 unmodified linesthis.selectedCase = c;this.selectedIndex = i;this.showDetails = true;document.body.classList.add('modal-open');}closeDetails(): void {this.showDetails = false;this.selectedCase = null;this.selectedIndex = -1;document.body.classList.remove('modal-open');}editCase(c: PoliceCase, i: number): void {284 unmodified lines285286287288289290291292293294295296284 unmodified linesthis.selectedCase = c;this.selectedIndex = i;this.showDetails = true;}closeDetails(): void {this.showDetails = false;this.selectedCase = null;this.selectedIndex = -1;}editCase(c: PoliceCase, i: number): void {
22 unmodified lines232425262728293022 unmodified linesoccupation?: string;};lastUpdated?: string;nextAction?: string;casePriority?: 'High' | 'Medium' | 'Low';}@Injectable({ providedIn: 'root' })22 unmodified lines23242526272822 unmodified linesoccupation?: string;};lastUpdated?: string;}@Injectable({ providedIn: 'root' })
src/app/case-details-page/case-details-page.component.css+10-402
src/app/case-details-page/case-details-page.component.html+24-139
src/app/case-details-page/case-details-page.component.ts+2-321
src/app/recordpage/recordpage.component.css+252-368
src/app/recordpage/recordpage.component.html+3-3
src/app/recordpage/recordpage.component.ts-2
src/app/shared/case-store.service.ts-2