Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
- xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:p="http://primefaces.org/ui"
- xmlns:f="http://xmlns.jcp.org/jsf/core">
- <h:head>
- <style>
- /* Card Styles */
- .card {
- background-color: #ffffff;
- border-radius: 10px;
- box-shadow: 0 4px 8px rgba(0,0,0,0.1);
- padding: 1.5rem;
- margin-bottom: 1.5rem;
- }
- .card-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 1rem;
- }
- .card-title {
- font-size: 1.2rem;
- font-weight: 600;
- color: #4a5568;
- }
- /*.card-title {*/
- /* font-size: 0.9rem;*/
- /* color: #6c757d;*/
- /* text-transform: uppercase;*/
- /* font-weight: 600;*/
- /* }*/
- .card-icon {
- width: 40px;
- height: 40px;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- /*.card-icon {*/
- /* font-size: 1.8rem;*/
- /* margin-right: 1rem;*/
- /* width: 50px;*/
- /* height: 50px;*/
- /* border-radius: 50%;*/
- /* display: flex;*/
- /* align-items: center;*/
- /* justify-content: center;*/
- /*}*/
- .card-icon.income {
- background-color: #e9f7ef;
- color: #38a169;
- }
- .card-value {
- font-size: 1.8rem;
- font-weight: 700;
- color: #2d3748;
- margin-bottom: 0.5rem;
- }
- /* Form Styles */
- .form-grid {
- display: grid;
- grid-template-columns: 1fr;
- gap: 1rem;
- }
- @media (min-width: 768px) {
- .form-grid {
- grid-template-columns: 1fr 1fr;
- }
- }
- .form-field {
- margin-bottom: 1.25rem;
- }
- .form-field label {
- display: block;
- margin-bottom: 0.5rem;
- font-weight: 600;
- color: #4a5568;
- }
- /* Button Styles */
- .action-buttons {
- display: flex;
- justify-content: flex-end;
- margin-top: 1rem;
- gap: 0.5rem;
- }
- /* Table Styles */
- .table-actions {
- display: flex;
- gap: 0.5rem;
- }
- .income-table .p-datatable-thead th {
- background-color: #f8f9fa;
- font-weight: 600;
- }
- .income-table .p-datatable-tbody td {
- vertical-align: middle;
- }
- .cancel-btn {
- background: #f8f9fa !important;
- border: 1px solid #dee2e6 !important;
- color: #495057 !important;
- transition: all 0.3s ease;
- }
- .cancel-btn:hover {
- background: #e9ecef !important;
- border-color: #ced4da !important;
- }
- .cancel-btn:focus {
- box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25) !important;
- }
- .action-buttons {
- display: flex;
- justify-content: flex-end;
- gap: 0.75rem;
- margin-top: 1.5rem;
- }
- /* Button sizing */
- .p-button {
- padding: 0.65rem 1.25rem !important;
- font-size: 1rem !important;
- }
- /* Expense icon styling */
- .card-icon.expense {
- background-color: #fce8e6;
- color: #e53e3e;
- }
- /* dashboard.css */
- .dashboard-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 1.5rem;
- }
- .header-title h1 {
- color: #2e384d;
- margin-bottom: 0.25rem;
- }
- .welcome-message {
- color: #6c757d;
- font-size: 0.9rem;
- }
- .card-container {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
- gap: 1.5rem;
- margin-bottom: 2rem;
- }
- .summary-card {
- background: white;
- border-radius: 10px;
- padding: 1.5rem;
- box-shadow: 0 4px 6px rgba(0,0,0,0.05);
- border-top: 4px solid;
- }
- .balance-card {
- border-color: #4e73df;
- }
- .expense-card {
- border-color: #e74a3b;
- }
- .income-card {
- border-color: #1cc88a;
- }
- .balance-card .card-icon {
- background-color: #e0e6f7;
- color: #4e73df;
- }
- .expense-card .card-icon {
- background-color: #fbe9e8;
- color: #e74a3b;
- }
- .income-card .card-icon {
- background-color: #e6f4f0;
- color: #1cc88a;
- }
- .card-trend {
- font-size: 0.9rem;
- display: flex;
- align-items: center;
- }
- .positive {
- color: #1cc88a;
- }
- .negative {
- color: #e74a3b;
- }
- .panel-container {
- background: white;
- border-radius: 10px;
- overflow: hidden;
- box-shadow: 0 4px 6px rgba(0,0,0,0.05);
- }
- .panel-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0.5rem 0;
- }
- .transactions-table {
- border: none;
- }
- .transaction-info {
- display: flex;
- align-items: center;
- }
- .transaction-icon {
- width: 40px;
- height: 40px;
- border-radius: 8px;
- background-color: #f0f5ff;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 1rem;
- color: #4e73df;
- }
- .transaction-name {
- font-weight: 600;
- color: #2e384d;
- }
- .transaction-category {
- font-size: 0.85rem;
- color: #6c757d;
- }
- .transaction-date {
- color: #2e384d;
- font-weight: 500;
- }
- .transaction-time {
- font-size: 0.8rem;
- color: #adb5bd;
- }
- .transaction-amount {
- font-weight: 700;
- font-size: 1.1rem;
- }
- .transaction-actions {
- display: flex;
- gap: 0.5rem;
- }
- .action-btn {
- width: 32px;
- height: 32px;
- border-radius: 50%;
- }
- .delete-btn {
- color: #e74a3b !important;
- background-color: #fbe9e8 !important;
- }
- .credit-row {
- border-left: 3px solid #1cc88a;
- }
- .debit-row {
- border-left: 3px solid #e74a3b;
- }
- .btn-primary {
- background: #4e73df !important;
- border: none !important;
- }
- .btn-outline {
- background: transparent !important;
- border: 1px solid #4e73df !important;
- color: #4e73df !important;
- }
- </style>
- <title>Monivo Dashboard</title>
- </h:head>
- <h:body>
- <ui:composition template="/WEB-INF/templates/user.xhtml">
- <ui:define name="content">
- <h:outputStylesheet library="css" name="user-dashboard.css"/>
- <div class="dashboard-container">
- <!-- Header -->
- <div class="dashboard-header">
- <div class="header-title">
- <h1>Dashboard</h1>
- <p class="welcome-message">Welcome back, #{userAccountcdi.user.name}!</p>
- </div>
- <div class="header-controls">
- <p:commandButton value="Add Transaction"
- icon="pi pi-plus"
- styleClass="btn-primary"
- action="#{transactionController.openDialog}"/>
- </div>
- </div>
- <!-- Financial Summary Cards -->
- <div class="card-container">
- <!-- Total Balance Card -->
- <div class="summary-card balance-card">
- <div class="card-header">
- <div>
- <span class="card-title">TOTAL BALANCE</span>
- <h3 class="card-value">$2,543</h3>
- </div>
- </div>
- <div class="card-trend positive">
- <i class="pi pi-arrow-up"></i> 2.5% from last month
- </div>
- </div>
- <!-- Monthly Expenses Card -->
- <div class="summary-card expense-card">
- <div class="card-header">
- <div>
- <span class="card-title">MONTHLY EXPENSES</span>
- <h3 class="card-value">$3,240.00</h3>
- </div>
- </div>
- <div class="card-trend negative">
- <i class="pi pi-arrow-down"></i> 0.8% from last month
- </div>
- </div>
- <!-- Monthly Income Card -->
- <div class="summary-card income-card">
- <div class="card-header">
- <div>
- <span class="card-title">MONTHLY INCOME</span>
- <h3 class="card-value">$6,800.00</h3>
- </div>
- </div>
- <div class="card-trend positive">
- <i class="pi pi-arrow-up"></i> 4.2% from last month
- </div>
- </div>
- </div>
- <!-- Recent Transactions Panel -->
- <div class="panel-container">
- <p:panel>
- <f:facet name="header">
- <div class="panel-header">
- <h3>Recent Transactions</h3>
- </div>
- </f:facet>
- <p:dataTable value="#{transactionController.recentTransactions}"
- var="txn"
- styleClass="transactions-table"
- emptyMessage="No records found."
- rowStyleClass="#{txn.amount lt 0 ? 'debit-row' : 'credit-row'}">
- <p:column headerText="Description">
- <div class="transaction-info">
- <div class="transaction-icon">
- <i class="pi #{txn.category.icon}"></i>
- </div>
- <div>
- <div class="transaction-name">#{txn.description}</div>
- <div class="transaction-category">#{txn.category.name}</div>
- </div>
- </div>
- </p:column>
- <p:column headerText="Amount">
- <div class="transaction-amount #{txn.amount lt 0 ? 'negative' : 'positive'}">
- <h:outputText value="#{txn.amount}">
- <f:convertNumber type="currency" currencySymbol="$"/>
- </h:outputText>
- </div>
- </p:column>
- <p:column headerText="Actions">
- <div class="transaction-actions">
- <p:commandButton icon="pi pi-pencil"
- styleClass="action-btn"
- action="#{transactionController.edit(txn)}"/>
- <p:commandButton icon="pi pi-trash"
- styleClass="action-btn delete-btn"
- action="#{transactionController.delete(txn)}"/>
- </div>
- </p:column>
- </p:dataTable>
- </p:panel>
- </div>
- </div>
- </ui:define>
- </ui:composition>
- </h:body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement