Skip to content

Commit

Permalink
change get intervention param 'replacedSuppliers' to 'replacedT1Suppl…
Browse files Browse the repository at this point in the history
…iers' and 'replacedProducers'
  • Loading branch information
barbara-chaves authored and davidsingal committed Jun 22, 2023
1 parent 9dcb56f commit ee90138
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
3 changes: 0 additions & 3 deletions client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
- Add filter by year on analysis table. [LANDGRIF-965](https://vizzuality.atlassian.net/browse/LANDGRIF-965)

### Changed
<<<<<<< HEAD
- Updated sidebar design. [LANDGRIF-1035](https://vizzuality.atlassian.net/browse/LANDGRIF-1035)
=======
- Separate 'T1 supplier' and 'producers' in different dropdowns [LANGRIF-1404](https://vizzuality.atlassian.net/browse/LANDGRIF-1404)
>>>>>>> 19100c7c (Separate 'T1 supplier' and 'producers' in different dropdowns)
- T1 supplier and producers are different dropdowns [LANDGRIF-1402](https://vizzuality.atlassian.net/browse/LANDGRIF-1402)
- Hide the manage data table search bar and years filter.[LANDGRIF-1310](https://vizzuality.atlassian.net/browse/LANDGRIF-1310)
- Add unit for the volumes in the procurement data table view.[LANDGRIF-1315](https://vizzuality.atlassian.net/browse/LANDGRIF-1315)
Expand Down
8 changes: 2 additions & 6 deletions client/src/containers/interventions/form/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,11 @@ const InterventionForm: React.FC<InterventionFormProps> = ({
label: name,
value: id,
})),
t1SupplierIds: intervention.replacedT1Suppliers.map(({ id, name }) => ({
t1SupplierIds: intervention.replacedT1Suppliers?.map(({ id, name }) => ({
label: name,
value: id,
})),
producerIds: intervention.replacedProducers.map(({ id, name }) => ({
producerIds: intervention.replacedProducers?.map(({ id, name }) => ({
label: name,
value: id,
})),
Expand Down Expand Up @@ -483,10 +483,6 @@ const InterventionForm: React.FC<InterventionFormProps> = ({
});
}

// * resets supplier and producer info whenever the intervention type changes
resetField('newT1SupplierId', { defaultValue: null });
resetField('newProducerId', { defaultValue: null });

// * closes "Supplier" panel whenever the intervention type changes
if (closeSupplierRef.current !== null) {
closeSupplierRef.current();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ const EditInterventionPage: React.FC = () => {
'replacedMaterials',
'replacedBusinessUnits',
'replacedAdminRegions',
'replacedSuppliers',
'replacedT1Suppliers',
'replacedProducers',
'newMaterial',
'newBusinessUnit',
'newAdminRegion',
Expand Down

1 comment on commit ee90138

@vercel
Copy link

@vercel vercel bot commented on ee90138 Jun 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

landgriffon-client – ./client

landgriffon-client.vercel.app
landgriffon-client-vizzuality1.vercel.app
landgriffon-client-git-dev-vizzuality1.vercel.app

Please sign in to comment.