Resolved blank page issue

This commit is contained in:
Prashant Shendre 2026-10-15 16:55:04 +05:30
parent 773f62ce07
commit fb9014c78f
11 changed files with 3169 additions and 10 deletions

14
.dockerignore Normal file
View File

@ -0,0 +1,14 @@
node_modules
**/node_modules
.venv
**/.venv
__pycache__
**/__pycache__
*.pyc
*.pyo
*.pyd
.pytest_cache
**/dist
.git
.gitignore

View File

@ -14,7 +14,7 @@ COPY frontend/package.json ./
RUN npm install RUN npm install
COPY frontend/ ./ COPY frontend/ ./
RUN npm run build || (mkdir -p dist && cp index.html dist/index.html) RUN npm run build
# ---- Stage 2: Hardened Nginx Runtime ---- # ---- Stage 2: Hardened Nginx Runtime ----
FROM nginx:1.27-alpine AS runtime FROM nginx:1.27-alpine AS runtime

3136
frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,6 @@
*/ */
import React from 'react'; import React from 'react';
import { authStore } from '../../stores/authStore'; import { authStore } from '../../stores/authStore';
import { Card } from '../../components/ui/Card';
import { Button } from '../../components/ui/Button'; import { Button } from '../../components/ui/Button';
import { ShieldAlert, ArrowLeft, LogOut } from 'lucide-react'; import { ShieldAlert, ArrowLeft, LogOut } from 'lucide-react';

View File

@ -7,8 +7,7 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { authStore } from '../../stores/authStore'; import { authStore } from '../../stores/authStore';
import { Button } from '../../components/ui/Button'; import { Button } from '../../components/ui/Button';
import { Card } from '../../components/ui/Card'; import { ShieldCheck, LogIn } from 'lucide-react';
import { ShieldCheck, LogIn, ChevronRight } from 'lucide-react';
export const LoginView: React.FC = () => { export const LoginView: React.FC = () => {
const [selectedPersona, setSelectedPersona] = useState<string>('buyer@malwa-agri.demo'); const [selectedPersona, setSelectedPersona] = useState<string>('buyer@malwa-agri.demo');

View File

@ -10,7 +10,7 @@ import { apiClient } from '../../services/api';
import { Card } from '../../components/ui/Card'; import { Card } from '../../components/ui/Card';
import { Button } from '../../components/ui/Button'; import { Button } from '../../components/ui/Button';
import { StatusPill } from '../../components/ui/StatusPill'; import { StatusPill } from '../../components/ui/StatusPill';
import { LogOut, ShieldCheck, KeyRound } from 'lucide-react'; import { LogOut, ShieldCheck } from 'lucide-react';
export const SessionView: React.FC = () => { export const SessionView: React.FC = () => {
const [isLoggingOut, setIsLoggingOut] = useState<boolean>(false); const [isLoggingOut, setIsLoggingOut] = useState<boolean>(false);

View File

@ -3,7 +3,7 @@ import { tenantStore } from '../../stores/tenantStore';
import { apiClient } from '../../services/api'; import { apiClient } from '../../services/api';
import { StatusPill } from '../../components/ui/StatusPill'; import { StatusPill } from '../../components/ui/StatusPill';
import { Button } from '../../components/ui/Button'; import { Button } from '../../components/ui/Button';
import { FileText, Code2, Eye } from 'lucide-react'; import { Eye } from 'lucide-react';
/** /**
* Immutable Transaction Audit Log Viewer Screen. * Immutable Transaction Audit Log Viewer Screen.
@ -51,7 +51,7 @@ export const AuditLogView: React.FC = () => {
const fetchAuditLogs = async (tenantId: string) => { const fetchAuditLogs = async (tenantId: string) => {
setLoading(true); setLoading(true);
setError(null); setError(null);
const resp = await apiClient<{ events: AuditEvent[] }>('/api/v1/audit/events'); const resp = await apiClient<{ events: AuditEvent[] }>(`/api/v1/audit/events?tenant_id=${encodeURIComponent(tenantId)}`);
setLoading(false); setLoading(false);
if (resp.status === 200 && resp.data?.events) { if (resp.status === 200 && resp.data?.events) {
setEvents(resp.data.events); setEvents(resp.data.events);
@ -90,6 +90,12 @@ export const AuditLogView: React.FC = () => {
</div> </div>
)} )}
{loading && (
<div className="text-xs text-text-muted font-mono">
Refreshing audit log ledger...
</div>
)}
{/* Audit Log Table adhering to DESIGN.md */} {/* Audit Log Table adhering to DESIGN.md */}
<div className="bg-card-surface border border-card-border rounded shadow-none overflow-hidden"> <div className="bg-card-surface border border-card-border rounded shadow-none overflow-hidden">
<table className="min-w-full divide-y divide-card-border"> <table className="min-w-full divide-y divide-card-border">

View File

@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react';
import { tenantStore, TenantMembershipInfo } from '../../stores/tenantStore'; import { tenantStore, TenantMembershipInfo } from '../../stores/tenantStore';
import { apiClient } from '../../services/api'; import { apiClient } from '../../services/api';
import { Building2, ChevronDown } from 'lucide-react'; import { Building2, ChevronDown } from 'lucide-react';
import { StatusPill } from '../../components/ui/StatusPill';
/** /**
* Header Tenant Switcher Dropdown Component. * Header Tenant Switcher Dropdown Component.

View File

@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import { apiClient } from '../../services/api'; import { apiClient } from '../../services/api';
import { Button } from '../../components/ui/Button'; import { Button } from '../../components/ui/Button';
import { StatusPill } from '../../components/ui/StatusPill'; import { StatusPill } from '../../components/ui/StatusPill';
import { Plus, Building2, SlidersHorizontal } from 'lucide-react'; import { Plus } from 'lucide-react';
/** /**
* Platform Tenants Management View. * Platform Tenants Management View.

View File

@ -3,7 +3,7 @@ import { tenantStore } from '../../stores/tenantStore';
import { apiClient } from '../../services/api'; import { apiClient } from '../../services/api';
import { Button } from '../../components/ui/Button'; import { Button } from '../../components/ui/Button';
import { StatusPill } from '../../components/ui/StatusPill'; import { StatusPill } from '../../components/ui/StatusPill';
import { UserPlus, UserCheck, Shield } from 'lucide-react'; import { UserPlus } from 'lucide-react';
/** /**
* Tenant Members & Roles Management View. * Tenant Members & Roles Management View.

6
frontend/src/vite-env.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference types="vite/client" />
declare const process: {
env: Record<string, string | undefined>;
};