fix: update product name reference in RowShareAction component and clean up imports
This commit is contained in:
parent
0070d0c49e
commit
f82b56d540
@ -173,6 +173,7 @@ public function findForShare(Cutting $cutting): Cutting
|
||||
$cutting->load([
|
||||
'media',
|
||||
'createdBy.profile',
|
||||
'results',
|
||||
'materials.rawMaterialPrice.rawMaterial:id,name,unit',
|
||||
'materials.rawMaterialPrice.media',
|
||||
'materials.combination',
|
||||
|
||||
@ -1,7 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import { Briefcase, Copy, MessageCircle, Share2 } from '@lucide/vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
Popover,
|
||||
@ -11,6 +8,9 @@ import {
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
|
||||
import { share } from '@/routes/admin/manage/cuttings';
|
||||
import type { CuttingListItem } from '@/types/cutting';
|
||||
import { Briefcase, Copy, MessageCircle, Share2 } from '@lucide/vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { toast } from 'vue-sonner';
|
||||
|
||||
const props = defineProps<{
|
||||
cutting: CuttingListItem;
|
||||
@ -40,7 +40,7 @@ const whatsappText = computed(() => {
|
||||
const productNames = new Set<string>();
|
||||
|
||||
c.results.forEach((result) => {
|
||||
const productName = result.product_variant?.product?.name ?? 'Produk Tidak Diketahui';
|
||||
const productName = result.product_name ?? 'Produk Tidak Diketahui';
|
||||
productNames.add(productName);
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user