fix(admin-ui): Customer Groups in Pricing + TIP (#4670)
* Use NextSelect * Ensure boolean value of includes taxa * Create thin-kings-grab.md
This commit is contained in:
6
.changeset/thin-kings-grab.md
Normal file
6
.changeset/thin-kings-grab.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@medusajs/admin-ui": patch
|
||||
"@medusajs/admin": patch
|
||||
---
|
||||
|
||||
fix(admin-ui): Customer Groups in Pricing + TIP
|
||||
@@ -41,7 +41,7 @@ const FormHeader = (props: PriceListFormProps & { onClose?: () => void }) => {
|
||||
const onPublish = (values: CreatePriceListFormValues) => {
|
||||
const data = mapFormValuesToCreatePriceList(values, PriceListStatus.ACTIVE)
|
||||
if (isFeatureEnabled("tax_inclusive_pricing")) {
|
||||
data.includes_tax = values.includes_tax
|
||||
data.includes_tax = !!values.includes_tax
|
||||
}
|
||||
createPriceList.mutate(data, {
|
||||
onSuccess: ({ price_list }) => {
|
||||
|
||||
@@ -6,11 +6,11 @@ import { Controller } from "react-hook-form"
|
||||
import DatePicker from "../../../../components/atoms/date-picker/date-picker"
|
||||
import TimePicker from "../../../../components/atoms/date-picker/time-picker"
|
||||
import Switch from "../../../../components/atoms/switch"
|
||||
import Select from "../../../../components/molecules/select"
|
||||
import Accordion from "../../../../components/organisms/accordion"
|
||||
import { weekFromNow } from "../../../../utils/date-utils"
|
||||
import { usePriceListForm } from "../form/pricing-form-context"
|
||||
import { ConfigurationFields } from "../types"
|
||||
import { NextSelect } from "../../../../components/molecules/select/next-select"
|
||||
|
||||
type ConfigurationProps = {
|
||||
priceList?: PriceList
|
||||
@@ -165,22 +165,21 @@ const Configuration: React.FC<ConfigurationProps> = () => {
|
||||
}
|
||||
)}
|
||||
>
|
||||
<Select
|
||||
value={value}
|
||||
label="Customer Groups"
|
||||
onChange={onChange}
|
||||
isMultiSelect
|
||||
fullWidth
|
||||
enableSearch
|
||||
hasSelectAll
|
||||
isLoading={isLoading}
|
||||
<NextSelect
|
||||
options={
|
||||
customer_groups?.map((cg) => ({
|
||||
label: cg.name,
|
||||
value: cg.id,
|
||||
})) || []
|
||||
}
|
||||
label="Customer Groups"
|
||||
onChange={onChange}
|
||||
isMulti={true}
|
||||
selectAll={true}
|
||||
isSearchable={true}
|
||||
value={value}
|
||||
ref={ref}
|
||||
isLoading={isLoading}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user