Skip to content

Commit

Permalink
refactor:パッケージの整理
Browse files Browse the repository at this point in the history
Reorganize product-related components into subdirectories

Moved product and product category components into `item` and `category` subdirectories for better structure and maintainability. Updated import paths across files to reflect the new directory structure.
  • Loading branch information
k2works committed Dec 27, 2024
1 parent 00b9731 commit ff686a2
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions app/frontend/src/components/master/ProductCategory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {ProductCategoryType, ProductType} from "../../models";

import {useFetchProductCategories, useFetchProducts, useProduct, useProductCategory} from "./hooks";
import Modal from "react-modal";
import {ProductCategoryCollectionView} from "../../views/master/product/ProductCategoryCollection.tsx";
import {ProductCategorySingleView} from "../../views/master/product/ProductCategorySingle.tsx";
import {ProductCollectionSelectView} from "../../views/master/product/ProductSelect.tsx";
import {ProductCollectionAddListView} from "../../views/master/product/ProductCollection.tsx";
import {ProductCategoryCollectionView} from "../../views/master/product/category/ProductCategoryCollection.tsx";
import {ProductCategorySingleView} from "../../views/master/product/category/ProductCategorySingle.tsx";
import {ProductCollectionSelectView} from "../../views/master/product/item/ProductSelect.tsx";
import {ProductCollectionAddListView} from "../../views/master/product/item/ProductCollection.tsx";

export const ProductCategory: React.FC = () => {
const Content: React.FC = () => {
Expand Down
12 changes: 6 additions & 6 deletions app/frontend/src/components/master/ProductItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import {usePageNation} from "../../views/application/PageNation.tsx";
import LoadingIndicator from "../../views/application/LoadingIndicatior.tsx";
import {useFetchBoms, useFetchProducts, useFetchSubstitutes, useProduct} from "./hooks";
import {ProductType} from "../../models";
import {ProductCollectionView} from "../../views/master/product/ProductCollection.tsx";
import {ProductSingleView} from "../../views/master/product/ProductSingle.tsx";
import {ProductCollectionSelectView} from "../../views/master/product/ProductSelect.tsx";
import {SubstituteProductCollectionAddListView} from "../../views/master/product/SubstituteProductCollection.tsx";
import {BomCollectionAddListView} from "../../views/master/product/BomCollection.tsx";
import {ProductCollectionView} from "../../views/master/product/item/ProductCollection.tsx";
import {ProductSingleView} from "../../views/master/product/item/ProductSingle.tsx";
import {ProductCollectionSelectView} from "../../views/master/product/item/ProductSelect.tsx";
import {SubstituteProductCollectionAddListView} from "../../views/master/product/item/SubstituteProductCollection.tsx";
import {BomCollectionAddListView} from "../../views/master/product/item/BomCollection.tsx";
import {
CustomerSpecificSellingPriceCollectionAddListView
} from "../../views/master/product/CustomerSpecificSellingPriceCollection.tsx";
} from "../../views/master/product/item/CustomerSpecificSellingPriceCollection.tsx";

export const ProductItem: React.FC = () => {
const Content: React.FC = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import {ProductCategoryType} from "../../../models";
import {Message} from "../../../components/application/Message.tsx";
import {PageNation} from "../../application/PageNation.tsx";
import {ProductCategoryType} from "../../../../models";
import {Message} from "../../../../components/application/Message.tsx";
import {PageNation} from "../../../application/PageNation.tsx";

interface SearchBarProps {
searchValue: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {Message} from "../../../components/application/Message.tsx";
import {ProductCategoryType} from "../../../models";
import {FormInput, SingleViewHeaderActions, SingleViewHeaderItem} from "../../Common.tsx";
import {Message} from "../../../../components/application/Message.tsx";
import {ProductCategoryType} from "../../../../models";
import {FormInput, SingleViewHeaderActions, SingleViewHeaderItem} from "../../../Common.tsx";

interface HeaderProps {
title: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useState} from "react";
import {BomType} from "../../../models";
import {BomType} from "../../../../models";

interface BomCollectionProps {
boms: BomType[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useState} from "react";
import {CustomerSpecificSellingPriceType} from "../../../models";
import {CustomerSpecificSellingPriceType} from "../../../../models";

interface CustomerSpecificSellingPriceCollectionProps {
prices: CustomerSpecificSellingPriceType[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {Message} from "../../../components/application/Message.tsx";
import {PageNation} from "../../application/PageNation.tsx";
import {ProductType} from "../../../models";
import {Message} from "../../../../components/application/Message.tsx";
import {PageNation} from "../../../application/PageNation.tsx";
import {ProductType} from "../../../../models";

interface SearchBarProps {
searchValue: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import {ProductType} from "../../../models"; // 正しいパスに修正してください
import {ProductType} from "../../../../models"; // 正しいパスに修正してください
import {FaTimes} from "react-icons/fa";
import {PageNation} from "../../application/PageNation.tsx";
import {PageNation} from "../../../application/PageNation.tsx";

interface ProductCollectionSelectProps {
products: ProductType[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import {FormInput, FormSelect, SingleViewHeaderActions, SingleViewHeaderItem} from "../../Common.tsx";
import {FormInput, FormSelect, SingleViewHeaderActions, SingleViewHeaderItem} from "../../../Common.tsx";
import {
MiscellaneousEnumType,
ProductEnumType,
ProductType,
StockAllocationEnumType,
StockManagementTargetEnumType,
TaxEnumType
} from "../../../models";
} from "../../../../models";
import React from "react";
import {Message} from "../../../components/application/Message.tsx";
import {Message} from "../../../../components/application/Message.tsx";

interface HeaderProps {
title: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useState} from "react";
import {SubstituteProductType} from "../../../models";
import {SubstituteProductType} from "../../../../models";

interface SubstituteProductCollectionProps {
substituteProducts: SubstituteProductType[];
Expand Down

0 comments on commit ff686a2

Please sign in to comment.