Skip to content

Commit 6b10772

Browse files
committed
Update styling of proposed actions in export
1 parent 5cc3d46 commit 6b10772

File tree

7 files changed

+188
-196
lines changed

7 files changed

+188
-196
lines changed

app/src/views/DrefApplicationExport/i18n.json

-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@
110110
"proposedActions": "Proposed Actions",
111111
"proposedActionsActivities": "Activities",
112112
"priorityActionsBudget": "Budget (CHF)",
113-
"proposedActionsEarlyActions": "Early Actions",
114-
"priorityActionsEarlyResponse": "Early Response",
115113
"priorityActionsSubTotal": "Sub-total",
116114
"priorityActionsSurgeDeployment": "Surge Deployment (if applicable)",
117115
"priorityActionsIndirectCost": "Indirect Cost",

app/src/views/DrefApplicationExport/index.tsx

+159-171
Large diffs are not rendered by default.

app/src/views/DrefApplicationExport/styles.module.css

+22-16
Original file line numberDiff line numberDiff line change
@@ -243,45 +243,51 @@
243243
page-break-inside: avoid;
244244
}
245245

246-
.actions-section {
246+
.proposed-actions {
247247
display: grid;
248248
grid-gap: var(--go-ui-width-separator-md);
249-
grid-template-columns: 1fr 1fr 1fr 1fr;
249+
grid-template-columns: 6fr 5fr 5fr 4fr;
250250
page-break-inside: avoid;
251251

252-
.actions-title {
253-
display: flex;
254-
background-color: var(--pdf-element-bg);
252+
.action-title-label {
253+
background-color: var(--go-ui-color-element-background);
255254
padding: var(--go-ui-spacing-sm);
256-
break-inside: avoid;
257-
font-weight: var(--go-ui-font-weight-bold);
255+
font-weight: var(--go-ui-font-weight-semibold);
258256
}
259257

260-
.actions-group {
258+
.proposed-action {
261259
display: flex;
260+
align-items: center;
261+
gap: var(--go-ui-spacing-sm);
262+
padding: var(--go-ui-spacing-md);
262263
background-color: var(--pdf-element-bg);
263-
padding: var(--go-ui-spacing-sm);
264-
break-inside: avoid;
265264

266-
.logo {
265+
.proposed-action-icon {
267266
height: 3rem;
268267
}
269268
}
270269

271-
.actions-item {
272-
display: flex;
270+
.sector,
271+
.activity,
272+
.budget {
273273
background-color: var(--pdf-element-bg);
274274
padding: var(--go-ui-spacing-sm);
275275
break-inside: avoid;
276276
}
277277

278-
.cost-item {
279-
display: flex;
280-
flex-direction: column;
278+
.cost-label {
279+
grid-column: span 3;
281280
background-color: var(--pdf-element-bg);
282281
padding: var(--go-ui-spacing-sm);
283282
break-inside: avoid;
284283
text-align: right;
284+
font-weight: var(--go-ui-font-weight-semibold);
285+
}
286+
287+
.cost-value {
288+
background-color: var(--pdf-element-bg);
289+
padding: var(--go-ui-spacing-sm);
290+
break-inside: avoid;
285291
}
286292
}
287293
}

app/src/views/DrefApplicationForm/Operation/ProposedActionsInput/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import {
3131
type GoApiResponse,
3232
useRequest,
3333
} from '#utils/restRequest';
34-
import { EARLY_ACTIONS } from '#views/DrefApplicationForm/common';
34+
import { EARLY_ACTION } from '#views/DrefApplicationForm/common';
3535

3636
import { type PartialDref } from '../../schema';
3737
import ActivitiesInput from './ActivitiesInput';
@@ -139,7 +139,7 @@ function ProposedActionsInput(props: Props) {
139139
return (
140140
<InputSection
141141
title={
142-
value.proposed_type === EARLY_ACTIONS
142+
value.proposed_type === EARLY_ACTION
143143
? (
144144
<div className={styles.proposedAction}>
145145
<img

app/src/views/DrefApplicationForm/Overview/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import {
5757
DISASTER_FIRE,
5858
DISASTER_FLASH_FLOOD,
5959
DISASTER_FLOOD,
60-
EARLY_ACTIONS,
60+
EARLY_ACTION,
6161
EARLY_RESPONSE,
6262
ONSET_SUDDEN,
6363
OPERATION_TIMEFRAME_IMMINENT,
@@ -193,7 +193,7 @@ function Overview(props: Props) {
193193
|| oldValue.proposed_action.length < 1 ? [
194194
{
195195
client_id: randomString(),
196-
proposed_type: EARLY_ACTIONS,
196+
proposed_type: EARLY_ACTION,
197197
},
198198
{
199199
client_id: randomString(),

app/src/views/DrefApplicationForm/common.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const SURGE_INDIRECT_COST = 5800;
3535
export const INDIRECT_COST = 5000;
3636
export const SUB_TOTAL = 75000;
3737

38-
export const EARLY_ACTIONS = 1 satisfies ProposedActionOption['key'];
38+
export const EARLY_ACTION = 1 satisfies ProposedActionOption['key'];
3939
export const EARLY_RESPONSE = 2 satisfies ProposedActionOption['key'];
4040
export const OPERATION_TIMEFRAME_IMMINENT = 45; // 45 days
4141

app/src/views/DrefApplicationForm/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ import {
6363
import Actions from './Actions';
6464
import {
6565
checkTabErrors,
66-
EARLY_ACTIONS,
66+
EARLY_ACTION,
6767
EARLY_RESPONSE,
6868
OPERATION_TIMEFRAME_IMMINENT,
6969
TYPE_IMMINENT,
@@ -335,7 +335,7 @@ export function Component() {
335335
).sort((a, b) => a.proposed_type - b.proposed_type) : [
336336
{
337337
client_id: randomString(),
338-
proposed_type: EARLY_ACTIONS,
338+
proposed_type: EARLY_ACTION,
339339
},
340340
{
341341
client_id: randomString(),

0 commit comments

Comments
 (0)