Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/ui/SidebarTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ export const SidebarTabs: React.FC<SidebarTabsProps> = ({ width = 350, showBorde
onMouseLeave={(e) => { if (active !== 'mml') Object.assign(e.currentTarget.style, tabBase); }}
onClick={() => navigate('/mml')}
>
MML
Meta Model
</button>
<button
style={{ ...tabBase, ...(active === 'project' ? activeTab : {}) }}
onMouseEnter={(e) => { if (active !== 'project') Object.assign(e.currentTarget.style, inactiveTabHover); }}
onMouseLeave={(e) => { if (active !== 'project') Object.assign(e.currentTarget.style, tabBase); }}
onClick={() => navigate('/project')}
>
Project
Projects
</button>
</div>
<div style={{ borderTop: '1px solid #e5e7eb', height: '100%', overflow: 'hidden' }}>
Expand Down
3 changes: 1 addition & 2 deletions src/components/ui/VsumDetailsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ export const VsumDetailsModal: React.FC<Props> = ({ isOpen, vsumId, onClose, onS
setSaving(true);
setError('');
try {
const currentMetaModelIds = (details.metaModels || []).map(m => m.id);
await apiService.updateVsum(vsumId, { name: name.trim(), metaModelIds: currentMetaModelIds });
await apiService.renameVsum(vsumId, { name: name.trim() });
onSaved?.();
onClose();
} catch (e: any) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/VsumsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const VsumsPanel: React.FC = () => {

return (
<div style={containerStyle}>
<div style={titleStyle}>vSUMS</div>
<div style={titleStyle}>Projects</div>

<CreateVsumModal
isOpen={showCreate}
Expand All @@ -154,7 +154,7 @@ export const VsumsPanel: React.FC = () => {
Create
</button>

<div style={sectionStyle}>All vSUMs</div>
<div style={sectionStyle}>All</div>

{loading && <div style={{ padding: 12, fontStyle: 'italic', color: '#5a6c7d' }}>Loading...</div>}
{!loading && sorted.length === 0 && (
Expand Down
28 changes: 27 additions & 1 deletion src/services/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,31 @@ class ApiService {
});
}

// inside ApiService class
async renameVsum(id: number | string, data: { name: string }): Promise<ApiResponse<any>> {
return this.authenticatedRequest(`/api/v1/vsums/${id}`, {
method: 'PUT',
body: JSON.stringify(data),
});
}

/**
* vSUMS: Sync changes with relationship data
*/
async syncVsumChanges(id: number | string, data: {
metaModelIds: number[];
metaModelRelationRequests: Array<{
sourceId: number;
targetId: number;
reactionFileId: number;
}>;
}): Promise<ApiResponse<any>> {
return this.authenticatedRequest(`/api/v1/vsums/${id}/sync-changes`, {
method: 'PUT',
body: JSON.stringify(data),
});
}

/**
* vSUMS: Get details
*/
Expand Down Expand Up @@ -517,4 +542,5 @@ export interface UserSearchItem {
firstName?: string;
lastName?: string;
email: string;
}
}

Loading