fix: block renaming main project variant; dynamic page titles
- Add ErrCannotRenameMainVariant; ProjectService.Update now returns this error if the caller tries to change the Variant of a main project (empty Variant) — ensures there is always exactly one main - Handle ErrCannotRenameMainVariant in PUT /api/projects/:uuid with 400 - Set document.title dynamically from breadcrumb data: - Configurator: "CODE / variant / Config name — QuoteForge" - Project detail: "CODE / variant — QuoteForge" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -477,6 +477,7 @@ function updateConfigBreadcrumbs() {
|
||||
configEl.textContent = truncateBreadcrumbSpecName(fullConfigName);
|
||||
configEl.title = fullConfigName;
|
||||
versionEl.textContent = 'main';
|
||||
document.title = code + ' / ' + variant + ' / ' + fullConfigName + ' — QuoteForge';
|
||||
const configNameLinkEl = document.getElementById('breadcrumb-config-name-link');
|
||||
if (configNameLinkEl && configUUID) {
|
||||
configNameLinkEl.href = '/configs/' + configUUID + '/revisions';
|
||||
|
||||
@@ -363,6 +363,7 @@ function renderVariantSelect() {
|
||||
if (item.uuid === projectUUID) {
|
||||
option.className += ' font-semibold text-gray-900';
|
||||
label.textContent = variantLabel;
|
||||
document.title = (project && project.code ? project.code : '—') + ' / ' + variantLabel + ' — QuoteForge';
|
||||
}
|
||||
option.textContent = variantLabel;
|
||||
option.onclick = function() {
|
||||
|
||||
Reference in New Issue
Block a user