Skip to content

Commit

Permalink
Reconfigure provision of the act for other fuel diesel
Browse files Browse the repository at this point in the history
  • Loading branch information
areyeslo committed Jan 4, 2025
1 parent 6e12d3b commit b8e343b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"""Update fuel type name
Revision ID: bfa7bbb1eea3
Revises: 9329e38396e1
Create Date: 2025-01-03 13:24:19.525006
"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "bfa7bbb1eea3"
down_revision = "9329e38396e1"
branch_labels = None
depends_on = None


def upgrade() -> None:
# Update fuel type name
op.execute("""
UPDATE fuel_type
SET fuel_type = 'Other diesel fuel',
provision_1_id = 3 -- Change from prescribed (1) to default (3)
WHERE fuel_type = 'Other diesel';
""")


def downgrade() -> None:
# Revert fuel type name update
op.execute("""
UPDATE fuel_type
SET fuel_type = 'Other diesel',
provision_1_id = 1 -- Change from default (3) to prescribed (1)
WHERE fuel_type = 'Other diesel fuel';
""")

2 changes: 1 addition & 1 deletion frontend/src/assets/locales/en/allocationAgreement.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"allocationAgreementSubtitle": "Enter allocation agreement details below",
"fuelCodeFieldRequiredError": "Error updating row: Fuel code field required",
"allocationAgreementColLabels": {
"transaction": "Responsibility",
"allocationTransactionType": "Responsibility",
"transactionPartner": "Legal name of transaction partner",
"postalAddress": "Address for service",
"transactionPartnerEmail": "Email",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/AllocationAgreements/_schema.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const allocationAgreementColDefs = (optionsData, errors, currentUser) =>
field: 'allocationTransactionType',
headerComponent: RequiredHeader,
headerName: i18n.t(
'allocationAgreement:allocationAgreementColLabels.transaction'
'allocationAgreement:allocationAgreementColLabels.allocationTransactionType'
),
cellEditor: AutocompleteCellEditor,
cellEditorParams: {
Expand Down

0 comments on commit b8e343b

Please sign in to comment.