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

@ -1,12 +1,12 @@
<template> <template>
<div> <div>
<!-- Navigation --> <!-- Navigation -->
<nav class="bg-white shadow-sm border-b"> <nav class="bg-black border-b-4 border-black">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16"> <div class="flex justify-between h-16">
<div class="flex items-center"> <div class="flex items-center">
<NuxtLink to="/" class="text-xl font-bold text-gray-900 font-mono"> <NuxtLink to="/" class="text-xl font-bold text-white font-mono">
Faber Finances FABER FINANCES
</NuxtLink> </NuxtLink>
</div> </div>
</div> </div>

View file

@ -1,12 +1,12 @@
<template> <template>
<div v-if="isOpen" class="fixed inset-0 bg-black bg-opacity-50 overflow-y-auto h-full w-full z-50"> <div v-if="isOpen" class="fixed inset-0 bg-black bg-opacity-75 overflow-y-auto h-full w-full z-50">
<div class="relative top-10 mx-auto p-5 border-2 border-black w-full max-w-2xl shadow-lg bg-white"> <div class="relative top-10 mx-auto p-5 border-4 border-black w-full max-w-2xl bg-white">
<div class="mt-3"> <div class="mt-3">
<div class="flex justify-between items-center mb-6"> <div class="flex justify-between items-center mb-6">
<h3 class="text-lg font-medium text-black">Update Available Balances</h3> <h3 class="text-lg font-bold uppercase text-black">UPDATE BALANCES</h3>
<button <button
@click="closeModal" @click="closeModal"
class="text-black hover:text-red-600"> 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"> <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" /> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg> </svg>
@ -15,12 +15,12 @@
<form @submit.prevent="updateBalances" class="space-y-6"> <form @submit.prevent="updateBalances" class="space-y-6">
<!-- Manual Entry Balances --> <!-- Manual Entry Balances -->
<div class="border-2 border-black p-4"> <div class="border-4 border-black p-4">
<div class="flex justify-between items-center mb-4"> <div class="flex justify-between items-center mb-4">
<div> <div>
<h4 class="text-md font-semibold text-black">Manual Entry</h4> <h4 class="text-md font-bold uppercase text-black">MANUAL ENTRY</h4>
<div v-if="lastManualUpdate" class="text-xs text-black mt-1"> <div v-if="lastManualUpdate" class="text-xs text-black mt-1 uppercase">
Last updated: {{ formatTimestamp(lastManualUpdate) }} LAST UPDATE: {{ formatTimestamp(lastManualUpdate) }}
</div> </div>
</div> </div>
</div> </div>
@ -28,44 +28,44 @@
<!-- RBC --> <!-- RBC -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4"> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
<div> <div>
<label class="block text-sm font-medium text-black mb-1"> <label class="block text-sm font-bold uppercase text-black mb-1">
RBC Available Cash (CAD $) RBC AVAILABLE (CAD)
</label> </label>
<input <input
v-model.number="balances.rbc_cad" v-model.number="balances.rbc_cad"
type="number" type="number"
step="0.01" step="0.01"
class="w-full px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500" class="w-full px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-mono"
placeholder="0.00" /> placeholder="0.00" />
<p class="text-xs text-black mt-1">Including overdraft limit</p> <p class="text-xs text-black mt-1 uppercase">INCLUDING OVERDRAFT</p>
</div> </div>
<!-- TD --> <!-- TD -->
<div> <div>
<label class="block text-sm font-medium text-black mb-1"> <label class="block text-sm font-bold uppercase text-black mb-1">
TD Available Cash (CAD $) TD AVAILABLE (CAD)
</label> </label>
<input <input
v-model.number="balances.td_cad" v-model.number="balances.td_cad"
type="number" type="number"
step="0.01" step="0.01"
class="w-full px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500" class="w-full px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-mono"
placeholder="0.00" /> placeholder="0.00" />
<p class="text-xs text-black mt-1">Including overdraft limit</p> <p class="text-xs text-black mt-1 uppercase">INCLUDING OVERDRAFT</p>
</div> </div>
</div> </div>
<!-- Millennium --> <!-- Millennium -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div> <div>
<label class="block text-sm font-medium text-black mb-1"> <label class="block text-sm font-bold uppercase text-black mb-1">
Millennium Balance () MILLENNIUM (EUR)
</label> </label>
<input <input
v-model.number="balances.millennium_eur" v-model.number="balances.millennium_eur"
type="number" type="number"
step="0.01" step="0.01"
class="w-full px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500" class="w-full px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-mono"
placeholder="0.00" /> placeholder="0.00" />
</div> </div>
</div> </div>
@ -73,67 +73,67 @@
<!-- Wise API Balances --> <!-- Wise API Balances -->
<div class="border rounded-lg p-4"> <div class="border-4 border-black p-4">
<div class="flex justify-between items-center mb-4"> <div class="flex justify-between items-center mb-4">
<div> <div>
<h4 class="text-md font-semibold text-gray-800">Wise Balances</h4> <h4 class="text-md font-bold uppercase text-black">WISE BALANCES</h4>
<div v-if="lastWiseFetch" class="text-xs text-gray-500 mt-1"> <div v-if="lastWiseFetch" class="text-xs text-black mt-1 uppercase">
Last fetched: {{ formatTimestamp(lastWiseFetch) }} LAST FETCH: {{ formatTimestamp(lastWiseFetch) }}
</div> </div>
</div> </div>
<button <button
type="button" type="button"
@click="fetchWiseBalances" @click="fetchWiseBalances"
:disabled="loading" :disabled="loading"
class="bg-green-500 hover:bg-green-600 disabled:bg-gray-400 text-white text-sm font-medium py-1 px-3 border-2 border-green-700"> class="bg-black hover:bg-white text-white hover:text-black disabled:bg-gray-300 disabled:text-gray-600 text-sm font-bold py-1 px-3 border-2 border-black uppercase">
{{ loading ? 'Fetching...' : 'Fetch from API' }} {{ loading ? 'FETCHING...' : 'FETCH API' }}
</button> </button>
</div> </div>
<!-- Jennie Wise --> <!-- Jennie Wise -->
<div class="mb-4"> <div class="mb-4">
<h5 class="text-sm font-medium text-black mb-2">Jennie Wise Balances</h5> <h5 class="text-sm font-bold uppercase text-black mb-2">JENNIE WISE</h5>
<div v-if="wiseBalances.jennie && wiseBalances.jennie.length > 0" class="grid grid-cols-1 md:grid-cols-3 gap-3"> <div v-if="wiseBalances.jennie && wiseBalances.jennie.length > 0" class="grid grid-cols-1 md:grid-cols-3 gap-3">
<div v-for="balance in wiseBalances.jennie" :key="`jennie-${balance.currency}`" class="bg-white border-2 border-black p-3"> <div v-for="balance in wiseBalances.jennie" :key="`jennie-${balance.currency}`" class="bg-white border-2 border-black p-3">
<div class="text-xs text-black">{{ balance.currency }}</div> <div class="text-xs text-black font-bold uppercase">{{ balance.currency }}</div>
<div class="text-sm font-medium">{{ formatCurrency(balance.value.value, balance.currency) }}</div> <div class="text-sm font-bold font-mono">{{ formatCurrency(balance.value.value, balance.currency) }}</div>
</div> </div>
</div> </div>
<div v-else class="text-sm text-black italic"> <div v-else class="text-sm text-black uppercase">
{{ loading ? 'Loading...' : 'No balances fetched yet' }} {{ loading ? 'LOADING...' : 'NO DATA' }}
</div> </div>
</div> </div>
<!-- Henry Wise --> <!-- Henry Wise -->
<div> <div>
<h5 class="text-sm font-medium text-black mb-2">Henry Wise Balances</h5> <h5 class="text-sm font-bold uppercase text-black mb-2">HENRY WISE</h5>
<div v-if="wiseBalances.henry && wiseBalances.henry.length > 0" class="grid grid-cols-1 md:grid-cols-3 gap-3"> <div v-if="wiseBalances.henry && wiseBalances.henry.length > 0" class="grid grid-cols-1 md:grid-cols-3 gap-3">
<div v-for="balance in wiseBalances.henry" :key="`henry-${balance.currency}`" class="bg-white border-2 border-black p-3"> <div v-for="balance in wiseBalances.henry" :key="`henry-${balance.currency}`" class="bg-white border-2 border-black p-3">
<div class="text-xs text-black">{{ balance.currency }}</div> <div class="text-xs text-black font-bold uppercase">{{ balance.currency }}</div>
<div class="text-sm font-medium">{{ formatCurrency(balance.value.value, balance.currency) }}</div> <div class="text-sm font-bold font-mono">{{ formatCurrency(balance.value.value, balance.currency) }}</div>
</div> </div>
</div> </div>
<div v-else class="text-sm text-black italic"> <div v-else class="text-sm text-black uppercase">
{{ loading ? 'Loading...' : 'No balances fetched yet' }} {{ loading ? 'LOADING...' : 'NO DATA' }}
</div> </div>
</div> </div>
</div> </div>
<!-- Total in CAD --> <!-- Total in CAD -->
<div class="border-t pt-4"> <div class="border-t-4 border-black pt-4">
<div class="bg-white border-2 border-black p-4"> <div class="bg-black text-white p-4">
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<span class="text-sm font-medium text-black">Total Available Balance (CAD $)</span> <span class="text-sm font-bold uppercase">TOTAL AVAILABLE (CAD)</span>
<span class="text-lg font-bold text-blue-600">{{ formatCurrency(totalBalanceCAD, 'CAD') }}</span> <span class="text-lg font-bold font-mono">{{ formatCurrency(totalBalanceCAD, 'CAD') }}</span>
</div> </div>
<p class="text-xs text-black mt-1">All balances converted to CAD using current exchange rates</p> <p class="text-xs mt-1 uppercase">ALL BALANCES CONVERTED TO CAD</p>
</div> </div>
</div> </div>
<!-- Error Display --> <!-- Error Display -->
<div v-if="error" class="bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded"> <div v-if="error" class="bg-white border-4 border-black text-black px-4 py-3">
{{ error }} <span class="font-bold uppercase">ERROR:</span> {{ error }}
</div> </div>
<!-- Action Buttons --> <!-- Action Buttons -->
@ -141,13 +141,13 @@
<button <button
type="button" type="button"
@click="closeModal" @click="closeModal"
class="px-4 py-2 text-sm font-medium text-black bg-white border-2 border-black hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-black"> 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 CANCEL
</button> </button>
<button <button
type="submit" type="submit"
class="px-4 py-2 text-sm font-medium text-white bg-blue-600 border-2 border-blue-800 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500"> 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">
Update Balances UPDATE
</button> </button>
</div> </div>
</form> </form>

View file

@ -1,15 +1,15 @@
<template> <template>
<div <div
v-if="isOpen" v-if="isOpen"
class="fixed inset-0 bg-black 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 <div
class="relative top-20 mx-auto p-5 border-2 border-black w-96 shadow-lg bg-white"> class="relative top-20 mx-auto p-5 border-4 border-black w-96 bg-white">
<div class="mt-3"> <div class="mt-3">
<div class="flex justify-between items-center mb-4"> <div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-medium text-black"> <h3 class="text-lg font-bold uppercase text-black">
{{ isEditing ? "Edit Transaction" : "Add New Transaction" }} {{ isEditing ? "EDIT TRANSACTION" : "ADD TRANSACTION" }}
</h3> </h3>
<button @click="closeModal" class="text-black hover:text-red-600"> <button @click="closeModal" class="text-black hover:bg-black hover:text-white p-1">
<svg <svg
class="w-6 h-6" class="w-6 h-6"
fill="none" fill="none"
@ -27,21 +27,21 @@
<form @submit.prevent="handleSubmit" class="space-y-4"> <form @submit.prevent="handleSubmit" class="space-y-4">
<!-- Description --> <!-- Description -->
<div> <div>
<label class="block text-sm font-medium text-black mb-1"> <label class="block text-sm font-bold uppercase text-black mb-1">
Description * DESCRIPTION *
</label> </label>
<input <input
v-model="form.description" v-model="form.description"
type="text" type="text"
required required
class="w-full px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500" class="w-full px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-mono"
placeholder="Enter transaction description" /> placeholder="Enter description" />
</div> </div>
<!-- Amount --> <!-- Amount -->
<div> <div>
<label class="block text-sm font-medium text-black mb-1"> <label class="block text-sm font-bold uppercase text-black mb-1">
Amount * AMOUNT *
</label> </label>
<div class="flex space-x-2"> <div class="flex space-x-2">
<input <input
@ -49,126 +49,126 @@
type="number" type="number"
step="0.01" step="0.01"
required required
class="flex-1 px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500" class="flex-1 px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-mono"
placeholder="Enter amount" /> placeholder="0.00" />
<select <select
v-model="form.currency" v-model="form.currency"
class="px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500"> class="px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-bold">
<option value="CAD">CAD $</option> <option value="CAD">CAD</option>
<option value="EUR">EUR </option> <option value="EUR">EUR</option>
</select> </select>
</div> </div>
<div <div
v-if="form.currency !== 'CAD' && form.amount" v-if="form.currency !== 'CAD' && form.amount"
class="mt-1 space-y-1"> class="mt-1 space-y-1">
<div class="text-sm text-black"> <div class="text-sm text-black font-mono">
{{ form.amount > 0 ? "+" : "" {{ form.amount > 0 ? "+" : ""
}}{{ formatCurrency(form.amount, form.currency) }} = }}{{ formatCurrency(form.amount, form.currency) }} =
{{ form.amount > 0 ? "+" : "" {{ form.amount > 0 ? "+" : ""
}}{{ formatCurrency(convertedAmount, "CAD") }} CAD }}{{ formatCurrency(convertedAmount, "CAD") }}
<span v-if="exchangeRateLoading" class="text-blue-600 ml-2"> <span v-if="exchangeRateLoading" class="text-black ml-2">
Updating rate... UPDATING...
</span> </span>
</div> </div>
<div class="text-xs text-black"> <div class="text-xs text-black font-mono">
<span v-if="lastRateUpdate"> <span v-if="lastRateUpdate">
Rate: {{ exchangeRates[form.currency].toFixed(5) }} ({{ RATE: {{ exchangeRates[form.currency].toFixed(5) }} ({{
formatTimeAgo(lastRateUpdate) formatTimeAgo(lastRateUpdate)
}}) }})
</span> </span>
<span v-if="exchangeRateError" class="text-orange-600 ml-2"> <span v-if="exchangeRateError" class="text-black ml-2 font-bold">
{{ exchangeRateError }} {{ exchangeRateError }}
</span> </span>
</div> </div>
</div> </div>
<p class="text-xs text-black mt-1"> <p class="text-xs text-black mt-1 uppercase">
Positive for income, negative for expenses POSITIVE = INCOME, NEGATIVE = EXPENSE
</p> </p>
</div> </div>
<!-- Category --> <!-- Category -->
<div> <div>
<label class="block text-sm font-medium text-black mb-1"> <label class="block text-sm font-bold uppercase text-black mb-1">
Category * CATEGORY *
</label> </label>
<select <select
v-model="form.category" v-model="form.category"
required required
class="w-full px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500"> class="w-full px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-bold">
<option value="">Select category</option> <option value="">SELECT</option>
<option value="Expense: Need">Expense: Need</option> <option value="Expense: Need">EXPENSE: NEED</option>
<option value="Expense: Want">Expense: Want</option> <option value="Expense: Want">EXPENSE: WANT</option>
<option value="Income">Income</option> <option value="Income">INCOME</option>
</select> </select>
</div> </div>
<!-- Type --> <!-- Type -->
<div> <div>
<label class="block text-sm font-medium text-black mb-1"> <label class="block text-sm font-bold uppercase text-black mb-1">
Type * TYPE *
</label> </label>
<select <select
v-model="form.type" v-model="form.type"
required required
class="w-full px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500"> class="w-full px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-bold">
<option value="recurring">Recurring</option> <option value="recurring">RECURRING</option>
<option value="one-time">One-time</option> <option value="one-time">ONE-TIME</option>
</select> </select>
</div> </div>
<!-- Frequency (only for recurring) --> <!-- Frequency (only for recurring) -->
<div v-if="form.type === 'recurring'"> <div v-if="form.type === 'recurring'">
<label class="block text-sm font-medium text-black mb-1"> <label class="block text-sm font-bold uppercase text-black mb-1">
Frequency * FREQUENCY *
</label> </label>
<select <select
v-model="form.frequency" v-model="form.frequency"
required required
class="w-full px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500"> class="w-full px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-bold">
<option value="weekly">Weekly</option> <option value="weekly">WEEKLY</option>
<option value="biweekly">Biweekly</option> <option value="biweekly">BIWEEKLY</option>
<option value="monthly">Monthly</option> <option value="monthly">MONTHLY</option>
<option value="quarterly">Quarterly</option> <option value="quarterly">QUARTERLY</option>
<option value="custom">Custom</option> <option value="custom">CUSTOM</option>
</select> </select>
</div> </div>
<!-- Custom months (only for custom frequency) --> <!-- Custom months (only for custom frequency) -->
<div v-if="form.type === 'recurring' && form.frequency === 'custom'"> <div v-if="form.type === 'recurring' && form.frequency === 'custom'">
<label class="block text-sm font-medium text-black mb-1"> <label class="block text-sm font-bold uppercase text-black mb-1">
Every X Months * EVERY X MONTHS *
</label> </label>
<input <input
v-model.number="form.customMonths" v-model.number="form.customMonths"
type="number" type="number"
min="1" min="1"
required required
class="w-full px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500" class="w-full px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-mono"
placeholder="Enter number of months" /> placeholder="1" />
</div> </div>
<!-- Start Date --> <!-- Start Date -->
<div> <div>
<label class="block text-sm font-medium text-black mb-1"> <label class="block text-sm font-bold uppercase text-black mb-1">
Start Date * START DATE *
</label> </label>
<input <input
v-model="form.date" v-model="form.date"
type="date" type="date"
required required
class="w-full px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500" /> class="w-full px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-mono" />
</div> </div>
<!-- End Date (optional for recurring) --> <!-- End Date (optional for recurring) -->
<div v-if="form.type === 'recurring'"> <div v-if="form.type === 'recurring'">
<label class="block text-sm font-medium text-black mb-1"> <label class="block text-sm font-bold uppercase text-black mb-1">
End Date (optional) END DATE (OPTIONAL)
</label> </label>
<input <input
v-model="form.endDate" v-model="form.endDate"
type="date" type="date"
class="w-full px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500" /> class="w-full px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-mono" />
</div> </div>
<!-- Confirmed Status --> <!-- Confirmed Status -->
@ -176,35 +176,35 @@
<input <input
v-model="form.isConfirmed" v-model="form.isConfirmed"
type="checkbox" type="checkbox"
class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-2 border-black" /> class="h-4 w-4 border-2 border-black accent-black" />
<label class="ml-2 block text-sm text-black"> <label class="ml-2 block text-sm text-black uppercase">
Confirmed (check if this transaction is certain) CONFIRMED
</label> </label>
</div> </div>
<!-- Notes --> <!-- Notes -->
<div> <div>
<label class="block text-sm font-medium text-black mb-1"> <label class="block text-sm font-bold uppercase text-black mb-1">
Notes NOTES
</label> </label>
<textarea <textarea
v-model="form.notes" v-model="form.notes"
rows="2" rows="2"
class="w-full px-3 py-2 border-2 border-black focus:outline-none focus:ring-2 focus:ring-blue-500" class="w-full px-3 py-2 border-2 border-black bg-white focus:outline-none focus:bg-black focus:text-white font-mono"
placeholder="Optional notes"></textarea> placeholder="Optional"></textarea>
</div> </div>
<!-- Business Percentage Split --> <!-- Business Percentage Split -->
<div class="border-t pt-4"> <div class="border-t-2 border-black pt-4">
<label class="block text-sm font-medium text-black mb-3"> <label class="block text-sm font-bold uppercase text-black mb-3">
Business/Personal Split BUSINESS/PERSONAL SPLIT
</label> </label>
<div class="space-y-3"> <div class="space-y-3">
<!-- Slider --> <!-- Slider -->
<div> <div>
<div class="flex justify-between items-center mb-2"> <div class="flex justify-between items-center mb-2">
<span class="text-sm text-black">Machine Magic %</span> <span class="text-sm text-black uppercase">MACHINE MAGIC %</span>
<span class="text-sm font-medium text-blue-600">{{ form.businessPercentage }}%</span> <span class="text-sm font-bold text-black">{{ form.businessPercentage }}%</span>
</div> </div>
<input <input
v-model.number="form.businessPercentage" v-model.number="form.businessPercentage"
@ -219,20 +219,20 @@
<div class="bg-white border-2 border-black p-3"> <div class="bg-white border-2 border-black p-3">
<div class="grid grid-cols-2 gap-4 text-sm"> <div class="grid grid-cols-2 gap-4 text-sm">
<div> <div>
<span class="text-black">Machine Magic:</span> <span class="text-black uppercase">BUSINESS:</span>
<span class="font-medium text-blue-600 ml-1"> <span class="font-bold text-black ml-1">
{{ formatCurrency(businessAmount) }} {{ formatCurrency(businessAmount) }}
</span> </span>
</div> </div>
<div> <div>
<span class="text-black">Personal:</span> <span class="text-black uppercase">PERSONAL:</span>
<span class="font-medium text-green-600 ml-1"> <span class="font-bold text-black ml-1">
{{ formatCurrency(personalAmount) }} {{ formatCurrency(personalAmount) }}
</span> </span>
</div> </div>
</div> </div>
<div class="text-xs text-black mt-2"> <div class="text-xs text-black mt-2 uppercase">
Only the personal portion ({{ formatCurrency(personalAmount) }}) affects your cash flow calculations PERSONAL PORTION AFFECTS CASH FLOW
</div> </div>
</div> </div>
</div> </div>
@ -246,11 +246,11 @@
v-if="isEditing" v-if="isEditing"
type="button" type="button"
@click="handleDelete" @click="handleDelete"
class="px-4 py-2 text-sm font-medium text-white bg-red-600 border-2 border-red-800 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500"> 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">
<svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
</svg> </svg>
Delete DELETE
</button> </button>
</div> </div>
<!-- Cancel and Save buttons --> <!-- Cancel and Save buttons -->
@ -258,13 +258,13 @@
<button <button
type="button" type="button"
@click="closeModal" @click="closeModal"
class="px-4 py-2 text-sm font-medium text-black bg-white border-2 border-black hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-black"> 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 CANCEL
</button> </button>
<button <button
type="submit" type="submit"
class="px-4 py-2 text-sm font-medium text-white bg-blue-600 border-2 border-blue-800 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500"> 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">
{{ isEditing ? "Update" : "Add" }} Transaction {{ isEditing ? "UPDATE" : "ADD" }}
</button> </button>
</div> </div>
</div> </div>
@ -482,27 +482,23 @@ const handleSubmit = () => {
<style scoped> <style scoped>
/* Custom slider styling */ /* Custom slider styling */
.slider { .slider {
background: linear-gradient(to right, #3b82f6 0%, #3b82f6 var(--percentage, 0%), #d1d5db var(--percentage, 0%), #d1d5db 100%); background: #000;
} }
.slider::-webkit-slider-thumb { .slider::-webkit-slider-thumb {
appearance: none; appearance: none;
height: 20px; height: 20px;
width: 20px; width: 20px;
border-radius: 50%; background: #fff;
background: #3b82f6;
cursor: pointer; cursor: pointer;
border: 2px solid white; border: 2px solid black;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
} }
.slider::-moz-range-thumb { .slider::-moz-range-thumb {
height: 20px; height: 20px;
width: 20px; width: 20px;
border-radius: 50%; background: #fff;
background: #3b82f6;
cursor: pointer; cursor: pointer;
border: 2px solid white; border: 2px solid black;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
} }
</style> </style>

View file

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