Merge pull request #398 from useautumn/feature/customer2-restyle
feature: customer2 restyle
This commit is contained in:
@@ -173,7 +173,7 @@ export const previewToCheckoutRes = async ({
|
||||
.filter(notNullish);
|
||||
|
||||
return CheckoutResponseV0Schema.parse({
|
||||
customer_id: attachParams.customer.id,
|
||||
customer_id: attachParams.customer.id || attachParams.customer.internal_id,
|
||||
lines,
|
||||
product: newProduct,
|
||||
current_product: curProduct,
|
||||
|
||||
@@ -24,7 +24,9 @@ export function AttachProductSheet() {
|
||||
/>
|
||||
|
||||
<div className="flex-1 overflow-y-auto">
|
||||
<AttachProductForm customerId={customer?.id ?? ""} />
|
||||
<AttachProductForm
|
||||
customerId={customer?.id ?? customer?.internal_id ?? ""}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -30,7 +30,7 @@ const FormContent = ({
|
||||
form: UseAttachProductForm;
|
||||
}) => {
|
||||
const { customer } = useCusQuery();
|
||||
const customerId = customer?.id;
|
||||
const customerId = customer?.id ?? customer?.internal_id;
|
||||
const storeProduct = useProductStore((s) => s.product);
|
||||
const product = storeProduct?.id ? storeProduct : (productV2 ?? undefined);
|
||||
const entityId = cusProduct?.entity_id ?? undefined;
|
||||
|
||||
@@ -59,7 +59,7 @@ export const CustomerPlanEditorBar = () => {
|
||||
|
||||
//navigate back to the customer plan page
|
||||
pushPage({
|
||||
path: `/customers/${customer?.id}/`,
|
||||
path: `/customers/${customer?.id ?? customer?.internal_id}/`,
|
||||
navigate,
|
||||
preserveParams: false,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user