Skip to content

Commit

Permalink
Add new prop dateType to BookingPanel
Browse files Browse the repository at this point in the history
  • Loading branch information
OtterleyW committed Sep 10, 2019
1 parent efa0e95 commit 71cc748
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 56 deletions.
16 changes: 16 additions & 0 deletions src/components/BookingBreakdown/BookingBreakdown.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const Checkout = {
props: {
userRole: 'customer',
unitType: LINE_ITEM_NIGHT,
dateType: 'datetime',
transaction: exampleTransaction({
payinTotal: new Money(9000, CURRENCY),
payoutTotal: new Money(9000, CURRENCY),
Expand All @@ -86,6 +87,7 @@ export const CustomerOrder = {
props: {
userRole: 'customer',
unitType: LINE_ITEM_NIGHT,
dateType: 'datetime',
transaction: exampleTransaction({
payinTotal: new Money(9000, CURRENCY),
payoutTotal: new Money(9000, CURRENCY),
Expand All @@ -112,6 +114,7 @@ export const ProviderSale = {
props: {
userRole: 'provider',
unitType: LINE_ITEM_NIGHT,
dateType: 'datetime',
transaction: exampleTransaction({
payinTotal: new Money(9000, CURRENCY),
payoutTotal: new Money(7000, CURRENCY),
Expand Down Expand Up @@ -145,6 +148,7 @@ export const ProviderSaleZeroCommission = {
props: {
userRole: 'provider',
unitType: LINE_ITEM_NIGHT,
dateType: 'datetime',
transaction: exampleTransaction({
payinTotal: new Money(9000, CURRENCY),
payoutTotal: new Money(9000, CURRENCY),
Expand Down Expand Up @@ -178,6 +182,7 @@ export const ProviderSaleSingleNight = {
props: {
userRole: 'provider',
unitType: LINE_ITEM_NIGHT,
dateType: 'date',
transaction: exampleTransaction({
payinTotal: new Money(4500, CURRENCY),
payoutTotal: new Money(2500, CURRENCY),
Expand Down Expand Up @@ -211,6 +216,7 @@ export const ProviderSalePreauthorized = {
props: {
userRole: 'provider',
unitType: LINE_ITEM_NIGHT,
dateType: 'datetime',
transaction: exampleTransaction({
lastTransition: TRANSITION_CONFIRM_PAYMENT,
payinTotal: new Money(4500, CURRENCY),
Expand Down Expand Up @@ -245,6 +251,7 @@ export const ProviderSaleAccepted = {
props: {
userRole: 'provider',
unitType: LINE_ITEM_NIGHT,
dateType: 'datetime',
transaction: exampleTransaction({
lastTransition: TRANSITION_ACCEPT,
payinTotal: new Money(4500, CURRENCY),
Expand Down Expand Up @@ -279,6 +286,7 @@ export const ProviderSaleDeclined = {
props: {
userRole: 'provider',
unitType: LINE_ITEM_NIGHT,
dateType: 'datetime',
transaction: exampleTransaction({
lastTransition: TRANSITION_DECLINE,
payinTotal: new Money(4500, CURRENCY),
Expand Down Expand Up @@ -313,6 +321,7 @@ export const ProviderSaleAutoDeclined = {
props: {
userRole: 'provider',
unitType: LINE_ITEM_NIGHT,
dateType: 'datetime',
transaction: exampleTransaction({
lastTransition: TRANSITION_EXPIRE,
payinTotal: new Money(4500, CURRENCY),
Expand Down Expand Up @@ -347,6 +356,7 @@ export const ProviderSaleDelivered = {
props: {
userRole: 'provider',
unitType: LINE_ITEM_NIGHT,
dateType: 'datetime',
transaction: exampleTransaction({
lastTransition: TRANSITION_COMPLETE,
payinTotal: new Money(4500, CURRENCY),
Expand Down Expand Up @@ -381,6 +391,7 @@ export const ProviderSaleCanceled = {
props: {
userRole: 'provider',
unitType: LINE_ITEM_NIGHT,
dateType: 'datetime',
transaction: exampleTransaction({
lastTransition: TRANSITION_CANCEL,
payinTotal: new Money(0, CURRENCY),
Expand Down Expand Up @@ -432,6 +443,7 @@ export const SingleDay = {
props: {
userRole: 'customer',
unitType: LINE_ITEM_DAY,
dateType: 'date',
transaction: exampleTransaction({
payinTotal: new Money(4500, CURRENCY),
payoutTotal: new Money(4500, CURRENCY),
Expand All @@ -458,6 +470,7 @@ export const MultipleDays = {
props: {
userRole: 'customer',
unitType: LINE_ITEM_DAY,
dateType: 'date',
transaction: exampleTransaction({
payinTotal: new Money(9000, CURRENCY),
payoutTotal: new Money(9000, CURRENCY),
Expand All @@ -484,6 +497,7 @@ export const UnitsType = {
props: {
userRole: 'customer',
unitType: LINE_ITEM_UNITS,
dateType: 'datetime',
transaction: exampleTransaction({
payinTotal: new Money(9000, CURRENCY),
payoutTotal: new Money(9000, CURRENCY),
Expand All @@ -510,6 +524,7 @@ export const CustomPricing = {
props: {
userRole: 'customer',
unitType: LINE_ITEM_NIGHT,
dateType: 'datetime',
transaction: exampleTransaction({
payinTotal: new Money(12800, CURRENCY),
payoutTotal: new Money(12600, CURRENCY),
Expand Down Expand Up @@ -560,6 +575,7 @@ export const CustomPricingWithRefund = {
props: {
userRole: 'customer',
unitType: LINE_ITEM_NIGHT,
dateType: 'datetime',
transaction: exampleTransaction({
payinTotal: new Money(0, CURRENCY),
payoutTotal: new Money(0, CURRENCY),
Expand Down
4 changes: 4 additions & 0 deletions src/components/BookingBreakdown/BookingBreakdown.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe('BookingBreakdown', () => {
<BookingBreakdownComponent
userRole="customer"
unitType={LINE_ITEM_NIGHT}
dateType="date"
transaction={exampleTransaction({
payinTotal: new Money(2000, 'USD'),
payoutTotal: new Money(2000, 'USD'),
Expand Down Expand Up @@ -71,6 +72,7 @@ describe('BookingBreakdown', () => {
<BookingBreakdownComponent
userRole="customer"
unitType={LINE_ITEM_NIGHT}
dateType="date"
transaction={exampleTransaction({
payinTotal: new Money(2000, 'USD'),
payoutTotal: new Money(2000, 'USD'),
Expand Down Expand Up @@ -100,6 +102,7 @@ describe('BookingBreakdown', () => {
<BookingBreakdownComponent
userRole="provider"
unitType={LINE_ITEM_NIGHT}
dateType="date"
transaction={exampleTransaction({
payinTotal: new Money(2000, 'USD'),
payoutTotal: new Money(1800, 'USD'),
Expand Down Expand Up @@ -135,6 +138,7 @@ describe('BookingBreakdown', () => {
<BookingBreakdownComponent
userRole="provider"
unitType={LINE_ITEM_NIGHT}
dateType="date"
transaction={exampleTransaction({
lastTransition: TRANSITION_CANCEL,
payinTotal: new Money(0, 'USD'),
Expand Down
Loading

0 comments on commit 71cc748

Please sign in to comment.