From fbbb1ee84f1ea80da7d8414d4edb3a8789fb6cf3 Mon Sep 17 00:00:00 2001 From: William Chong Date: Mon, 5 Aug 2024 03:25:39 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20=20Disable=20delivery=20mode=20e?= =?UTF-8?q?diting=20for=20physical=20only=20edition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/nft-book-store/new.vue | 3 ++- pages/nft-book-store/status/[classId]/edit/[editionIndex].vue | 4 ++-- pages/nft-book-store/status/[classId]/edit/new.vue | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pages/nft-book-store/new.vue b/pages/nft-book-store/new.vue index 6f095bb12..adc1691c5 100644 --- a/pages/nft-book-store/new.vue +++ b/pages/nft-book-store/new.vue @@ -92,6 +92,7 @@ @@ -753,7 +754,7 @@ function mapPrices (prices: any) { priceInDecimal: Math.round(Number(p.price) * 100), price: Number(p.price), stock: Number(p.stock), - isAutoDeliver: p.deliveryMethod === 'auto', + isAutoDeliver: !p.isPhysicalOnly && p.deliveryMethod === 'auto', isAllowCustomPrice: p.isAllowCustomPrice || false, autoMemo: p.deliveryMethod === 'auto' ? p.autoMemo || '' : '', hasShipping: p.hasShipping || false, diff --git a/pages/nft-book-store/status/[classId]/edit/[editionIndex].vue b/pages/nft-book-store/status/[classId]/edit/[editionIndex].vue index d5349134b..72095407f 100644 --- a/pages/nft-book-store/status/[classId]/edit/[editionIndex].vue +++ b/pages/nft-book-store/status/[classId]/edit/[editionIndex].vue @@ -71,7 +71,7 @@ @@ -439,7 +439,7 @@ async function handleSubmit () { priceInDecimal: Math.round(Number(price.value) * 100), price: Number(price.value), stock: Number(stock.value), - isAutoDeliver: isAutoDeliver.value, + isAutoDeliver: !isPhysicalOnly.value && isAutoDeliver.value, autoMemo: autoMemo.value || '', hasShipping: hasShipping.value || false, isPhysicalOnly: isPhysicalOnly.value || false, diff --git a/pages/nft-book-store/status/[classId]/edit/new.vue b/pages/nft-book-store/status/[classId]/edit/new.vue index 2d8c0bb0d..0f207fbda 100644 --- a/pages/nft-book-store/status/[classId]/edit/new.vue +++ b/pages/nft-book-store/status/[classId]/edit/new.vue @@ -71,6 +71,7 @@ @@ -405,7 +406,7 @@ async function handleSubmit () { priceInDecimal: Math.round(Number(price.value) * 100), price: Number(price.value), stock: Number(stock.value), - isAutoDeliver: deliveryMethod.value === 'auto', + isAutoDeliver: !isPhysicalOnly.value && deliveryMethod.value === 'auto', autoMemo: deliveryMethod.value === 'auto' ? (autoMemo.value || '') : '', hasShipping: hasShipping.value || false, isPhysicalOnly: isPhysicalOnly.value || false,