Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Finances | CommunityPulse Hub</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| </head> | |
| <body class="bg-gray-50 min-h-screen flex flex-col"> | |
| <custom-navbar></custom-navbar> | |
| <main class="flex-grow container mx-auto px-4 py-8"> | |
| <div class="mb-8 flex justify-between items-center"> | |
| <h1 class="text-2xl font-bold text-gray-800">Brotherhood Finances</h1> | |
| <div class="flex gap-4"> | |
| <button onclick="openAddTransactionModal()" class="bg-primary-500 hover:bg-primary-600 text-white px-4 py-2 rounded-md flex items-center gap-2 transition duration-300"> | |
| <i data-feather="plus"></i> | |
| Add Transaction | |
| </button> | |
| <button class="bg-secondary-500 hover:bg-secondary-600 text-white px-4 py-2 rounded-md flex items-center gap-2 transition duration-300"> | |
| <i data-feather="download"></i> | |
| Export | |
| </button> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow overflow-hidden mb-8"> | |
| <div class="p-6 border-b border-gray-200 flex justify-between items-center"> | |
| <h3 class="text-lg font-medium text-gray-900">Financial Overview</h3> | |
| <div class="flex gap-2"> | |
| <select class="border border-gray-300 rounded-md px-3 py-1 text-sm"> | |
| <option>This Month</option> | |
| <option>Last Month</option> | |
| <option>Last 3 Months</option> | |
| <option>This Year</option> | |
| </select> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-3 divide-y md:divide-y-0 md:divide-x divide-gray-200"> | |
| <div class="p-6"> | |
| <div class="flex items-center justify-between"> | |
| <h4 class="text-gray-500">Total Income</h4> | |
| <div class="p-2 rounded-full bg-green-100 text-green-500"> | |
| <i data-feather="arrow-up" class="w-4 h-4"></i> | |
| </div> | |
| </div> | |
| <p class="text-2xl font-bold text-gray-800 mt-2">₱162,250</p> | |
| <p class="text-green-500 text-sm mt-1">+8% from last month</p> | |
| </div> | |
| <div class="p-6"> | |
| <div class="flex items-center justify-between"> | |
| <h4 class="text-gray-500">Total Expenses</h4> | |
| <div class="p-2 rounded-full bg-red-100 text-red-500"> | |
| <i data-feather="arrow-down" class="w-4 h-4"></i> | |
| </div> | |
| </div> | |
| <p class="text-2xl font-bold text-gray-800 mt-2">₱94,500</p> | |
| <p class="text-red-500 text-sm mt-1">-5% from last month</p> | |
| </div> | |
| <div class="p-6"> | |
| <div class="flex items-center justify-between"> | |
| <h4 class="text-gray-500">Current Balance</h4> | |
| <div class="p-2 rounded-full bg-blue-100 text-blue-500"> | |
| <i data-feather="dollar-sign" class="w-4 h-4"></i> | |
| </div> | |
| </div> | |
| <p class="text-2xl font-bold text-gray-800 mt-2">₱786,600</p> | |
| <p class="text-green-500 text-sm mt-1">+15% from last month</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow overflow-hidden"> | |
| <div class="p-6 border-b border-gray-200 flex justify-between items-center"> | |
| <h3 class="text-lg font-medium text-gray-900">All Transactions</h3> | |
| <div class="flex gap-2"> | |
| <input type="text" placeholder="Search..." class="border border-gray-300 rounded-md px-3 py-1 text-sm"> | |
| <select class="border border-gray-300 rounded-md px-3 py-1 text-sm"> | |
| <option>All Types</option> | |
| <option>Income</option> | |
| <option>Expense</option> | |
| </select> | |
| </div> | |
| </div> | |
| <div class="overflow-x-auto"> | |
| <table class="min-w-full divide-y divide-gray-200"> | |
| <thead class="bg-gray-50"> | |
| <tr> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Member</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Description</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Category</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Amount</th> | |
| <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200"> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 15, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10 bg-gray-100 rounded-full flex items-center justify-center"> | |
| <span class="text-gray-500">JD</span> | |
| </div> | |
| <div class="ml-4"> | |
| <div class="text-sm font-medium text-gray-900">John Doe</div> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Monthly dues payment</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Dues</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-green-600">+₱2,500</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium"> | |
| <button class="text-blue-500 hover:text-blue-700 mr-3"><i data-feather="edit" class="w-4 h-4"></i></button> | |
| <button class="text-red-500 hover:text-red-700"><i data-feather="trash-2" class="w-4 h-4"></i></button> | |
| </td> | |
| </tr> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 10, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10 bg-gray-100 rounded-full flex items-center justify-center"> | |
| <span class="text-gray-500">JS</span> | |
| </div> | |
| <div class="ml-4"> | |
| <div class="text-sm font-medium text-gray-900">Jane Smith</div> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Donation for event</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-purple-100 text-purple-800">Donation</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-green-600">+₱10,000</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium"> | |
| <button class="text-blue-500 hover:text-blue-700 mr-3"><i data-feather="edit" class="w-4 h-4"></i></button> | |
| <button class="text-red-500 hover:text-red-700"><i data-feather="trash-2" class="w-4 h-4"></i></button> | |
| </td> | |
| </tr> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 5, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10 bg-gray-100 rounded-full flex items-center justify-center"> | |
| <span class="text-gray-500">TC</span> | |
| </div> | |
| <div class="ml-4"> | |
| <div class="text-sm font-medium text-gray-900">Treasurer</div> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Office supplies</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Supplies</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-red-600">-₱6,025</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium"> | |
| <button class="text-blue-500 hover:text-blue-700 mr-3"><i data-feather="edit" class="w-4 h-4"></i></button> | |
| <button class="text-red-500 hover:text-red-700"><i data-feather="trash-2" class="w-4 h-4"></i></button> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| <div class="px-6 py-4 border-t border-gray-200 flex items-center justify-between"> | |
| <div class="text-sm text-gray-500">Showing <span class="font-medium">1</span> to <span class="font-medium">3</span> of <span class="font-medium">24</span> results</div> | |
| <div class="flex space-x-2"> | |
| <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">Previous</button> | |
| <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-white bg-primary-500 hover:bg-primary-600">1</button> | |
| <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">2</button> | |
| <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">Next</button> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <!-- Add Transaction Modal --> | |
| <div id="transactionModal" class="fixed inset-0 overflow-y-auto hidden"> | |
| <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"> | |
| <div class="fixed inset-0 transition-opacity" aria-hidden="true"> | |
| <div class="absolute inset-0 bg-gray-500 opacity-75"></div> | |
| </div> | |
| <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span> | |
| <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"> | |
| <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"> | |
| <div class="sm:flex sm:items-start"> | |
| <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"> | |
| <h3 class="text-lg leading-6 font-medium text-gray-900 mb-4">Add New Transaction</h3> | |
| <form class="space-y-4"> | |
| <div> | |
| <label for="transactionType" class="block text-sm font-medium text-gray-700">Transaction Type</label> | |
| <select id="transactionType" name="transactionType" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm"> | |
| <option value="income">Income</option> | |
| <option value="expense">Expense</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label for="transactionAmount" class="block text-sm font-medium text-gray-700">Amount</label> | |
| <input type="number" id="transactionAmount" name="transactionAmount" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm" placeholder="0.00"> | |
| </div> | |
| <div> | |
| <label for="transactionDate" class="block text-sm font-medium text-gray-700">Date</label> | |
| <input type="date" id="transactionDate" name="transactionDate" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm"> | |
| </div> | |
| <div> | |
| <label for="transactionMember" class="block text-sm font-medium text-gray-700">Member</label> | |
| <select id="transactionMember" name="transactionMember" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm"> | |
| <option value="">Select Member</option> | |
| <option value="1">John Doe</option> | |
| <option value="2">Jane Smith</option> | |
| <option value="3">Robert Johnson</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label for="transactionCategory" class="block text-sm font-medium text-gray-700">Category</label> | |
| <select id="transactionCategory" name="transactionCategory" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm"> | |
| <option value="dues">Dues</option> | |
| <option value="donation">Donation</option> | |
| <option value="event">Event</option> | |
| <option value="supplies">Supplies</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label for="transactionDescription" class="block text-sm font-medium text-gray-700">Description</label> | |
| <textarea id="transactionDescription" name="transactionDescription" rows="3" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm"></textarea> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"> | |
| <button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-primary-500 text-base font-medium text-white hover:bg-primary-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 sm:ml-3 sm:w-auto sm:text-sm"> | |
| Save Transaction | |
| </button> | |
| <button type="button" onclick="closeAddTransactionModal()" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"> | |
| Cancel | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <custom-footer></custom-footer> | |
| <script src="components/navbar.js"></script> | |
| <script src="components/footer.js"></script> | |
| <script src="script.js"></script> | |
| <script> | |
| function openAddTransactionModal() { | |
| document.getElementById('transactionModal').classList.remove('hidden'); | |
| } | |
| function closeAddTransactionModal() { | |
| document.getElementById('transactionModal').classList.add('hidden'); | |
| } | |
| feather.replace(); | |
| </script> | |
| </body> | |
| </html> |