Skip to content

Commit

Permalink
Merge pull request #29 from sharetribe/update-v4.1.0-from-upstream
Browse files Browse the repository at this point in the history
Update v4.1.0 from upstream
  • Loading branch information
OtterleyW authored Nov 4, 2019
2 parents b40a37b + d989de2 commit e2a447f
Show file tree
Hide file tree
Showing 19 changed files with 588 additions and 460 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ https://github.com/sharetribe/flex-template-web/

## Upcoming version 2019-XX-XX

## [v4.1.0] 2019-11-04

### One change in this template

- [fix] change console.warning to console.warn and remove examples from FieldDateRangeInput
component (the component is not updated to work with time-based availability).

### Changes from upstream

- [change] update react-dates from 20.3.0 to 21.3.1
[#1223](https://github.com/sharetribe/flex-template-web/pull/1223)
- [change] Update helmet from 3.18.0 to 3.21.2
[#1225](https://github.com/sharetribe/flex-template-web/pull/1225)
- [change] Update @sentry/browser and @sentry/node from 5.6.2 to 5.7.1. Due to some refactoring
Sentry has done internally which is included to this update, you might need to remove
`node_modules` and run `yarn install` again.
[#1224](https://github.com/sharetribe/flex-template-web/pull/1224)
- [add] Add default timezone to date formatting in example transaction process email templates.
[#1227](https://github.com/sharetribe/flex-template-web/pull/1227)
- [change] Update @formatjs/intl-relativetimeformat from 2.8.3 to 4.2.1
[#1222](https://github.com/sharetribe/flex-template-web/pull/1222)
- [fix] Use currency of the `lineItem` on every line of the `BookingBreakdown` if possible.
[#1221](https://github.com/sharetribe/flex-template-web/pull/1221)
- [fix] AvailabilityPlan doesn't need to have entries for every day.
[#1214](https://github.com/sharetribe/flex-template-web/pull/1214)
- [change] Default transaction process alias changed.
[#1219](https://github.com/sharetribe/flex-template-web/pull/1219)
- [change] Add default tx process definition. Remove default email templates.
[#1220](https://github.com/sharetribe/flex-template-web/pull/1220)

[v4.1.0]: https://github.com/sharetribe/flex-template-web/compare/v4.0.0...v4.1.0

## [v4.0.0] 2019-10-25

- [add] Add default process and email templates to `ext/transaction-process`.
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ So, if you have started working with the original FTW repository and you want to
you can
[change the 'upstream' remote repository](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork).

> Note: we have created [another template](https://github.com/sharetribe/ftw-time) for time-based
> processes. It is still in **beta** mode, but if you are taking time-based booking process into use,
> you should consider using it instead. You can read more from the related
> [Flex Docs article](https://www.sharetribe.com/docs/background/time-based-template)
## Quick start

> **Note:** this template assumes that you are using
Expand Down Expand Up @@ -75,6 +80,11 @@ See the Flex Docs site: https://www.sharetribe.com/docs/

See also the [docs/](docs/) directory for some additional internal documentation.

## Get help – join Sharetribe Flex Developer Slack channel

If you have any questions about development, the best place to ask them is the Flex Developer Slack
channel at https://www.sharetribe.com/flex-slack

## License

This project is licensed under the terms of the Apache-2.0 license.
Expand Down
6 changes: 3 additions & 3 deletions ext/transaction-process/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ This is the transaction process that the Flex Template for Web is designed to wo
The `process.edn` file describes the process flow while the `templates` folder contains notification
messages that are used by the process.

The process uses day-based booking and night-based pricing i.e. the quantity of booked units is
defined by the number of nights in the booking. The process has preauthorization and it relies on
the provider to accept booking requests.
The process uses unit-based booking and time-based pricing i.e. the quantity of booked units should
be calculated from the number of time units. The process has preauthorization and it relies on the
provider to accept booking requests.

For different process descriptions for varying booking and pricing models, see the
[Flex example processes repository](https://github.com/sharetribe/flex-example-processes)
2 changes: 1 addition & 1 deletion ext/transaction-process/process.edn
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,4 @@
{:name :notification/review-by-customer-second,
:on :transition/review-2-by-customer,
:to :actor.role/provider,
:template :review-by-other-party-published}]}
:template :review-by-other-party-published}]}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

{{~#*inline "format-money"~}}
{{money-amount money}} {{money.currency}}
{{money-amount money}} {{ money.currency }}
{{~/inline~}}

{{~#*inline "format-date"~}}
Expand All @@ -24,36 +23,41 @@
<html>
<head>
<style type="text/css">
table {
border-collapse: collapse;
}
.left {
text-align: left;
}
.right {
text-align: right;
padding-left: 20px;
}
.bottom-row > td {
padding-bottom: 5px;
}
.top-row {
border-top: 1px solid #CCC;
}
.top-row > td,
.top-row > th
{
padding-top: 5px;
}
table {
border-collapse: collapse;
}
.left {
text-align: left;
}
.right {
text-align: right;
padding-left: 20px;
}
.bottom-row > td {
padding-bottom: 5px;
}
.top-row {
border-top: 1px solid #ccc;
}
.top-row > td,
.top-row > th {
padding-top: 5px;
}
</style>
</head>
<body>
<h1>Your booking request was accepted!</h1>

{{#with transaction}}
<p>{{provider.display-name}} has accepted your booking request for {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}}.</p>
<p>
{{ provider.display - name }} has accepted your booking request for {{ listing.title }} from
{{> format-date date=booking.start}} to {{> format-date date=booking.end}}.
</p>

<p>We have charged {{> format-money money=payin-total}} from your credit card. Here's your receipt.</p>
<p>
We have charged {{> format-money money=payin-total}} from your credit card. Here's your
receipt.
</p>

<table>
<thead>
Expand All @@ -62,33 +66,39 @@ <h1>Your booking request was accepted!</h1>
<td class="right">End date</td>
</tr>
<tr>
<th class="left">{{> format-day-time date=booking.start}}</th>
<th class="right">{{> format-day-time date=booking.end}}</th>
<th class="left">{{> format-day-time date=booking.start}}</th>
<th class="right">{{> format-day-time date=booking.end}}</th>
</tr>
<tr class="bottom-row">
<th class="left">{{> format-month-date date=booking.start format="MMM d"}}</th>
<th class="right">{{> format-month-date date=booking.end format="MMM d"}}</th>
</tr>
</thead>
<tbody>
{{#each tx-line-items}}
{{#each tx-line-items}}
{{#contains include-for "customer"}}
{{#eq "line-item/units" code}}
{{#if seats}}
<tr class="top-row">
<td colspan="2">{{> format-money money=unit-price}} &times; {{number units}} {{inflect units "unit" "units"}}</td>
</tr>
<tr class="bottom-row">
<td colspan="2">Seats &times; {{number seats}}</td>
</tr>
{{else}}
<tr class="top-row bottom-row">
<td colspan="2">{{> format-money money=unit-price}} &times; {{number quantity}} {{inflect quantity "unit" "units"}}</td>
</tr>
{{/if}}
{{/eq}}
{{#eq "line-item/units" code}}
{{#if seats}}
<tr class="top-row">
<td colspan="2">
{{> format-money money=unit-price}} &times; {{number units}}
{{inflect units "unit" "units"}}
</td>
</tr>
<tr class="bottom-row">
<td colspan="2">Seats &times; {{number seats}}</td>
</tr>
{{else}}
<tr class="top-row bottom-row">
<td colspan="2">
{{> format-money money=unit-price}} &times; {{number quantity}}
{{inflect quantity "unit" "units"}}
</td>
</tr>
{{/if}}
{{/eq}}
{{/contains}}
{{/each}}
{{/each}}
</tbody>
<tfoot>
<tr class="top-row">
Expand All @@ -102,6 +112,9 @@ <h1>Your booking request was accepted!</h1>

<hr />

<p>You have received this email notification because you are a member of {{marketplace.name}}. If you no longer wish to receive these emails, please contact {{marketplace.name}} team.</p>
<p>
You have received this email notification because you are a member of {{ marketplace.name }}.
If you no longer wish to receive these emails, please contact {{ marketplace.name }} team.
</p>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{{~#*inline "format-date"~}}
{{#with transaction.listing.availability-plan}}
{{date d format="hh:mm a" tz=timezone}} on {{date date format="MMM d, YYYY" tz=timezone}}
Expand All @@ -10,13 +9,21 @@
<h1>Your booking request has expired.</h1>

{{#with transaction}}
<p>Unfortunately {{provider.display-name}} didn't respond to your booking request for {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}} on time, so the request has expired. You have not been billed.</p>
<p>
Unfortunately {{ provider.display - name }} didn't respond to your booking request for
{{ listing.title }} from {{> format-date date=booking.start}} to
{{> format-date date=booking.end}} on time, so the request has expired. You have not been
billed.
</p>
{{/with}}

<p><a href="{{marketplace.url}}">Try to book something else instead</a></p>
<p><a href="{{ marketplace.url }}">Try to book something else instead</a></p>

<hr />

<p>You have received this email notification because you are a member of {{marketplace.name}}. If you no longer wish to receive these emails, please contact {{marketplace.name}} team.</p>
<p>
You have received this email notification because you are a member of {{ marketplace.name }}.
If you no longer wish to receive these emails, please contact {{ marketplace.name }} team.
</p>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{{~#*inline "format-date"~}}
{{#with transaction.listing.availability-plan}}
{{date d format="hh:mm a" tz=timezone}} on {{date date format="MMM d, YYYY" tz=timezone}}
Expand All @@ -10,13 +9,20 @@
<h1>Your booking request was declined.</h1>

{{#with transaction}}
<p>Unfortunately {{provider.display-name}} decided to decline your booking request for {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}}. You have not been billed.</p>
<p>
Unfortunately {{ provider.display - name }} decided to decline your booking request for
{{ listing.title }} from {{> format-date date=booking.start}} to
{{> format-date date=booking.end}}. You have not been billed.
</p>
{{/with}}

<p><a href="{{marketplace.url}}">Try to book something else instead</a></p>
<p><a href="{{ marketplace.url }}">Try to book something else instead</a></p>

<hr />

<p>You have received this email notification because you are a member of {{marketplace.name}}. If you no longer wish to receive these emails, please contact {{marketplace.name}} team.</p>
<p>
You have received this email notification because you are a member of {{ marketplace.name }}.
If you no longer wish to receive these emails, please contact {{ marketplace.name }} team.
</p>
</body>
</html>
Loading

0 comments on commit e2a447f

Please sign in to comment.