mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 20:53:24 +10:00
Merge pull request #169 from sharetribe/salepage-copy-texts
Salepage copy texts
This commit is contained in:
commit
d959f267cc
6 changed files with 78 additions and 36 deletions
|
|
@ -18,13 +18,13 @@ const EditListingLocationPanel = props => {
|
|||
|
||||
// TODO location address is currently serialized inside address field (API will change later)
|
||||
// Content is something like { locationAddress: 'Street, Province, Country', building: 'A 42' };
|
||||
let locationAddress = "";
|
||||
let building = "";
|
||||
let locationAddress = '';
|
||||
let building = '';
|
||||
try {
|
||||
const deserializedAddress = JSON.parse(address || "{}");
|
||||
const deserializedAddress = JSON.parse(address || '{}');
|
||||
locationAddress = deserializedAddress.locationAddress;
|
||||
building = deserializedAddress.building;
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
locationAddress = address;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,28 +99,28 @@ const OrderDetailsPanel = props => {
|
|||
</div>
|
||||
),
|
||||
};
|
||||
break;
|
||||
case propTypes.TX_STATE_DELIVERED:
|
||||
stateMsgData = {
|
||||
title: (
|
||||
break;
|
||||
case propTypes.TX_STATE_DELIVERED:
|
||||
stateMsgData = {
|
||||
title: (
|
||||
<FormattedMessage
|
||||
id="OrderDetailsPanel.orderDeliveredTitle"
|
||||
values={{ title: listingLink }}
|
||||
id="OrderDetailsPanel.orderDeliveredTitle"
|
||||
values={{ title: listingLink }}
|
||||
/>
|
||||
),
|
||||
message: (
|
||||
<div className={css.messagesContainer}>
|
||||
<FormattedMessage
|
||||
id="OrderDetailsPanel.orderDeliveredStatus"
|
||||
values={{ providerName }}
|
||||
/>
|
||||
<FormattedDate value={lastTransitionedAt} year="numeric" month="short" day="numeric" />
|
||||
</div>
|
||||
),
|
||||
};
|
||||
break;
|
||||
default:
|
||||
stateMsgData = { title: null, message: null };
|
||||
),
|
||||
message: (
|
||||
<div className={css.messagesContainer}>
|
||||
<FormattedMessage
|
||||
id="OrderDetailsPanel.orderDeliveredStatus"
|
||||
values={{ providerName }}
|
||||
/>
|
||||
<FormattedDate value={lastTransitionedAt} year="numeric" month="short" day="numeric" />
|
||||
</div>
|
||||
),
|
||||
};
|
||||
break;
|
||||
default:
|
||||
stateMsgData = { title: null, message: null };
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -72,7 +72,19 @@ const SaleDetailsPanel = props => {
|
|||
message: (
|
||||
<div className={css.message}>
|
||||
<FormattedMessage id="SaleDetailsPanel.saleAcceptedStatus" />
|
||||
<FormattedDate value={lastTransitionedAt} year="numeric" month="short" day="numeric" />
|
||||
<FormattedMessage
|
||||
id="SaleDetailsPanel.onDate"
|
||||
values={{
|
||||
formattedDate: (
|
||||
<FormattedDate
|
||||
value={lastTransitionedAt}
|
||||
year="numeric"
|
||||
month="short"
|
||||
day="numeric"
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
),
|
||||
};
|
||||
|
|
@ -88,7 +100,19 @@ const SaleDetailsPanel = props => {
|
|||
message: (
|
||||
<div className={css.message}>
|
||||
<FormattedMessage id="SaleDetailsPanel.saleRejectedStatus" />
|
||||
<FormattedDate value={lastTransitionedAt} year="numeric" month="short" day="numeric" />
|
||||
<FormattedMessage
|
||||
id="SaleDetailsPanel.onDate"
|
||||
values={{
|
||||
formattedDate: (
|
||||
<FormattedDate
|
||||
value={lastTransitionedAt}
|
||||
year="numeric"
|
||||
month="short"
|
||||
day="numeric"
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
),
|
||||
};
|
||||
|
|
@ -104,7 +128,19 @@ const SaleDetailsPanel = props => {
|
|||
message: (
|
||||
<div className={css.message}>
|
||||
<FormattedMessage id="SaleDetailsPanel.saleDeliveredStatus" />
|
||||
<FormattedDate value={lastTransitionedAt} year="numeric" month="short" day="numeric" />
|
||||
<FormattedMessage
|
||||
id="SaleDetailsPanel.onDate"
|
||||
values={{
|
||||
formattedDate: (
|
||||
<FormattedDate
|
||||
value={lastTransitionedAt}
|
||||
year="numeric"
|
||||
month="short"
|
||||
day="numeric"
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -97,11 +97,11 @@ export class ListingPageComponent extends Component {
|
|||
|
||||
// TODO location address is currently serialized inside address field (API will change later)
|
||||
// Content is something like { locationAddress: 'Street, Province, Country', building: 'A 42' };
|
||||
let locationAddress = "";
|
||||
let locationAddress = '';
|
||||
try {
|
||||
const deserializedAddress = JSON.parse(address || "{}");
|
||||
const deserializedAddress = JSON.parse(address || '{}');
|
||||
locationAddress = deserializedAddress.locationAddress;
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
locationAddress = address;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -126,14 +126,15 @@
|
|||
"SaleDetailsPanel.listingDeliveredTitle": "{customerName} booked {title}.",
|
||||
"SaleDetailsPanel.listingRejectedTitle": "{customerName} requested to book {title}.",
|
||||
"SaleDetailsPanel.listingRequestedTitle": "{customerName} has requested to book {title}.",
|
||||
"SaleDetailsPanel.saleAcceptedStatus": "You accepted the booking.",
|
||||
"SaleDetailsPanel.saleDeliveredStatus": "You delivered the order.",
|
||||
"SaleDetailsPanel.saleRejectedStatus": "You rejected the booking.",
|
||||
"SaleDetailsPanel.onDate": "on {formattedDate}",
|
||||
"SaleDetailsPanel.saleAcceptedStatus": "You accepted the booking",
|
||||
"SaleDetailsPanel.saleDeliveredStatus": "You delivered the order",
|
||||
"SaleDetailsPanel.saleRejectedStatus": "You rejected the booking",
|
||||
"SaleDetailsPanel.saleRequestedStatus": "{customerName} is waiting for your response.",
|
||||
"SalePage.acceptButton": "Accept",
|
||||
"SalePage.acceptButton": "Accept request",
|
||||
"SalePage.fetchSaleFailed": "Fetching sale data failed.",
|
||||
"SalePage.loadingData": "Loading sale data.",
|
||||
"SalePage.rejectButton": "Reject",
|
||||
"SalePage.rejectButton": "Reject request",
|
||||
"SalePage.title": "Sale details for ${title}.",
|
||||
"SearchForm.placeholder": "Search by location, e.g. New York",
|
||||
"SearchForm.search": "Search",
|
||||
|
|
|
|||
|
|
@ -133,7 +133,12 @@ export const TX_STATE_REJECTED = 'state/rejected';
|
|||
export const TX_STATE_PREAUTHORIZED = 'state/preauthorized';
|
||||
export const TX_STATE_DELIVERED = 'state/delivered';
|
||||
|
||||
export const TX_STATES = [TX_STATE_ACCEPTED, TX_STATE_REJECTED, TX_STATE_PREAUTHORIZED, TX_STATE_DELIVERED];
|
||||
export const TX_STATES = [
|
||||
TX_STATE_ACCEPTED,
|
||||
TX_STATE_REJECTED,
|
||||
TX_STATE_PREAUTHORIZED,
|
||||
TX_STATE_DELIVERED,
|
||||
];
|
||||
|
||||
// Denormalised transaction object
|
||||
export const transaction = shape({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue