Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ICAT
Datahub
Commits
bda5d1b6
Commit
bda5d1b6
authored
Aug 25, 2020
by
Axel Bocciarelli
Browse files
Rename sending address to "address of sender"
parent
7a2f95a8
Pipeline
#31883
passed with stage
in 3 minutes and 15 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/components/Parcels/ParcelDetails.js
View file @
bda5d1b6
...
...
@@ -196,7 +196,7 @@ function ParcelDetails(props) {
<
Col
sm
=
{
12
}
md
=
{
6
}
>
<
AddressPanel
address
=
{
shippingAddress
}
header
=
{
<
b
>
Sending
Address
:
<
/b>
}
header
=
{
<
b
>
Address
of
Sender
:
<
/b>
}
/>
<
/Col
>
)}
...
...
src/components/Parcels/ParcelFormModal.js
View file @
bda5d1b6
...
...
@@ -205,8 +205,7 @@ function ParcelFormModal(props) {
<
FormGroup
controlId
=
"
shippingAddress
"
>
<
Col
{...
FORM_LAYOUT
.
labelCol
}
>
<
ControlLabel
>
Sending
address
<
/ControlLabel
>
<
p
className
=
{
styles
.
info
}
>
From
where
the
parcel
is
sent
.
<
/p
>
<
ControlLabel
>
Address
of
sender
<
/ControlLabel
>
<
p
>
<
DropdownButton
title
=
"
Choose
"
id
=
"
shippingAddressAutoFill
"
>
{
addresses
.
map
((
a
)
=>
(
...
...
src/components/Shipping/CreateAddress.js
View file @
bda5d1b6
...
...
@@ -5,7 +5,7 @@ import AddressResource from '../../resources/address';
import
AddressFormModal
from
'
../Address/AddressFormModal
'
;
function
CreateAddress
(
props
)
{
const
{
investigation
,
type
,
onCreate
}
=
props
;
const
{
investigation
,
onCreate
}
=
props
;
const
[
isCreating
,
setCreating
]
=
useState
(
false
);
...
...
@@ -39,7 +39,7 @@ function CreateAddress(props) {
setCreating
(
true
);
}}
>
Create
new
{
type
}
address
Create
new
address
<
/Button
>
<
/
>
);
...
...
src/components/Shipping/ParcelsSection.js
View file @
bda5d1b6
...
...
@@ -228,8 +228,9 @@ function ParcelsSection(props) {
)
:
(
<
div
className
=
{
styles
.
heading
}
>
<
HelpBlock
>
<
Glyphicon
glyph
=
"
warning-sign
"
/>
Your
shipping
addresses
are
not
valid
!
Please
correct
them
before
adding
parcels
.
<
Glyphicon
glyph
=
"
warning-sign
"
/>
Your
default
shipping
addresses
are
not
valid
!
Please
correct
them
before
adding
parcels
.
<
/HelpBlock
>
<
Button
className
=
{
styles
.
newButton
}
bsStyle
=
"
primary
"
disabled
>
<
Glyphicon
glyph
=
"
plus
"
/>
New
parcel
...
...
src/components/Shipping/ShipmentSummary.js
View file @
bda5d1b6
...
...
@@ -10,11 +10,13 @@ function ShipmentSummary(props) {
<
Col
md
=
{
4
}
>
{
defaultShippingAddress
!==
undefined
?
(
<
AddressPanel
header
=
{
<
b
>
Default
send
ing
address
<
/b>
}
header
=
{
<
b
>
Default
send
er
'
s
address</b>}
address={defaultShippingAddress}
/>
) : (
<
Alert
bsStyle
=
"
danger
"
>
Sending
address
no
longer
exists
.
<
/Alert
>
<Alert bsStyle="danger">
Default sender
'
s
address
no
longer
exists
.
<
/Alert
>
)}
<
/Col
>
<
Col
md
=
{
4
}
>
...
...
@@ -24,7 +26,9 @@ function ShipmentSummary(props) {
address
=
{
defaultReturnAddress
}
/
>
)
:
(
<
Alert
bsStyle
=
"
danger
"
>
Return
address
no
longer
exists
.
<
/Alert
>
<
Alert
bsStyle
=
"
danger
"
>
Default
return
address
no
longer
exists
.
<
/Alert
>
)}
<
/Col
>
<
Col
md
=
{
4
}
>
...
...
src/components/Shipping/ShippingForm.js
View file @
bda5d1b6
...
...
@@ -105,13 +105,9 @@ function ShippingForm(props) {
<
FormGroup
controlId
=
"
defaultShippingAddress
"
>
<
Col
{...
FORM_LAYOUT
.
labelCol
}
>
<
ControlLabel
>
Default
send
ing
address
{
'
'
}
Default
send
er
'
s
address{
'
'
}
<span className={styles.hint}>– required</span>
</ControlLabel>
<
p
className
=
{
styles
.
info
}
>
The
<
em
>
sending
address
<
/em> is the address from where a parcel i
s
sent
.
<
/p
>
</Col>
<Col {...FORM_LAYOUT.fieldCol}>
<FormControl
...
...
@@ -119,7 +115,7 @@ function ShippingForm(props) {
componentClass="select"
inputRef={register({ required: true })}
>
<
option
value
=
""
>
Select
default
send
ing
address
...
<
/option
>
<option value="">Select default send
er
'
s
address
...
<
/option
>
{
shippingAddressOptions
.
map
((
addr
)
=>
(
<
option
key
=
{
addr
.
_id
}
value
=
{
addr
.
_id
}
>
{
addressFormatter
(
addr
)}
...
...
@@ -137,7 +133,7 @@ function ShippingForm(props) {
)}
{
errors
.
defaultShippingAddress
&&
(
<
FieldAlert
fieldLabel
=
"
Default send
ing
address
"
fieldLabel
=
"
Default send
er's
address
"
error
=
{
errors
.
defaultShippingAddress
}
/
>
)}
...
...
@@ -145,7 +141,6 @@ function ShippingForm(props) {
{
shippingAddressOptions
.
length
===
0
&&
'
No addresses found!
'
}
<
CreateAddress
investigation
=
{
investigation
}
type
=
"
shipping
"
onCreate
=
{(
id
)
=>
{
setValue
(
'
defaultShippingAddress
'
,
id
);
}}
...
...
@@ -198,7 +193,6 @@ function ShippingForm(props) {
{
returnAddressOptions
.
length
===
0
&&
'
No addresses found!
'
}
<
CreateAddress
investigation
=
{
investigation
}
type
=
"
return
"
onCreate
=
{(
id
)
=>
{
setValue
(
'
defaultReturnAddress
'
,
id
);
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment