Feature/per project export templates#141
Merged
therealbrad merged 20 commits intomainfrom Mar 19, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Added nullable defaultCaseExportTemplateId Int? FK to Projects model - Added defaultCaseExportTemplate CaseExportTemplate? optional relation with onDelete: SetNull - Added defaultForProjects Projects[] back-relation on CaseExportTemplate model - Named relation 'ProjectDefaultExportTemplate' disambiguates from join-table relation
…ltCaseExportTemplate relation - prisma/schema.prisma updated with defaultCaseExportTemplateId FK and relation - lib/hooks updated with new relation metadata - Database schema pushed (nullable column added to Projects table) - OpenAPI spec updated to include new fields
- 25-01-SUMMARY.md created - STATE.md updated with decisions and session info - ROADMAP.md phase 25 marked complete (1/1 plans done) - REQUIREMENTS.md SCHEMA-02 marked complete
…ectAssignment - Add @@Allow('create,delete') for users with explicit SPECIFIC_ROLE Project Admin on project - Add @@Allow('create,delete') for users with PROJECTADMIN access assigned to project - Mirrors access pattern from Projects model for consistency - Run pnpm generate to regenerate ZenStack/Prisma artifacts
- Add 26-01-SUMMARY.md with plan execution results - Update STATE.md with progress, decisions, and session info - Update ROADMAP.md progress for phase 26 - Mark ADMIN-01 requirement as complete Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add ExportTemplateAssignmentSection with checkbox list for template assignment - Delete-all/recreate save pattern for assignments - Default template selector (filtered to assigned templates only) - Clears default when unchecked template was the default - Add exportTemplates translation keys to en-US.json quickScript namespace - data-testid="export-template-assignment-section" for testing
…pt page - Import ExportTemplateAssignmentSection component - Add defaultCaseExportTemplateId to project query select - Render ExportTemplateAssignmentSection between toggle card and code repo section
- Add 26-02-SUMMARY.md with component details and decisions - Update STATE.md: session, decisions, metrics - Update ROADMAP.md: phase 26 plans complete - Mark ADMIN-02 requirement complete in REQUIREMENTS.md
- Replace checkbox list with MultiAsyncCombobox for template selection - Add alphabetical sorting by name in template options - Push metadata badges (category, language) to the right in option rows - Add assignedLabel and selectPlaceholder translation keys - Fix MultiAsyncCombobox X button alignment and check icon consistency
- Updated SUMMARY.md with checkpoint approval, UI refinements, and final commit hashes - STATE.md: progress updated to 100%, decisions and session recorded - ROADMAP.md: phase 26 marked complete (2/2 plans)
- Added 'noAvailableTemplates' key under repository.quickScript namespace - Value: 'No available templates. Contact your admin.' - Used when project has assignments configured but all are disabled/deleted
…re-select project default - Fetch project assignments via useFindManyCaseExportTemplateProjectAssignment - Fetch project defaultCaseExportTemplateId via useFindUniqueProjects - filteredTemplates: shows only assigned templates when assignments exist (EXPORT-01) - Fallback: no assignments = all enabled templates shown (EXPORT-03) - defaultTemplate priority: user selection > project default > global isDefault > first (EXPORT-02) - assignmentsExistButEmpty: renders empty state message and disables export button - groupedTemplates updated to use filteredTemplates preserving category grouping
- SUMMARY.md created with task commits, decisions, and deviations - STATE.md updated: progress 100%, decisions, session info - ROADMAP.md updated: Phase 27 complete (1/1 plans) - REQUIREMENTS.md: EXPORT-01, EXPORT-02, EXPORT-03 marked complete
Update three docs to cover the new per-project template assignment feature: - quickscript-templates.md: new "Per-Project Template Assignment" section - projects/quickscript.md: updated template selection behavior and priority - llm-quickscript.md: mention Export Templates in Settings > QuickScript Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
🎉 This PR is included in version 0.16.28 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds per-project export template assignment and default selection. Admins can now configure which Case Export Templates are available for each project and set a project-specific default. The QuickScript export dialog filters templates to only show those assigned to the current project, with the project default pre-selected. If no templates are assigned, all enabled templates are shown (backward compatible).
Related Issue
Closes #85
Type of Change
How Has This Been Tested?
Describe the tests you ran to verify your changes:
Test Configuration:
Manual Test Scenarios
Checklist
Screenshots (if applicable)
Additional Notes
Changes Summary
Schema (
schema.zmodel):defaultCaseExportTemplateIdnullable FK anddefaultCaseExportTemplaterelation toProjectsmodel (withonDelete: SetNull)defaultForProjectsback-relation onCaseExportTemplateCaseExportTemplateProjectAssignmentaccess rules to allow project admins (not just system admins) to manage assignmentsAdmin UI:
ExportTemplateAssignmentSectioncomponent on the Project Settings > QuickScript pageMultiAsyncComboboxfor template selection with category/language badgesExport Dialog (
QuickScriptModal.tsx):isDefault> first availableTranslations:
projects.settings.quickScript.exportTemplates(en-US only per project conventions)noAvailableTemplateskey underrepository.quickScriptShared component improvement:
MultiAsyncComboboxX button styling to useopacity-70 hover:opacity-100pattern (matching dialog close button) for better visibility across themes