WIP: Edit-able Habit Logs #4

Draft
fenskesd wants to merge 22 commits from put-habit-logs into main
Owner

Resolves issue #1
Resolves issue #3

/api/v1/habits/:habit_id/logs has been changed

  • [POST] Will throw an error if you try to log a task as done twice in the same time period
  • [PUT] *new - Allows you to update the status of a habit log
Resolves issue #1 Resolves issue #3 /api/v1/habits/:habit_id/logs has been changed - [POST] Will throw an error if you try to log a task as done twice in the same time period - [PUT] *new - Allows you to update the status of a habit log
Our unscheduled habits API was overly restrictive.
Any habit with a  log during it's period was not shown.
Now only ones which have a log, where the status indicates it's done are hidden.
Rough commit. I am now throwing a 400 error when attempting to create a daily task for a task that was already logged today.
Co-authored-by: aider (ollama_chat/qwen-coder) <aider@aider.chat>
Co-authored-by: aider (ollama_chat/qwen-coder) <aider@aider.chat>
Adding ignore for aider
Some checks are pending
CI / scan_ruby (pull_request) Waiting to run
CI / scan_js (pull_request) Waiting to run
CI / lint (pull_request) Waiting to run
CI / test (pull_request) Waiting to run
f77b8a673d
Co-authored-by: aider (ollama_chat/qwen-coder) <aider@aider.chat>
Co-authored-by: aider (ollama_chat/qwen-coder) <aider@aider.chat>
Co-authored-by: aider (ollama_chat/qwen-coder) <aider@aider.chat>
Used list for completed statuses
Some checks are pending
CI / scan_ruby (pull_request) Waiting to run
CI / scan_js (pull_request) Waiting to run
CI / lint (pull_request) Waiting to run
CI / test (pull_request) Waiting to run
bb24c5ce54
Co-authored-by: aider (ollama_chat/qwen-coder) <aider@aider.chat>
chore: move habit test to steadfast-api/test/models
Some checks are pending
CI / scan_ruby (pull_request) Waiting to run
CI / scan_js (pull_request) Waiting to run
CI / lint (pull_request) Waiting to run
CI / test (pull_request) Waiting to run
a6801bd28d
Co-authored-by: aider (ollama_chat/qwen-coder) <aider@aider.chat>
refactor: decouple habit logs from habits

Co-authored-by: aider (ollama_chat/qwen-coder) <aider@aider.chat>

refactor: remove habit from activity log

refactor: remove belongs_to :habit from ActivityLog

Co-authored-by: aider (ollama_chat/qwen-coder) <aider@aider.chat>

Blah
Co-authored-by: aider (ollama_chat/qwen-coder) <aider@aider.chat>
Migrating HabitLogs to ActivityLogs
Some checks failed
CI / scan_ruby (pull_request) Has been cancelled
CI / scan_js (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
67de231462
You can now create activity logs separately from habits.
Get Relevant Logs
Some checks failed
CI / scan_ruby (pull_request) Has been cancelled
CI / scan_js (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
c971a7be73
Lets you get habit logs for a relevant period. (i.e. that day, that month, that week, depending on the habit's frequency)
Some checks failed
CI / scan_ruby (pull_request) Has been cancelled
CI / scan_js (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin put-habit-logs:put-habit-logs
git switch put-habit-logs

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff put-habit-logs
git switch put-habit-logs
git rebase main
git switch main
git merge --ff-only put-habit-logs
git switch put-habit-logs
git rebase main
git switch main
git merge --no-ff put-habit-logs
git switch main
git merge --squash put-habit-logs
git switch main
git merge --ff-only put-habit-logs
git switch main
git merge put-habit-logs
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
fenskesd/Steadfast-API!4
No description provided.