Align CMS title fallbacks and mutation error handling.
Add blog post untitled helper, use product title helper in order views, and surface API validation messages on product save/delete.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
{{ row.productTitle }}
|
||||
{{ getProductTitle(row.productTitle) }}
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -113,6 +113,7 @@ import type { OrderExtended } from '@/types/order/OrderExtended';
|
||||
import { DeliveryMode } from '@/types/product/DeliveryMode';
|
||||
import { formatDeliveryMode } from '@/utils/product/formatDeliveryMode';
|
||||
import { formatFiatPrice } from '@/utils/formatFiatPrice';
|
||||
import { getProductTitle } from '@/utils/product/getProductTitle';
|
||||
import { resolveAxiosErrorMessage } from '@/utils/resolveAxiosErrorMessage';
|
||||
|
||||
const props = defineProps({
|
||||
@@ -143,7 +144,7 @@ const openAutoDelivery = (line: OrderLine): void => {
|
||||
const markAsFulfilled = async (line: OrderLine): Promise<void> => {
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`Mark "${line.productTitle}" (${line.variantTitle}) as fulfilled? This cannot be undone.`,
|
||||
`Mark "${getProductTitle(line.productTitle)}" (${line.variantTitle}) as fulfilled? This cannot be undone.`,
|
||||
'Mark as fulfilled',
|
||||
{
|
||||
type: 'warning',
|
||||
|
||||
Reference in New Issue
Block a user