From d73294569837e4ce6d38c09e5eda28569d0f0b73 Mon Sep 17 00:00:00 2001 From: Abderrahmane Smimite Date: Sat, 19 Oct 2024 18:46:45 +0200 Subject: [PATCH 1/2] Model buttons improvement --- .../TableRowActions/TableRowActions.svelte | 4 +- .../(internal)/[model=urlmodel]/+page.svelte | 63 +++++++++++-------- 2 files changed, 38 insertions(+), 29 deletions(-) diff --git a/frontend/src/lib/components/TableRowActions/TableRowActions.svelte b/frontend/src/lib/components/TableRowActions/TableRowActions.svelte index 66cdc381f..01e013c9f 100644 --- a/frontend/src/lib/components/TableRowActions/TableRowActions.svelte +++ b/frontend/src/lib/components/TableRowActions/TableRowActions.svelte @@ -69,9 +69,7 @@ $: displayDelete = canDeleteObject && deleteForm !== undefined; - + {#if !hasBody} diff --git a/frontend/src/routes/(app)/(internal)/[model=urlmodel]/+page.svelte b/frontend/src/routes/(app)/(internal)/[model=urlmodel]/+page.svelte index 5212eb855..d3385cf5f 100644 --- a/frontend/src/routes/(app)/(internal)/[model=urlmodel]/+page.svelte +++ b/frontend/src/routes/(app)/(internal)/[model=urlmodel]/+page.svelte @@ -50,35 +50,46 @@ {#key URLModel}
- {#if !['risk-matrices', 'frameworks', 'requirement-mapping-sets', 'user-groups', 'role-assignments'].includes(URLModel)} - - {#if URLModel === 'applied-controls'} + + {#if !['risk-matrices', 'frameworks', 'requirement-mapping-sets', 'user-groups', 'role-assignments'].includes(URLModel)} + + {#if URLModel === 'applied-controls'} + + {/if} + {:else if URLModel === 'risk-matrices'} {m.exportButton()} + {:else if URLModel === 'frameworks'} + + {:else if URLModel === 'requirement-mapping-sets'} + {/if} - {:else if URLModel === 'risk-matrices'} - {m.importMatrices()} - {:else if URLModel === 'frameworks'} - {m.importFrameworks()} - {:else if URLModel === 'requirement-mapping-sets'} - {m.importMappings()} - {/if} +
{/key} From b21dc2313f649721f28efd605eb4c7d2dbaa290d Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Mon, 21 Oct 2024 12:03:17 +0200 Subject: [PATCH 2/2] third-party route model buttons improvement --- .../[model=thirdparty_urlmodels]/+page.svelte | 59 ++++++++++++------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/frontend/src/routes/(app)/(third-party)/[model=thirdparty_urlmodels]/+page.svelte b/frontend/src/routes/(app)/(third-party)/[model=thirdparty_urlmodels]/+page.svelte index dcf49cb4b..d3385cf5f 100644 --- a/frontend/src/routes/(app)/(third-party)/[model=thirdparty_urlmodels]/+page.svelte +++ b/frontend/src/routes/(app)/(third-party)/[model=thirdparty_urlmodels]/+page.svelte @@ -50,31 +50,46 @@ {#key URLModel}
- {#if !['risk-matrices', 'frameworks', 'user-groups', 'role-assignments'].includes(URLModel)} - - {#if URLModel === 'applied-controls'} + + {#if !['risk-matrices', 'frameworks', 'requirement-mapping-sets', 'user-groups', 'role-assignments'].includes(URLModel)} + + {#if URLModel === 'applied-controls'} + + {/if} + {:else if URLModel === 'risk-matrices'} {m.exportButton()} + {:else if URLModel === 'frameworks'} + + {:else if URLModel === 'requirement-mapping-sets'} + {/if} - {:else if URLModel === 'risk-matrices'} - {m.importMatrices()} - {:else if URLModel === 'frameworks'} - {m.importFrameworks()} - {/if} +
{/key}