add point account list
This commit is contained in:
@@ -378,7 +378,7 @@ async function loadPointAccount(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
pointAccount.value = await PointAPI.accountDetail(customer.value.id, customer.value.storeId);
|
||||
pointAccount.value = await PointAPI.detailByCustomerId(customer.value.id, customer.value.storeId);
|
||||
} catch {
|
||||
pointAccount.value = undefined;
|
||||
}
|
||||
@@ -388,10 +388,14 @@ async function toPointAccount(): Promise<void> {
|
||||
if (!customer.value?.id) {
|
||||
return;
|
||||
}
|
||||
if (!pointAccount.value?.id) {
|
||||
await router.push({ name: "PointAccountList" });
|
||||
return;
|
||||
}
|
||||
await router.push({
|
||||
name: "PointAccount",
|
||||
name: "PointAccountDetail",
|
||||
params: { id: pointAccount.value.id },
|
||||
query: {
|
||||
customerId: customer.value.id,
|
||||
storeId: customer.value.storeId || "",
|
||||
transitionDepth: String(Number(route.meta.depth ?? 0) + 1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user