diff --git a/client/CHANGELOG.md b/client/CHANGELOG.md index 13e884542..cb84447c8 100644 --- a/client/CHANGELOG.md +++ b/client/CHANGELOG.md @@ -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) diff --git a/client/src/containers/interventions/form/component.tsx b/client/src/containers/interventions/form/component.tsx index 35c2abaab..92024e2e6 100644 --- a/client/src/containers/interventions/form/component.tsx +++ b/client/src/containers/interventions/form/component.tsx @@ -331,11 +331,11 @@ const InterventionForm: React.FC = ({ 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, })), @@ -483,10 +483,6 @@ const InterventionForm: React.FC = ({ }); } - // * 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(); diff --git a/client/src/pages/data/scenarios/[scenarioId]/interventions/[interventionId]/edit.tsx b/client/src/pages/data/scenarios/[scenarioId]/interventions/[interventionId]/edit.tsx index 8fb35fd05..8fc2a08bb 100644 --- a/client/src/pages/data/scenarios/[scenarioId]/interventions/[interventionId]/edit.tsx +++ b/client/src/pages/data/scenarios/[scenarioId]/interventions/[interventionId]/edit.tsx @@ -23,7 +23,8 @@ const EditInterventionPage: React.FC = () => { 'replacedMaterials', 'replacedBusinessUnits', 'replacedAdminRegions', - 'replacedSuppliers', + 'replacedT1Suppliers', + 'replacedProducers', 'newMaterial', 'newBusinessUnit', 'newAdminRegion',