update
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
VITE_TOKEN_NAME = 'dmnu_a_t'
|
VITE_TOKEN_NAME = 'dmnu_a_t'
|
||||||
VITE_REFRESH_TOKEN_NAME = 'dmnu-a-rt'
|
VITE_REFRESH_TOKEN_NAME = 'dmnu-a-rt'
|
||||||
|
|
||||||
# VITE_BASE_URL = 'https://dmenuplus-api-production.dev.danakcorp.com'
|
# VITE_BASE_URL = 'https://dkala-api.danakcorp.com'
|
||||||
VITE_BASE_URL = 'http://192.168.99.209:4000'
|
VITE_BASE_URL = 'http://10.191.241.88:4000'
|
||||||
|
|
||||||
VITE_SOCKET_URL = 'https://dmenuplus-api-production.dev.danakcorp.com'
|
VITE_SOCKET_URL = 'https://dkala-api.danakcorp.com'
|
||||||
@@ -99,11 +99,11 @@ const UploadBoxDraggble: FC<Props> = (props: Props) => {
|
|||||||
)}>
|
)}>
|
||||||
{
|
{
|
||||||
perviews && perviews.map((item, index) => {
|
perviews && perviews.map((item, index) => {
|
||||||
const imageSizeClass = props.imageSize === 'large'
|
const imageSizeClass = props.imageSize === 'large'
|
||||||
? 'w-full h-32 rounded-lg'
|
? 'w-full h-32 rounded-lg'
|
||||||
: props.imageSize === 'medium'
|
: props.imageSize === 'medium'
|
||||||
? 'size-20 rounded-lg'
|
? 'size-20 rounded-lg'
|
||||||
: 'size-10 rounded-full'
|
: 'size-10 rounded-full'
|
||||||
return (
|
return (
|
||||||
<div key={index} className='flex items-center gap-2'>
|
<div key={index} className='flex items-center gap-2'>
|
||||||
<div key={index} className='flex relative items-center gap-2'>
|
<div key={index} className='flex relative items-center gap-2'>
|
||||||
@@ -141,11 +141,11 @@ const UploadBoxDraggble: FC<Props> = (props: Props) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const imageSizeClass = props.imageSize === 'large'
|
const imageSizeClass = props.imageSize === 'large'
|
||||||
? 'w-full h-32 rounded-lg'
|
? 'w-full h-32 rounded-lg'
|
||||||
: props.imageSize === 'medium'
|
: props.imageSize === 'medium'
|
||||||
? 'size-20 rounded-lg'
|
? 'size-20 rounded-lg'
|
||||||
: 'size-10 rounded-full'
|
: 'size-10 rounded-full'
|
||||||
return (
|
return (
|
||||||
<div key={index} className='flex items-center gap-2'>
|
<div key={index} className='flex items-center gap-2'>
|
||||||
<div key={index} className='flex relative items-center gap-2'>
|
<div key={index} className='flex relative items-center gap-2'>
|
||||||
|
|||||||
@@ -72,7 +72,11 @@ const UpdateProduct: FC = () => {
|
|||||||
const allImages = [...values.images, ...newImageUrls]
|
const allImages = [...values.images, ...newImageUrls]
|
||||||
const variants =
|
const variants =
|
||||||
values.variants.length > 0
|
values.variants.length > 0
|
||||||
? values.variants
|
? values.variants.map((v) => ({
|
||||||
|
...(v.id && { id: v.id }),
|
||||||
|
value: v.value ?? '',
|
||||||
|
price: v.price ?? 0
|
||||||
|
}))
|
||||||
: [{ value: '', price: values.price }]
|
: [{ value: '', price: values.price }]
|
||||||
const productData: CreateProductType = {
|
const productData: CreateProductType = {
|
||||||
...values,
|
...values,
|
||||||
|
|||||||
Reference in New Issue
Block a user