fix: update import paths for packing slips module to reflect new directory structure
- Adjusted import statements in various files within the packing slips module to correct the paths to shared entities and components. - Ensured consistency in the import structure across the module, improving maintainability and reducing potential import errors. These changes enhance the organization of the packing slips module by aligning import paths with the updated directory structure.
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { SalesDocumentDto, SalesDocumentEntity } from '../../../sales/shared/sales-document.entity';
|
||||
import type { SalesDocumentDto, SalesDocumentEntity } from '../../../../sales/shared/sales-document.entity';
|
||||
|
||||
export interface PackingSlipEntity extends SalesDocumentEntity {
|
||||
salesOrderId?: string | null;
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import {
|
||||
toLookup,
|
||||
toSalesFilterPayload,
|
||||
toSalesWritePayload,
|
||||
} from '../../../sales/shared/sales-document.mapper';
|
||||
} from '../../../../sales/shared/sales-document.mapper';
|
||||
import type { PackingSlipDto, PackingSlipEntity } from '../entities';
|
||||
|
||||
export class PackingSlipsRemoteDataTransformer extends BaseDataTransformer<PackingSlipEntity> {
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
import { Box, FieldAsyncSelect, FieldDatePicker, FieldTextInput, Paper, SimpleGrid, Text } from '@repo/ui/components';
|
||||
import { useEnterpriseModuleTranslationContext, useFormPageContext } from '@repo/ui/foundations';
|
||||
import { loadCustomerOptions } from '../../../../shared/load-customer-options';
|
||||
import { loadSalesOrderOptions } from '../../../../sales/shared/load-sales-order-options';
|
||||
import { loadSalesOrderOptions } from '../../../../../sales/shared/load-sales-order-options';
|
||||
import { relationLabel } from '../../../../shared/relation-label';
|
||||
import type { CustomerEntity } from '../../../../../configuration/customers/domain/entities';
|
||||
import type { SalesOrderEntity } from '../../../../sales/orders/domain/entities';
|
||||
import type { SalesOrderEntity } from '../../../../../sales/orders/domain/entities';
|
||||
|
||||
export function FormPackingGeneral() {
|
||||
const { formControl } = useFormPageContext();
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
import { Stack } from '@repo/ui/components';
|
||||
import { EnterpriseDetailPageProvider, useEnterpriseModuleTranslationContext } from '@repo/ui/foundations';
|
||||
import { packingSlipsModuleConfig } from '../../domain/constants';
|
||||
import { DetailGeneral } from '../../../sales/shared/detail-general';
|
||||
import { DetailLocation } from '../../../sales/shared/detail-location';
|
||||
import { DetailProducts } from '../../../sales/shared/detail-products';
|
||||
import { useSalesDocumentActions } from '../../../sales/shared/use-sales-document-actions';
|
||||
import { salesOrdersModuleConfig } from '../../../sales/orders/domain/constants';
|
||||
import { DetailGeneral } from '../../../../sales/shared/detail-general';
|
||||
import { DetailLocation } from '../../../../sales/shared/detail-location';
|
||||
import { DetailProducts } from '../../../../sales/shared/detail-products';
|
||||
import { useSalesDocumentActions } from '../../../../sales/shared/use-sales-document-actions';
|
||||
import { salesOrdersModuleConfig } from '../../../../sales/orders/domain/constants';
|
||||
import type { PackingSlipEntity } from '../../domain/entities';
|
||||
|
||||
export default function PackingSlipPageDetail() {
|
||||
|
||||
+4
-4
@@ -4,11 +4,11 @@ import { Stack } from '@repo/ui/components';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { packingSlipsModuleConfig } from '../../domain/constants';
|
||||
import { createSalesPackingSlipSchema } from '../../../sales/shared/sales-document.validator';
|
||||
import { createSalesPackingSlipSchema } from '../../../../sales/shared/sales-document.validator';
|
||||
import { FormPackingGeneral } from '../components/form-component/form-packing-general';
|
||||
import { FormLocation } from '../../../sales/shared/form-location';
|
||||
import { FormProducts } from '../../../sales/shared/form-products';
|
||||
import { FormNotes } from '../../../sales/shared/form-notes';
|
||||
import { FormLocation } from '../../../../sales/shared/form-location';
|
||||
import { FormProducts } from '../../../../sales/shared/form-products';
|
||||
import { FormNotes } from '../../../../sales/shared/form-notes';
|
||||
|
||||
export default function PackingSlipPageForm({ formPageType }: { formPageType: FormPageType }) {
|
||||
const { t } = useEnterpriseModuleTranslationContext();
|
||||
|
||||
+3
-3
@@ -7,9 +7,9 @@ import {
|
||||
import { ColDef, Text } from '@repo/ui/components';
|
||||
import { Trans } from '@repo/core-i18n';
|
||||
import { Package } from 'lucide-react';
|
||||
import { SalesFilterFormContent } from '../../../sales/shared/filter-content';
|
||||
import { useSalesDocumentActions } from '../../../sales/shared/use-sales-document-actions';
|
||||
import { relationLabel } from '../../shared/relation-label';
|
||||
import { SalesFilterFormContent } from '../../../../sales/shared/filter-content';
|
||||
import { useSalesDocumentActions } from '../../../../sales/shared/use-sales-document-actions';
|
||||
import { relationLabel } from '../../../shared/relation-label';
|
||||
import type { PackingSlipEntity } from '../../domain/entities';
|
||||
|
||||
export default function PackingSlipPageIndex() {
|
||||
|
||||
+3
-2
@@ -32,6 +32,7 @@ export function DetailGeneral() {
|
||||
const { t } = useEnterpriseModuleTranslationContext();
|
||||
const { dataServices } = useEnterpriseModuleDataServiceContext<PlanEntity, PlansRemoteDataServices>();
|
||||
const data = detailData;
|
||||
const attachments = data?.purpose === 'sales' ? data?.invoices : data?.packingSlips;
|
||||
const destinationForm = useForm<{ customer: CustomerEntity | null }>({ defaultValues: { customer: null } });
|
||||
|
||||
const handleAdd = destinationForm.handleSubmit(async (values) => {
|
||||
@@ -126,13 +127,13 @@ export function DetailGeneral() {
|
||||
</Group>
|
||||
</Paper>
|
||||
|
||||
{(data?.purpose === 'sales' ? data?.invoices : data?.packingSlips)?.length ? (
|
||||
{attachments?.length ? (
|
||||
<Paper withBorder shadow="sm" radius="md" p="xl">
|
||||
<Text fw={600} mb="md">
|
||||
{t('section_attachments')}
|
||||
</Text>
|
||||
<Stack gap="xs">
|
||||
{(data.purpose === 'sales' ? data.invoices : data?.packingSlips)?.map((item) => (
|
||||
{attachments.map((item) => (
|
||||
<Text key={item.id} size="sm">
|
||||
{relationLabel(item) || item.id}
|
||||
</Text>
|
||||
|
||||
Reference in New Issue
Block a user