Skip to content

Commit

Permalink
Include new field in channel creation
Browse files Browse the repository at this point in the history
  • Loading branch information
lkostrowski committed Oct 4, 2024
1 parent b7e349d commit 788b6b7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Link from "@dashboard/components/Link";
import { FormChange } from "@dashboard/hooks/useForm";
import { DOCS_ULRS } from "@dashboard/links";
import { Box, Checkbox, Text } from "@saleor/macaw-ui-next";
import React from "react";
import { FormattedMessage } from "react-intl";
Expand Down Expand Up @@ -42,7 +43,7 @@ export const AutomaticallyCompleteCheckouts = ({
values={{
link: (
<Link
href="https://docs.saleor.io/developer/payments/transactions#automatic-checkout-completion"
href={DOCS_ULRS.TRANSACTIONS_AUTOMATIC_CHECKOUT_COMPLETION}
target="_blank"
rel="noopener noreferer"
>
Expand Down
4 changes: 4 additions & 0 deletions src/channels/views/ChannelCreate/ChannelCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const ChannelCreateView = () => {
slug,
warehousesIdsToAdd,
warehousesToDisplay,
automaticallyCompleteCheckouts,
}: FormData) => {
const input: ChannelCreateInput = {
name,
Expand All @@ -93,6 +94,9 @@ export const ChannelCreateView = () => {
deleteExpiredOrdersAfter,
allowUnpaidOrders,
},
checkoutSettings: {
automaticallyCompleteFullyPaidCheckouts: automaticallyCompleteCheckouts,
},
};

return saveChannel(input, warehousesToDisplay);
Expand Down
5 changes: 5 additions & 0 deletions src/links.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
export const TECHNICAL_HELP_CTA_URL =
"https://www.getclockwise.com/c/rian-dillon-saleor-io/short-call-with-saleor";

export const DOCS_ULRS = {
TRANSACTIONS_AUTOMATIC_CHECKOUT_COMPLETION:
"https://docs.saleor.io/developer/payments/transactions#automatic-checkout-completion",
};

0 comments on commit 788b6b7

Please sign in to comment.