From f2bba887f35817936a3b5861834ab3696cca8c2b Mon Sep 17 00:00:00 2001 From: Josmar Soares Trigueiro Junior Date: Tue, 26 Nov 2024 10:10:50 -0300 Subject: [PATCH 1/4] feat: add new splitting quote configuration to settings UI --- react/components/AppSettings.tsx | 76 ++++++++++++++++++++++++++++-- react/typings/vtex.styleguide.d.ts | 1 + 2 files changed, 74 insertions(+), 3 deletions(-) diff --git a/react/components/AppSettings.tsx b/react/components/AppSettings.tsx index 2e09007..c6d94d3 100644 --- a/react/components/AppSettings.tsx +++ b/react/components/AppSettings.tsx @@ -3,6 +3,7 @@ import React, { useState, useEffect } from 'react' import { useQuery, useMutation } from 'react-apollo' import { useIntl } from 'react-intl' import type { NumberInputValue } from '@vtex/admin-ui' +import { RadioGroup } from 'vtex.styleguide' import { Page, PageHeader, @@ -28,6 +29,10 @@ const AppSettings: FC = () => { cartLifeSpan: 30, }) + const [state, setState] = useState({ + value: 'marketplace', + }) + const [settingsLoading, setSettingsLoading] = useState(false) const { data, loading } = useQuery(APP_SETTINGS, { @@ -85,9 +90,20 @@ const AppSettings: FC = () => { {loading && } {data?.getAppSettings?.adminSetup && ( - + +

+ Expiration Period for Quotes and Saved Carts +

+
+ { }} /> - + +

+ Quote Management for Marketplace +

+

+ Configure how quotes are managed in the marketplace. +

+

+ Who is responsible for managing quotes? +

+
+ + + Marketplace + +

+ Only the main marketplace manages quotes. +

+
+ ), + }, + { + value: 'sellers', + label: ( +
+ Sellers +

+ Sellers manage quotes for their own products and can + choose not to account quotes +

+
+ ), + }, + ]} + value={state.value} + onChange={(e: React.ChangeEvent) => + setState({ value: e.currentTarget.value }) + } + /> + +
+