Skip to content

Commit

Permalink
Merge pull request #2063 from bcgov/fix/daniel-delete-allocaion-2046
Browse files Browse the repository at this point in the history
fix: Remove return types from Save
  • Loading branch information
dhaselhan authored Feb 21, 2025
2 parents 9b6e3de + 7cf77d6 commit 55110bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
21 changes: 8 additions & 13 deletions backend/lcfs/web/api/allocation_agreement/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
allocation agreements endpoints
"""

import structlog
from typing import List, Optional, Union
from typing import List, Optional

import structlog
from fastapi import (
APIRouter,
Body,
Expand All @@ -15,26 +15,24 @@
Depends,
Query,
)
from fastapi_cache.decorator import cache

from lcfs.db import dependencies
from lcfs.web.api.compliance_report.validation import ComplianceReportValidation
from lcfs.web.core.decorators import view_handler
from lcfs.web.api.organizations.services import OrganizationsService
from lcfs.web.api.allocation_agreement.services import AllocationAgreementServices
from lcfs.db.models.user.Role import RoleEnum
from lcfs.web.api.allocation_agreement.schema import (
AllocationAgreementCreateSchema,
AllocationAgreementOptionsSchema,
AllocationAgreementSchema,
AllocationAgreementListSchema,
DeleteAllocationAgreementResponseSchema,
PaginatedAllocationAgreementRequestSchema,
AllocationAgreementAllSchema,
OrganizationDetailsSchema,
)
from lcfs.web.api.base import ComplianceReportRequestSchema, PaginationRequestSchema
from lcfs.web.api.allocation_agreement.services import AllocationAgreementServices
from lcfs.web.api.allocation_agreement.validation import AllocationAgreementValidation
from lcfs.db.models.user.Role import RoleEnum
from lcfs.web.api.base import ComplianceReportRequestSchema, PaginationRequestSchema
from lcfs.web.api.compliance_report.validation import ComplianceReportValidation
from lcfs.web.api.organizations.services import OrganizationsService
from lcfs.web.core.decorators import view_handler

router = APIRouter()
logger = structlog.get_logger(__name__)
Expand Down Expand Up @@ -134,9 +132,6 @@ async def get_allocation_agreements_paginated(

@router.post(
"/save",
response_model=Union[
AllocationAgreementSchema, DeleteAllocationAgreementResponseSchema
],
status_code=status.HTTP_200_OK,
)
@view_handler([RoleEnum.COMPLIANCE_REPORTING, RoleEnum.SIGNING_AUTHORITY])
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/BCDataGrid/BCGridEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ export const BCGridEditor = ({
const onCellFocused = (params) => {
if (params.column) {
// Ensure the focused column is always visible
this.gridApi.ensureColumnVisible(params.column)
params.gridApi.ensureColumnVisible(params.column)

// Scroll to make focused cell align to left
const leftPos = params.column.getLeftPosition()
if (leftPos !== null) {
this.gridApi.horizontalScrollTo(leftPos)
params.gridApi.horizontalScrollTo(leftPos)
}
}
}
Expand Down

0 comments on commit 55110bf

Please sign in to comment.