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
6 changes: 3 additions & 3 deletions src/components/ui/CreateVsumModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const CreateVsumModal: React.FC<CreateVsumModalProps> = ({ isOpen, onClos
setDescription('');
onClose();
} catch (e) {
const msg = e instanceof Error ? e.message : 'Failed to create vSUM';
const msg = e instanceof Error ? e.message : 'Failed to create VSUM';
setError(msg);
showError(msg);
} finally {
Expand All @@ -166,7 +166,7 @@ export const CreateVsumModal: React.FC<CreateVsumModalProps> = ({ isOpen, onClos
<div style={modalOverlayStyle} onClick={handleClose}>
<div style={modalStyle} onClick={(e) => e.stopPropagation()}>
<div style={headerStyle}>
<h3 style={titleStyle}>Create vSUM</h3>
<h3 style={titleStyle}>Create</h3>
<button style={closeButtonStyle} onClick={handleClose}>
×
</button>
Expand Down Expand Up @@ -199,7 +199,7 @@ export const CreateVsumModal: React.FC<CreateVsumModalProps> = ({ isOpen, onClos
<div style={buttonRowStyle}>
<button style={secondaryButtonStyle} onClick={handleClose} disabled={loading}>Cancel</button>
<button style={primaryButtonStyle} onClick={handleSubmit} disabled={loading || !name.trim()}>
{loading ? 'Creating...' : 'Create vSUM'}
{loading ? 'Creating...' : 'Create'}
</button>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/MetaModelsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ export const MetaModelsPanel: React.FC<MetaModelsPanelProps> = ({ activeVsumId,
style={{ padding: '4px 8px', border: '1px solid #dee2e6', borderRadius: 6, background: '#ffffff', cursor: 'pointer', fontSize: 12, fontWeight: 600 }}
disabled={(selectedMetaModelIds || []).includes(model.id)}
>
{(selectedMetaModelIds || []).includes(model.id) ? 'Added' : 'Add to vSUM'}
{(selectedMetaModelIds || []).includes(model.id) ? 'Added' : 'Add to VSUM'}
</button>
)}
</>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/VsumDetailsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const VsumDetailsModal: React.FC<Props> = ({ isOpen, vsumId, onClose, onS
<div style={overlay} onClick={onClose} role="dialog" aria-modal="true">
<div style={dialog} onClick={(e)=>e.stopPropagation()}>
<div style={header}>
<h3 style={title}>{details?.name ?? 'vSUM Details'}</h3>
<h3 style={title}>{details?.name ?? 'VSUM Details'}</h3>
<div style={{ display:'flex', gap:8 }}>
<button
onClick={()=>setActiveTab('details')}
Expand Down Expand Up @@ -163,7 +163,7 @@ export const VsumDetailsModal: React.FC<Props> = ({ isOpen, vsumId, onClose, onS
)
) : (
!vsumId
? <div style={{fontStyle:'italic', color:'#6c757d'}}>No vSUM selected.</div>
? <div style={{fontStyle:'italic', color:'#6c757d'}}>No VSUM selected.</div>
: <VsumUsersTab vsumId={vsumId} onChanged={onSaved} />
)}
</div>
Expand Down
10 changes: 5 additions & 5 deletions src/components/ui/VsumTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const VsumTabs: React.FC<VsumTabsProps> = ({ openVsums, activeVsumId, onA
setDetailsById(prev => ({ ...prev, [id]: res.data }));
setEdits(prev => ({ ...prev, [id]: { name: res.data.name, metaModelIds: (res.data.metaModels || []).map(m => m.id) } }));
} catch (e) {
setError(e instanceof Error ? e.message : 'Failed to load vSUM details');
setError(e instanceof Error ? e.message : 'Failed to load VSUM details');
}
};
if (activeVsumId && !detailsById[activeVsumId]) {
Expand All @@ -74,7 +74,7 @@ export const VsumTabs: React.FC<VsumTabsProps> = ({ openVsums, activeVsumId, onA
setEdits(prev => ({ ...prev, [id]: { name: res.data.name, metaModelIds: (res.data.metaModels || []).map(m => m.id) } }));
window.dispatchEvent(new CustomEvent('vitruv.refreshVsums'));
} catch (e) {
setError(e instanceof Error ? e.message : 'Failed to save vSUM');
setError(e instanceof Error ? e.message : 'Failed to save VSUM');
} finally {
setSaving(false);
}
Expand All @@ -93,14 +93,14 @@ export const VsumTabs: React.FC<VsumTabsProps> = ({ openVsums, activeVsumId, onA
setEdits(prev => ({ ...prev, [id]: { name: res.data.name, metaModelIds: (res.data.metaModels || []).map(m => m.id) } }));
return res.data;
} catch (e) {
setError(e instanceof Error ? e.message : 'Failed to load vSUM details');
setError(e instanceof Error ? e.message : 'Failed to load VSUM details');
return undefined;
}
};

const beginRename = async (id: number) => {
await ensureDetails(id);
const currentName = edits[id]?.name || detailsById[id]?.name || `vSUM #${id}`;
const currentName = edits[id]?.name || detailsById[id]?.name || `VSUM #${id}`;
setRenamingId(id);
setRenameValue(currentName);
};
Expand Down Expand Up @@ -138,7 +138,7 @@ export const VsumTabs: React.FC<VsumTabsProps> = ({ openVsums, activeVsumId, onA
<div style={{ display: 'flex', alignItems: 'center', gap: 6, overflowX: 'auto', flex: 1 }}>
{openVsums.map(id => {
const isActive = id === activeVsumId;
const name = detailsById[id]?.name || `vSUM #${id}`;
const name = detailsById[id]?.name || `VSUM #${id}`;
const isDirty = !!dirtyById[id];
return (
<div
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/VsumUsersTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const VsumUsersTab: React.FC<Props> = ({ vsumId, onChanged }) => {

// remove member (only non-owner get a button)
const removeMember = async (vsumUserId: number) => {
if (!window.confirm('Remove this member from the vSUM?')) return;
if (!window.confirm('Remove this member from the VSUM?')) return;
try {
setErr('');
await apiService.removeVsumMember(vsumUserId); // [REMOVE_MEMBER]
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/VsumsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const VsumsPanel: React.FC = () => {
onMouseEnter={(e) => Object.assign(e.currentTarget.style, createButtonHoverStyle)}
onMouseLeave={(e) => Object.assign(e.currentTarget.style, createButtonStyle)}
>
Create vSUM
Create
</button>

<div style={sectionStyle}>All vSUMs</div>
Expand Down
4 changes: 2 additions & 2 deletions src/services/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,15 +437,15 @@ class ApiService {
}

/**
* VSUM USERS: Fetch members of a vSUM
* VSUM USERS: Fetch members of a VSUM
* GET /v1/vsum-users/vsumId={vsumId}
*/
async getVsumMembers(vsumId: number | string): Promise<ApiResponse<VsumUserResponse[]>> {
return this.authenticatedRequest(`/api/v1/vsum-users/vsumId=${vsumId}`);
}

/**
* VSUM USERS: Add member to a vSUM
* VSUM USERS: Add member to a VSUM
* POST /v1/vsum-users/add-member
* body: { vsumId, userId }
*/
Expand Down
Loading