<feed xmlns='http://www.w3.org/2005/Atom'>
<title>water-consumption/fe/src/stores, branch prod</title>
<subtitle>A simple website to track water consumption between me and my GF.</subtitle>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/'/>
<entry>
<title>Add routes for preference, clean up and add types</title>
<updated>2024-03-15T22:49:43+00:00</updated>
<author>
<name>Zach Berwaldt</name>
<email>zberwaldt@tutamail.com</email>
</author>
<published>2024-03-15T22:49:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/commit/?id=9cae9c1d2a0b4f7fa72f3075541b9ffafe1a7275'/>
<id>9cae9c1d2a0b4f7fa72f3075541b9ffafe1a7275</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat: Add API logging</title>
<updated>2024-03-02T21:52:55+00:00</updated>
<author>
<name>Zach Berwaldt</name>
<email>zberwaldt@tutamail.com</email>
</author>
<published>2024-03-02T21:52:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/commit/?id=cf2113e77edabf8e3a632c7b76c769752039ba88'/>
<id>cf2113e77edabf8e3a632c7b76c769752039ba88</id>
<content type='text'>
Add logging to the API to keep track of specific requests and headers. Also added CORS middleware to handle OPTIONS requests.

---

The commit adds logging functionality to the API and includes a middleware function to handle CORS OPTIONS requests. This will allow us to track specific requests and headers received by the API.

[API/main.go](/api/main.go):
- Added import for the 'log' package
- Added logging statements to print the request headers and "_I am here_" message
- Removed unnecessary newlines and comments

[fe/src/app.css](/fe/src/app.css):
- Added a new style for button hover effects

[fe/src/lib/Card.svelte](/fe/src/lib/Card.svelte):
- Added a new `height` prop to the Card component

[fe/src/lib/Column.svelte](/fe/src/lib/Column.svelte):
- Added a new CSS class for column layout
- Set the width and gap using CSS variables

[fe/src/lib/DataView.svelte](/fe/src/lib/DataView.svelte):
- Updated the 'fetchData' function to also fetch 'totals' and 'userStats' data
- Added canvas references and chart variables for bar and line charts
- Added a new 'getLastSevenDays' function to calculate the labels for the charts
- Updated the 'onMount' function to initialize the bar and line charts using the canvas references and data
- Updated the 'onDestroy' function to destroy the bar and line charts
- Added a new 'addFormOpen' store and imported it
- Added a new 'onClick' handler for the Add button to open the AddForm modal
- Updated the layout and added Card components to display the bar and line charts and the JSON data
- Added a new 'fetchTotals' function to fetch data for the 'totals' section
- Added a new 'fetchStatsForUser' function to fetch data for the 'userStats' section

[fe/src/lib/Layout.svelte](/fe/src/lib/Layout.svelte):
- Added a new 'preferenceFormOpen' variable and initialized it to 'false'
- Added a new 'showPreferencesDialog' function to set 'preferenceFormOpen' to 'true'
- Added a new 'closePreferenceDialog' function to set 'preferenceFormOpen' to 'false'
- Added a new 'showAddDialog' function to open the AddForm modal
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add logging to the API to keep track of specific requests and headers. Also added CORS middleware to handle OPTIONS requests.

---

The commit adds logging functionality to the API and includes a middleware function to handle CORS OPTIONS requests. This will allow us to track specific requests and headers received by the API.

[API/main.go](/api/main.go):
- Added import for the 'log' package
- Added logging statements to print the request headers and "_I am here_" message
- Removed unnecessary newlines and comments

[fe/src/app.css](/fe/src/app.css):
- Added a new style for button hover effects

[fe/src/lib/Card.svelte](/fe/src/lib/Card.svelte):
- Added a new `height` prop to the Card component

[fe/src/lib/Column.svelte](/fe/src/lib/Column.svelte):
- Added a new CSS class for column layout
- Set the width and gap using CSS variables

[fe/src/lib/DataView.svelte](/fe/src/lib/DataView.svelte):
- Updated the 'fetchData' function to also fetch 'totals' and 'userStats' data
- Added canvas references and chart variables for bar and line charts
- Added a new 'getLastSevenDays' function to calculate the labels for the charts
- Updated the 'onMount' function to initialize the bar and line charts using the canvas references and data
- Updated the 'onDestroy' function to destroy the bar and line charts
- Added a new 'addFormOpen' store and imported it
- Added a new 'onClick' handler for the Add button to open the AddForm modal
- Updated the layout and added Card components to display the bar and line charts and the JSON data
- Added a new 'fetchTotals' function to fetch data for the 'totals' section
- Added a new 'fetchStatsForUser' function to fetch data for the 'userStats' section

[fe/src/lib/Layout.svelte](/fe/src/lib/Layout.svelte):
- Added a new 'preferenceFormOpen' variable and initialized it to 'false'
- Added a new 'showPreferencesDialog' function to set 'preferenceFormOpen' to 'true'
- Added a new 'closePreferenceDialog' function to set 'preferenceFormOpen' to 'false'
- Added a new 'showAddDialog' function to open the AddForm modal
</pre>
</div>
</content>
</entry>
<entry>
<title>reformat fe</title>
<updated>2024-03-01T23:17:42+00:00</updated>
<author>
<name>Zach Berwaldt</name>
<email>zberwaldt@tutamail.com</email>
</author>
<published>2024-03-01T23:17:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/commit/?id=afeffe31bd7d0f8333627a972e1d32e64a325b5b'/>
<id>afeffe31bd7d0f8333627a972e1d32e64a325b5b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>modify api, build additional FE components, add types</title>
<updated>2024-03-01T01:13:48+00:00</updated>
<author>
<name>Doog</name>
<email>157747121+doogongithub@users.noreply.github.com</email>
</author>
<published>2024-03-01T01:13:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/commit/?id=9f9a33cbf55d38987a66b709284d2bb4ffea0fe9'/>
<id>9f9a33cbf55d38987a66b709284d2bb4ffea0fe9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add gitignore</title>
<updated>2024-02-25T01:08:35+00:00</updated>
<author>
<name>Doog</name>
<email>157747121+doogongithub@users.noreply.github.com</email>
</author>
<published>2024-02-25T01:08:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/commit/?id=e37c73e33a4aaf7fb8d25b5af03627f20bcda19f'/>
<id>e37c73e33a4aaf7fb8d25b5af03627f20bcda19f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
