npm install
npm run serve
npm run build
npm run test:unit
npm run lint
Login
- System has two roles Admin and Customer
- Form requires - Email and Password
- The form uses a dummy login API from ReqRes [https://reqres.in/api/login] that returns a token
- The returned token is saved in the localStorage to login the user and redirect to the respective dashboard, selected based on the selected user-role. In a real world app this will based on the role returned by the API
Customer Dashboard
-
Customer can view the following:
-
Available Credit: reduced as the customer uses the credit
-
Create a new Loan [Click on get Cash button]
-
Existing Loans: lists the loans with
Loan Amount
,Term
andLoan Status
-
Loan Details: Loan details view with customer's name, avatar, date of loan application, amount, term, EMI, interest rate, Repaid amount.
-
Name of the Customer and logout button
-
-
Create a Loan
Steps
- Select
Loan Amount
. - Select
EMI Plan
for repayment. - Review details and Finish to save loan for send loan for approval by admin.
- Post Approval, the customer can pay the loan, by clicking the loan from the existing loans list, review the details and further clicking on the Pay EMI button.
- As the customer pays the EMI, the repaid amount keeps increasing to a point where all amount + interest has been repaid.
- The loan gets a completed status when the last EMI is paid by the customer.
- Select
-
The created loan is stored as part of the
loanData
property in the browser localStorage which as our mini DB, accessed/updated through browser's localStorage APIs.
Admin Dashboard
- Admin can view all the loans in the system.
- Filter the loans based on the
LoanStatus
. - View loan details by clicking the loan item in the loans list.
- Can Approve or Reject a loan.
CSS Challenge