1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[PR #359] [MERGED] Add soft-delete support for system maintenance types #1017

Closed
opened 2026-05-07 00:15:30 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/359
Author: @Keybored02
Created: 2/13/2026
Status: Merged
Merged: 2/13/2026
Merged by: @maziggy

Base: 0.2.0bHead: 0.2.0b


📝 Commits (3)

📊 Changes

11 files changed (+135 additions, -15 deletions)

View changed files

📝 backend/app/api/routes/maintenance.py (+28 -4)
📝 backend/app/core/database.py (+7 -0)
📝 backend/app/models/maintenance.py (+1 -0)
📝 backend/tests/unit/test_code_quality.py (+1 -1)
📝 frontend/src/api/client.ts (+2 -0)
📝 frontend/src/components/ConfirmModal.tsx (+14 -2)
📝 frontend/src/i18n/locales/de.ts (+4 -0)
📝 frontend/src/i18n/locales/en.ts (+4 -0)
📝 frontend/src/i18n/locales/it.ts (+4 -0)
📝 frontend/src/i18n/locales/ja.ts (+4 -0)
📝 frontend/src/pages/MaintenancePage.tsx (+66 -8)

📄 Description

Description

Added soft-delete support for system maintenance types so default tasks can be deleted without errors and later restored; deletes now mark is_deleted for system types and filter them out of maintenance queries. Helpful with printers that require more specific maintenance tasks, tidies up the UI, but still allows for full restore.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Changes Made

  • Added soft-delete
  • Introduced restore endpoint and UI button to bring back deleted default tasks
  • Replaced browser confirm with ConfirmModal
  • Added i18n strings for the new delete confirmation
  • Force UTF-8 decoding when reading Python files in the import-shadowing test to prevent Windows cp1252 UnicodeDecodeError failures.

Screenshots

image image image

Testing

  • I have tested this on my local machine
  • I have tested with my printer model: H2C

Checklist

  • My code follows the project's coding style
  • I have commented my code where necessary
  • I have updated the documentation (if needed)
  • My changes generate no new warnings
  • I have tested my changes thoroughly

Additional Notes


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/maziggy/bambuddy/pull/359 **Author:** [@Keybored02](https://github.com/Keybored02) **Created:** 2/13/2026 **Status:** ✅ Merged **Merged:** 2/13/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `0.2.0b` ← **Head:** `0.2.0b` --- ### 📝 Commits (3) - [`8b0895f`](https://github.com/maziggy/bambuddy/commit/8b0895f63f76cc97efed84f054012fee2ce328e5) Add soft-delete for system maintenance tasks - [`c40447b`](https://github.com/maziggy/bambuddy/commit/c40447b5f9309d662ceae26b4d92fe9541ee23c5) Merge branch '0.2.0b' of https://github.com/Keybored02/bambuddy into 0.2.0b - [`79f68a2`](https://github.com/maziggy/bambuddy/commit/79f68a2a40765aebc926a9a9aed5683d759cfdcc) Merge branch 'maziggy:0.2.0b' into 0.2.0b ### 📊 Changes **11 files changed** (+135 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/api/routes/maintenance.py` (+28 -4) 📝 `backend/app/core/database.py` (+7 -0) 📝 `backend/app/models/maintenance.py` (+1 -0) 📝 `backend/tests/unit/test_code_quality.py` (+1 -1) 📝 `frontend/src/api/client.ts` (+2 -0) 📝 `frontend/src/components/ConfirmModal.tsx` (+14 -2) 📝 `frontend/src/i18n/locales/de.ts` (+4 -0) 📝 `frontend/src/i18n/locales/en.ts` (+4 -0) 📝 `frontend/src/i18n/locales/it.ts` (+4 -0) 📝 `frontend/src/i18n/locales/ja.ts` (+4 -0) 📝 `frontend/src/pages/MaintenancePage.tsx` (+66 -8) </details> ### 📄 Description ## Description Added soft-delete support for system maintenance types so default tasks can be deleted without errors and later restored; deletes now mark `is_deleted` for system types and filter them out of maintenance queries. Helpful with printers that require more specific maintenance tasks, tidies up the UI, but still allows for full restore. ## Type of Change <!-- Mark the relevant option with an "x" --> - [ ] Bug fix (non-breaking change that fixes an issue) - [x] New feature (non-breaking change that adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [x] Test addition or update ## Changes Made - Added soft-delete - Introduced restore endpoint and UI button to bring back deleted default tasks - Replaced browser confirm with `ConfirmModal` - Added i18n strings for the new delete confirmation - Force UTF-8 decoding when reading Python files in the import-shadowing test to prevent Windows cp1252 `UnicodeDecodeError` failures. ## Screenshots <img width="466" height="206" alt="image" src="https://github.com/user-attachments/assets/49f7364f-3691-4f64-98c9-4b49e821b367" /> <img width="542" height="87" alt="image" src="https://github.com/user-attachments/assets/abf52884-66f1-4848-9608-4df411473f52" /> <img width="378" height="56" alt="image" src="https://github.com/user-attachments/assets/06b381c3-8dcc-454a-b024-316f317d57d7" /> ## Testing <!-- Describe how you tested your changes --> - [x] I have tested this on my local machine - [x] I have tested with my printer model: H2C ## Checklist - [x] My code follows the project's coding style - [x] I have commented my code where necessary - [ ] I have updated the documentation (if needed) - [x] My changes generate no new warnings - [x] I have tested my changes thoroughly ## Additional Notes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:15:30 +02:00
Sign in to join this conversation.
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
starred/bambuddy-maziggy-1#1017
No description provided.