Skip to content

Sample State

mayagbarnes edited this page Apr 15, 2021 · 5 revisions

Sample State

{
  entities: {
    accounts: {
      1: {
        id: 1,
        accountName: "Checking Account 1",
        institution: "Bank of America",
        category: "Cash",
        balance: 1000.00,
        userId: 1,
      },
      2: {
        id: 2,
        accountName: "Mortgage",
        institution: "Bank of America",
        category: "Loan",
        balance: -200000.00,
        userId: 1,
      },
      3: {
        id: 3,
        accountName: "Individual Inv Acct",
        institution: "Charles Schwab",
        category: "Investment",
        balance: 50000.00,
        userId: 2,
      }
    },
    transactions: {
      1: {
        id: 1,
        description: "February Internet",
        category: "Bills & Utilities",
        amount: 50.00,
        date: 2/5/2021,
        accountId: 25,
      },
      2: {
        id: 2,
        description: "July Mortgage Payment",
        category: "Home",
        amount: -2000.00,
        date: 7/1/2021,
        accountId: 12,
      },
      3: {
        id: 2,
        description: "March Paycheck",
        category: "Home",
        amount: 3500.00,
        date: 3/15/2021,
        accountId: 4,
      }
    },
    filteredTran: {
      2: {
        id: 2,
        description: "July Mortgage Payment",
        category: "Home",
        amount: -2000.00,
        date: 7/1/2021,
        accountId: 12,
      }
    },
    investments: {
      1: {
        id: 1,
        invName: "Apple",
        price: 120.25,
        shares: 25,
        pricePaid: 100.00,
        marketValue: 3006.25,
        change: 506.25,
        accountId: 25,
      },
      2: {
        id: 1,
        invName: "VOO",
        price: 350.50,
        shares: 5,
        pricePaid: 325.00,
        marketValue: 1752.50,
        change: 127.50,
        accountId: 2,
      },
      3: {
        id: 1,
        invName: "401k",
        price: 0,
        shares: 0,
        pricePaid: 0,
        marketValue: 7500.00,
        change: 7500.00,
        accountId: 46,
      }
    },
    filteredInv: {
      1: {
        id: 1,
        invName: "Apple",
        price: 120.25,
        shares: 25,
        pricePaid: 100.00,
        marketValue: 3006.25,
        change: 506.25,
        accountId: 25,
      },
      3: {
        id: 1,
        invName: "401k",
        price: 0,
        shares: 0,
        pricePaid: 0,
        marketValue: 7500.00,
        change: 7500.00,
        accountId: 46,
      }
    },
    users: {
      3: {
        id: 3,
        username: "DemoLogin"       
      }
    },
  },
  errors: {
    accounts: ["Balance can't be blank"],
    investments: ["Invalid Ticker"],
    session: ["Invalid username/password"],
    transactions: ["Description can't be blank"]
  },
  session: { id: 1 },
  modal: { type: "Add" }
}

Clone this wiki locally