UI improvements and fixes

- Fixed brutalist styling across all components
- Removed notes field from transaction list display
- Added whitespace-nowrap to prevent description wrapping
- Updated modals with consistent border styling
- Improved form layouts and button styling
This commit is contained in:
Jennie Robinson Faber 2025-08-23 11:57:21 +01:00
parent 086d682592
commit cdbf0733c5
4 changed files with 219 additions and 238 deletions

View file

@ -5,49 +5,49 @@
<!-- Key Metrics -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<!-- Current Balance Card -->
<div class="bg-white border-2 border-black shadow-lg p-6">
<div class="bg-white border-4 border-black p-6">
<div class="text-center">
<p class="text-sm font-medium text-black">
Available Balance
<p class="text-sm font-bold uppercase text-black">
AVAILABLE BALANCE
</p>
<p class="text-2xl font-bold text-blue-600">
<p class="text-2xl font-bold text-black">
{{ formatCurrency(cashFlow?.startingBalance?.value || 0) }}
</p>
<button
@click="openBalanceModal"
class="mt-2 text-xs text-blue-600 hover:text-blue-800 underline border-b border-blue-600">
Update Balances
class="mt-2 text-xs text-black hover:bg-black hover:text-white px-2 py-1 border-2 border-black font-bold uppercase">
UPDATE
</button>
</div>
</div>
<!-- Runway Card -->
<div class="bg-white border-2 border-black shadow-lg p-6">
<div class="bg-white border-4 border-black p-6">
<div class="text-center">
<p class="text-sm font-medium text-black">Runway</p>
<p class="text-2xl font-bold" :class="runwayColor">
<p class="text-sm font-bold uppercase text-black">RUNWAY</p>
<p class="text-2xl font-bold text-black">
{{ runwayText }}
</p>
</div>
</div>
<!-- Core Expenses Card -->
<div class="bg-white border-2 border-black shadow-lg p-6">
<div class="bg-white border-4 border-black p-6">
<div class="text-center">
<p class="text-sm font-medium text-black">
Core Expenses (Needs)
<p class="text-sm font-bold uppercase text-black">
CORE EXPENSES
</p>
<p class="text-2xl font-bold text-red-600">
<p class="text-2xl font-bold text-black">
{{ formatCurrency(monthlyCoreExpenses) }}
</p>
</div>
</div>
<!-- Income Card -->
<div class="bg-white border-2 border-black shadow-lg p-6">
<div class="bg-white border-4 border-black p-6">
<div class="text-center">
<p class="text-sm font-medium text-black">Monthly Income</p>
<p class="text-2xl font-bold text-green-600">
<p class="text-sm font-bold uppercase text-black">MONTHLY INCOME</p>
<p class="text-2xl font-bold text-black">
{{ formatCurrency(monthlyIncome) }}
</p>
</div>
@ -55,23 +55,20 @@
</div>
<!-- Scenario Control Panel -->
<div class="bg-white border-2 border-black shadow-lg p-6 mb-8">
<div class="bg-white border-4 border-black p-6 mb-8">
<div
class="flex flex-col sm:flex-row sm:items-center sm:justify-between">
<div class="mb-4 sm:mb-0">
<h3 class="text-lg font-semibold text-black">
Financial Scenario
<h3 class="text-lg font-bold uppercase text-black">
FINANCIAL SCENARIO
</h3>
<p class="text-sm text-black">
<span
class="font-medium"
:class="
scenario === 'interest' ? 'text-red-600' : 'text-green-600'
">
class="font-bold uppercase">
{{
scenario === "interest"
? "🔴 Current (Interest Payments)"
: "🟢 Bankruptcy (Surplus Payments)"
? "CURRENT (INTEREST)"
: "BANKRUPTCY (SURPLUS)"
}}
</span>
- {{ scenarioDescription }}
@ -82,13 +79,13 @@
class="flex flex-col sm:flex-row sm:items-center space-y-4 sm:space-y-0 sm:space-x-4">
<!-- Scenario Toggle -->
<div class="flex items-center space-x-3">
<label class="text-sm font-medium text-black">Scenario:</label>
<label class="text-sm font-bold uppercase text-black">SCENARIO:</label>
<select
v-model="scenario"
@change="updateScenario"
class="px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500">
<option value="interest">Interest Payments</option>
<option value="bankruptcy">Dynamic Surplus</option>
class="px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-bold">
<option value="interest">INTEREST</option>
<option value="bankruptcy">BANKRUPTCY</option>
</select>
</div>
@ -96,12 +93,12 @@
<div
v-if="scenario === 'bankruptcy'"
class="bg-white border-2 border-black px-3 py-2 text-sm">
<div class="font-medium text-black">
Surplus: {{ formatCurrency(calculatedSurplusPayment) }}/month
<div class="font-bold uppercase text-black">
SURPLUS: {{ formatCurrency(calculatedSurplusPayment) }}/MO
</div>
<div class="text-xs text-black">
Income: {{ formatCurrency(householdNetIncome) }} | Threshold:
{{ formatCurrency(surplusThreshold) }} | Available:
<div class="text-xs text-black uppercase">
INC: {{ formatCurrency(householdNetIncome) }} | THR:
{{ formatCurrency(surplusThreshold) }} | AVL:
{{
formatCurrency(
Math.max(0, householdNetIncome - surplusThreshold)
@ -125,27 +122,27 @@
<!-- Delete Confirmation Modal -->
<div
v-if="showDeleteConfirmation"
class="fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full z-50">
class="fixed inset-0 bg-black bg-opacity-75 overflow-y-auto h-full w-full z-50">
<div
class="relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white">
class="relative top-20 mx-auto p-5 border-4 border-black w-96 bg-white">
<div class="mt-3">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-medium text-gray-900">
Confirm Delete
<h3 class="text-lg font-bold uppercase text-black">
CONFIRM DELETE
</h3>
<button @click="cancelDelete" class="text-gray-400 hover:text-gray-600">
<button @click="cancelDelete" class="text-black hover:bg-black hover:text-white p-1">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
<div class="mb-4">
<p class="text-sm text-gray-600">
<p class="text-sm text-black">
Are you sure you want to delete this transaction? This action cannot be undone.
</p>
<div v-if="transactionToDelete" class="mt-3 p-3 bg-gray-50 rounded">
<p class="text-sm font-medium">{{ transactionToDelete.description }}</p>
<p class="text-sm text-gray-500">
<div v-if="transactionToDelete" class="mt-3 p-3 bg-white border-2 border-black">
<p class="text-sm font-bold">{{ transactionToDelete.description }}</p>
<p class="text-sm text-black">
{{ formatCurrency(transactionToDelete.amount) }} - {{ transactionToDelete.category }}
</p>
</div>
@ -153,13 +150,13 @@
<div class="flex justify-end space-x-3">
<button
@click="cancelDelete"
class="px-4 py-2 text-sm font-medium text-gray-700 bg-gray-200 rounded-md hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500">
Cancel
class="px-4 py-2 text-sm font-bold text-black bg-white border-2 border-black hover:bg-black hover:text-white focus:outline-none uppercase">
CANCEL
</button>
<button
@click="confirmDelete"
class="px-4 py-2 text-sm font-medium text-white bg-red-600 rounded-md hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500">
Delete Transaction
class="px-4 py-2 text-sm font-bold text-white bg-black border-2 border-black hover:bg-white hover:text-black focus:outline-none uppercase">
DELETE
</button>
</div>
</div>
@ -174,15 +171,15 @@
@update="updateBalance" />
<!-- Projected Transactions (Next 13 Weeks) -->
<div class="bg-white rounded-lg shadow overflow-hidden">
<div class="bg-white border-4 border-black overflow-hidden">
<div
class="px-6 py-4 border-b border-gray-200 flex justify-between items-center">
<h3 class="text-lg font-semibold">
All Transactions - Next 13 Weeks
class="px-6 py-4 border-b-4 border-black flex justify-between items-center">
<h3 class="text-lg font-bold uppercase">
ALL TRANSACTIONS - NEXT 13 WEEKS
</h3>
<button
@click="handleAddTransaction"
class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 border-2 border-blue-800 flex items-center">
class="bg-black text-white hover:bg-white hover:text-black font-bold py-2 px-4 border-2 border-black flex items-center uppercase">
<svg
class="w-4 h-4 mr-2"
fill="none"
@ -194,7 +191,7 @@
stroke-width="2"
d="M12 6v6m0 0v6m0-6h6m-6 0H6" />
</svg>
Add Transaction
ADD TRANSACTION
</button>
</div>
<div class="overflow-x-auto" v-if="projectedTransactions.length > 0">
@ -202,68 +199,61 @@
<thead class="bg-black text-white">
<tr>
<th
class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
Date
class="px-6 py-3 text-left text-xs font-bold uppercase tracking-wider">
DATE
</th>
<th
class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
Description
class="px-6 py-3 text-left text-xs font-bold uppercase tracking-wider">
DESCRIPTION
</th>
<th
class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
Category
class="px-6 py-3 text-left text-xs font-bold uppercase tracking-wider">
CATEGORY
</th>
<th
class="px-6 py-3 text-right text-xs font-medium uppercase tracking-wider">
Amount
class="px-6 py-3 text-right text-xs font-bold uppercase tracking-wider">
AMOUNT
</th>
<th
class="px-6 py-3 text-right text-xs font-medium uppercase tracking-wider">
Running Balance
class="px-6 py-3 text-right text-xs font-bold uppercase tracking-wider">
BALANCE
</th>
<th
class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
Notes
</th>
<th
class="px-6 py-3 text-center text-xs font-medium uppercase tracking-wider">
Actions
class="px-6 py-3 text-center text-xs font-bold uppercase tracking-wider">
ACTIONS
</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-black">
<tbody class="bg-white divide-y-2 divide-black">
<tr
v-for="transaction in projectedTransactions"
:key="`${transaction.id}-${transaction.date}`"
class="hover:bg-blue-50 transition-colors">
<td class="px-6 py-4 whitespace-nowrap text-sm text-black">
class="hover:bg-gray-100">
<td class="px-6 py-4 whitespace-nowrap text-sm text-black font-mono">
{{ formatDate(transaction.date) }}
</td>
<td class="px-6 py-4">
<td class="px-6 py-4 whitespace-nowrap">
<div>
<p class="text-sm font-medium text-black">
<p class="text-sm font-bold text-black">
{{ transaction.description }}
</p>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="text-sm text-black">{{
<span class="text-sm text-black font-mono">{{
transaction.category
}}</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-right">
<div
:class="
transaction.amount > 0 ? 'text-green-600' : 'text-red-600'
">
<p class="text-sm font-medium">
<div class="text-black">
<p class="text-sm font-bold font-mono">
{{ formatCurrency(transaction.amount) }}
</p>
<!-- Show business split info if applicable -->
<div v-if="transaction.businessPercentage > 0" class="text-xs text-gray-500 space-y-0.5">
<div>Personal: {{ formatCurrency(transaction.amount) }}</div>
<div class="text-blue-600">Business: {{ formatCurrency(transaction.businessAmount || 0) }} ({{ transaction.businessPercentage }}%)</div>
<div class="font-medium">Total: {{ formatCurrency(transaction.totalAmount || transaction.amount) }}</div>
<div v-if="transaction.businessPercentage > 0" class="text-xs text-black space-y-0.5">
<div>PER: {{ formatCurrency(transaction.amount) }}</div>
<div>BUS: {{ formatCurrency(transaction.businessAmount || 0) }} ({{ transaction.businessPercentage }}%)</div>
<div class="font-bold">TTL: {{ formatCurrency(transaction.totalAmount || transaction.amount) }}</div>
</div>
<!-- Show original currency info if different and no business split -->
<p
@ -271,7 +261,7 @@
transaction.originalCurrency &&
transaction.originalCurrency !== 'CAD'
"
class="text-xs text-gray-500">
class="text-xs text-black">
({{
formatCurrency(
transaction.originalAmount,
@ -283,31 +273,26 @@
</td>
<td class="px-6 py-4 whitespace-nowrap text-right">
<p
class="text-sm font-bold"
class="text-sm font-bold font-mono"
:class="
transaction.runningBalance < 0
? 'text-red-600'
? 'bg-black text-white px-1'
: 'text-black'
">
{{ formatCurrency(transaction.runningBalance) }}
</p>
</td>
<td class="px-6 py-4 text-left">
<p class="text-sm text-black max-w-xs truncate" :title="transaction.notes">
{{ transaction.notes || '-' }}
</p>
</td>
<td class="px-6 py-4 whitespace-nowrap text-center">
<div class="flex justify-center space-x-2">
<button
@click="handleEditTransaction(transaction)"
class="text-blue-600 hover:text-blue-800 text-sm font-medium px-2 py-1 border border-blue-600 hover:bg-blue-50">
Edit
class="text-black text-sm font-bold px-2 py-1 border-2 border-black hover:bg-black hover:text-white uppercase">
EDIT
</button>
<button
@click="handleDeleteTransaction(transaction.id)"
class="text-red-600 hover:text-red-800 text-sm font-medium px-2 py-1 border border-red-600 hover:bg-red-50">
Delete
class="text-black text-sm font-bold px-2 py-1 border-2 border-black hover:bg-black hover:text-white uppercase">
DEL
</button>
</div>
</td>
@ -318,7 +303,7 @@
<!-- Empty state when no transactions -->
<div v-else class="text-center py-12">
<svg
class="h-12 w-12 mx-auto mb-4 text-gray-400"
class="h-12 w-12 mx-auto mb-4 text-black"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24">
@ -328,10 +313,10 @@
stroke-width="2"
d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" />
</svg>
<h3 class="text-lg font-medium text-gray-900 mb-2">
No transactions yet
<h3 class="text-lg font-bold uppercase text-black mb-2">
NO TRANSACTIONS
</h3>
<p class="text-gray-600 mb-4">
<p class="text-black mb-4">
Add your first transaction to start tracking your cash flow
</p>
</div>