업데이트
This commit is contained in:
parent
e02942786f
commit
4d92cc2b61
@ -17,9 +17,9 @@ import { useQuery } from 'react-query';
|
|||||||
const TABLE_HEAD = [
|
const TABLE_HEAD = [
|
||||||
{ id: 'name', label: 'Product', alignRight: false, sort: true },
|
{ id: 'name', label: 'Product', alignRight: false, sort: true },
|
||||||
{ id: 'createdAt', label: 'Date', alignRight: false, sort: true },
|
{ id: 'createdAt', label: 'Date', alignRight: false, sort: true },
|
||||||
{ id: 'inventoryType', label: 'Status', alignRight: false, sort: false },
|
// { id: 'inventoryType', label: 'Status', alignRight: false, sort: false },
|
||||||
{ id: 'rating', label: 'Rating', alignRight: false, sort: true },
|
{ id: 'rating', label: 'Rating', alignRight: false, sort: true },
|
||||||
{ id: 'price', label: 'Price', alignRight: false, sort: true },
|
// { id: 'price', label: 'Price', alignRight: false, sort: true },
|
||||||
{ id: '', label: 'Actions', alignRight: true }
|
{ id: '', label: 'Actions', alignRight: true }
|
||||||
];
|
];
|
||||||
export default function AdminProducts({ brands, categories, shops, isVendor }) {
|
export default function AdminProducts({ brands, categories, shops, isVendor }) {
|
||||||
|
@ -76,7 +76,7 @@ export default function ProductRow({ isLoading, row, handleClickOpen, isVendor }
|
|||||||
<Skeleton variant="text" />
|
<Skeleton variant="text" />
|
||||||
</TableCell> */}
|
</TableCell> */}
|
||||||
<TableCell>{isLoading ? <Skeleton variant="text" /> : <>{fDateShort(row?.createdAt, enUS)}</>}</TableCell>
|
<TableCell>{isLoading ? <Skeleton variant="text" /> : <>{fDateShort(row?.createdAt, enUS)}</>}</TableCell>
|
||||||
<TableCell>
|
{/* <TableCell>
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<Skeleton variant="text" />
|
<Skeleton variant="text" />
|
||||||
) : (
|
) : (
|
||||||
@ -97,7 +97,7 @@ export default function ProductRow({ isLoading, row, handleClickOpen, isVendor }
|
|||||||
(row?.available < 20 && '재고 부족') ||
|
(row?.available < 20 && '재고 부족') ||
|
||||||
(row?.available >= 20 && '재고 있음')
|
(row?.available >= 20 && '재고 있음')
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell> */}
|
||||||
<TableCell align="left">
|
<TableCell align="left">
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<Skeleton variant="text" />
|
<Skeleton variant="text" />
|
||||||
@ -105,7 +105,7 @@ export default function ProductRow({ isLoading, row, handleClickOpen, isVendor }
|
|||||||
<Rating name="text-feedback" size="small" value={row?.averageRating || 0} readOnly precision={0.5} />
|
<Rating name="text-feedback" size="small" value={row?.averageRating || 0} readOnly precision={0.5} />
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>{isLoading ? <Skeleton variant="text" /> : fCurrency(row?.priceSale || row?.price)}</TableCell>
|
{/* <TableCell>{isLoading ? <Skeleton variant="text" /> : fCurrency(row?.priceSale || row?.price)}</TableCell> */}
|
||||||
{/* <TableCell>
|
{/* <TableCell>
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<Skeleton variant="text" />
|
<Skeleton variant="text" />
|
||||||
|
@ -9,7 +9,7 @@ export function fDateShortMonth(date) {
|
|||||||
return format(new Date(date), 'MM/dd/yyyy'); // Change format here (e.g., 'dd MMM yyyy')
|
return format(new Date(date), 'MM/dd/yyyy'); // Change format here (e.g., 'dd MMM yyyy')
|
||||||
}
|
}
|
||||||
export function fDateShort(date) {
|
export function fDateShort(date) {
|
||||||
return format(new Date(date), 'dd MMM yyyy');
|
return format(new Date(date), 'yyyy MMM dd');
|
||||||
}
|
}
|
||||||
export function fDateTime(date) {
|
export function fDateTime(date) {
|
||||||
return format(new Date(date), 'dd MMM yyyy HH:mm');
|
return format(new Date(date), 'dd MMM yyyy HH:mm');
|
||||||
|
Loading…
Reference in New Issue
Block a user