Skip to content

Conversation

@sethidden
Copy link
Contributor

@sethidden sethidden commented May 15, 2022

This is M2-510 and M2-509 in one PR because I didn't want to create conflicts with myself.

</SfTableHeading>
<SfTableRow
v-for="item in currentOrder.items"
:key="item.key"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no longer any formatting in the computed as in the last PR - I'm just using values from the Order directly

>
<SfTableData class="products__name">
{{ item.name }}
{{ item.product_name }}
Copy link
Contributor Author

@sethidden sethidden May 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for M2-510 (add customizable product options)

<SfTableData>{{ $fc(item.product_sale_price.value) }}</SfTableData>
</SfTableRow>

<OrderSummaryRow>
Copy link
Contributor Author

@sethidden sethidden May 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no very large because there's no v-for as before. This is because I needed to add the shipping and billing address components, so the data format is not homogenous anymore

I could probably still do something like

v-if="isADdress"
v-else

but at this point I really prefer the flexibility of keeping it that way in the template.

I wanted to move it to a separate component but this isn't possible since Vue 2 doesn't support multi-root components (natively). This could be made possible with some more digging through the summary and its table (display: table etc.) but I didn't want to do this in this PR.

Copy link
Contributor Author

@sethidden sethidden May 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, but I forgot could also use <component :is="", but then I wouldn't be able to use the label and value slots

@sethidden sethidden marked this pull request as ready for review May 16, 2022 06:53
@sethidden sethidden force-pushed the feature/M2-510-and-M2-509 branch from ea16797 to e654e36 Compare May 16, 2022 08:04
if (order === null) {
return null;
}
const uniqueCountryCodePromises = [...new Set([order.shipping_address.country_code, order.billing_address.country_code])]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no way of downloading only selected country codes, it's either load() all countries, or search() one country at a time

@sethidden sethidden merged commit 921342d into develop May 16, 2022
@sethidden sethidden deleted the feature/M2-510-and-M2-509 branch May 16, 2022 08:37
@Frodigo Frodigo added this to the 1.0.0-rc.8 milestone May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants