Skip to content

Commit

Permalink
fix: breadcrumbs and title in plans
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed May 16, 2024
1 parent 4d350b9 commit 3ad9c2b
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion frontend/src/lib/utils/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ export function localItems(languageTag: string): LocalItems {
languageTag: languageTag
}),
actionPlan: m.actionPlan({ languageTag: languageTag }),
matchingRequirements: m.matchingRequirements({ languageTag: languageTag })
matchingRequirements: m.matchingRequirements({ languageTag: languageTag }),
remediationPlan: m.remediationPlan({ languageTag: languageTag }),
};
return LOCAL_ITEMS;
}
6 changes: 3 additions & 3 deletions frontend/src/routes/(app)/analyses-registry/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<ModelTable source={data.table} URLModel={data.URLModel}>
<span slot="actions" let:meta class="space-x-2 whitespace-nowrap">
<a
href="/risk-assessments/{meta.id}/plan"
href="/risk-assessments/{meta.id}/remediation-plan"
class="unstyled cursor-pointer text-xl text-slate-500 hover:text-indigo-700"
on:click={stopPropagation}><i class="fa-solid fa-heart-pulse" /></a
>
Expand All @@ -49,12 +49,12 @@
>
<p class="block px-4 py-2 text-sm text-gray-800">Treatment plan</p>
<a
href="/risk-assessments/{meta.id}/plan/export/pdf"
href="/risk-assessments/{meta.id}/remediation-plan/export/pdf"
class="block px-4 py-2 text-sm text-gray-800 hover:bg-gray-200"
on:click={stopPropagation}>... as PDF</a
>
<a
href="/risk-assessments/{meta.id}/plan/export/csv"
href="/risk-assessments/{meta.id}/remediation-plan/export/csv"
class="block px-4 py-2 text-sm text-gray-800 border-b hover:bg-gray-200"
on:click={stopPropagation}>... as csv</a
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
import type { TableSource } from '$lib/components/ModelTable/types';
import { Tab, TabGroup, tableSourceMapper } from '@skeletonlabs/skeleton';
import ModelTable from '$lib/components/ModelTable/ModelTable.svelte';
import { breadcrumbObject } from '$lib/utils/stores';
export let data;
breadcrumbObject.set(data.compliance_assessment);
let tabSet = 0;
const plannedAppliedControls: TableSource = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<div>
<div class="card bg-white p-4 m-4 shadow flex space-x-2 relative">
<div class="absolute right-2 top-2 py-2 px-4">
<a href="/risk-assessments/{risk_assessment.id}/plan" class="btn variant-filled-primary"
<a href="/risk-assessments/{risk_assessment.id}/remediation-plan" class="btn variant-filled-primary"
><i class="fa-solid fa-heart-pulse mr-2" />{m.remediationPlan()}</a
>
<button class="btn variant-filled-primary" use:popup={popupDownload}
Expand All @@ -183,11 +183,11 @@
>
<p class="block px-4 py-2 text-sm text-gray-800">{m.treatmentPlan()}</p>
<a
href="/risk-assessments/{risk_assessment.id}/plan/export/pdf"
href="/risk-assessments/{risk_assessment.id}/remediation-plan/export/pdf"
class="block px-4 py-2 text-sm text-gray-800 hover:bg-gray-200">... {m.asPDF()}</a
>
<a
href="/risk-assessments/{risk_assessment.id}/plan/export/csv"
href="/risk-assessments/{risk_assessment.id}/remediation-plan/export/csv"
class="block px-4 py-2 text-sm text-gray-800 border-b hover:bg-gray-200"
>... {m.asCSV()}</a
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<script lang="ts">
import { goto } from '$app/navigation';
import * as m from '$paraglide/messages.js';
import { breadcrumbObject } from '$lib/utils/stores';
export let data;
breadcrumbObject.set(data.risk_assessment);
const scenarioTreatmentColorMap = (status: string) => {
const map: Record<string, string> = {
open: 'bg-orange-200',
Expand Down

0 comments on commit 3ad9c2b

Please sign in to comment.