Commit d96c2477 authored by Rais Aryaguna's avatar Rais Aryaguna

fix eslint

parent 71923273
import { Close } from '@mui/icons-material';
import { Dialog, DialogContent, DialogTitle, IconButton, Typography } from '@mui/material';
import { useState } from 'react';
// import { useState } from 'react';
import { useForm } from 'react-hook-form';
import { Field } from 'src/components/hook-form';
import { useAppSelector } from 'src/store';
......@@ -24,13 +24,13 @@ export default function DialogPenandatangan({
onClose,
title = 'Penandatangan',
}: DialogPenandatanganProps) {
const penandatanganOptions = useAppSelector((state) => state.user.data.signer_npwp);
const penandatanganOptions = useAppSelector((state: any) => state.user.data.signer_npwp);
const form = useForm({
mode: 'all',
});
const [isCheckedAgreement, setIsCheckedAgreement] = useState(false);
// const [isCheckedAgreement, setIsCheckedAgreement] = useState(false);
const handleClose = () => {
form.reset();
......@@ -65,7 +65,7 @@ export default function DialogPenandatangan({
<IconButton
aria-label="close"
onClick={handleClose}
sx={(theme) => ({
sx={(theme: any) => ({
position: 'absolute',
right: 8,
top: 8,
......
import Grid from '@mui/material/Grid';
import { useState } from 'react';
import { useFormContext } from 'react-hook-form';
import { useParams } from 'react-router';
// import { useParams } from 'react-router';
import { Field } from 'src/components/hook-form';
type IdentitasProps = {
......@@ -11,7 +11,7 @@ type IdentitasProps = {
};
const Identitas = ({ isPengganti }: IdentitasProps) => {
const { dnId } = useParams();
// const { dnId } = useParams();
const { setValue } = useFormContext();
const [jumlahKeterangan, setJumlahKeterangan] = useState<number>(0);
......@@ -35,16 +35,16 @@ const Identitas = ({ isPengganti }: IdentitasProps) => {
return (
<Grid container rowSpacing={2} alignItems="center" columnSpacing={2}>
<Grid size={{ md: 6 }}>
<Field.DatePicker name="tglPemotongan" label="Tanggal Pemotongan" />
</Grid>
<Grid size={{ md: 3 }}>
<Field.DatePicker name="thnPajak" label="Tahun Pajak" view="year" format="YYYY" />
</Grid>
<Grid size={{ md: 3 }}>
<Field.DatePicker name="msPajak" label="Masa Pajak" view="month" format="MM" />
</Grid>
<Grid size={{ md: 6 }}>
<Field.DatePicker name="tglPemotongan" label="Tanggal Pemotongan" />
</Grid>
<Grid size={{ md: 3 }}>
<Field.DatePicker name="thnPajak" label="Tahun Pajak" view="year" format="YYYY" />
</Grid>
<Grid size={{ md: 3 }}>
<Field.DatePicker name="msPajak" label="Masa Pajak" view="month" format="MM" />
</Grid>
</Grid>
);
};
......
import React, { useEffect, useState } from 'react';
import { useEffect, useState } from 'react';
import { enqueueSnackbar } from 'notistack';
import DialogUmum from 'src/shared/components/dialog/DialogUmum';
import DialogContent from '@mui/material/DialogContent';
......
/* eslint-disable react-hooks/exhaustive-deps */
// import Divider from '@mui/material/Divider';
// import Grid from '@mui/material/Grid';
// import MenuItem from '@mui/material/MenuItem';
......
......@@ -3,7 +3,7 @@ import { CustomBreadcrumbs } from 'src/components/custom-breadcrumbs';
import { DashboardContent } from 'src/layouts/dashboard';
import { RouterLink } from 'src/routes/components';
import { paths } from 'src/routes/paths';
import React, { useCallback, useEffect, useMemo, useRef, useState, startTransition } from 'react';
import { useCallback, useEffect, useMemo, useRef, useState, startTransition } from 'react';
import { useNavigate } from 'react-router';
import type {
GridColDef,
......@@ -12,11 +12,9 @@ import type {
GridRowSelectionModel,
GridSortModel,
GridToolbarProps,
GridPaginationModel} from '@mui/x-data-grid-premium';
import {
DataGridPremium,
useGridApiRef
GridPaginationModel,
} from '@mui/x-data-grid-premium';
import { DataGridPremium, useGridApiRef } from '@mui/x-data-grid-premium';
import { unstable_batchedUpdates } from 'react-dom';
import {
......@@ -105,7 +103,7 @@ export function DnListView() {
const [selectionVersion, setSelectionVersion] = useState(0);
const [kodeObjekPajaks, setKodeObjekPajaks] = useState<TKodeObjekPajak[]>([]);
const { data: kodeObjekPajak, isLoading: isLoadingKop } = useGetKodeObjekPajak();
const { data: kodeObjekPajak } = useGetKodeObjekPajak();
const { buildAdvancedFilter, buildRequestParams } = useAdvancedFilter();
......@@ -216,6 +214,7 @@ export function DnListView() {
// ---------- status options and columns (kept identical to your original) ----------
type Status = 'draft' | 'normal' | 'cancelled' | 'amended';
type StatusOption = { value: Status; label: string };
// eslint-disable-next-line react-hooks/exhaustive-deps
const statusOptions: StatusOption[] = [
{ value: 'draft', label: 'Draft' },
{ value: 'normal', label: 'Normal' },
......
......@@ -64,11 +64,11 @@ const DokumenDipersamakanRekamView = () => {
defaultValues,
});
const {
reset,
handleSubmit,
formState: { isSubmitting },
} = methods;
// const {
// reset,
// handleSubmit,
// formState: { isSubmitting },
// } = methods;
const SubmitRekam = () => {
console.log('Submit API');
......@@ -76,61 +76,58 @@ const DokumenDipersamakanRekamView = () => {
return (
<DashboardContent>
<CustomBreadcrumbs
heading="Add Bupot Unifikasi Non Residen"
links={[
{ name: 'Dashboard', href: paths.dashboard.root },
{ name: 'e-Bupot Unifikasi Non Residen', href: paths.unifikasi.nr },
{ name: 'Add Bupot Unifikasi Non Residen' },
]}
/>
<CustomBreadcrumbs
heading="Add Bupot Unifikasi Non Residen"
links={[
{ name: 'Dashboard', href: paths.dashboard.root },
{ name: 'e-Bupot Unifikasi Non Residen', href: paths.unifikasi.nr },
{ name: 'Add Bupot Unifikasi Non Residen' },
]}
/>
<HeadingRekam label="Rekam Data Bukti Potong PPh Non Residen" />
<HeadingRekam label="Rekam Data Bukti Potong PPh Non Residen" />
<Grid container columnSpacing={2} /* container otomatis */>
<Grid size={{ xs: isOpenPanduan ? 8 : 11 }}>
<form onSubmit={methods.handleSubmit(SubmitRekam)}>
<FormProvider {...methods}>
<Grid container columnSpacing={2} /* container otomatis */>
<Grid size={{ xs: isOpenPanduan ? 8 : 11 }}>
<form onSubmit={methods.handleSubmit(SubmitRekam)}>
<FormProvider {...methods}>
<Suspense fallback={<FormSkeleton />}>
<Identitas isPengganti />
<Divider />
<Suspense fallback={<FormSkeleton />}>
<Identitas isPengganti />
<Divider />
<Suspense fallback={<FormSkeleton />}>
<PphDipotong kodeObjectPajak={data?.data ?? []} />
</Suspense>
<PphDipotong kodeObjectPajak={data?.data ?? []} />
</Suspense>
<Grid size={12}>
<Agreement
isCheckedAgreement={isCheckedAgreement}
setIsCheckedAgreement={setIsCheckedAgreement}
text="Dengan ini saya menyatakan bahwa Bukti Pemotongan/Pemungutan Unifikasi telah
<Grid size={12}>
<Agreement
isCheckedAgreement={isCheckedAgreement}
setIsCheckedAgreement={setIsCheckedAgreement}
text="Dengan ini saya menyatakan bahwa Bukti Pemotongan/Pemungutan Unifikasi telah
saya isi dengan benar secara elektronik sesuai
dengan"
/>
</Grid>
<Stack direction="row" gap={2} justifyContent="end" marginTop={2}>
<LoadingButton
type="button"
disabled={!isCheckedAgreement}
// onClick={handleClickUploadSsp}
// loading={uploadDn.isLoading}
variant="contained"
sx={{ background: '#143B88' }}
>
Save
</LoadingButton>
</Stack>
</Suspense>
</FormProvider>
</form>
</Grid>
<Grid size={{ xs: isOpenPanduan ? 4 : 1 }}>
<PanduanDokumenDipersamakanRekam
handleOpen={handleOpenPanduan}
isOpen={isOpenPanduan}
/>
</Grid>
/>
</Grid>
<Stack direction="row" gap={2} justifyContent="end" marginTop={2}>
<LoadingButton
type="button"
disabled={!isCheckedAgreement}
// onClick={handleClickUploadSsp}
// loading={uploadDn.isLoading}
variant="contained"
sx={{ background: '#143B88' }}
>
Save
</LoadingButton>
</Stack>
</Suspense>
</FormProvider>
</form>
</Grid>
<Grid size={{ xs: isOpenPanduan ? 4 : 1 }}>
<PanduanDokumenDipersamakanRekam handleOpen={handleOpenPanduan} isOpen={isOpenPanduan} />
</Grid>
</DashboardContent>
</Grid>
</DashboardContent>
);
};
......
import Grid from '@mui/material/Grid';
import { useState } from 'react';
import { useFormContext } from 'react-hook-form';
import { useParams } from 'react-router';
// import { useParams } from 'react-router';
import { Field } from 'src/components/hook-form';
type IdentitasProps = {
......@@ -11,7 +11,7 @@ type IdentitasProps = {
};
const Identitas = ({ isPengganti }: IdentitasProps) => {
const { dnId } = useParams();
// const { dnId } = useParams();
const { setValue } = useFormContext();
const [jumlahKeterangan, setJumlahKeterangan] = useState<number>(0);
......@@ -35,16 +35,16 @@ const Identitas = ({ isPengganti }: IdentitasProps) => {
return (
<Grid container rowSpacing={2} alignItems="center" columnSpacing={2}>
<Grid size={{ md: 6 }}>
<Field.DatePicker name="tglPemotongan" label="Tanggal Pemotongan" />
</Grid>
<Grid size={{ md: 3 }}>
<Field.DatePicker name="thnPajak" label="Tahun Pajak" view="year" format="YYYY" />
</Grid>
<Grid size={{ md: 3 }}>
<Field.DatePicker name="msPajak" label="Masa Pajak" view="month" format="MM" />
</Grid>
<Grid size={{ md: 6 }}>
<Field.DatePicker name="tglPemotongan" label="Tanggal Pemotongan" />
</Grid>
<Grid size={{ md: 3 }}>
<Field.DatePicker name="thnPajak" label="Tahun Pajak" view="year" format="YYYY" />
</Grid>
<Grid size={{ md: 3 }}>
<Field.DatePicker name="msPajak" label="Masa Pajak" view="month" format="MM" />
</Grid>
</Grid>
);
};
......
......@@ -74,7 +74,7 @@ export function SspListView() {
.join(' AND ');
};
const { data, isLoading, isError } = useGetDn({
const { data, isLoading } = useGetDn({
params: {
Page: paginationModel.page + 1, // API biasanya 1-based
Limit: paginationModel.pageSize,
......@@ -82,7 +82,7 @@ export function SspListView() {
sortingMode: sortModel[0]?.field,
sortingMethod: sortModel[0]?.sort,
},
refetchOnWindowFocus: false,
// refetchOnWindowFocus: false,
});
const totalRows = data?.total || 0;
......
......@@ -66,7 +66,7 @@ const vswpApi = {
const {
data: { status, data },
status: httpStatus,
// status: httpStatus,
} = await dashboardClient.post<TVswpResponse>('/sandbox/vswp/npwp', payload);
// ✅ status adalah dari body, bukan httpStatus
......@@ -82,7 +82,7 @@ const vswpApi = {
const {
data: { status, data },
status: httpStatus,
// status: httpStatus,
} = await dashboardClient.post<TVswpResponse>('/sandbox/vswp/nik', payload);
if (status !== 1) {
......
......@@ -88,6 +88,7 @@ const useDialogProgressBar = (): UseDialogProgressBarReturn => {
useEffect(() => {
handleStatus();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [numberOfDataProcessed, numberOfData]);
return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment