refactored expense date to be a Temporal.PlainDate
This commit is contained in:
parent
a92c4bec1f
commit
ee823d015b
12 changed files with 233 additions and 74 deletions
|
|
@ -12,6 +12,6 @@ post {
|
|||
|
||||
body:json {
|
||||
{
|
||||
"name": "Household:Supplies"
|
||||
"name": "Gas"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,30 +12,10 @@ post {
|
|||
|
||||
body:json {
|
||||
{
|
||||
"year": "2026",
|
||||
"month": "01",
|
||||
"day": "03",
|
||||
"cents": 1234,
|
||||
"note": "Additional Expense Test",
|
||||
"category": {
|
||||
"id": "96db93d8-2f7e-462c-b520-8754a5900253"
|
||||
},
|
||||
"merchant": {
|
||||
"id": "9afbe4fd-9077-473a-9d08-f5fb4c8f692f"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"id": "db6d60d9-66e1-4005-a5a3-1e165812aa3c",
|
||||
"name": "Tag One"
|
||||
},
|
||||
{
|
||||
"id": "999a8e68-5232-43e0-adf5-98af75aa01ba",
|
||||
"name": "Tag Two"
|
||||
},
|
||||
{
|
||||
"id": "619d5c95-65fc-4795-8828-ee1adfe289f8",
|
||||
"name": "Tag Three"
|
||||
}
|
||||
]
|
||||
"date": "2026-01-03",
|
||||
"cents": 1010,
|
||||
"note": "Gas",
|
||||
"categoryId": "db21acbb-0e3e-4ea1-89e1-3d52e5d72cb4",
|
||||
"marchantId": "b9028a32-1305-4699-8611-d8fd812ebc04"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@ post {
|
|||
|
||||
body:json {
|
||||
{
|
||||
"name": "Merchant Three"
|
||||
"name": "Casey's"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
80
bruno/Common Cents/seed-data.js
Normal file
80
bruno/Common Cents/seed-data.js
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
const postFakeCategories = [
|
||||
{
|
||||
name: "Utilities"
|
||||
},
|
||||
{
|
||||
name: "Automotive:Gasoline"
|
||||
},
|
||||
{
|
||||
name: "Groceries:Food"
|
||||
}
|
||||
];
|
||||
const postFakeMerchants = [
|
||||
{
|
||||
name: "Walmart"
|
||||
},
|
||||
{
|
||||
name: "Casey's"
|
||||
},
|
||||
{
|
||||
name: "Electric Company"
|
||||
}
|
||||
];
|
||||
const postFakeTags = [
|
||||
{
|
||||
name: "Truck"
|
||||
},
|
||||
{
|
||||
name: "Van"
|
||||
}
|
||||
];
|
||||
const postFakeExpenses = [
|
||||
{
|
||||
year: "2025",
|
||||
month: "12",
|
||||
day: "28",
|
||||
cents: 12153,
|
||||
category: {
|
||||
name: "Utilities"
|
||||
},
|
||||
merchant: {
|
||||
name: "Electric Company"
|
||||
}
|
||||
},
|
||||
{
|
||||
year: "2025",
|
||||
month: "12",
|
||||
day: "31",
|
||||
cents: 5500,
|
||||
category: {
|
||||
name: "Automotive:Gasoline"
|
||||
},
|
||||
merchant: {
|
||||
name: "Casey's"
|
||||
},
|
||||
tags: [
|
||||
{
|
||||
name: "Truck"
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
console.log({ postFakeCategories, postFakeMerchants, postFakeTags, postFakeExpenses });
|
||||
|
||||
|
||||
// async function fetchData(url) {
|
||||
// try {
|
||||
// const response = await fetch(url);
|
||||
// if (!response.ok) {
|
||||
// throw new Error('Network response was not ok');
|
||||
// }
|
||||
// const data = await response.json(); // Wait for the JSON data to be parsed
|
||||
// console.log(data);
|
||||
// } catch (error) {
|
||||
// console.error('Error:', error);
|
||||
// }
|
||||
// }
|
||||
|
||||
// // Call the async function
|
||||
// fetchData('https://api.example.com/data');
|
||||
Loading…
Add table
Add a link
Reference in a new issue