Skip to content

Commit

Permalink
chore: run format
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed May 14, 2024
1 parent ad539eb commit f052b89
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
10 changes: 4 additions & 6 deletions frontend/src/routes/(app)/analytics/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,11 @@ export const load: PageServerLoad = async ({ locals, fetch }) => {
function timeState(date: string) {
const eta = new Date(date);
if (eta.getDate() > TODAY.getDate()) {
return {'name': 'incoming', 'hexcolor': '#93c5fd'};
return { name: 'incoming', hexcolor: '#93c5fd' };
} else if (eta.getDate() < TODAY.getDate()) {
return {'name': 'outdated', 'hexcolor': '#f87171'};
}
else {
return {'name': 'today', 'hexcolor': '#fbbf24'};
return { name: 'outdated', hexcolor: '#f87171' };
} else {
return { name: 'today', hexcolor: '#fbbf24' };
}
}

Expand All @@ -88,7 +87,6 @@ export const load: PageServerLoad = async ({ locals, fetch }) => {
residual: Record<string, any>[];
} = await req_get_risks_count_per_level.json().then((res) => res.results);


const req_get_measures_to_review = await fetch(`${BASE_API_URL}/applied-controls/to_review/`);
const measures_to_review = await req_get_measures_to_review.json();

Expand Down
16 changes: 14 additions & 2 deletions frontend/src/routes/(app)/analytics/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@
eta: 'eta',
state: 'state'
},
body: tableSourceMapper(data.measures, ['name', 'category', 'folder', 'ranking_score', 'eta', 'state']),
body: tableSourceMapper(data.measures, [
'name',
'category',
'folder',
'ranking_score',
'eta',
'state'
]),
meta: data.measures
};
Expand Down Expand Up @@ -77,7 +84,12 @@
expiry_date: 'expiryDate',
state: 'state'
},
body: tableSourceMapper(data.acceptances_to_review, ['name', 'risk_scenarios', 'expiry_date', 'state']),
body: tableSourceMapper(data.acceptances_to_review, [
'name',
'risk_scenarios',
'expiry_date',
'state'
]),
meta: data.acceptances_to_review
};
Expand Down

0 comments on commit f052b89

Please sign in to comment.