diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..62553ac --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,18 @@ +name: CI +on: + push: + branches: [dev, main] + pull_request: + branches: [dev, main] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - run: npm ci + - run: npm run build + - run: npx tsc --noEmit diff --git a/package-lock.json b/package-lock.json index f3bad4b..afb7557 100644 --- a/package-lock.json +++ b/package-lock.json @@ -835,9 +835,9 @@ } }, "node_modules/@hono/node-server": { - "version": "1.19.14", - "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.14.tgz", - "integrity": "sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw==", + "version": "1.19.17", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.17.tgz", + "integrity": "sha512-dSneS5qhiauZWGDCeK4o695Xd9nUNjviSZCMQrj10eetr8Uln1ucn6bbphOM6UynAMMtNIzZNSpL9vnASJwrPQ==", "license": "MIT", "engines": { "node": ">=18.14.1" @@ -4071,15 +4071,15 @@ } }, "node_modules/brace-expansion": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", - "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", "license": "MIT", "dependencies": { "balanced-match": "^4.0.2" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" } }, "node_modules/braces": { @@ -4797,9 +4797,9 @@ } }, "node_modules/dompurify": { - "version": "3.4.12", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.12.tgz", - "integrity": "sha512-zQvGet8Z2sWbQhCmfFz/T5QWH2oBmjnqK3qvOjaqaNLrLEF912WamU+ohnTp0TCep/MFVHpdJuCZEdFOdTnEFg==", + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.13.tgz", + "integrity": "sha512-2vmYIoqjze2d+kakP8S/nS5shfsl587kzwEjcGlTdiksUVgFHnFCsLYDVj/JNqJVOQZGSYBTmuycv0PodwmnMQ==", "license": "(MPL-2.0 OR Apache-2.0)", "optional": true, "optionalDependencies": { @@ -5435,9 +5435,9 @@ } }, "node_modules/fast-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", - "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz", + "integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==", "funding": [ { "type": "github", @@ -5957,9 +5957,9 @@ } }, "node_modules/hono": { - "version": "4.12.25", - "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.25.tgz", - "integrity": "sha512-2NFaIyNVgJmBs/ecmtGzlmluTFs5cHEWGTdu0t1HBwYzoGXOL5nUQBRMXsXWla5i4KkG//QMzVP88m1+I3fdAQ==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.2.tgz", + "integrity": "sha512-JydRilDRkYBQMt9qR9U92mXxmbGqsqSn/IKOrh4e7/gEbn+0zSr8igTu0obwJoNGN4sez28DIql7FBHWydoJpA==", "license": "MIT", "engines": { "node": ">=16.9.0" @@ -6104,9 +6104,9 @@ "license": "MIT" }, "node_modules/ip-address": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz", - "integrity": "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.5.0.tgz", + "integrity": "sha512-R5SnVLJmgYYvf2F2ZgwSBnelz5G4q5AxIC277GDfUaNbrZKNANcBC7RHqYYePlszf4kBolVkJauG0ZjHHFh55g==", "license": "MIT", "engines": { "node": ">= 12" @@ -6343,9 +6343,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", + "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", "funding": [ { "type": "github", @@ -7032,9 +7032,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.12", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", - "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", "funding": [ { "type": "github", @@ -7470,9 +7470,9 @@ } }, "node_modules/postcss": { - "version": "8.5.15", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", - "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", + "version": "8.5.26", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz", + "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", "funding": [ { "type": "opencollective", @@ -7489,7 +7489,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.12", + "nanoid": "^3.3.17", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -7846,9 +7846,9 @@ } }, "node_modules/react-router": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.17.0.tgz", - "integrity": "sha512-FDELK7rTMlCHO5+reyXsPlmfr7N1F91lPHsWYfMEGQm/KQ+F4JFM8jGoeQDmDvdTs93Fw9aSilH+uKRb4/jXvQ==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.2.tgz", + "integrity": "sha512-aUVMjFm3GAPTTZL7oYr5E7ETiqfQCHRLH+B+5afnICvf0r7kkK4eR6SMuwbSTJw/7t+12khT/Kahij49fqOCIg==", "license": "MIT", "dependencies": { "cookie": "^1.0.1", @@ -7868,12 +7868,12 @@ } }, "node_modules/react-router-dom": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.17.0.tgz", - "integrity": "sha512-fyU2yjGups/hE6Xz0I5ZYbVL8Gx29eCjgpHaRaTaVU+OOAdfRX05KsvyRm0GO8YQwOkhpU3MurW1jyMUJn+zSw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.2.tgz", + "integrity": "sha512-AIKJ/jgGlFb3EbfCXk5Gzshiwt+l3mqbCrNjmEWMMjqQxNJ3svBa6bgzFyCC2Sw3RA0VWF1kg3uQf2OFhxb8hw==", "license": "MIT", "dependencies": { - "react-router": "7.17.0" + "react-router": "7.18.2" }, "engines": { "node": ">=20.0.0" diff --git a/src/lib/api/accountMapper.ts b/src/lib/api/accountMapper.ts index 61ade35..8c0b989 100644 --- a/src/lib/api/accountMapper.ts +++ b/src/lib/api/accountMapper.ts @@ -1,4 +1,5 @@ import apiClient from './client' +import type { BeneficiaryEntry, ApiConfig } from '@/modules/account-mapper/types' export const lookupBeneficiary = async (beneficiaryId: string) => { const response = await apiClient.get(`/beneficiary/${beneficiaryId}`) @@ -7,8 +8,25 @@ export const lookupBeneficiary = async (beneficiaryId: string) => { export const updateBeneficiary = async ( beneficiaryId: string, - data: { financialInstitution: string; financialAddress: string; paymentModality: string }, + data: { financialInstitution: string; financialAddress: string; paymentModality: string; bbic?: string }, ) => { - const response = await apiClient.put(`/beneficiary/${beneficiaryId}`, data) + const response = await apiClient.put('/identityAccountMapper/beneficiary', { + beneficiaryId, + ...data, + }) return response.data } + +// No backend endpoint deployed yet for bulk register/update — logs the +// request shape so operators can verify the payload, then resolves as if +// the call succeeded. +export const submitBeneficiaries = async ( + mode: 'register' | 'update', + beneficiaries: BeneficiaryEntry[], + config: ApiConfig, +) => { + const payload = { mode, beneficiaries, config } + console.log(`[mock] ${mode === 'register' ? 'POST' : 'PUT'} /identityAccountMapper/beneficiary`, payload) + await new Promise((resolve) => setTimeout(resolve, 800)) + return { message: `${beneficiaries.length} beneficiary(ies) ${mode === 'register' ? 'registered' : 'updated'} successfully` } +} diff --git a/src/lib/api/paymentHub.ts b/src/lib/api/paymentHub.ts index e6d3283..5d148af 100644 --- a/src/lib/api/paymentHub.ts +++ b/src/lib/api/paymentHub.ts @@ -1,6 +1,7 @@ import apiClient from './client' +import type { MainBatch } from '@/modules/payment-hub/types' -export const fetchMainBatches = async () => { +export const fetchMainBatches = async (): Promise<{ data: MainBatch[] }> => { const response = await apiClient.get('/batches') return { data: response.data.data } } diff --git a/src/modules/account-mapper/CreateBeneficiariesTab.tsx b/src/modules/account-mapper/CreateBeneficiariesTab.tsx index c4bfd30..7d6ba70 100644 --- a/src/modules/account-mapper/CreateBeneficiariesTab.tsx +++ b/src/modules/account-mapper/CreateBeneficiariesTab.tsx @@ -9,156 +9,321 @@ import { SelectTrigger, SelectValue, } from '@/components/ui/select' -import { CheckCircle } from 'lucide-react' +import { CheckCircle, AlertCircle, ChevronDown, Plus, X } from 'lucide-react' +import { submitBeneficiaries } from '@/lib/api/accountMapper' +import { PAYMENT_MODALITY_CODES, type BeneficiaryEntry, type ApiConfig, type PaymentModalityCode } from './types' -const PAYMENT_MODALITIES = [ - '(01) Mobile Money', - '(02) Voucher', - '(03) Digital Wallet', - '(04) Bank Account', -] +type Mode = 'register' | 'update' interface Props { onCancel: () => void onSuccess: () => void } -interface FormState { - fullName: string - governmentEntity: string - financialInstitution: string - functionalId: string - financialAddress: string - paymentModality: string -} +const MODALITIES_REQUIRING_BBIC: PaymentModalityCode[] = ['00', '01', '03'] -const empty: FormState = { - fullName: '', - governmentEntity: '', - financialInstitution: '', - functionalId: '', - financialAddress: '', +const emptyEntry: BeneficiaryEntry = { + payeeIdentity: '', paymentModality: '', + bbic: '', + financialAddress: '', + sourceBbId: '', +} + +const emptyConfig: ApiConfig = { + apiUrl: '', + callbackUrl: '', + registeringInstitutionId: '', } export default function CreateBeneficiariesTab({ onCancel, onSuccess }: Props) { - const [form, setForm] = useState(empty) + const [mode, setMode] = useState('register') + const [entries, setEntries] = useState([{ ...emptyEntry }]) + const [config, setConfig] = useState({ ...emptyConfig }) + const [configOpen, setConfigOpen] = useState(false) const [success, setSuccess] = useState(false) + const [error, setError] = useState(null) + const [submitting, setSubmitting] = useState(false) + + function switchMode(next: Mode) { + setMode(next) + setEntries([{ ...emptyEntry }]) + setSuccess(false) + setError(null) + } - function set(field: keyof FormState, value: string) { - setForm((prev) => ({ ...prev, [field]: value })) + function setEntryField(index: number, field: keyof BeneficiaryEntry, value: string) { + setEntries((prev) => + prev.map((entry, i) => (i === index ? { ...entry, [field]: value } : entry)) + ) + setError(null) } - function handleSubmit(e: React.FormEvent) { + function addEntry() { + setEntries((prev) => [...prev, { ...emptyEntry }]) + } + + function removeEntry(index: number) { + setEntries((prev) => prev.filter((_, i) => i !== index)) + } + + function validate(): string | null { + for (const entry of entries) { + if (!entry.payeeIdentity || !entry.paymentModality || !entry.financialAddress) { + return 'Please fill in all required fields' + } + if (mode === 'update' && !entry.sourceBbId) { + return 'Source BB ID is required in update mode' + } + const bbicRequired = MODALITIES_REQUIRING_BBIC.includes(entry.paymentModality) + if (bbicRequired && !entry.bbic) { + return 'Banking Institution Code (BBIC) is required for the selected payment modality' + } + } + return null + } + + async function handleSubmit(e: React.FormEvent) { e.preventDefault() - setSuccess(true) - setTimeout(() => { + const validationError = validate() + if (validationError) { + setError(validationError) setSuccess(false) - setForm(empty) - onSuccess() - }, 1500) + return + } + + setError(null) + setSubmitting(true) + try { + await submitBeneficiaries(mode, entries, config) + setSuccess(true) + setEntries([{ ...emptyEntry }]) + setTimeout(() => { + setSuccess(false) + onSuccess() + }, 1500) + } catch { + setError('Failed to submit. Please try again.') + } finally { + setSubmitting(false) + } } return (
-
+
-

Add Beneficiary

+

+ {mode === 'register' ? 'Register Beneficiary' : 'Update Beneficiary'} +

- Register new beneficiaries and map their financial accounts + {mode === 'register' + ? 'Register new beneficiaries and map their financial accounts' + : 'Update payment details for existing beneficiaries'}

+ {/* Mode toggle */} +
+ + +
+ {success && (
- Beneficiary added successfully + {mode === 'register' ? 'Beneficiaries registered successfully' : 'Beneficiaries updated successfully'}
)} -
-
- - set('fullName', e.target.value)} - required - /> + {error && ( +
+ + {error}
+ )} -
- - set('governmentEntity', e.target.value)} - required - /> -
+ + {entries.map((entry, index) => ( +
+
+

Beneficiary {index + 1}

+ {entries.length > 1 && ( + + )} +
-
- - set('financialInstitution', e.target.value)} - required - /> -
+
+ + setEntryField(index, 'payeeIdentity', e.target.value)} + required + /> +

+ {mode === 'update' + ? 'Not updateable, used to identify record' + : 'The functional ID of the beneficiary'} +

+
-
- - set('functionalId', e.target.value)} - required - /> -
+
+ + +
-
- - set('financialAddress', e.target.value)} - required - /> -
+
+ + setEntryField(index, 'bbic', e.target.value)} + /> +

+ Required for bank account, mobile money, and digital wallet +

+
+ +
+ + setEntryField(index, 'financialAddress', e.target.value)} + required + /> +

IBAN, phone number, or wallet address

+
-
- - setEntryField(index, 'sourceBbId', e.target.value)} + required + /> +
+ )} +
+ ))} + + + + {/* API config (collapsible) */} +
+ + {configOpen && ( +
+
+ + setConfig((prev) => ({ ...prev, apiUrl: e.target.value }))} + /> +
+
+ + setConfig((prev) => ({ ...prev, callbackUrl: e.target.value }))} + /> +
+
+ + + setConfig((prev) => ({ ...prev, registeringInstitutionId: e.target.value })) + } + /> +
+
+ )}
+ )}
{successMsg && ( @@ -174,7 +210,7 @@ export default function SelfServicePortal() { )} - {/* Read-only fields */} + {/* Always read-only fields */}
- {/* Editable fields */} + {/* Editable fields — read-only until Edit is clicked */}
setFinancialInstitution(e.target.value)} + readOnly={!isEditing} + className={!isEditing ? 'bg-gray-50 text-gray-500 cursor-not-allowed' : undefined} required />
+
+ + {isEditing ? ( + + ) : ( + + )} +
+ +
+ + setBbic(e.target.value)} + readOnly={!isEditing} + className={!isEditing ? 'bg-gray-50 text-gray-500 cursor-not-allowed' : undefined} + /> +
+
setFinancialAddress(e.target.value)} + readOnly={!isEditing} + className={!isEditing ? 'bg-gray-50 text-gray-500 cursor-not-allowed' : undefined} required />

Your registered account number, mobile number, or wallet identifier.

-
- - -
- - + {isEditing && ( +
+ + +
+ )} , ) diff --git a/src/modules/account-mapper/mocks/beneficiaries.mock.ts b/src/modules/account-mapper/mocks/beneficiaries.mock.ts index 06d2310..70d1f0d 100644 --- a/src/modules/account-mapper/mocks/beneficiaries.mock.ts +++ b/src/modules/account-mapper/mocks/beneficiaries.mock.ts @@ -7,6 +7,7 @@ export const beneficiaries: Beneficiary[] = [ functionalId: 'BEN-FIN-001', financialAddress: 'rajesh.kumar@greenbank', paymentModality: '(04) Bank Account', + bbic: 'GRNBIN2026001', }, { governmentEntity: 'Ministry of Education', @@ -14,6 +15,7 @@ export const beneficiaries: Beneficiary[] = [ functionalId: 'BEN-EDU-002', financialAddress: 'priya.sharma@hdfc', paymentModality: '(04) Bank Account', + bbic: 'HDFCIN2026002', }, { governmentEntity: 'Ministry of Health', @@ -21,6 +23,7 @@ export const beneficiaries: Beneficiary[] = [ functionalId: 'BEN-HLT-003', financialAddress: '9876543210@digiwallet', paymentModality: '(03) Digital Wallet', + bbic: 'DGWLIN2026003', }, { governmentEntity: 'Ministry of Rural Development', @@ -28,6 +31,7 @@ export const beneficiaries: Beneficiary[] = [ functionalId: 'BEN-RD-004', financialAddress: 'anita.verma@bluebank', paymentModality: '(04) Bank Account', + bbic: 'BLUBIN2026004', }, { governmentEntity: 'Ministry of Corporate Affairs', @@ -35,6 +39,7 @@ export const beneficiaries: Beneficiary[] = [ functionalId: 'BEN-CA-005', financialAddress: 'suresh.nair@sbi', paymentModality: '(04) Bank Account', + bbic: 'SBIIIN2026005', }, { governmentEntity: 'Ministry of Agriculture', @@ -42,6 +47,7 @@ export const beneficiaries: Beneficiary[] = [ functionalId: 'BEN-AGR-006', financialAddress: '8765432109@redbank', paymentModality: '(01) Mobile Money', + bbic: 'REDBIN2026006', }, { governmentEntity: 'Ministry of Health', @@ -56,6 +62,7 @@ export const beneficiaries: Beneficiary[] = [ functionalId: 'BEN-EDU-008', financialAddress: '7654321098@digiwallet', paymentModality: '(03) Digital Wallet', + bbic: 'DGWLIN2026008', }, { governmentEntity: 'Ministry of Finance', @@ -63,6 +70,7 @@ export const beneficiaries: Beneficiary[] = [ functionalId: 'BEN-FIN-009', financialAddress: 'vikram.singh@sbi', paymentModality: '(04) Bank Account', + bbic: 'SBIIIN2026009', }, { governmentEntity: 'Ministry of Rural Development', @@ -70,5 +78,6 @@ export const beneficiaries: Beneficiary[] = [ functionalId: 'BEN-RD-010', financialAddress: 'kavitha.rao@greenbank', paymentModality: '(01) Mobile Money', + bbic: 'GRNBIN2026010', }, ] diff --git a/src/modules/account-mapper/types.ts b/src/modules/account-mapper/types.ts index 160502b..712e17e 100644 --- a/src/modules/account-mapper/types.ts +++ b/src/modules/account-mapper/types.ts @@ -4,4 +4,29 @@ export interface Beneficiary { functionalId: string financialAddress: string paymentModality: string + bbic?: string +} + +export const PAYMENT_MODALITY_CODES = [ + { code: '00', label: 'Bank Account' }, + { code: '01', label: 'Mobile Money' }, + { code: '02', label: 'Voucher' }, + { code: '03', label: 'Digital Wallet' }, + { code: '04', label: 'Proxy' }, +] as const + +export type PaymentModalityCode = (typeof PAYMENT_MODALITY_CODES)[number]['code'] + +export interface BeneficiaryEntry { + payeeIdentity: string + paymentModality: PaymentModalityCode | '' + bbic: string + financialAddress: string + sourceBbId: string +} + +export interface ApiConfig { + apiUrl: string + callbackUrl: string + registeringInstitutionId: string } diff --git a/src/modules/payment-hub/MainBatchesTab.tsx b/src/modules/payment-hub/MainBatchesTab.tsx index 7616f6b..6dee922 100644 --- a/src/modules/payment-hub/MainBatchesTab.tsx +++ b/src/modules/payment-hub/MainBatchesTab.tsx @@ -44,7 +44,7 @@ export default function MainBatchesTab() { // Fall back to mock data only when the API call fails const rows: MainBatch[] = isError ? mockBatches : (apiData?.data ?? []) - const totalCount: number = apiData?.totalBatches ?? rows.length + const totalCount: number = rows.length const filtered = rows.filter( (b) => statusFilter === 'all' || b.status === statusFilter diff --git a/src/modules/rbac/UserManagementTab.tsx b/src/modules/rbac/UserManagementTab.tsx index 0f9e6ed..76e435e 100644 --- a/src/modules/rbac/UserManagementTab.tsx +++ b/src/modules/rbac/UserManagementTab.tsx @@ -67,7 +67,7 @@ export default function UserManagementTab() { toast('User created successfully') } - function handleAssignRole(id: string) { + function handleAssignRole(_id: string) { toast('Role assigned successfully') } @@ -82,7 +82,7 @@ export default function UserManagementTab() { toast('User status updated') } - function handleResetPassword(id: string) { + function handleResetPassword(_id: string) { toast('Password reset email sent') } diff --git a/src/pages/Dashboard.tsx b/src/pages/Dashboard.tsx index 6aaee33..2c61a11 100644 --- a/src/pages/Dashboard.tsx +++ b/src/pages/Dashboard.tsx @@ -6,9 +6,7 @@ import StatusBadge from '@/components/shared/StatusBadge' import { fetchMainBatches } from '@/lib/api/paymentHub' import { mainBatches as mockBatches } from '@/modules/payment-hub/mocks/mainBatches.mock' import { vouchers } from '@/modules/vouchers/mocks/vouchers.mock' -import { g2pConfigs } from '@/modules/g2p-config/mocks/g2pConfigs.mock' -const activeG2P = g2pConfigs.filter((c) => c.status === 'Active').length const recentVouchers = vouchers.slice(0, 5) function formatAmount(n: number) { diff --git a/tsconfig.app.json b/tsconfig.app.json index dfcde0d..fd56802 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -20,7 +20,6 @@ "noUnusedParameters": true, "erasableSyntaxOnly": true, "noFallthroughCasesInSwitch": true, - "baseUrl": ".", "paths": { "@/*": ["./src/*"] } diff --git a/tsconfig.json b/tsconfig.json index 08d70bd..703e7ea 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,6 @@ { "files": [], "compilerOptions": { - "baseUrl": ".", "paths": { "@/*": ["./src/*"] }