Skip to content
Snippets Groups Projects
Commit a45ad978 authored by Marjolaine Bodin's avatar Marjolaine Bodin
Browse files

Merge branch '839-fix_transport_organization_update' into 'main'

Resolve "Update transport organization"

Closes #839

See merge request !736
parents 0b76ed3a a41e409a
No related branches found
No related tags found
1 merge request!736Resolve "Update transport organization"
Pipeline #229451 passed
......@@ -175,6 +175,11 @@ export function ParcelTransportOrganisation({
body: {
...parcel,
isReimbursed: e.currentTarget.checked,
returnParcelInformation: {
returnType: undefined,
forwarderName: undefined,
plannedPickupDate: undefined,
},
},
});
if (e.currentTarget.checked) {
......@@ -198,7 +203,7 @@ export function ParcelTransportOrganisation({
reference={reference}
/>
)}
{parcel.returnAddress && paidByFacility !== true && (
{parcel.returnAddress && (
<>
<Row className="mt-1">
<Col>
......@@ -214,13 +219,15 @@ export function ParcelTransportOrganisation({
label={`I will prepare the transport documents using my forwarder account, and ${facilityName} will organise the return using the return documents I prepared (daily pickups from ${facilityName} exist for ${faciltyTransporters}).`}
name="radio-parcel-papers-included"
id="radio-parcel-papers-included"
checked={parcelPapersManaged}
checked={!paidByFacility && parcelPapersManaged}
onChange={(e) => {
setParcelPapersManaged(e.currentTarget.checked);
setPaidByFacility(false);
setPickup(!e.currentTarget.checked);
mutate({
body: {
...parcel,
isReimbursed: false,
returnParcelInformation: {
returnType: RETURN_PARCEL_TYPE_MANAGE,
forwarderName: undefined,
......@@ -241,13 +248,15 @@ export function ParcelTransportOrganisation({
label={`I will prepare the transport documents using my forwarder account, and I will organise the return directly with the fowarder (if not ${faciltyTransporters}).`}
name="radio-parcel-papers-oganized"
id="radio-parcel-papers-oganized"
checked={pickup}
checked={!paidByFacility && pickup}
onChange={(e) => {
setPickup(e.currentTarget.checked);
setPaidByFacility(false);
setParcelPapersManaged(!e.currentTarget.checked);
mutate({
body: {
...parcel,
isReimbursed: false,
returnParcelInformation: {
returnType: RETURN_PARCEL_TYPE_ORGANIZE,
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment