From 0ae4fe083127d55f65d92a43a8091f10b24a3859 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Sat, 1 Nov 2025 15:58:47 +0700 Subject: [PATCH] chore: format code using prettier --- eslint.config.mjs | 18 +- postcss.config.mjs | 2 +- src/app/globals.css | 6 +- src/app/inventory/adjustment/add/page.tsx | 10 +- .../inventory/adjustment/detail/layout.tsx | 12 +- src/app/inventory/adjustment/detail/page.tsx | 15 +- src/app/master-data/customer/add/page.tsx | 10 +- src/app/master-data/customer/detail/page.tsx | 32 +- src/app/master-data/customer/page.tsx | 8 +- src/app/master-data/flock/add/page.tsx | 6 +- .../master-data/flock/detail/edit/page.tsx | 16 +- src/app/master-data/flock/detail/layout.tsx | 12 +- src/app/master-data/flock/detail/page.tsx | 35 +- src/app/master-data/flock/page.tsx | 10 +- .../master-data/product-category/add/page.tsx | 6 +- .../product-category/detail/edit/page.tsx | 63 +- .../product-category/detail/page.tsx | 14 +- src/app/master-data/product-category/page.tsx | 6 +- src/app/master-data/product/add/page.tsx | 4 +- .../master-data/product/detail/edit/page.tsx | 7 +- src/app/master-data/product/detail/page.tsx | 7 +- src/app/master-data/product/page.tsx | 8 +- src/app/master-data/supplier/add/page.tsx | 2 +- src/app/master-data/supplier/detail/page.tsx | 2 +- src/app/master-data/supplier/page.tsx | 2 +- src/app/production/chickin/add/layout.tsx | 12 +- src/app/production/chickin/detail/layout.tsx | 12 +- src/app/production/chickin/detail/page.tsx | 10 +- src/app/production/chickin/page.tsx | 10 +- src/app/production/project-flock/add/page.tsx | 12 +- .../project-flock/detail/edit/page.tsx | 39 +- .../project-flock/detail/layout.tsx | 12 +- .../production/project-flock/detail/page.tsx | 6 +- src/app/production/project-flock/page.tsx | 8 +- src/components/Card.tsx | 28 +- src/components/Pagination.tsx | 20 +- src/components/input/DateInput.tsx | 11 +- src/components/input/FileInput.tsx | 5 +- src/components/input/NumberInput.tsx | 16 +- src/components/pages/ApprovalSteps.tsx | 20 +- .../adjustment/InventoryAdjustmentTable.tsx | 4 +- .../form/InventoryAdjustmentForm.schema.ts | 9 +- .../form/InventoryAdjustmentForm.tsx | 45 +- .../customer/form/CustomerForm.tsx | 9 +- .../flock/form/FlockForm.schema.ts | 5 +- .../master-data/flock/form/FlockForm.tsx | 11 +- .../form/ProductCategoryForm.schema.ts | 8 +- .../form/ProductCategoryForm.tsx | 17 +- .../product/form/ProductForm.schema.ts | 65 +- .../master-data/product/form/ProductForm.tsx | 134 +- .../supplier/form/SupplierForm.schema.ts | 67 +- .../supplier/form/SupplierForm.tsx | 16 +- .../chickin/form/ChickinForm.schema.ts | 8 +- .../form/ProjectFlockForm.schema.ts | 3 +- .../project-flock/form/ProjectFlockForm.tsx | 19 +- .../form/ProjectFlockKandangTable.tsx | 7 +- .../recording/form/RecordingForm.tsx | 1403 +++++++++-------- .../TransferToLayingsTable.tsx | 18 +- src/services/api/base.ts | 11 +- src/services/api/master-data.ts | 2 +- src/services/api/production.ts | 2 +- src/types/api/master-data/customer.d.ts | 40 +- src/types/api/master-data/product.d.ts | 2 +- src/types/api/master-data/supplier.d.ts | 60 +- src/types/api/production/chickin.d.ts | 10 +- .../api/production/project-flock-kandang.d.ts | 8 +- 66 files changed, 1319 insertions(+), 1198 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 719cea2b..fa167c8d 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,6 +1,6 @@ -import { dirname } from "path"; -import { fileURLToPath } from "url"; -import { FlatCompat } from "@eslint/eslintrc"; +import { dirname } from 'path'; +import { fileURLToPath } from 'url'; +import { FlatCompat } from '@eslint/eslintrc'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); @@ -10,14 +10,14 @@ const compat = new FlatCompat({ }); const eslintConfig = [ - ...compat.extends("next/core-web-vitals", "next/typescript"), + ...compat.extends('next/core-web-vitals', 'next/typescript'), { ignores: [ - "node_modules/**", - ".next/**", - "out/**", - "build/**", - "next-env.d.ts", + 'node_modules/**', + '.next/**', + 'out/**', + 'build/**', + 'next-env.d.ts', ], }, ]; diff --git a/postcss.config.mjs b/postcss.config.mjs index c7bcb4b1..ba720fe5 100644 --- a/postcss.config.mjs +++ b/postcss.config.mjs @@ -1,5 +1,5 @@ const config = { - plugins: ["@tailwindcss/postcss"], + plugins: ['@tailwindcss/postcss'], }; export default config; diff --git a/src/app/globals.css b/src/app/globals.css index 97be6978..c3d05c67 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -3,10 +3,10 @@ @import '../styles/daisyui.css'; @plugin "daisyui/theme" { - name: "lti"; + name: 'lti'; default: false; prefersdark: false; - color-scheme: "light"; + color-scheme: 'light'; --color-base-100: oklch(98% 0.001 106.423); --color-base-200: oklch(97% 0.001 106.424); --color-base-300: oklch(92% 0.003 48.717); @@ -37,8 +37,6 @@ --noise: 0; } - - :root { --color-primary: #1f74bf; } diff --git a/src/app/inventory/adjustment/add/page.tsx b/src/app/inventory/adjustment/add/page.tsx index 3bd64573..e20eedfc 100644 --- a/src/app/inventory/adjustment/add/page.tsx +++ b/src/app/inventory/adjustment/add/page.tsx @@ -1,11 +1,11 @@ -import InventoryAdjustmentForm from "@/components/pages/inventory/adjustment/form/InventoryAdjustmentForm"; +import InventoryAdjustmentForm from '@/components/pages/inventory/adjustment/form/InventoryAdjustmentForm'; const CreateInventoryAdjustment = () => { return ( -
- +
+
); -} +}; -export default CreateInventoryAdjustment; \ No newline at end of file +export default CreateInventoryAdjustment; diff --git a/src/app/inventory/adjustment/detail/layout.tsx b/src/app/inventory/adjustment/detail/layout.tsx index b41c70f9..7220dfa1 100644 --- a/src/app/inventory/adjustment/detail/layout.tsx +++ b/src/app/inventory/adjustment/detail/layout.tsx @@ -1,11 +1,11 @@ -import SuspenseHelper from "@/components/helper/SuspenseHelper" +import SuspenseHelper from '@/components/helper/SuspenseHelper'; const Layout = ({ - children + children, }: Readonly<{ - children: React.ReactNode + children: React.ReactNode; }>) => { - return {children} -} + return {children}; +}; -export default Layout; \ No newline at end of file +export default Layout; diff --git a/src/app/inventory/adjustment/detail/page.tsx b/src/app/inventory/adjustment/detail/page.tsx index 5e96c86a..acb9f8db 100644 --- a/src/app/inventory/adjustment/detail/page.tsx +++ b/src/app/inventory/adjustment/detail/page.tsx @@ -7,11 +7,12 @@ import type { InventoryAdjustment } from '@/types/api/inventory/adjustment'; const DetailInventoryAdjustment = () => { const router = useRouter(); - const [inventoryAdjustment, setInventoryAdjustment] = useState(null); + const [inventoryAdjustment, setInventoryAdjustment] = + useState(null); // Ambil data dari router state useEffect(() => { - console.log("Router State"); + console.log('Router State'); console.log(window.history.state); const state = window.history.state?.usr as | { inventoryAdjustment?: InventoryAdjustment } @@ -24,20 +25,20 @@ const DetailInventoryAdjustment = () => { }, [router]); const finalData = inventoryAdjustment; - - console.log("Final Data"); + + console.log('Final Data'); console.log(finalData); if (!finalData) { return ( -
- +
+
); } return ( -
+
); diff --git a/src/app/master-data/customer/add/page.tsx b/src/app/master-data/customer/add/page.tsx index a1096f02..dd75c679 100644 --- a/src/app/master-data/customer/add/page.tsx +++ b/src/app/master-data/customer/add/page.tsx @@ -1,11 +1,11 @@ -import CustomerForm from "@/components/pages/master-data/customer/form/CustomerForm"; +import CustomerForm from '@/components/pages/master-data/customer/form/CustomerForm'; const AddCustomer = () => { return ( -
- +
+
); -} +}; -export default AddCustomer; \ No newline at end of file +export default AddCustomer; diff --git a/src/app/master-data/customer/detail/page.tsx b/src/app/master-data/customer/detail/page.tsx index 263458c2..d778f83b 100644 --- a/src/app/master-data/customer/detail/page.tsx +++ b/src/app/master-data/customer/detail/page.tsx @@ -1,45 +1,47 @@ -'use client' +'use client'; -import { useRouter, useSearchParams } from "next/navigation"; -import useSWR from "swr"; +import { useRouter, useSearchParams } from 'next/navigation'; +import useSWR from 'swr'; import { CustomerApi } from '@/services/api/master-data'; -import { isResponseError, isResponseSuccess } from "@/lib/api-helper"; -import CustomerForm from "@/components/pages/master-data/customer/form/CustomerForm"; +import { isResponseError, isResponseSuccess } from '@/lib/api-helper'; +import CustomerForm from '@/components/pages/master-data/customer/form/CustomerForm'; const CustomerDetail = () => { const router = useRouter(); const searchParams = useSearchParams(); - const costumerId = searchParams.get("customerId"); + const costumerId = searchParams.get('customerId'); const { data: costumer, isLoading: isLoadingCostumer } = useSWR( costumerId, (id: number) => CustomerApi.getSingle(id) ); - if(!costumerId){ + if (!costumerId) { router.back(); return ( -
- +
+
); } - if(!isLoadingCostumer && (!costumer || isResponseError(costumer))){ - router.replace("/404"); + if (!isLoadingCostumer && (!costumer || isResponseError(costumer))) { + router.replace('/404'); return; } return ( -
- {isLoadingCostumer && } +
+ {isLoadingCostumer && ( + + )} {!isLoadingCostumer && isResponseSuccess(costumer) && ( - + )}
- ) + ); }; export default CustomerDetail; diff --git a/src/app/master-data/customer/page.tsx b/src/app/master-data/customer/page.tsx index b80401f1..8aec1088 100644 --- a/src/app/master-data/customer/page.tsx +++ b/src/app/master-data/customer/page.tsx @@ -1,11 +1,11 @@ -import CustomersTable from "@/components/pages/master-data/customer/CustomersTable"; +import CustomersTable from '@/components/pages/master-data/customer/CustomersTable'; const Customer = () => { return ( -
+
- ) + ); }; -export default Customer; \ No newline at end of file +export default Customer; diff --git a/src/app/master-data/flock/add/page.tsx b/src/app/master-data/flock/add/page.tsx index 5ee3958e..d038d414 100644 --- a/src/app/master-data/flock/add/page.tsx +++ b/src/app/master-data/flock/add/page.tsx @@ -1,11 +1,11 @@ -import FlockForm from "@/components/pages/master-data/flock/form/FlockForm"; +import FlockForm from '@/components/pages/master-data/flock/form/FlockForm'; const AddFlock = () => { return ( -
+
); -} +}; export default AddFlock; diff --git a/src/app/master-data/flock/detail/edit/page.tsx b/src/app/master-data/flock/detail/edit/page.tsx index c9651727..babc6653 100644 --- a/src/app/master-data/flock/detail/edit/page.tsx +++ b/src/app/master-data/flock/detail/edit/page.tsx @@ -1,10 +1,10 @@ -'use client' +'use client'; -import FlockForm from "@/components/pages/master-data/flock/form/FlockForm"; -import { isResponseError, isResponseSuccess } from "@/lib/api-helper"; -import { FlockApi } from "@/services/api/master-data"; -import { useRouter, useSearchParams } from "next/navigation"; -import useSWR from "swr"; +import FlockForm from '@/components/pages/master-data/flock/form/FlockForm'; +import { isResponseError, isResponseSuccess } from '@/lib/api-helper'; +import { FlockApi } from '@/services/api/master-data'; +import { useRouter, useSearchParams } from 'next/navigation'; +import useSWR from 'swr'; const FlockEdit = () => { const router = useRouter(); @@ -44,6 +44,6 @@ const FlockEdit = () => { )}
); -} +}; -export default FlockEdit; \ No newline at end of file +export default FlockEdit; diff --git a/src/app/master-data/flock/detail/layout.tsx b/src/app/master-data/flock/detail/layout.tsx index b41c70f9..7220dfa1 100644 --- a/src/app/master-data/flock/detail/layout.tsx +++ b/src/app/master-data/flock/detail/layout.tsx @@ -1,11 +1,11 @@ -import SuspenseHelper from "@/components/helper/SuspenseHelper" +import SuspenseHelper from '@/components/helper/SuspenseHelper'; const Layout = ({ - children + children, }: Readonly<{ - children: React.ReactNode + children: React.ReactNode; }>) => { - return {children} -} + return {children}; +}; -export default Layout; \ No newline at end of file +export default Layout; diff --git a/src/app/master-data/flock/detail/page.tsx b/src/app/master-data/flock/detail/page.tsx index 8a805911..e9620d33 100644 --- a/src/app/master-data/flock/detail/page.tsx +++ b/src/app/master-data/flock/detail/page.tsx @@ -1,10 +1,10 @@ -'use client' +'use client'; -import FlockForm from "@/components/pages/master-data/flock/form/FlockForm"; -import { isResponseError, isResponseSuccess } from "@/lib/api-helper"; -import { FlockApi } from "@/services/api/master-data"; -import { useRouter, useSearchParams } from "next/navigation"; -import useSWR from "swr"; +import FlockForm from '@/components/pages/master-data/flock/form/FlockForm'; +import { isResponseError, isResponseSuccess } from '@/lib/api-helper'; +import { FlockApi } from '@/services/api/master-data'; +import { useRouter, useSearchParams } from 'next/navigation'; +import useSWR from 'swr'; const FlockDetail = () => { const router = useRouter(); @@ -14,33 +14,36 @@ const FlockDetail = () => { const flockId = searchParams.get('flockId'); // Fetch Data - const { data: flock, isLoading: isLoadingFlock } = useSWR(flockId, (id: number) => FlockApi.getSingle(id)); + const { data: flock, isLoading: isLoadingFlock } = useSWR( + flockId, + (id: number) => FlockApi.getSingle(id) + ); - if(!flockId){ + if (!flockId) { router.back(); return ( -
- +
+
); } - if(!isLoadingFlock && (!flock || isResponseError(flock))){ + if (!isLoadingFlock && (!flock || isResponseError(flock))) { router.replace('/404'); return; } return ( -
+
{isLoadingFlock && ( - + )} {!isLoadingFlock && isResponseSuccess(flock) && ( - + )}
); -} +}; -export default FlockDetail; \ No newline at end of file +export default FlockDetail; diff --git a/src/app/master-data/flock/page.tsx b/src/app/master-data/flock/page.tsx index b317091a..76cc32c1 100644 --- a/src/app/master-data/flock/page.tsx +++ b/src/app/master-data/flock/page.tsx @@ -1,11 +1,11 @@ -import FlockTable from "@/components/pages/master-data/flock/FlocksTable"; +import FlockTable from '@/components/pages/master-data/flock/FlocksTable'; const Flock = () => { return ( -
- +
+
- ); -} + ); +}; export default Flock; diff --git a/src/app/master-data/product-category/add/page.tsx b/src/app/master-data/product-category/add/page.tsx index 0993ba7a..2331159e 100644 --- a/src/app/master-data/product-category/add/page.tsx +++ b/src/app/master-data/product-category/add/page.tsx @@ -1,11 +1,11 @@ -import ProductCategoryForm from "@/components/pages/master-data/product-category/form/ProductCategoryForm"; +import ProductCategoryForm from '@/components/pages/master-data/product-category/form/ProductCategoryForm'; const AddProductCategory = () => { return ( -
+
); }; -export default AddProductCategory; \ No newline at end of file +export default AddProductCategory; diff --git a/src/app/master-data/product-category/detail/edit/page.tsx b/src/app/master-data/product-category/detail/edit/page.tsx index 6bc10644..4cb7eb5a 100644 --- a/src/app/master-data/product-category/detail/edit/page.tsx +++ b/src/app/master-data/product-category/detail/edit/page.tsx @@ -9,39 +9,44 @@ import { ProductCategoryApi } from '@/services/api/master-data'; import { isResponseError, isResponseSuccess } from '@/lib/api-helper'; const ProductCategoryEdit = () => { - const router = useRouter(); - const searchParams = useSearchParams(); + const router = useRouter(); + const searchParams = useSearchParams(); - const productCategoryId = searchParams.get('productCategoryId'); + const productCategoryId = searchParams.get('productCategoryId'); - const { data: productCategory, isLoading: isLoadingProductCategory } = useSWR( - productCategoryId, - (id: number) => ProductCategoryApi.getSingle(id) - ); + const { data: productCategory, isLoading: isLoadingProductCategory } = useSWR( + productCategoryId, + (id: number) => ProductCategoryApi.getSingle(id) + ); - if (!productCategoryId) { - router.back(); - - return ( -
- -
- ); - } - - if (!isLoadingProductCategory && (!productCategory || isResponseError(productCategory))) { - router.replace('/404'); - return; - } + if (!productCategoryId) { + router.back(); return ( -
- {isLoadingProductCategory && } - {!isLoadingProductCategory && isResponseSuccess(productCategory) && ( - - )} -
+
+ +
); -} + } -export default ProductCategoryEdit; \ No newline at end of file + if ( + !isLoadingProductCategory && + (!productCategory || isResponseError(productCategory)) + ) { + router.replace('/404'); + return; + } + + return ( +
+ {isLoadingProductCategory && ( + + )} + {!isLoadingProductCategory && isResponseSuccess(productCategory) && ( + + )} +
+ ); +}; + +export default ProductCategoryEdit; diff --git a/src/app/master-data/product-category/detail/page.tsx b/src/app/master-data/product-category/detail/page.tsx index cba06fdb..c1a21aaf 100644 --- a/src/app/master-data/product-category/detail/page.tsx +++ b/src/app/master-data/product-category/detail/page.tsx @@ -29,16 +29,24 @@ const ProductCategoryDetail = () => { ); } - if (!isLoadingProductCategory && (!productCategory || isResponseError(productCategory))) { + if ( + !isLoadingProductCategory && + (!productCategory || isResponseError(productCategory)) + ) { router.replace('/404'); return; } return (
- {isLoadingProductCategory && } + {isLoadingProductCategory && ( + + )} {!isLoadingProductCategory && isResponseSuccess(productCategory) && ( - + )}
); diff --git a/src/app/master-data/product-category/page.tsx b/src/app/master-data/product-category/page.tsx index 5ec6d555..78a4fda3 100644 --- a/src/app/master-data/product-category/page.tsx +++ b/src/app/master-data/product-category/page.tsx @@ -1,11 +1,11 @@ -import ProductCategoryTable from "@/components/pages/master-data/product-category/ProductCategoryTable"; +import ProductCategoryTable from '@/components/pages/master-data/product-category/ProductCategoryTable'; const ProductCategory = () => { return ( -
+
); }; -export default ProductCategory; \ No newline at end of file +export default ProductCategory; diff --git a/src/app/master-data/product/add/page.tsx b/src/app/master-data/product/add/page.tsx index 7cc995b6..37f42691 100644 --- a/src/app/master-data/product/add/page.tsx +++ b/src/app/master-data/product/add/page.tsx @@ -2,10 +2,10 @@ import ProductForm from '@/components/pages/master-data/product/form/ProductForm const AddProduct = () => { return ( -
+
); }; -export default AddProduct; \ No newline at end of file +export default AddProduct; diff --git a/src/app/master-data/product/detail/edit/page.tsx b/src/app/master-data/product/detail/edit/page.tsx index 96cfdc42..8916a98e 100644 --- a/src/app/master-data/product/detail/edit/page.tsx +++ b/src/app/master-data/product/detail/edit/page.tsx @@ -13,9 +13,8 @@ const ProductEdit = () => { const productId = searchParams.get('productId'); - const { data: product, isLoading } = useSWR( - productId, - (id: number) => ProductApi.getSingle(id) + const { data: product, isLoading } = useSWR(productId, (id: number) => + ProductApi.getSingle(id) ); if (!productId) { @@ -42,4 +41,4 @@ const ProductEdit = () => { ); }; -export default ProductEdit; \ No newline at end of file +export default ProductEdit; diff --git a/src/app/master-data/product/detail/page.tsx b/src/app/master-data/product/detail/page.tsx index 916a44d0..34743e1f 100644 --- a/src/app/master-data/product/detail/page.tsx +++ b/src/app/master-data/product/detail/page.tsx @@ -13,9 +13,8 @@ const ProductDetail = () => { const productId = searchParams.get('productId'); - const { data: product, isLoading } = useSWR( - productId, - (id: number) => ProductApi.getSingle(id) + const { data: product, isLoading } = useSWR(productId, (id: number) => + ProductApi.getSingle(id) ); if (!productId) { @@ -42,4 +41,4 @@ const ProductDetail = () => { ); }; -export default ProductDetail; \ No newline at end of file +export default ProductDetail; diff --git a/src/app/master-data/product/page.tsx b/src/app/master-data/product/page.tsx index 6014aeb9..a385d411 100644 --- a/src/app/master-data/product/page.tsx +++ b/src/app/master-data/product/page.tsx @@ -1,11 +1,11 @@ -import ProductsTable from "@/components/pages/master-data/product/ProductTable"; +import ProductsTable from '@/components/pages/master-data/product/ProductTable'; const Product = () => { return ( -
- +
+
); }; -export default Product; \ No newline at end of file +export default Product; diff --git a/src/app/master-data/supplier/add/page.tsx b/src/app/master-data/supplier/add/page.tsx index 8a95c3c6..37df33b0 100644 --- a/src/app/master-data/supplier/add/page.tsx +++ b/src/app/master-data/supplier/add/page.tsx @@ -8,4 +8,4 @@ const AddSupplier = () => { ); }; -export default AddSupplier; \ No newline at end of file +export default AddSupplier; diff --git a/src/app/master-data/supplier/detail/page.tsx b/src/app/master-data/supplier/detail/page.tsx index 433fa043..a34ad72e 100644 --- a/src/app/master-data/supplier/detail/page.tsx +++ b/src/app/master-data/supplier/detail/page.tsx @@ -46,4 +46,4 @@ const SupplierDetail = () => { ); }; -export default SupplierDetail; \ No newline at end of file +export default SupplierDetail; diff --git a/src/app/master-data/supplier/page.tsx b/src/app/master-data/supplier/page.tsx index 1f54bd0d..8000be0a 100644 --- a/src/app/master-data/supplier/page.tsx +++ b/src/app/master-data/supplier/page.tsx @@ -1,4 +1,4 @@ -import SuppliersTable from "@/components/pages/master-data/supplier/SupplierTable"; +import SuppliersTable from '@/components/pages/master-data/supplier/SupplierTable'; const Supplier = () => { return ( diff --git a/src/app/production/chickin/add/layout.tsx b/src/app/production/chickin/add/layout.tsx index b41c70f9..7220dfa1 100644 --- a/src/app/production/chickin/add/layout.tsx +++ b/src/app/production/chickin/add/layout.tsx @@ -1,11 +1,11 @@ -import SuspenseHelper from "@/components/helper/SuspenseHelper" +import SuspenseHelper from '@/components/helper/SuspenseHelper'; const Layout = ({ - children + children, }: Readonly<{ - children: React.ReactNode + children: React.ReactNode; }>) => { - return {children} -} + return {children}; +}; -export default Layout; \ No newline at end of file +export default Layout; diff --git a/src/app/production/chickin/detail/layout.tsx b/src/app/production/chickin/detail/layout.tsx index b41c70f9..7220dfa1 100644 --- a/src/app/production/chickin/detail/layout.tsx +++ b/src/app/production/chickin/detail/layout.tsx @@ -1,11 +1,11 @@ -import SuspenseHelper from "@/components/helper/SuspenseHelper" +import SuspenseHelper from '@/components/helper/SuspenseHelper'; const Layout = ({ - children + children, }: Readonly<{ - children: React.ReactNode + children: React.ReactNode; }>) => { - return {children} -} + return {children}; +}; -export default Layout; \ No newline at end of file +export default Layout; diff --git a/src/app/production/chickin/detail/page.tsx b/src/app/production/chickin/detail/page.tsx index 96647c55..be8c5332 100644 --- a/src/app/production/chickin/detail/page.tsx +++ b/src/app/production/chickin/detail/page.tsx @@ -20,7 +20,7 @@ import useSWR from 'swr'; /** * TODO: Refactor code - pindahin detail ke reuseable component - * setelah implement approval and reject + * setelah implement approval and reject */ const DetailChickin = () => { @@ -43,9 +43,8 @@ const DetailChickin = () => { // chickin.data?.approval.step_number == 1 ? false : true true ); - const [isRejectedDisabled, setIsRejectedDisabled] = useState( - !isApprovedDisabled - ); + const [isRejectedDisabled, setIsRejectedDisabled] = + useState(!isApprovedDisabled); const [approvalAction, setApprovalAction] = useState<'APPROVED' | 'REJECTED'>( !isApprovedDisabled ? 'APPROVED' : 'REJECTED' ); @@ -264,7 +263,8 @@ const DetailChickin = () => { Delete -