Skip to content

Commit 56d91fa

Browse files
committed
Fixes to permissions in frontend, Picker updates, Asset improvements
1 parent 91f1a20 commit 56d91fa

30 files changed

Lines changed: 1479 additions & 520 deletions

frontend/package-lock.json

Lines changed: 16 additions & 361 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"dependencies": {
4646
"@atlaskit/pragmatic-drag-and-drop": "^1.7.6",
4747
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
48+
"@dagrejs/dagre": "^2.0.4",
4849
"@excalidraw/excalidraw": "^0.18.0",
4950
"@fontsource/geist-sans": "^5.2.5",
5051
"@fontsource/inter": "^5.2.8",

frontend/src/lib/api/assets.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ export const assetSets = {
44
getAll: () => fetchAPI('/asset-sets'),
55
get: (id) => fetchAPI(`/asset-sets/${id}`),
66
create: (data) =>
7-
fetchAPI('/admin/asset-sets', {
7+
fetchAPI('/asset-sets', {
88
method: 'POST',
99
body: JSON.stringify(data),
1010
}),
1111
update: (id, data) =>
12-
fetchAPI(`/admin/asset-sets/${id}`, {
12+
fetchAPI(`/asset-sets/${id}`, {
1313
method: 'PUT',
1414
body: JSON.stringify(data),
1515
}),
@@ -143,6 +143,7 @@ export const assets = {
143143
method: 'POST',
144144
body: JSON.stringify(data),
145145
}),
146+
getRelationshipGraph: (id) => fetchAPI(`/assets/${id}/relationship-graph`),
146147
};
147148

148149
export const itemLinkedAssets = {

frontend/src/lib/components/Button.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
9999
</svg>
100100
{:else if icon && iconPosition === 'left'}
101-
<icon class={iconSize} />
101+
<svelte:component this={icon} class={iconSize} />
102102
{/if}
103103
104104
{#if children}{@render children()}{/if}
@@ -110,14 +110,14 @@
110110
{/if}
111111
112112
{#if !loading && icon && iconPosition === 'right'}
113-
<icon class={iconSize} />
113+
<svelte:component this={icon} class={iconSize} />
114114
{/if}
115115
{/snippet}
116116
117117
<!-- Snippet for link inner content (no loading state) -->
118118
{#snippet linkContent()}
119119
{#if icon && iconPosition === 'left'}
120-
<icon class={iconSize} />
120+
<svelte:component this={icon} class={iconSize} />
121121
{/if}
122122
123123
{#if children}{@render children()}{/if}
@@ -129,7 +129,7 @@
129129
{/if}
130130
131131
{#if icon && iconPosition === 'right'}
132-
<icon class={iconSize} />
132+
<svelte:component this={icon} class={iconSize} />
133133
{/if}
134134
{/snippet}
135135

frontend/src/lib/dialogs/RequestFormModal.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
if (portalSlug) {
9090
customFieldDefinitions = await api.portal.getCustomFields(portalSlug) || [];
9191
} else {
92-
customFieldDefinitions = await api.customFields.getAll() || [];
92+
customFieldDefinitions = (await api.customFields.getAll())?.data || [];
9393
}
9494
9595
// Initialize custom field values (for both custom and virtual fields)

frontend/src/lib/features/actions/UpdateAssetConfigPanel.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// Load custom fields on mount
1818
onMount(async () => {
1919
try {
20-
customFields = await api.customFields.getAll() || [];
20+
customFields = (await api.customFields.getAll())?.data || [];
2121
// Filter to only asset type fields
2222
assetFields = customFields.filter(f => f.field_type === 'asset');
2323
} catch (error) {

0 commit comments

Comments
 (0)