randmarcomps 1.364.0 → 1.366.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15951,7 +15951,7 @@ const emptySplitApi = createApi({
15951
15951
  })
15952
15952
  }),
15953
15953
  overrideExisting: !1
15954
- }), { useGetV4PartnerByApplicationIdAccountQuery, useLazyGetV4PartnerByApplicationIdAccountQuery, useGetV4PartnerByApplicationIdAccountLogoQuery, useGetV4PartnerByApplicationIdAccountLogoExistsQuery, useGetV4PartnerByApplicationIdAccountManufacturerQuery, useGetV4PartnerByApplicationIdAccountResellerQuery, usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation, usePostV4PartnerByApplicationIdAccountManufacturerAndFieldNameMutation, usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsQuery, useLazyGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsHasUnreadsQuery, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdReadMutation, useLazyGetV4ResellerByRouteResellerIdDocumentAndDocumentNumberPdfQuery, usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation, useGetV4ManufacturerByRouteManufacturerIdDocumentsActiveOrderDetailsQuery, useGetV4ManufacturerByRouteManufacturerIdInventoryValueQuery, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdShopifyMutation, useGetV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeQuery, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeShopifyMutation, useGetV4PartnerByRouteApplicationIdManufacturersQuery, usePostV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberEmailMutation, usePutV4ResellerByRouteResellerIdOpportunityAndManufacturerIdDefaultMutation, useGetV4PartnerByRouteApplicationIdPartnerAndPartnerIdQuery, usePostV4ResellerByRouteResellerIdProductAndRandmarSkuShopifyMutation, usePutV4ResellerByRouteResellerIdProductAndRandmarSkuRequisitionMutation, useGetV4PartnerByRouteApplicationIdProductAndRandmarSkuQuery, useLazyGetV4PartnerByRouteApplicationIdProductsQuery, useGetProductByRandmarSkuImageQuery, useGetProductByProductNumberImageExistsQuery, useGetProductByProductNumberVideoQuery, useGetProductByProductNumberVideoExistsQuery, usePostV4ManufacturerByRouteManufacturerIdPurchaseOrderAndPurchaseOrderNumberEditItemRandmarSkuMutation, usePostV4ResellerByRouteResellerIdReportProductsEmailMutation, usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation, usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation, usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation, usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportReorderEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportSalesEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportInventoryEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportOpenOrdersEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportProductsEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportPurchasedOrdersEmailMutation } = injectedRtkApi;
15954
+ }), { useGetV4PartnerByApplicationIdAccountQuery, useLazyGetV4PartnerByApplicationIdAccountQuery, useGetV4PartnerByApplicationIdAccountLogoQuery, useGetV4PartnerByApplicationIdAccountLogoExistsQuery, useGetV4PartnerByApplicationIdAccountManufacturerQuery, useGetV4PartnerByApplicationIdAccountResellerQuery, usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation, usePostV4PartnerByApplicationIdAccountManufacturerAndFieldNameMutation, usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsQuery, useLazyGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsHasUnreadsQuery, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdReadMutation, useLazyGetV4ResellerByRouteResellerIdDocumentAndDocumentNumberPdfQuery, usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation, useGetV4ManufacturerByRouteManufacturerIdDocumentsActiveOrderDetailsQuery, useGetV4ManufacturerByRouteManufacturerIdInventoryValueQuery, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdShopifyMutation, useGetV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeQuery, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeShopifyMutation, useGetV4PartnerByRouteApplicationIdManufacturersQuery, usePostV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberEmailMutation, usePutV4ResellerByRouteResellerIdOpportunityAndManufacturerIdDefaultMutation, useGetV4PartnerByRouteApplicationIdPartnerAndPartnerIdQuery, usePostV4ResellerByRouteResellerIdProductAndRandmarSkuShopifyMutation, usePutV4ResellerByRouteResellerIdProductAndRandmarSkuRequisitionMutation, useGetV4PartnerByRouteApplicationIdProductAndRandmarSkuQuery, useLazyGetV4PartnerByRouteApplicationIdProductsQuery, useGetProductByRandmarSkuImageQuery, useGetProductByProductNumberImageExistsQuery, useGetProductByProductNumberVideoQuery, useGetProductByProductNumberVideoExistsQuery, usePostV4ManufacturerByRouteManufacturerIdPurchaseOrderAndPurchaseOrderNumberEditItemRandmarSkuMutation, usePostV4ResellerByRouteResellerIdReportProductsEmailMutation, usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation, usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation, usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation, usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportReorderEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportSalesEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportInventoryEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportOpenOrdersEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportProductsEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportPurchasedOrdersEmailMutation, useDeleteV4ManufacturerByRouteManufacturerIdRequisitionAndRequisitionNumberMutation } = injectedRtkApi;
15955
15955
  injectedRtkApi.enhanceEndpoints({
15956
15956
  addTagTypes: ["Cart", "Conversation", "Account", "Reseller", "Unread", "Warehouse", "WarehouseList", "Users", "Integration", "Shopify", "Logs", "Manufacturer"],
15957
15957
  endpoints: {
@@ -91315,8 +91315,7 @@ function PurchaseOrdersTable({
91315
91315
  }
91316
91316
  ) }),
91317
91317
  /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsxs("p", { children: [
91318
- "View details for purchase order",
91319
- " ",
91318
+ "View details for Purchase Order ",
91320
91319
  S.original.PurchaseOrderNumber
91321
91320
  ] }) })
91322
91321
  ] }) }) : "—",
@@ -91350,7 +91349,7 @@ function PurchaseOrdersTable({
91350
91349
  }
91351
91350
  ) }),
91352
91351
  /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsxs("p", { children: [
91353
- "View details for product ",
91352
+ "View details for Product ",
91354
91353
  S.original.RandmarSKU
91355
91354
  ] }) })
91356
91355
  ] }) }) : "—",
@@ -91384,12 +91383,12 @@ function PurchaseOrdersTable({
91384
91383
  }).then(() => {
91385
91384
  l(
91386
91385
  (M) => M.filter(
91387
- (I) => !(I.PurchaseOrderNumber === R.PurchaseOrderNumber && I.MPN === R.MPN)
91386
+ (I) => !(I.PurchaseOrderNumber === I.PurchaseOrderNumber && I.MPN === I.MPN)
91388
91387
  )
91389
91388
  ), f({
91390
91389
  variant: "success",
91391
91390
  title: "Success",
91392
- description: `Part ${R.MPN} has been successfully deleted from purchase order ${R.PurchaseOrderNumber}.`
91391
+ description: `Part ${R.MPN} has been successfully deleted from Purchase Order ${R.PurchaseOrderNumber}.`
91393
91392
  });
91394
91393
  }).catch((M) => {
91395
91394
  console.error(M), E(!0), f({
@@ -91421,7 +91420,7 @@ function PurchaseOrdersTable({
91421
91420
  /* @__PURE__ */ jsxs(AlertDialogDescription, { children: [
91422
91421
  "Are you sure you want to delete part ",
91423
91422
  /* @__PURE__ */ jsx("strong", { children: R.MPN }),
91424
- " from purchase order ",
91423
+ " from Purchase Order ",
91425
91424
  /* @__PURE__ */ jsx("strong", { children: R.PurchaseOrderNumber }),
91426
91425
  "?."
91427
91426
  ] })
@@ -91443,6 +91442,10 @@ function PurchaseOrdersTable({
91443
91442
  const S = {};
91444
91443
  return o && (S.PurchaseOrderNumber = Array.from(
91445
91444
  new Set(o.map((_) => _.PurchaseOrderNumber).filter((_) => _ != null))
91445
+ ), S.PurchaseOrderDate = Array.from(
91446
+ new Set(
91447
+ o.map((_) => _.PurchaseOrderDate).filter((_) => _ != null).map(String)
91448
+ )
91446
91449
  ), S.Location = Array.from(
91447
91450
  new Set(o.map((_) => _.Location).filter((_) => _ != null))
91448
91451
  ), S.PartNumber = Array.from(
@@ -91468,6 +91471,158 @@ function PurchaseOrdersTable({
91468
91471
  }
91469
91472
  );
91470
91473
  }
91474
+ function RequisitionsTable({
91475
+ applicationId: t,
91476
+ requisitions: e = null,
91477
+ loading: n = !1
91478
+ }) {
91479
+ const [o, l] = useState([]), [d] = useDeleteV4ManufacturerByRouteManufacturerIdRequisitionAndRequisitionNumberMutation(), { toast: f } = useToast();
91480
+ useEffect(() => {
91481
+ l(e || []);
91482
+ }, [e]);
91483
+ const g = useMemo(
91484
+ () => [
91485
+ {
91486
+ accessorKey: "RequisitionNumber",
91487
+ header: "Number",
91488
+ cell: ({ row: S }) => S.original.RequisitionNumber ? /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 100, children: /* @__PURE__ */ jsxs(Tooltip$1, { children: [
91489
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: !0, children: /* @__PURE__ */ jsx(
91490
+ Link,
91491
+ {
91492
+ to: `/${t}/Document/${S.original.RequisitionNumber}`,
91493
+ className: "font-medium text-primary hover:underline",
91494
+ children: S.original.RequisitionNumber
91495
+ }
91496
+ ) }),
91497
+ /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsxs("p", { children: [
91498
+ "View details for Draft Purchase ",
91499
+ S.original.RequisitionNumber
91500
+ ] }) })
91501
+ ] }) }) : "—",
91502
+ enableSorting: !0,
91503
+ enableFiltering: !0
91504
+ },
91505
+ {
91506
+ accessorKey: "RequisitionDate",
91507
+ header: "Date",
91508
+ cell: ({ row: S }) => formatYYYYMMDDIntToDateString(S.original.RequisitionDate),
91509
+ enableSorting: !0,
91510
+ enableFiltering: !0
91511
+ },
91512
+ {
91513
+ accessorKey: "Location",
91514
+ header: "Location",
91515
+ cell: ({ row: S }) => S.original.Location ?? "—",
91516
+ enableSorting: !0,
91517
+ enableFiltering: !0
91518
+ },
91519
+ {
91520
+ accessorKey: "SubTotal",
91521
+ header: "Sub Total",
91522
+ cell: ({ row: S }) => S.original.SubTotal ? formatMoney(S.original.SubTotal) : "—",
91523
+ enableSorting: !0,
91524
+ enableFiltering: !0
91525
+ },
91526
+ {
91527
+ accessorKey: "RequestedBy",
91528
+ header: "Requestor",
91529
+ cell: ({ row: S }) => S.original.RequestedBy ?? "—",
91530
+ enableSorting: !0,
91531
+ enableFiltering: !0
91532
+ },
91533
+ {
91534
+ id: "actions",
91535
+ header: () => /* @__PURE__ */ jsx("div", { className: "text-right", children: "Action" }),
91536
+ cell: function({ row: _ }) {
91537
+ const [C, E] = useState(!1), R = _.original, A = () => {
91538
+ E(!0), d({
91539
+ routeManufacturerId: t,
91540
+ requisitionNumber: R.RequisitionNumber ?? ""
91541
+ }).then(() => {
91542
+ l(
91543
+ (M) => M.filter(
91544
+ (I) => I.RequisitionNumber !== I.RequisitionNumber
91545
+ )
91546
+ ), f({
91547
+ variant: "success",
91548
+ title: "Success",
91549
+ description: `Draft Purchase ${R.RequisitionNumber} has been successfully cancelled.`
91550
+ });
91551
+ }).catch((M) => {
91552
+ console.error(M), E(!0), f({
91553
+ variant: "destructive",
91554
+ title: "Error",
91555
+ description: "Something went wrong!"
91556
+ });
91557
+ });
91558
+ };
91559
+ return /* @__PURE__ */ jsx("div", { className: "text-right", children: /* @__PURE__ */ jsxs(AlertDialog, { children: [
91560
+ /* @__PURE__ */ jsx(AlertDialogTrigger, { asChild: !0, children: /* @__PURE__ */ jsx(
91561
+ Button,
91562
+ {
91563
+ variant: "red",
91564
+ size: "sm",
91565
+ disabled: C,
91566
+ children: C ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
91567
+ /* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
91568
+ "Cancelling"
91569
+ ] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
91570
+ /* @__PURE__ */ jsx(Trash2, { className: "mr-2 h-4 w-4" }),
91571
+ "Cancel"
91572
+ ] })
91573
+ }
91574
+ ) }),
91575
+ /* @__PURE__ */ jsxs(AlertDialogContent, { children: [
91576
+ /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [
91577
+ /* @__PURE__ */ jsx(AlertDialogTitle, { children: "Confirmation" }),
91578
+ /* @__PURE__ */ jsxs(AlertDialogDescription, { children: [
91579
+ "Are you sure you want to cancel Draft Purchase ",
91580
+ /* @__PURE__ */ jsx("strong", { children: R.RequisitionNumber }),
91581
+ "?."
91582
+ ] })
91583
+ ] }),
91584
+ /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [
91585
+ /* @__PURE__ */ jsx(AlertDialogCancel, { disabled: C, children: "Cancel" }),
91586
+ /* @__PURE__ */ jsxs(AlertDialogAction, { onClick: A, disabled: C, children: [
91587
+ C && /* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
91588
+ "Confirm"
91589
+ ] })
91590
+ ] })
91591
+ ] })
91592
+ ] }) });
91593
+ }
91594
+ }
91595
+ ],
91596
+ [t]
91597
+ ), b = useMemo(() => {
91598
+ const S = {};
91599
+ return o && (S.RequisitionNumber = Array.from(
91600
+ new Set(o.map((_) => _.RequisitionNumber).filter((_) => _ != null))
91601
+ ), S.RequisitionDate = Array.from(
91602
+ new Set(
91603
+ o.map((_) => _.RequisitionDate).filter((_) => _ != null).map(String)
91604
+ )
91605
+ ), S.Location = Array.from(
91606
+ new Set(o.map((_) => _.Location).filter((_) => _ != null))
91607
+ ), S.RequestedBy = Array.from(
91608
+ new Set(o.map((_) => _.RequestedBy).filter((_) => _ != null))
91609
+ ), S.SubTotal = Array.from(
91610
+ new Set(
91611
+ o.map((_) => _.SubTotal).filter((_) => _ != null).map(String)
91612
+ )
91613
+ )), S;
91614
+ }, [o]);
91615
+ return /* @__PURE__ */ jsx(
91616
+ DataTable,
91617
+ {
91618
+ columns: g,
91619
+ data: o,
91620
+ uniqueValues: b,
91621
+ loading: n,
91622
+ tableClass: "bg-card text-card-foreground"
91623
+ }
91624
+ );
91625
+ }
91471
91626
  function ProductOverviewPage({
91472
91627
  applicationId: t,
91473
91628
  sku: e,
@@ -91478,7 +91633,7 @@ function ProductOverviewPage({
91478
91633
  productShopifyHostname: d,
91479
91634
  productCustomAction: f = /* @__PURE__ */ jsx(Fragment$1, {})
91480
91635
  }) {
91481
- var V, q, z, Q, j, F, te, ne, oe, ge, se, Ae, Ve, Ne;
91636
+ var V, q, z, Q, j, F, te, ne, oe, ge, se, Ae, Ve, Ne, $e, Fe;
91482
91637
  const {
91483
91638
  data: g,
91484
91639
  isLoading: b
@@ -91501,24 +91656,24 @@ function ProductOverviewPage({
91501
91656
  applicationId: t
91502
91657
  }), [E, R] = useState("stats-tab"), [A, M] = useState(!1);
91503
91658
  useEffect(() => {
91504
- var ze, Be, Le, qe, Ge, Ue, Je, Ze;
91659
+ var Le, qe, Ge, Ue, Je, Ze, We, tt;
91505
91660
  if (_ || !S) {
91506
91661
  M(!1);
91507
91662
  return;
91508
91663
  }
91509
- const $e = {
91510
- stats: (((ze = S == null ? void 0 : S.SalesStatistics) == null ? void 0 : ze.length) ?? 0) <= 0,
91511
- inventory: (((Le = (Be = S == null ? void 0 : S.Distribution) == null ? void 0 : Be.Inventory) == null ? void 0 : Le.length) ?? 0) <= 0,
91512
- opportunities: (((qe = S == null ? void 0 : S.Opportunities) == null ? void 0 : qe.length) ?? 0) <= 0,
91513
- orders: (((Ge = S == null ? void 0 : S.ActiveOrderDetails) == null ? void 0 : Ge.length) ?? 0) <= 0 && (((Ue = S == null ? void 0 : S.Returns) == null ? void 0 : Ue.length) ?? 0) <= 0,
91514
- invoices: (((Je = S == null ? void 0 : S.CompletedOrderDetails) == null ? void 0 : Je.length) ?? 0) <= 0,
91515
- warehouse: (((Ze = S == null ? void 0 : S.Receipts) == null ? void 0 : Ze.length) ?? 0) <= 0
91516
- }, Fe = Object.values($e).some((We) => !We);
91517
- if (M(Fe), Fe && $e[E]) {
91518
- const We = Object.keys($e).find(
91519
- (tt) => !$e[tt]
91664
+ const ze = {
91665
+ stats: (((Le = S == null ? void 0 : S.SalesStatistics) == null ? void 0 : Le.length) ?? 0) <= 0,
91666
+ inventory: (((Ge = (qe = S == null ? void 0 : S.Distribution) == null ? void 0 : qe.Inventory) == null ? void 0 : Ge.length) ?? 0) <= 0,
91667
+ opportunities: (((Ue = S == null ? void 0 : S.Opportunities) == null ? void 0 : Ue.length) ?? 0) <= 0,
91668
+ orders: (((Je = S == null ? void 0 : S.ActiveOrderDetails) == null ? void 0 : Je.length) ?? 0) <= 0 && (((Ze = S == null ? void 0 : S.Returns) == null ? void 0 : Ze.length) ?? 0) <= 0,
91669
+ invoices: (((We = S == null ? void 0 : S.CompletedOrderDetails) == null ? void 0 : We.length) ?? 0) <= 0,
91670
+ warehouse: (((tt = S == null ? void 0 : S.Receipts) == null ? void 0 : tt.length) ?? 0) <= 0
91671
+ }, Be = Object.values(ze).some((Xe) => !Xe);
91672
+ if (M(Be), Be && ze[E]) {
91673
+ const Xe = Object.keys(ze).find(
91674
+ (it) => !ze[it]
91520
91675
  );
91521
- We && R(We);
91676
+ Xe && R(Xe);
91522
91677
  }
91523
91678
  }, [_, S, E]);
91524
91679
  const I = (g == null ? void 0 : g.ManufacturerId) !== t;
@@ -91655,7 +91810,7 @@ function ProductOverviewPage({
91655
91810
  {
91656
91811
  value: "purchase-orders-tab",
91657
91812
  className: "relative h-12 rounded-none border-b-2 border-b-transparent bg-transparent px-4 pb-3 pt-2 text-sm font-medium text-muted-foreground shadow-none transition-none hover:text-foreground data-[state=active]:border-b-primary data-[state=active]:text-foreground data-[state=active]:shadow-none cursor-pointer",
91658
- disabled: !(C != null && C.IsManufacturer) || (((ne = S == null ? void 0 : S.PurchaseOrders) == null ? void 0 : ne.length) ?? 0) <= 0,
91813
+ disabled: !(C != null && C.IsManufacturer) || (((ne = S == null ? void 0 : S.PurchaseOrders) == null ? void 0 : ne.length) ?? 0) <= 0 && (((oe = S == null ? void 0 : S.Requisitions) == null ? void 0 : oe.length) ?? 0) <= 0,
91659
91814
  children: "Purchase Orders"
91660
91815
  }
91661
91816
  ),
@@ -91664,7 +91819,7 @@ function ProductOverviewPage({
91664
91819
  {
91665
91820
  value: "warehouse-tab",
91666
91821
  className: "relative h-12 rounded-none border-b-2 border-b-transparent bg-transparent px-4 pb-3 pt-2 text-sm font-medium text-muted-foreground shadow-none transition-none hover:text-foreground data-[state=active]:border-b-primary data-[state=active]:text-foreground data-[state=active]:shadow-none cursor-pointer",
91667
- disabled: (((oe = S == null ? void 0 : S.Receipts) == null ? void 0 : oe.length) ?? 0) <= 0,
91822
+ disabled: (((ge = S == null ? void 0 : S.Receipts) == null ? void 0 : ge.length) ?? 0) <= 0,
91668
91823
  children: "Latest Warehouse Receiving"
91669
91824
  }
91670
91825
  )
@@ -91679,7 +91834,7 @@ function ProductOverviewPage({
91679
91834
  /* @__PURE__ */ jsx(TabsContent, { value: "inventory-tab", children: /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(
91680
91835
  ProductInventoryGrid,
91681
91836
  {
91682
- inventory: ((ge = S == null ? void 0 : S.Distribution) == null ? void 0 : ge.Inventory) ?? [],
91837
+ inventory: ((se = S == null ? void 0 : S.Distribution) == null ? void 0 : se.Inventory) ?? [],
91683
91838
  className: "bg-card text-card-foreground"
91684
91839
  }
91685
91840
  ) }) }),
@@ -91687,11 +91842,11 @@ function ProductOverviewPage({
91687
91842
  OpportunitiesTable,
91688
91843
  {
91689
91844
  applicationId: t,
91690
- opportunities: g == null ? void 0 : g.Opportunities,
91691
- loading: b
91845
+ opportunities: S == null ? void 0 : S.Opportunities,
91846
+ loading: _
91692
91847
  }
91693
91848
  ) }) }),
91694
- /* @__PURE__ */ jsx(TabsContent, { value: "active-orders-tab", children: (((se = S == null ? void 0 : S.ActiveOrderDetails) == null ? void 0 : se.length) ?? 0) > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(
91849
+ /* @__PURE__ */ jsx(TabsContent, { value: "active-orders-tab", children: (((Ae = S == null ? void 0 : S.ActiveOrderDetails) == null ? void 0 : Ae.length) ?? 0) > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(
91695
91850
  OrdersCard,
91696
91851
  {
91697
91852
  applicationId: t,
@@ -91700,7 +91855,7 @@ function ProductOverviewPage({
91700
91855
  loading: _
91701
91856
  }
91702
91857
  ) }) }),
91703
- /* @__PURE__ */ jsx(TabsContent, { value: "completed-orders-tab", children: (((Ae = S == null ? void 0 : S.CompletedOrderDetails) == null ? void 0 : Ae.length) ?? 0) > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(
91858
+ /* @__PURE__ */ jsx(TabsContent, { value: "completed-orders-tab", children: (((Ve = S == null ? void 0 : S.CompletedOrderDetails) == null ? void 0 : Ve.length) ?? 0) > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(
91704
91859
  OrdersCard,
91705
91860
  {
91706
91861
  applicationId: t,
@@ -91709,7 +91864,7 @@ function ProductOverviewPage({
91709
91864
  loading: _
91710
91865
  }
91711
91866
  ) }) }),
91712
- /* @__PURE__ */ jsx(TabsContent, { value: "returns-tab", children: (((Ve = S == null ? void 0 : S.Returns) == null ? void 0 : Ve.length) ?? 0) > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(
91867
+ /* @__PURE__ */ jsx(TabsContent, { value: "returns-tab", children: (((Ne = S == null ? void 0 : S.Returns) == null ? void 0 : Ne.length) ?? 0) > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(
91713
91868
  ReturnsTable,
91714
91869
  {
91715
91870
  applicationId: t,
@@ -91717,17 +91872,30 @@ function ProductOverviewPage({
91717
91872
  loading: _
91718
91873
  }
91719
91874
  ) }) }),
91720
- /* @__PURE__ */ jsx(TabsContent, { value: "purchase-orders-tab", children: (C == null ? void 0 : C.IsManufacturer) && (((Ne = S == null ? void 0 : S.PurchaseOrders) == null ? void 0 : Ne.length) ?? 0) > 0 && /* @__PURE__ */ jsxs(Card, { className: "mt-4 w-full", children: [
91721
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { className: "text-1xl font-bold", children: "Purchase Orders" }) }),
91722
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
91723
- PurchaseOrdersTable,
91724
- {
91725
- applicationId: t,
91726
- purchaseOrders: S == null ? void 0 : S.PurchaseOrders,
91727
- loading: _
91728
- }
91729
- ) })
91730
- ] }) }),
91875
+ /* @__PURE__ */ jsxs(TabsContent, { value: "purchase-orders-tab", children: [
91876
+ ((($e = S == null ? void 0 : S.PurchaseOrders) == null ? void 0 : $e.length) ?? 0) > 0 && /* @__PURE__ */ jsxs(Card, { className: "mt-4 w-full", children: [
91877
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { className: "text-1xl font-bold", children: "Purchase Orders" }) }),
91878
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
91879
+ PurchaseOrdersTable,
91880
+ {
91881
+ applicationId: t,
91882
+ purchaseOrders: S == null ? void 0 : S.PurchaseOrders,
91883
+ loading: _
91884
+ }
91885
+ ) })
91886
+ ] }),
91887
+ (((Fe = S == null ? void 0 : S.Requisitions) == null ? void 0 : Fe.length) ?? 0) > 0 && /* @__PURE__ */ jsxs(Card, { className: "mt-4 w-full", children: [
91888
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { className: "text-1xl font-bold", children: "Draft Purchases" }) }),
91889
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
91890
+ RequisitionsTable,
91891
+ {
91892
+ applicationId: t,
91893
+ requisitions: S == null ? void 0 : S.Requisitions,
91894
+ loading: _
91895
+ }
91896
+ ) })
91897
+ ] })
91898
+ ] }),
91731
91899
  /* @__PURE__ */ jsx(TabsContent, { value: "warehouse-tab", children: /* @__PURE__ */ jsxs(Card, { className: "mt-4 w-full", children: [
91732
91900
  /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { className: "text-1xl font-bold", children: "Receipts" }) }),
91733
91901
  /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(