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:
2026-09-16 16:20:52 +02:00
parent 09ad236cb9
commit 0cd7158f7d
5 changed files with 18 additions and 7 deletions
+3 -2
View File
@@ -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',