Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
C
ctas-box
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fachri
ctas-box
Commits
d48fb313
Commit
d48fb313
authored
Oct 28, 2025
by
Rais Aryaguna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update API endpoints in bulananApi for consistency and parameter handling
parent
92033d4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
src/sections/bupot-21-26/bupot-bulanan/utils/api.tsx
src/sections/bupot-21-26/bupot-bulanan/utils/api.tsx
+8
-6
src/sections/bupot-21-26/hitung.ts
src/sections/bupot-21-26/hitung.ts
+3
-3
No files found.
src/sections/bupot-21-26/bupot-bulanan/utils/api.tsx
View file @
d48fb313
import
{
fetcher
}
from
'
src/lib/axios-ctas-box
'
;
import
{
fetcher
,
endpoints
}
from
'
src/lib/axios-ctas-box
'
;
import
type
{
BupotRecord
,
TBaseResponseAPI
,
...
...
@@ -9,12 +9,14 @@ import type {
TPostBulananRequest
,
}
from
'
../types/types
'
;
const
{
list
,
canceled
,
delete
:
deleteAPI
,
upload
}
=
endpoints
.
pph21
.
bulanan
const
bulananApi
=
()
=>
{};
// API untuk get list table
bulananApi
.
getList
=
async
(
config
:
any
)
=>
{
const
response
=
await
fetcher
<
TBaseResponseAPI
<
TGetListDataTableDnResult
>>
([
'
IF_TXR_028/a0
'
,
list
,
{
method
:
'
GET
'
,
...
config
,
...
...
@@ -48,7 +50,7 @@ bulananApi.getKodeObjekPajak = async (params?: Record<string, any>) => {
bulananApi
.
save
=
async
(
config
:
TPostBulananRequest
)
=>
{
const
response
=
await
fetcher
<
TBaseResponseAPI
<
BupotRecord
[]
>>
([
'
/IF_TXR_028/a0
'
,
list
,
{
method
:
'
POST
'
,
data
:
config
,
...
...
@@ -64,7 +66,7 @@ bulananApi.save = async (config: TPostBulananRequest) => {
bulananApi
.
upload
=
async
(
config
:
TPortBulananRequest
)
=>
{
const
response
=
await
fetcher
<
TBaseResponseAPI
<
BupotRecord
>>
([
'
/IF_TXR_028/a0/upload
'
,
upload
,
{
method
:
'
POST
'
,
data
:
config
,
...
...
@@ -80,7 +82,7 @@ bulananApi.upload = async (config: TPortBulananRequest) => {
bulananApi
.
delete
=
async
(
config
:
TPortBulananRequest
)
=>
{
const
response
=
await
fetcher
<
TBaseResponseAPI
<
BupotRecord
>>
([
'
/IF_TXR_028/a0/delete
'
,
deleteAPI
,
{
method
:
'
POST
'
,
data
:
config
,
...
...
@@ -96,7 +98,7 @@ bulananApi.delete = async (config: TPortBulananRequest) => {
bulananApi
.
batal
=
async
(
config
:
TPortBulananCenceledRequest
)
=>
{
const
response
=
await
fetcher
<
TBaseResponseAPI
<
BupotRecord
>>
([
'
/IF_TXR_028/a0/batal
'
,
canceled
,
{
method
:
'
POST
'
,
data
:
config
,
...
...
src/sections/bupot-21-26/hitung.ts
View file @
d48fb313
...
...
@@ -53,8 +53,8 @@ interface TransformedBupotParams {
dpp
:
string
|
number
;
}
type
MutationProps
=
Omit
<
UseMutationOptions
<
ApiResponseBulanan
,
AxiosError
,
transformParamsBupotBulananProps
>
,
type
MutationProps
<
T
>
=
Omit
<
UseMutationOptions
<
ApiResponseBulanan
,
AxiosError
,
T
>
,
'
mutationKey
'
|
'
mutationFn
'
>
;
...
...
@@ -160,7 +160,7 @@ const handleHitungBulanan = async (
// ========================================
export
function
useHitungBulanan
(
props
?:
MutationProps
props
?:
MutationProps
<
transformParamsBupotBulananProps
>
):
UseMutationResult
<
ApiResponseBulanan
,
AxiosError
,
transformParamsBupotBulananProps
>
{
return
useMutation
<
ApiResponseBulanan
,
AxiosError
,
transformParamsBupotBulananProps
>
({
mutationKey
:
[
'
pph-21-26
'
,
'
bulanan
'
,
'
hitung
'
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment