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([
|
$cutting->load([
|
||||||
'media',
|
'media',
|
||||||
'createdBy.profile',
|
'createdBy.profile',
|
||||||
|
'results',
|
||||||
'materials.rawMaterialPrice.rawMaterial:id,name,unit',
|
'materials.rawMaterialPrice.rawMaterial:id,name,unit',
|
||||||
'materials.rawMaterialPrice.media',
|
'materials.rawMaterialPrice.media',
|
||||||
'materials.combination',
|
'materials.combination',
|
||||||
|
|||||||
@ -1,7 +1,4 @@
|
|||||||
<script setup lang="ts">
|
<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 { Button } from '@/components/ui/button';
|
||||||
import {
|
import {
|
||||||
Popover,
|
Popover,
|
||||||
@ -11,6 +8,9 @@ import {
|
|||||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
|
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
|
||||||
import { share } from '@/routes/admin/manage/cuttings';
|
import { share } from '@/routes/admin/manage/cuttings';
|
||||||
import type { CuttingListItem } from '@/types/cutting';
|
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<{
|
const props = defineProps<{
|
||||||
cutting: CuttingListItem;
|
cutting: CuttingListItem;
|
||||||
@ -40,7 +40,7 @@ const whatsappText = computed(() => {
|
|||||||
const productNames = new Set<string>();
|
const productNames = new Set<string>();
|
||||||
|
|
||||||
c.results.forEach((result) => {
|
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);
|
productNames.add(productName);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user