Skip to content

Commit

Permalink
🐛 Add isPhysicalOnly parsing for books
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Feb 8, 2024
1 parent defe0d4 commit b4c0560
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pages/nft-book-store/new.vue
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,8 @@ function mapPrices (prices:any) {
stock: Number(p.stock),
isAutoDeliver: p.deliveryMethod === 'auto',
autoMemo: p.deliveryMethod === 'auto' ? (p.autoMemo || '') : '',
hasShipping: p.hasShipping || false
hasShipping: p.hasShipping || false,
isPhysicalOnly: p.isPhysicalOnly || false
}))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ const nameZh = ref('標準版')
const descriptionEn = ref('')
const descriptionZh = ref('')
const hasShipping = ref(false)
const isPhysicalOnly = ref(false)
const shippingRates = ref<any[]>([{
price: 10.0,
nameEn: 'Standard Shipping',
Expand Down Expand Up @@ -321,6 +322,7 @@ onMounted(async () => {
descriptionEn.value = currentEdition.description?.en || legacyDescription || ' '
descriptionZh.value = currentEdition.description?.zh || legacyDescription || ' '
hasShipping.value = currentEdition.hasShipping || false
isPhysicalOnly.value = currentEdition.isPhysicalOnly || false
oldStock.value = currentEdition.stock
oldIsAutoDeliver.value = currentEdition.isAutoDeliver
Expand Down Expand Up @@ -395,7 +397,8 @@ async function handleSubmit () {
stock: Number(stock.value),
isAutoDeliver: isAutoDeliver.value,
autoMemo: autoMemo.value || '',
hasShipping: hasShipping.value || false
hasShipping: hasShipping.value || false,
isPhysicalOnly: isPhysicalOnly.value || false
}
if (!editedPrice || editedPrice.price === undefined) {
Expand Down
3 changes: 2 additions & 1 deletion pages/nft-book-store/status/[classId]/edit/new.vue
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ async function handleSubmit () {
stock: Number(stock.value),
isAutoDeliver: deliveryMethod.value === 'auto',
autoMemo: deliveryMethod.value === 'auto' ? (autoMemo.value || '') : '',
hasShipping: hasShipping.value || false
hasShipping: hasShipping.value || false,
isPhysicalOnly: false
}
if (!editedPrice || editedPrice.price === undefined) {
Expand Down

0 comments on commit b4c0560

Please sign in to comment.