Skip to content

Commit

Permalink
feat: #56 (lint) lint files
Browse files Browse the repository at this point in the history
  • Loading branch information
Baroshem committed Aug 24, 2021
1 parent 09fc67e commit b91d2ef
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/api-client/src/api/updateAddressDetails/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const updateAddressDetails = async (context: Context, params: UpdateAddressDetai
}) as UpdateAddressDetailsResponse;

if (isBilling && isCustomerDataFilled(request?.data?.setOrderBillingAddress as Order)) {
await transitionOrderToState(context, { state: ARRANGING_PAYMENT_STATE })
await transitionOrderToState(context, { state: ARRANGING_PAYMENT_STATE });
}

return request;
Expand Down
8 changes: 4 additions & 4 deletions packages/api-client/src/helpers/checkout.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Order } from "../types";
import { Order } from '../types';

export const isCustomerDataFilled = (order: Order): boolean => {
if (!order) return;
return Boolean(order?.customer?.emailAddress && order?.billingAddress?.streetLine1 && order?.shippingAddress?.streetLine1);
}
if (!order) return;
return Boolean(order?.customer?.emailAddress && order?.billingAddress?.streetLine1 && order?.shippingAddress?.streetLine1);
};
2 changes: 1 addition & 1 deletion packages/api-client/src/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './constants';
export * from './checkout';
export * from './checkout';
4 changes: 2 additions & 2 deletions packages/theme/pages/Checkout/Payment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ export default {
const updatePaymentMethod = method => {
paymentMethod.value = method;
}
};
const processOrder = async () => {
const response = await $vendure.api.setPaymentMethod({
method: paymentMethod?.value?.code,
metadata: {
// Here goes metadata from the payment provider. For security reasons it should be handled on the server!
}
})
});
const orderId = response?.data?.addPaymentToOrder?.id;
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/pages/Checkout/Shipping.vue
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export default {
ValidationObserver,
VsfShippingProvider: () => import('~/components/Checkout/VsfShippingProvider')
},
setup (_, { emit }) {
setup () {
const isFormSubmitted = ref(false);
const { load, save, loading } = useShipping();
const { loading: loadingShippingProvider } = useShippingProvider();
Expand Down

0 comments on commit b91d2ef

Please sign in to comment.