Built the lease management#1032
Open
Qoder-Undefined wants to merge 1 commit into
Open
Conversation
|
@Qoder-Undefined is attempting to deploy a commit to the naijabuz's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Qoder-Undefined Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[FE-47] Build lease management UI — create on-chain lease agreements and view lease terms
Overview
Assets can be leased to third parties with terms recorded on the Stellar blockchain. This UI allows creating a lease, viewing its terms, and terminating it. Depends on BE-64.
Context
Add a "Lease" section to the asset detail page Overview tab (or a dedicated sub-tab)
API endpoints (from BE-64): POST /stellar/assets/:id/lease, GET /stellar/assets/:id/lease, PATCH /stellar/assets/:id/lease/terminate
Acceptance Criteria
If no active lease: show "Create Lease" button with form: lessee Stellar address, start date, end date, monthly rent (XLM), deposit amount
Form validation: end date must be after start date, rent must be > 0
On submit: show "Recording on Stellar..." loader, display success with transaction hash
If active lease: show lease details card — lessee address, period, monthly rent, deposit, days remaining, transaction hash
"Terminate Lease" button (admin only) with confirmation dialog: "This will record the termination on-chain. Are you sure?"
Lease duration countdown chip (e.g., "127 days remaining")
closes #984
[FE-48] Build insurance management UI — attach insurance policies to assets on-chain
Overview
Insurance details for assets can be stored on the Stellar blockchain for immutable record-keeping. This UI allows attaching an insurance policy to an asset and viewing the policy details. Depends on BE-64.
Context
Add an "Insurance" section to the asset detail page (Overview tab or sub-tab)
API endpoints (from BE-64): POST /stellar/assets/:id/insurance, GET /stellar/assets/:id/insurance
Off-chain insurance records (without blockchain) are a future consideration
Acceptance Criteria
Show current insurance status on the asset detail page: "No Insurance Recorded" or a policy summary card
"Add Insurance" button opens a form: insurer name, policy number, coverage amount, premium (annual), start date, end date
On submit: records to blockchain, shows confirmation with tx hash
Policy card shows: insurer, policy number, coverage amount, premium, dates, status chip (ACTIVE / EXPIRING / EXPIRED based on end date), transaction hash
Expiring policies (within 30 days) show a warning banner: "Policy expires in X days. Renew soon."
closes #985