mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-23 23:05:46 +00:00
refactor(FE-212): add DeletePurchaseRequestItemPayload and implement PurchaseDeleteItemsService
This commit is contained in:
@@ -318,17 +318,17 @@ const PurchaseOrderDetail = ({
|
||||
// ===== SUBMISSION HANDLER =====
|
||||
const createManagerApprovalHandler = useCallback(
|
||||
async (payload: CreateManagerApprovalRequestPayload) => {
|
||||
const purchaseRequisitionId = searchParams.get('purchaseId')
|
||||
const purchaseRequestId = searchParams.get('purchaseId')
|
||||
? parseInt(searchParams.get('purchaseId')!)
|
||||
: purchaseData?.id || 1;
|
||||
|
||||
if (!purchaseRequisitionId) {
|
||||
toast.error('Purchase Requisition ID is required');
|
||||
if (!purchaseRequestId) {
|
||||
toast.error('Purchase Request ID is required');
|
||||
return;
|
||||
}
|
||||
|
||||
const res = await ManagerApprovalApi.createManagerApproval(
|
||||
purchaseRequisitionId,
|
||||
purchaseRequestId,
|
||||
payload
|
||||
);
|
||||
|
||||
@@ -377,6 +377,10 @@ const PurchaseOrderDetail = ({
|
||||
};
|
||||
|
||||
const purchaseOrderColumns: ColumnDef<PurchaseItem>[] = [
|
||||
{
|
||||
header: 'No',
|
||||
cell: (props) => props.row.index + 1,
|
||||
},
|
||||
{
|
||||
accessorKey: 'product.name',
|
||||
header: 'Produk',
|
||||
|
||||
Reference in New Issue
Block a user