From 34e54fa4afdf17e7258cbc5ccac5a3d094ee161b Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Sat, 18 May 2024 01:33:18 +0200 Subject: [PATCH 01/14] fix: dont create entry executions if entry is only postponed --- src/lib/components/ui/EntryTodoButton.svelte | 17 ++++++++++++++++- src/lib/server/query/util.ts | 4 ++++ src/lib/shared/util/util.ts | 8 +++++++- src/routes/(app)/entry/[id]/+page.server.ts | 19 +++++++++++-------- src/routes/(app)/entry/[id]/+page.svelte | 3 +-- .../entry/[id]/editExecution/+page.server.ts | 5 +---- .../entry/[id]/editExecution/+page.svelte | 5 +++-- 7 files changed, 43 insertions(+), 18 deletions(-) diff --git a/src/lib/components/ui/EntryTodoButton.svelte b/src/lib/components/ui/EntryTodoButton.svelte index 6bedd3e..8e185cc 100644 --- a/src/lib/components/ui/EntryTodoButton.svelte +++ b/src/lib/components/ui/EntryTodoButton.svelte @@ -1,6 +1,21 @@ + +
{#each { length: 4 } as _, i} - - -
From b696ee88940f4d259b7f2287ab20b7236b08cf54 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Mon, 20 May 2024 15:11:32 +0200 Subject: [PATCH 11/14] chore(release): release v0.3.5 --- CHANGELOG.md | 22 ++++++++++++++++++++++ package.json | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e50f81d..0540fe4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. +## [v0.3.5](https://code.thetadev.de/HSA/Visitenbuch/compare/v0.3.4..v0.3.5) - 2024-05-20 + +### 🚀 Features + +- Focus filter bar when pressing F - ([ad796dc](https://code.thetadev.de/HSA/Visitenbuch/commit/ad796dcb578b79b566559d1c22c99f0231a03251)) +- Add optional Keycloak endpoint config - ([d746e47](https://code.thetadev.de/HSA/Visitenbuch/commit/d746e4787d70080bbc22b37263bbfa695c1a7d72)) + +### 🐛 Bug Fixes + +- Dont create entry executions if entry is only postponed - ([34e54fa](https://code.thetadev.de/HSA/Visitenbuch/commit/34e54fa4afdf17e7258cbc5ccac5a3d094ee161b)) +- HumanDate capitalization - ([f4f03ab](https://code.thetadev.de/HSA/Visitenbuch/commit/f4f03ab4914f850b15acf7bb39da34b1abb587a7)) +- Filterbar does not exclude present filters from URL, text filters dont confirm when defocused - ([9ed5f15](https://code.thetadev.de/HSA/Visitenbuch/commit/9ed5f15b9ef237cc400b069928baeb920b2d3681)) +- [**breaking**] Ensure category, room and station names are unique - ([98c62ac](https://code.thetadev.de/HSA/Visitenbuch/commit/98c62ac4603fa6d7c97e1a439f613379db7a2587)) +- Allow multiple date filters - ([2a4bda7](https://code.thetadev.de/HSA/Visitenbuch/commit/2a4bda70c6cfd85b4a32989a2e19ba718cc7717e)) +- Add dumb-init to docker image - ([47f0a08](https://code.thetadev.de/HSA/Visitenbuch/commit/47f0a08ea3dbd8b1721a11c52b36c42ad56e8e29)) +- Remove test route - ([03f6c58](https://code.thetadev.de/HSA/Visitenbuch/commit/03f6c5848201eff02999c6b9323ec1515d68fd5a)) + +### ⚙️ Miscellaneous Tasks + +- Remove unused zod-form-data dependency - ([882ae66](https://code.thetadev.de/HSA/Visitenbuch/commit/882ae66a6a137259388525df2c91b8e1ed924d86)) + + ## [v0.3.4](https://code.thetadev.de/HSA/Visitenbuch/compare/v0.3.3..v0.3.4) - 2024-05-16 ### 🚀 Features diff --git a/package.json b/package.json index 67220ca..1bde82a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "visitenbuch", - "version": "0.3.4", + "version": "0.3.5", "private": true, "license": "AGPL-3.0", "scripts": { From 8179c83383756006fb2cb4429ce1ddb6b61e5d94 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Mon, 20 May 2024 22:59:27 +0200 Subject: [PATCH 12/14] update README --- README.md | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1f1a26e..5eec35a 100644 --- a/README.md +++ b/README.md @@ -9,16 +9,24 @@ The project template was created using [`create-svelte`](https://github.com/svel Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: ```bash -npm run dev +pnpm run dev # or start the server and open the app in a new browser tab -npm run dev -- --open +pnpm run dev -- --open ``` -### Handle the prisma ORM +### Test environment + +The project depends on a PostgreSQL database and an OIDC authentication server. +You can setup both using the `run/db_up.sh` script. This creates a new testing environment using +docker-compose and fills the test database with mock data + +### Use the Pisma ORM + +If you apply changes to the database scheme, you have to create a new migration to apply these changes to +the database. ```bash -./run/db_up.sh # Start the docker container, create a new database and run migrations + insert test data npx prisma migrate dev --name my_migration --create-only # Create a new migration npx prisma migrate dev # Apply migrations to the database ``` @@ -28,13 +36,21 @@ npx prisma migrate dev # Apply migrations to the database To create a production version of your app: ```bash -npm run build +pnpm run build ``` You can preview the production build with `npm run preview`. > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. +### Test + +```bash +pnpm test # Unit- und Integrationstests +pnpm test:e2e # End2End-Tests +``` + + ### Release To release a new version, tun the release script with the new version as a parameter @@ -42,3 +58,10 @@ To release a new version, tun the release script with the new version as a param ```bash ./release.sh 1.0.0 ``` + +### Building docker image + +```bash +pnpm run build +docker build -t thetadev256/visitenbuch . +``` From 297f5cfa925925956b7951ef3afeff7058971f30 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Tue, 21 May 2024 03:58:13 +0200 Subject: [PATCH 13/14] update README --- README.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 5eec35a..cc42fac 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,11 @@ for the university hospital in Augsburg ## Development -The project template was created using [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). +The project template was created using +[`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: +Once you've created a project and installed dependencies with `npm install` (or +`pnpm install` or `yarn`), start a development server: ```bash pnpm run dev @@ -17,14 +19,17 @@ pnpm run dev -- --open ### Test environment -The project depends on a PostgreSQL database and an OIDC authentication server. -You can setup both using the `run/db_up.sh` script. This creates a new testing environment using -docker-compose and fills the test database with mock data +Copy the `.env.example` file to `.env` to get access to the required configuration +variables. + +The project depends on a PostgreSQL database and an OIDC authentication server. You can +setup both using the `run/db_up.sh` script. This creates a new testing environment using +docker-compose and fills the test database with mock data. ### Use the Pisma ORM -If you apply changes to the database scheme, you have to create a new migration to apply these changes to -the database. +If you apply changes to the database scheme, you have to create a new migration to apply +these changes to the database. ```bash npx prisma migrate dev --name my_migration --create-only # Create a new migration @@ -41,7 +46,8 @@ pnpm run build You can preview the production build with `npm run preview`. -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. +> To deploy your app, you may need to install an +> [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. ### Test @@ -50,7 +56,6 @@ pnpm test # Unit- und Integrationstests pnpm test:e2e # End2End-Tests ``` - ### Release To release a new version, tun the release script with the new version as a parameter From 4cbf1ca7c3d4e5a604095ef3a8913ec54f32e4ea Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Fri, 24 May 2024 17:49:06 +0200 Subject: [PATCH 14/14] ci: set fetch-depth to 0 --- .forgejo/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index d2ea852..c286741 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -68,7 +68,7 @@ jobs: - name: 👁️ Checkout repository uses: actions/checkout@v4 with: - fetch-depth: 1 # important to fetch tag logs + fetch-depth: 0 # important to fetch tag logs - name: 📦 pnpm install run: pnpm install