From 9562ce7b40deebc7d9ce3b0b6c2dcff98136f37d Mon Sep 17 00:00:00 2001 From: randy-ar Date: Fri, 2 Jan 2026 15:11:06 +0700 Subject: [PATCH 1/4] fix(FE): remove bypass permission in marketing detail and form page --- .../marketing/detail/MarketingDetail.tsx | 72 +++---------------- .../pages/marketing/form/MarketingForm.tsx | 19 +---- .../sales-order/SalesOrderProductForm.tsx | 5 +- .../table-view/DeliveryOrderProductTable.tsx | 60 ---------------- 4 files changed, 13 insertions(+), 143 deletions(-) diff --git a/src/components/pages/marketing/detail/MarketingDetail.tsx b/src/components/pages/marketing/detail/MarketingDetail.tsx index 4c9f1a34..677ea422 100644 --- a/src/components/pages/marketing/detail/MarketingDetail.tsx +++ b/src/components/pages/marketing/detail/MarketingDetail.tsx @@ -77,10 +77,6 @@ const MarketingDetail = ({ confirmationModal.openModal(); }; - const deliveryClickHandler = () => { - deliveryModal.openModal(); - }; - const deleteClickHandler = () => { deleteModal.openModal(); }; @@ -135,7 +131,7 @@ const MarketingDetail = ({
{initialValues?.latest_approval?.step_number == 1 && ( <> - {/* + - */} - + - {/* + - */} - + )} {initialValues?.latest_approval?.step_number != 1 && ( <> - {/* - */} - + )}
@@ -466,7 +426,7 @@ const MarketingDetail = ({
{initialValues?.latest_approval?.step_number != 3 && ( <> - {/* + - */} - + )} - {/* + - */} - +
- {/*
- {JSON.stringify(formik.values)} -
-
- {JSON.stringify(formik.errors)} -
*/} - {/* + - */} - + )} diff --git a/src/components/pages/marketing/form/repeater/sales-order/SalesOrderProductForm.tsx b/src/components/pages/marketing/form/repeater/sales-order/SalesOrderProductForm.tsx index 75aa3ba6..aa9dd9e8 100644 --- a/src/components/pages/marketing/form/repeater/sales-order/SalesOrderProductForm.tsx +++ b/src/components/pages/marketing/form/repeater/sales-order/SalesOrderProductForm.tsx @@ -11,7 +11,7 @@ import SelectInput, { useSelect, } from '@/components/input/SelectInput'; import { Kandang } from '@/types/api/master-data/kandang'; -import { KandangApi, WarehouseApi } from '@/services/api/master-data'; +import { WarehouseApi } from '@/services/api/master-data'; import { ProductWarehouse } from '@/types/api/inventory/product-warehouse'; import { ProductWarehouseApi } from '@/services/api/inventory'; import NumberInput from '@/components/input/NumberInput'; @@ -180,9 +180,6 @@ const SalesOrderProductForm = ({ )} - {/* - {JSON.stringify(formik.errors)} - */}
{ const cols = [ - // { - // id: 'select', - // header: ({ - // table, - // }: { - // table: TanStack.Table; - // }) => ( - //
- // - //
- // ), - // cell: ({ - // row, - // }: { - // row: TanStack.Row; - // }) => ( - //
- // - //
- // ), - // }, { accessorFn: (row: DeliveryOrderProductFormValues) => row.do_number, header: 'No. Pengiriman', @@ -188,18 +156,6 @@ const DeliveryOrderProductTable = ({ )} {!props.row.original.qty && '-'} - {/* {formType == 'add_deliver' && ( - - )} */}
), @@ -248,22 +204,6 @@ const DeliveryOrderProductTable = ({ Tambah Pengiriman - {/* {selectedRowIds.length > 0 && ( - - )} */} ); From 203782c25836437e0226ed708550e8aff9d39ed6 Mon Sep 17 00:00:00 2001 From: randy-ar Date: Mon, 5 Jan 2026 13:05:10 +0700 Subject: [PATCH 2/4] fix(FE): adjust permission finance --- src/components/pages/finance/FinanceDetail.tsx | 2 +- src/components/pages/finance/FinanceTable.tsx | 11 +++++++++-- src/config/route-permission.ts | 9 +++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/components/pages/finance/FinanceDetail.tsx b/src/components/pages/finance/FinanceDetail.tsx index c7057efa..7f24178f 100644 --- a/src/components/pages/finance/FinanceDetail.tsx +++ b/src/components/pages/finance/FinanceDetail.tsx @@ -162,7 +162,7 @@ const FinanceDetail = ({ finance }: { finance: Finance }) => { )} - + )} + {FINANCE_INJECTION_STATUS.includes(finance.transaction_type) && ( + + + + )}