diff --git a/TODO.md b/TODO.md index b9a09fe..809da28 100644 --- a/TODO.md +++ b/TODO.md @@ -1,34 +1,56 @@ # Project TODO List -This document outlines the remaining tasks, incomplete features, and future development plans for the application. +This document outlines the remaining tasks, incomplete features, and future +development plans for the application. ## High Priority -- **Implement Payment Processing**: The current rent payment system in `routes/tenant/rent/pay/index.tsx` is a placeholder. It needs to be fully implemented with a payment provider like Stripe to handle real transactions securely. + +- **Implement Payment Processing**: The current rent payment system in + `routes/tenant/rent/pay/index.tsx` is a placeholder. It needs to be fully + implemented with a payment provider like Stripe to handle real transactions + securely. ## Backend & API -- **Add Well-Known Endpoint**: Implement a `/.well-known/acme-challenge/:token` endpoint in `main.ts` to support services like Let's Encrypt for SSL certificate validation in production. -- **Enforce Database Constraints**: Ensure the `owner_id` field in the `AccessTokenResponse` interface is unique for each entry, as noted in `utils/database.ts`. This is crucial for maintaining data integrity. + +- **Add Well-Known Endpoint**: Implement a `/.well-known/acme-challenge/:token` + endpoint in `main.ts` to support services like Let's Encrypt for SSL + certificate validation in production. +- **Enforce Database Constraints**: Ensure the `owner_id` field in the + `AccessTokenResponse` interface is unique for each entry, as noted in + `utils/database.ts`. This is crucial for maintaining data integrity. ## Feature Development -- **Complete Landlord Dashboard**: Flesh out all features under the `routes/landlord/` directory. This includes: + +- **Complete Landlord Dashboard**: Flesh out all features under the + `routes/landlord/` directory. This includes: - Property management - Tenant invitation and management (`islands/LandlordInviteTenant.tsx`) - Messaging with tenants (`islands/LandlordMessageThreads.tsx`) - Financial tracking and reporting -- **Complete Tenant Dashboard**: Finalize all features under the `routes/tenant/` directory. This includes: +- **Complete Tenant Dashboard**: Finalize all features under the + `routes/tenant/` directory. This includes: - Viewing lease documents - Tracking rent payments and financial obligations - Messaging with landlords (`islands/TenantMessageThreads.tsx`) - Managing settings (`islands/TenantSettings.tsx`) -- **Enhance User Onboarding**: Improve the onboarding flow for both new landlords and tenants in `routes/onboarding/`. -- **Develop User Profile Management**: Complete the user profile editing and management features in `routes/user-profile/`. +- **Enhance User Onboarding**: Improve the onboarding flow for both new + landlords and tenants in `routes/onboarding/`. +- **Develop User Profile Management**: Complete the user profile editing and + management features in `routes/user-profile/`. ## Future Features & Refinements -- **AI/ML Feature Integration**: The advanced features found in the `islands/` directory need further development and integration into the user experience. This includes: + +- **AI/ML Feature Integration**: The advanced features found in the `islands/` + directory need further development and integration into the user experience. + This includes: - `BrainStudy.tsx` - `Quizzing.tsx` - `ImageGenerater.tsx` - `VoiceRecorder.tsx` -- **Calendar Functionality**: Expand the calendar features in `routes/calendar/` and improve the `islands/FinancialCalendar.tsx` component to be more interactive and informative. -- **Document Management**: Build out a robust document upload, storage, and sharing system for leases, notices, and other rental-related documents. -- **Reminders and Notifications**: Implement a system for sending automated reminders for rent payments, lease renewals, and other important events. +- **Calendar Functionality**: Expand the calendar features in `routes/calendar/` + and improve the `islands/FinancialCalendar.tsx` component to be more + interactive and informative. +- **Document Management**: Build out a robust document upload, storage, and + sharing system for leases, notices, and other rental-related documents. +- **Reminders and Notifications**: Implement a system for sending automated + reminders for rent payments, lease renewals, and other important events. diff --git a/islands/PaymentMethodsList.tsx b/islands/PaymentMethodsList.tsx index 7d64b67..b08f47a 100644 --- a/islands/PaymentMethodsList.tsx +++ b/islands/PaymentMethodsList.tsx @@ -75,8 +75,8 @@ export default function PaymentMethodsList( if (decryptedData) { const accountNumber = decryptedData; // Show only last 4 digits - processedMethod.maskedAccountNumber = - "****" + accountNumber.slice(-4); + processedMethod.maskedAccountNumber = "****" + + accountNumber.slice(-4); } } catch (error) { console.error("Failed to decrypt account number:", error); @@ -93,8 +93,8 @@ export default function PaymentMethodsList( if (decryptedData) { const routingNumber = decryptedData; // Show only last 4 digits - processedMethod.maskedRoutingNumber = - "****" + routingNumber.slice(-4); + processedMethod.maskedRoutingNumber = "****" + + routingNumber.slice(-4); } } catch (error) { console.error("Failed to decrypt routing number:", error); @@ -147,153 +147,155 @@ export default function PaymentMethodsList( {popupAddPaymentMethodDialog}
- {processedMethods.length === 0 ? ( -
- - - -

- No payment methods -

-

- Add a payment method to get started with rent payments. -

- -
- ) : ( - <> - - -
+ {processedMethods.length === 0 + ? ( +
+ + + +

+ No payment methods +

+

+ Add a payment method to get started with rent payments. +

- - )} + ) + : ( + <> + + +
+ +
+ + )}
); diff --git a/islands/dialogs/AddPaymentMethodDialog.tsx b/islands/dialogs/AddPaymentMethodDialog.tsx index e2234ca..f54a8b7 100644 --- a/islands/dialogs/AddPaymentMethodDialog.tsx +++ b/islands/dialogs/AddPaymentMethodDialog.tsx @@ -51,8 +51,10 @@ export default function AddPaymentMethodDialog( const formData = new FormData(formRef.current); const bankName = formData.get("bank_name")?.toString().trim() || ""; const accountType = formData.get("account_type")?.toString() || ""; - const routingNumber = formData.get("routing_number")?.toString().trim() || ""; - const accountNumber = formData.get("account_number")?.toString().trim() || ""; + const routingNumber = formData.get("routing_number")?.toString().trim() || + ""; + const accountNumber = formData.get("account_number")?.toString().trim() || + ""; const isDefault = formData.get("is_default") === "true"; const sender = typeof location !== "undefined" ? location.pathname : "/"; @@ -64,8 +66,10 @@ export default function AddPaymentMethodDialog( }; setFieldErrors(validation); - if (validation.bank_name || validation.account_type || - validation.routing_number || validation.account_number) { + if ( + validation.bank_name || validation.account_type || + validation.routing_number || validation.account_number + ) { return; } diff --git a/main.ts b/main.ts index ab8c7c3..1b9ea66 100755 --- a/main.ts +++ b/main.ts @@ -201,5 +201,3 @@ if (isAppReady) { // if (import.meta.main) { // await app.listen(); // } - - diff --git a/routes/api/payments/create_intent.ts b/routes/api/payments/create_intent.ts index a0a4315..8d99b89 100644 --- a/routes/api/payments/create_intent.ts +++ b/routes/api/payments/create_intent.ts @@ -90,4 +90,3 @@ export const handler = define.handlers({ } }, }); - diff --git a/routes/api/receipt/[id].ts b/routes/api/receipt/[id].ts index 18b025e..9316308 100644 --- a/routes/api/receipt/[id].ts +++ b/routes/api/receipt/[id].ts @@ -38,7 +38,9 @@ export const handler = define.handlers({
Lease ID
${leaseId}
Amount
$${amount.toLocaleString()}
Method
${method}
-
Date
${new Date(date).toLocaleString()}
+
Date
${ + new Date(date).toLocaleString() + }
`; @@ -49,4 +51,3 @@ export const handler = define.handlers({ }); }, }); - diff --git a/routes/api/retrieve/payment_transactions.ts b/routes/api/retrieve/payment_transactions.ts index bd6ff5d..a04e1b7 100644 --- a/routes/api/retrieve/payment_transactions.ts +++ b/routes/api/retrieve/payment_transactions.ts @@ -43,20 +43,3 @@ export const handler = define.handlers({ } }, }); - - - - - - - - - - - - - - - - - diff --git a/routes/landlord/payments/index.tsx b/routes/landlord/payments/index.tsx index 6f0dd53..b973a2f 100644 --- a/routes/landlord/payments/index.tsx +++ b/routes/landlord/payments/index.tsx @@ -282,4 +282,3 @@ export default define.page(function LandlordPayments({ data }) { ); }); - diff --git a/routes/landlord/tenants/invite.tsx b/routes/landlord/tenants/invite.tsx index 0df6389..b43eebc 100644 --- a/routes/landlord/tenants/invite.tsx +++ b/routes/landlord/tenants/invite.tsx @@ -150,40 +150,3 @@ export default define.page(function InviteTenantPage({ data }) { ); }); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/routes/tenant/rent/confirmation/index.tsx b/routes/tenant/rent/confirmation/index.tsx index ef0090f..316cb00 100644 --- a/routes/tenant/rent/confirmation/index.tsx +++ b/routes/tenant/rent/confirmation/index.tsx @@ -21,9 +21,7 @@ export default define.page(function RentConfirmation({ data }) {

Payment Successful

- {amount && ( -

Amount: ${amount}

- )} + {amount &&

Amount: ${amount}

}

A receipt is available from your payment history.

@@ -55,4 +53,3 @@ export default define.page(function RentConfirmation({ data }) { ); }); - diff --git a/services/paymentService.ts b/services/paymentService.ts index 5d19831..bd5df7e 100644 --- a/services/paymentService.ts +++ b/services/paymentService.ts @@ -387,4 +387,3 @@ export async function cancelAutoPayment( .where(eq(leases.id, lease_id)) .returning(); } - diff --git a/utils/database.ts b/utils/database.ts index b957f61..0764722 100644 --- a/utils/database.ts +++ b/utils/database.ts @@ -592,4 +592,3 @@ export async function upsertAccessToken(tokenResponse: AccessTokenResponse) { tokenResponse, ); } -