Merge branch 'develop' into MED-97
This commit is contained in:
@@ -4,10 +4,10 @@ import Link from 'next/link';
|
||||
|
||||
import { ColumnDef } from '@tanstack/react-table';
|
||||
|
||||
import { formatDateAndTime } from '@kit/shared/utils';
|
||||
import { Database } from '@kit/supabase/database';
|
||||
import { DataTable } from '@kit/ui/enhanced-data-table';
|
||||
import { ProfileAvatar } from '@kit/ui/profile-avatar';
|
||||
import { formatDateAndTime } from '@kit/shared/utils';
|
||||
|
||||
type Memberships =
|
||||
Database['medreport']['Functions']['get_account_members']['Returns'][number];
|
||||
|
||||
@@ -168,7 +168,12 @@ export async function addToCart({
|
||||
})
|
||||
.catch(medusaError);
|
||||
|
||||
return cart;
|
||||
const newCart = await getOrSetCart(countryCode);
|
||||
const addedItem = newCart.items?.filter(
|
||||
(item) => !cart.items?.some((oldCartItem) => oldCartItem.id === item.id),
|
||||
)?.[0];
|
||||
|
||||
return { newCart, addedItem };
|
||||
}
|
||||
|
||||
export async function updateLineItem({
|
||||
|
||||
@@ -21,7 +21,6 @@ export const listCategories = async (query?: Record<string, any>) => {
|
||||
...query,
|
||||
},
|
||||
next,
|
||||
cache: 'force-cache',
|
||||
},
|
||||
)
|
||||
.then(({ product_categories }) => product_categories);
|
||||
@@ -57,7 +56,6 @@ export const getProductCategories = async ({
|
||||
limit,
|
||||
},
|
||||
next,
|
||||
//cache: "force-cache",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
@@ -61,11 +61,6 @@ export const listOrders = async (
|
||||
};
|
||||
|
||||
export const createTransferRequest = async (
|
||||
state: {
|
||||
success: boolean;
|
||||
error: string | null;
|
||||
order: HttpTypes.StoreOrder | null;
|
||||
},
|
||||
formData: FormData,
|
||||
): Promise<{
|
||||
success: boolean;
|
||||
|
||||
@@ -15,7 +15,7 @@ export const listRegions = async () => {
|
||||
.fetch<{ regions: HttpTypes.StoreRegion[] }>(`/store/regions`, {
|
||||
method: 'GET',
|
||||
next,
|
||||
cache: 'force-cache',
|
||||
// cache: 'force-cache',
|
||||
})
|
||||
.then(({ regions }) => regions)
|
||||
.catch(medusaError);
|
||||
|
||||
Reference in New Issue
Block a user