<feed xmlns='http://www.w3.org/2005/Atom'>
<title>water-consumption/fe/src, 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>fix bugs, redo layout, reorg.</title>
<updated>2024-03-21T15:23:42+00:00</updated>
<author>
<name>Zach Berwaldt</name>
<email>zberwaldt@tutamail.com</email>
</author>
<published>2024-03-21T15:23:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/commit/?id=fd6f6f169f9ff9a1247228fb34dc9654a9584915'/>
<id>fd6f6f169f9ff9a1247228fb34dc9654a9584915</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>clean up, add better error handling</title>
<updated>2024-03-19T01:27:24+00:00</updated>
<author>
<name>Zach Berwaldt</name>
<email>zberwaldt@tutamail.com</email>
</author>
<published>2024-03-19T01:27:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/commit/?id=eb51bdbfef8c2aacf0fdfde279a40de7f74c8d86'/>
<id>eb51bdbfef8c2aacf0fdfde279a40de7f74c8d86</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cleanup</title>
<updated>2024-03-16T02:00:10+00:00</updated>
<author>
<name>Zach Berwaldt</name>
<email>zberwaldt@tutamail.com</email>
</author>
<published>2024-03-16T02:00:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/commit/?id=fd1332a3df191577e91c6d846a8b5db1747099fd'/>
<id>fd1332a3df191577e91c6d846a8b5db1747099fd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add env samples, move files</title>
<updated>2024-03-16T01:41:12+00:00</updated>
<author>
<name>Zach Berwaldt</name>
<email>zberwaldt@tutamail.com</email>
</author>
<published>2024-03-16T01:41:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/commit/?id=c4e5776f9e174fe6bf91721649c0541a9fb310ae'/>
<id>c4e5776f9e174fe6bf91721649c0541a9fb310ae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<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: Update authentication route and add comments to exported members</title>
<updated>2024-03-08T04:16:22+00:00</updated>
<author>
<name>Zach Berwaldt</name>
<email>zberwaldt@tutamail.com</email>
</author>
<published>2024-03-08T04:16:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/commit/?id=8fab2d03bce82e4dee798ebffb1e93c557f62a4b'/>
<id>8fab2d03bce82e4dee798ebffb1e93c557f62a4b</id>
<content type='text'>
- The authentication route in the API has been updated to use a new router setup function.
- Comments have been added to all exported members of the `auth.go` module in the internal controllers package.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- The authentication route in the API has been updated to use a new router setup function.
- Comments have been added to all exported members of the `auth.go` module in the internal controllers package.
</pre>
</div>
</content>
</entry>
<entry>
<title>[FEAT] Refactor API main file and models</title>
<updated>2024-03-07T02:53:07+00:00</updated>
<author>
<name>Zach Berwaldt</name>
<email>zberwaldt@tutamail.com</email>
</author>
<published>2024-03-07T02:53:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/commit/?id=5fa57845052655883120ba4d19a85d8756fb8d8c'/>
<id>5fa57845052655883120ba4d19a85d8756fb8d8c</id>
<content type='text'>
This commit refactors the `main.go` file in the API directory, as well as the related models in the `models.go` file. The changes include:

- Reordering imports and removing unnecessary imports
- Fixing error messages to be more descriptive
- Handling database connections more efficiently with deferred closures
- Handling errors and returning appropriate error responses
- Adding proper JSON bindings for POST requests
- Adding new views in the database scripts for aggregated statistics and daily user statistics

No changes were made to imports and requires.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit refactors the `main.go` file in the API directory, as well as the related models in the `models.go` file. The changes include:

- Reordering imports and removing unnecessary imports
- Fixing error messages to be more descriptive
- Handling database connections more efficiently with deferred closures
- Handling errors and returning appropriate error responses
- Adding proper JSON bindings for POST requests
- Adding new views in the database scripts for aggregated statistics and daily user statistics

No changes were made to imports and requires.
</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>feat: Add last seven days labels to chart</title>
<updated>2024-03-02T01:26:42+00:00</updated>
<author>
<name>Zach Berwaldt</name>
<email>zberwaldt@tutamail.com</email>
</author>
<published>2024-03-02T01:26:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/commit/?id=326f186d67017f87e631a1fbcdf3f184cbc42d7d'/>
<id>326f186d67017f87e631a1fbcdf3f184cbc42d7d</id>
<content type='text'>
In the `DataView.svelte` component, the last seven days are now included as labels in the chart. This allows users to easily visualize data for the past week. The `getLastSevenDays` function generates an array of string values representing the dates in ISO format. This array is assigned to the `lastSevenDays` variable, which is then used as the labels in the chart's dataset.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the `DataView.svelte` component, the last seven days are now included as labels in the chart. This allows users to easily visualize data for the past week. The `getLastSevenDays` function generates an array of string values representing the dates in ISO format. This array is assigned to the `lastSevenDays` variable, which is then used as the labels in the chart's dataset.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(DataView): Add functionality to add water statistic</title>
<updated>2024-03-02T01:12:21+00:00</updated>
<author>
<name>Zach Berwaldt</name>
<email>zberwaldt@tutamail.com</email>
</author>
<published>2024-03-02T01:12:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.zachberwaldt.dev/water-consumption/commit/?id=d8b0f1335078d53d95a4212b1a4d4b0b28016702'/>
<id>d8b0f1335078d53d95a4212b1a4d4b0b28016702</id>
<content type='text'>
This commit adds functionality to add water statistics to the DataView component. It includes the following changes:
- Remove unused imports and variables
- Move the 'handleClick' function logic to a new 'AddForm' component
- Create the 'AddForm' component which displays a dialog with input fields for date and quantity and allows the user to add a new water statistic
- Dispatch events on form submit and dialog close in the 'AddForm' component
- Call the 'fetchData' function on successful submission of a new statistic
- Update chart data to display sample data

New component:
- AddForm.svelte: A form component to add a new water statistic

Note: This commit message exceeds the 50-character limit in the subject line, but adheres to the other specified requirements.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds functionality to add water statistics to the DataView component. It includes the following changes:
- Remove unused imports and variables
- Move the 'handleClick' function logic to a new 'AddForm' component
- Create the 'AddForm' component which displays a dialog with input fields for date and quantity and allows the user to add a new water statistic
- Dispatch events on form submit and dialog close in the 'AddForm' component
- Call the 'fetchData' function on successful submission of a new statistic
- Update chart data to display sample data

New component:
- AddForm.svelte: A form component to add a new water statistic

Note: This commit message exceeds the 50-character limit in the subject line, but adheres to the other specified requirements.
</pre>
</div>
</content>
</entry>
</feed>
