@orbe-agro/client-core 5.6.295 → 5.6.297
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@ecme/assets/styles/app.css +7 -2
- package/dist/@ecme/assets/styles/tailwind/index.css +7 -2
- package/dist/@ecme/auth/AuthContext.js.map +1 -1
- package/dist/@ecme/auth/AuthProvider.js +23 -4
- package/dist/@ecme/auth/AuthProvider.js.map +1 -1
- package/dist/@ecme/components/template/Footer.js +1 -1
- package/dist/@ecme/constants/auth.constant.js +21 -0
- package/dist/@ecme/constants/auth.constant.js.map +1 -0
- package/dist/@ecme/constants/index.js +4 -0
- package/dist/@ecme/constants/index.js.map +1 -1
- package/dist/@ecme/index.js +4 -0
- package/dist/@ecme/index.js.map +1 -1
- package/dist/@ecme/views/auth/SignIn/SignIn.js +0 -6
- package/dist/@ecme/views/auth/SignIn/SignIn.js.map +1 -1
- package/dist/@ecme/views/auth/SignIn/components/SignInForm.js +8 -2
- package/dist/@ecme/views/auth/SignIn/components/SignInForm.js.map +1 -1
- package/dist/@ecme/views/guide/Documentations/components/Authentication.js +28 -2
- package/dist/@ecme/views/guide/Documentations/components/Authentication.js.map +1 -1
- package/dist/@types/@ecme/auth/AuthContext.d.ts +1 -1
- package/dist/@types/@ecme/auth/AuthContext.d.ts.map +1 -1
- package/dist/@types/@ecme/auth/AuthProvider.d.ts.map +1 -1
- package/dist/@types/@ecme/auth/useAuth.d.ts +1 -1
- package/dist/@types/@ecme/auth/useAuth.d.ts.map +1 -1
- package/dist/@types/@ecme/constants/auth.constant.d.ts +4 -0
- package/dist/@types/@ecme/constants/auth.constant.d.ts.map +1 -0
- package/dist/@types/@ecme/constants/index.d.ts +1 -0
- package/dist/@types/@ecme/constants/index.d.ts.map +1 -1
- package/dist/@types/@ecme/views/auth/SignIn/SignIn.d.ts.map +1 -1
- package/dist/@types/@ecme/views/auth/SignIn/components/SignInForm.d.ts +0 -1
- package/dist/@types/@ecme/views/auth/SignIn/components/SignInForm.d.ts.map +1 -1
- package/dist/@types/@ecme/views/guide/Documentations/components/Authentication.d.ts.map +1 -1
- package/dist/@types/base/@types/api/request/originacao/TCreateTermoFunruralRequest.d.ts +8 -0
- package/dist/@types/base/@types/api/request/originacao/TCreateTermoFunruralRequest.d.ts.map +1 -0
- package/dist/@types/base/@types/api/response/originacao/TDisponibilidadeOpcaoTermoFunruralResponse.d.ts +10 -0
- package/dist/@types/base/@types/api/response/originacao/TDisponibilidadeOpcaoTermoFunruralResponse.d.ts.map +1 -0
- package/dist/@types/base/@types/api/response/originacao/TExisteTermoFunruralResponse.d.ts +4 -0
- package/dist/@types/base/@types/api/response/originacao/TExisteTermoFunruralResponse.d.ts.map +1 -0
- package/dist/@types/base/@types/models/originacao/termoFunrural.d.ts +11 -3
- package/dist/@types/base/@types/models/originacao/termoFunrural.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts +8 -0
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/originacao/config/termoFunrural.d.ts +8 -0
- package/dist/@types/base/configs/endpoints.config/originacao/config/termoFunrural.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/originacao/originacao.d.ts +8 -0
- package/dist/@types/base/configs/endpoints.config/originacao/originacao.d.ts.map +1 -1
- package/dist/@types/base/hooks/useIdleTimeout.d.ts +1 -1
- package/dist/@types/base/hooks/useIdleTimeout.d.ts.map +1 -1
- package/dist/@types/base/services/modules/originacao/termoFunrural/termoFunruralService.d.ts +12 -7
- package/dist/@types/base/services/modules/originacao/termoFunrural/termoFunruralService.d.ts.map +1 -1
- package/dist/base/@types/api/request/originacao/TCreateTermoFunruralRequest.js +2 -0
- package/dist/base/@types/api/request/originacao/TCreateTermoFunruralRequest.js.map +1 -0
- package/dist/base/@types/api/response/originacao/TDisponibilidadeOpcaoTermoFunruralResponse.js +2 -0
- package/dist/base/@types/api/response/originacao/TDisponibilidadeOpcaoTermoFunruralResponse.js.map +1 -0
- package/dist/base/@types/api/response/originacao/TExisteTermoFunruralResponse.js +2 -0
- package/dist/base/@types/api/response/originacao/TExisteTermoFunruralResponse.js.map +1 -0
- package/dist/base/assets/styles/init.css +7 -2
- package/dist/base/configs/endpoints.config/originacao/config/termoFunrural.js +3 -1
- package/dist/base/configs/endpoints.config/originacao/config/termoFunrural.js.map +1 -1
- package/dist/base/hooks/useIdleTimeout.js +2 -1
- package/dist/base/hooks/useIdleTimeout.js.map +1 -1
- package/dist/base/index.js +3 -1
- package/dist/base/services/index.js +3 -1
- package/dist/base/services/modules/index.js +3 -1
- package/dist/base/services/modules/originacao/index.js +4 -2
- package/dist/base/services/modules/originacao/termoFunrural/termoFunruralService.js +18 -5
- package/dist/base/services/modules/originacao/termoFunrural/termoFunruralService.js.map +1 -1
- package/lib/@ecme/assets/styles/tailwind/index.css +7 -0
- package/lib/@ecme/auth/AuthContext.ts +1 -1
- package/lib/@ecme/auth/AuthProvider.tsx +37 -4
- package/lib/@ecme/constants/auth.constant.ts +19 -0
- package/lib/@ecme/constants/index.ts +1 -0
- package/lib/@ecme/views/auth/SignIn/SignIn.tsx +0 -10
- package/lib/@ecme/views/auth/SignIn/components/SignInForm.tsx +8 -3
- package/lib/@ecme/views/guide/Documentations/components/Authentication.tsx +25 -2
- package/lib/base/@types/api/request/originacao/TCreateTermoFunruralRequest.ts +11 -0
- package/lib/base/@types/api/response/originacao/TDisponibilidadeOpcaoTermoFunruralResponse.ts +9 -0
- package/lib/base/@types/api/response/originacao/TExisteTermoFunruralResponse.ts +3 -0
- package/lib/base/@types/models/originacao/termoFunrural.ts +13 -3
- package/lib/base/configs/endpoints.config/originacao/config/termoFunrural.ts +3 -1
- package/lib/base/hooks/useIdleTimeout.ts +6 -2
- package/lib/base/services/modules/originacao/termoFunrural/termoFunruralService.ts +36 -11
- package/package.json +1 -1
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import ActionLink from '@/components/shared/ActionLink'
|
|
2
|
-
import Alert from '@/components/ui/Alert'
|
|
3
|
-
import useTimeOutMessage from '@/utils/hooks/useTimeOutMessage'
|
|
4
2
|
import SignInForm from './components/SignInForm'
|
|
5
3
|
import Logo from '@/components/template/Logo'
|
|
6
4
|
import { getLogoFilename } from '@base/utils/logo'
|
|
@@ -17,8 +15,6 @@ export const SignInBase = ({
|
|
|
17
15
|
forgetPasswordUrl = '/forgot-password',
|
|
18
16
|
disableSubmit,
|
|
19
17
|
}: SignInProps) => {
|
|
20
|
-
const [message, setMessage] = useTimeOutMessage()
|
|
21
|
-
|
|
22
18
|
const { mode } = useThemeStore()
|
|
23
19
|
|
|
24
20
|
return (
|
|
@@ -33,14 +29,8 @@ export const SignInBase = ({
|
|
|
33
29
|
Digite seus dados para entrar.
|
|
34
30
|
</p>
|
|
35
31
|
</div>
|
|
36
|
-
{message && (
|
|
37
|
-
<Alert showIcon className="mb-4" type="danger">
|
|
38
|
-
<span className="break-all">{message}</span>
|
|
39
|
-
</Alert>
|
|
40
|
-
)}
|
|
41
32
|
<SignInForm
|
|
42
33
|
disableSubmit={disableSubmit}
|
|
43
|
-
setMessage={setMessage}
|
|
44
34
|
passwordHint={
|
|
45
35
|
<div className="mb-6 mt-2">
|
|
46
36
|
<ActionLink
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ReactNode, useState } from "react";
|
|
2
2
|
import Input from "@/components/ui/Input";
|
|
3
3
|
import Button from "@/components/ui/Button";
|
|
4
|
+
import Notification from "@/components/ui/Notification";
|
|
5
|
+
import toast from "@/components/ui/toast";
|
|
4
6
|
import { FormItem, Form } from "@/components/ui/Form";
|
|
5
7
|
import PasswordInput from "@/components/shared/PasswordInput";
|
|
6
8
|
import classNames from "@/utils/classNames";
|
|
@@ -13,7 +15,6 @@ import type { CommonProps } from "@/@types/common";
|
|
|
13
15
|
interface SignInFormProps extends CommonProps {
|
|
14
16
|
disableSubmit?: boolean;
|
|
15
17
|
passwordHint?: string | ReactNode;
|
|
16
|
-
setMessage?: (message: string) => void;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
type SignInFormSchema = {
|
|
@@ -33,7 +34,7 @@ const validationSchema: ZodType<SignInFormSchema> = z.object({
|
|
|
33
34
|
const SignInForm = (props: SignInFormProps) => {
|
|
34
35
|
const [isSubmitting, setSubmitting] = useState<boolean>(false);
|
|
35
36
|
|
|
36
|
-
const { disableSubmit = false, className,
|
|
37
|
+
const { disableSubmit = false, className, passwordHint } = props;
|
|
37
38
|
|
|
38
39
|
const {
|
|
39
40
|
handleSubmit,
|
|
@@ -58,7 +59,11 @@ const SignInForm = (props: SignInFormProps) => {
|
|
|
58
59
|
const result = await signIn({ username, password });
|
|
59
60
|
|
|
60
61
|
if (result?.status === "failed") {
|
|
61
|
-
|
|
62
|
+
toast.push(
|
|
63
|
+
<Notification title="Erro ao entrar" type="danger">
|
|
64
|
+
{result.message}
|
|
65
|
+
</Notification>
|
|
66
|
+
);
|
|
62
67
|
}
|
|
63
68
|
}
|
|
64
69
|
|
|
@@ -56,9 +56,9 @@ const Authentication = () => {
|
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
propName: 'signOut',
|
|
59
|
-
type: `<code>() => void</code>`,
|
|
59
|
+
type: `<code>(redirectUrl?: string) => void</code>`,
|
|
60
60
|
default: `-`,
|
|
61
|
-
desc: `A method to sign out the current user
|
|
61
|
+
desc: `A method to sign out the current user. Pass a redirect URL to return there after signing in again.`,
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
propName: 'oAuthSignIn',
|
|
@@ -102,6 +102,29 @@ const YourComponent = () => {
|
|
|
102
102
|
</div>
|
|
103
103
|
);
|
|
104
104
|
};
|
|
105
|
+
`}</SyntaxHighlighter>
|
|
106
|
+
<p className="mt-4">
|
|
107
|
+
To return to the current screen after an idle timeout, pass{' '}
|
|
108
|
+
<code>signOut</code> directly to <code>useIdleTimeout</code>.
|
|
109
|
+
The timeout hook supplies the current path, query string,
|
|
110
|
+
and hash to the callback. Calling <code>signOut()</code>{' '}
|
|
111
|
+
without a destination, such as for a manual logout, keeps
|
|
112
|
+
the existing behavior.
|
|
113
|
+
</p>
|
|
114
|
+
<SyntaxHighlighter language="tsx">{`import { useAuth } from '@/auth'
|
|
115
|
+
import { useIdleTimeout } from '@/base/hooks'
|
|
116
|
+
|
|
117
|
+
const SessionTimeout = () => {
|
|
118
|
+
const { signOut, authenticated } = useAuth();
|
|
119
|
+
|
|
120
|
+
useIdleTimeout({
|
|
121
|
+
timeout: 900,
|
|
122
|
+
onTimeout: signOut,
|
|
123
|
+
enabled: authenticated,
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
return null;
|
|
127
|
+
};
|
|
105
128
|
`}</SyntaxHighlighter>
|
|
106
129
|
</div>
|
|
107
130
|
<div className="mt-10" id="OAuth">
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
TTipoAssinaturaTermoFunrural,
|
|
3
|
+
TTipoRecolhimentoTermoFunrural,
|
|
4
|
+
} from '../../../models/originacao/termoFunrural'
|
|
5
|
+
|
|
6
|
+
export type TCreateTermoFunruralRequest = {
|
|
7
|
+
produtorId: number
|
|
8
|
+
tipoAssinatura: TTipoAssinaturaTermoFunrural
|
|
9
|
+
tipoRecolhimento: TTipoRecolhimentoTermoFunrural
|
|
10
|
+
tipoVigencia?: 'ANUAL' | 'VITALICIO'
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Disponibilidade de uma opção do Termo de Funrural (tipo de assinatura ou de recolhimento).
|
|
3
|
+
* Quando `habilitado` é false, `motivo` explica por que a opção não pode ser escolhida.
|
|
4
|
+
*/
|
|
5
|
+
export type TDisponibilidadeOpcaoTermoFunruralResponse<TOpcao extends string = string> = {
|
|
6
|
+
opcao: TOpcao
|
|
7
|
+
habilitado: boolean
|
|
8
|
+
motivo: string | null
|
|
9
|
+
}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
+
export type TTipoAssinaturaTermoFunrural = 'DIGITAL' | 'FISICA'
|
|
2
|
+
|
|
3
|
+
export type TTipoRecolhimentoTermoFunrural = 'PRODUCAO' | 'FOLHA_PAGAMENTO'
|
|
4
|
+
|
|
1
5
|
export type TTermoFunrural = {
|
|
2
6
|
id?: number,
|
|
3
|
-
cpfCnpj
|
|
7
|
+
cpfCnpj?: string
|
|
8
|
+
cpf?: string | null
|
|
9
|
+
cnpj?: string | null
|
|
4
10
|
produtorId?: number
|
|
5
|
-
tipoAssinatura?:
|
|
6
|
-
tipoRecolhimento?:
|
|
11
|
+
tipoAssinatura?: TTipoAssinaturaTermoFunrural | null
|
|
12
|
+
tipoRecolhimento?: TTipoRecolhimentoTermoFunrural | null
|
|
7
13
|
// Termo de Funrural é vitalício desde a melhoria OA-2000; ANUAL é mantido apenas para leitura de registros legados.
|
|
8
14
|
tipoVigencia?: 'ANUAL' | 'VITALICIO' | null
|
|
15
|
+
statusTermoFunrural?: string | null
|
|
9
16
|
statusCrm?: 'AGUARDANDO_ATUALIZACAO' | 'CONCLUIDO_SAP_ORBEAGRO' | null
|
|
17
|
+
motivo?: string | null
|
|
18
|
+
contratoId?: number | null
|
|
19
|
+
dataCriacao?: string | null
|
|
10
20
|
}
|
|
@@ -2,9 +2,11 @@ const TERMO_FUNRURAL_URL = '/originacao/api/termo-funrural'
|
|
|
2
2
|
|
|
3
3
|
const termoFunrural = {
|
|
4
4
|
add: { endpoint: `${TERMO_FUNRURAL_URL}`, method: 'post' },
|
|
5
|
-
findOne: { endpoint: `${TERMO_FUNRURAL_URL}
|
|
5
|
+
findOne: { endpoint: `${TERMO_FUNRURAL_URL}/`, method: 'get' },
|
|
6
6
|
findMonitor: { endpoint: `${TERMO_FUNRURAL_URL}/find-monitor`, method: 'get' },
|
|
7
7
|
existePorCpf: { endpoint: `${TERMO_FUNRURAL_URL}/existe-por-cpf`, method: 'get' },
|
|
8
|
+
verificarTiposAssinatura: { endpoint: `${TERMO_FUNRURAL_URL}/verificar-tipos-assinatura`, method: 'get' },
|
|
9
|
+
verificarTiposRecolhimento: { endpoint: `${TERMO_FUNRURAL_URL}/verificar-tipos-recolhimento`, method: 'get' },
|
|
8
10
|
findAllMetrics: { endpoint: `${TERMO_FUNRURAL_URL}/metrics`, method: 'get' },
|
|
9
11
|
cancelar: { endpoint: `${TERMO_FUNRURAL_URL}/cancelar/`, method: 'post' },
|
|
10
12
|
reprovar: { endpoint: `${TERMO_FUNRURAL_URL}/reprovar/`, method: 'post' },
|
|
@@ -3,7 +3,7 @@ import { useCallback } from 'react'
|
|
|
3
3
|
|
|
4
4
|
interface UseIdleTimeoutOptions {
|
|
5
5
|
timeout?: number
|
|
6
|
-
onTimeout: () => void
|
|
6
|
+
onTimeout: (redirectUrl: string) => void
|
|
7
7
|
enabled?: boolean
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -14,7 +14,11 @@ export function useIdleTimeout({
|
|
|
14
14
|
}: UseIdleTimeoutOptions) {
|
|
15
15
|
const handleIdle = useCallback(() => {
|
|
16
16
|
if (enabled) {
|
|
17
|
-
|
|
17
|
+
const redirectUrl =
|
|
18
|
+
window.location.pathname +
|
|
19
|
+
window.location.search +
|
|
20
|
+
window.location.hash
|
|
21
|
+
onTimeout(redirectUrl)
|
|
18
22
|
}
|
|
19
23
|
}, [enabled, onTimeout])
|
|
20
24
|
|
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
import { IFilterParams, TQueryResponse } from '@base/@types/api'
|
|
2
1
|
import endpointConfig from "@base/configs/endpoints.config/endpoints.navigation";
|
|
3
2
|
import ApiService from '@/services/ApiService'
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
// Os tipos usam caminhos relativos para que o .d.ts gerado resolva nos projetos que consomem a lib
|
|
4
|
+
// (o alias @base não existe fora do client-core e deixaria as assinaturas como `any`).
|
|
5
|
+
import type { TQueryResponse } from '../../../../@types/api'
|
|
6
|
+
import type {
|
|
7
|
+
TTermoFunrural,
|
|
8
|
+
TTipoAssinaturaTermoFunrural,
|
|
9
|
+
TTipoRecolhimentoTermoFunrural,
|
|
10
|
+
} from '../../../../@types/models/originacao/termoFunrural';
|
|
11
|
+
import type { TCreateTermoFunruralRequest } from '../../../../@types/api/request/originacao/TCreateTermoFunruralRequest';
|
|
12
|
+
import type { TExisteTermoFunruralResponse } from '../../../../@types/api/response/originacao/TExisteTermoFunruralResponse';
|
|
13
|
+
import type { TDisponibilidadeOpcaoTermoFunruralResponse } from '../../../../@types/api/response/originacao/TDisponibilidadeOpcaoTermoFunruralResponse';
|
|
14
|
+
import type { TFindAllMetricsTermoFunruralResponse } from '../../../../@types/api/response/originacao/TFindAllMetricsTermoFunruralResponse';
|
|
6
15
|
|
|
7
16
|
const TERMO_FUNRURAL_PROJECT_ENDPOINT = endpointConfig.originacao.termoFunrural;
|
|
8
17
|
|
|
9
|
-
export async function apiAddTermoFunrural(body:
|
|
10
|
-
return ApiService.fetchDataWithAxios<
|
|
18
|
+
export async function apiAddTermoFunrural(body: TCreateTermoFunruralRequest) {
|
|
19
|
+
return ApiService.fetchDataWithAxios<TTermoFunrural>({
|
|
11
20
|
url: TERMO_FUNRURAL_PROJECT_ENDPOINT.add.endpoint,
|
|
12
21
|
method: TERMO_FUNRURAL_PROJECT_ENDPOINT.add.method,
|
|
13
22
|
data: body,
|
|
@@ -44,19 +53,19 @@ export async function apiReprovarTermoFunrural(id: number, motivo: string) {
|
|
|
44
53
|
});
|
|
45
54
|
}
|
|
46
55
|
|
|
47
|
-
|
|
48
|
-
|
|
56
|
+
// O backend responde 204 e exige corpo (AprovarTermoFunruralRequest), mesmo com o motivo opcional.
|
|
57
|
+
export async function apiAprovarTermoFunrural(id: number, motivo?: string) {
|
|
58
|
+
return ApiService.fetchDataWithAxios<void>({
|
|
49
59
|
url: TERMO_FUNRURAL_PROJECT_ENDPOINT.aprovar.endpoint + `/${id}`,
|
|
50
60
|
method: TERMO_FUNRURAL_PROJECT_ENDPOINT.aprovar.method,
|
|
51
|
-
data: {
|
|
61
|
+
data: { motivo: motivo ?? null },
|
|
52
62
|
});
|
|
53
63
|
}
|
|
54
64
|
|
|
55
65
|
export async function apiReabrirTermoFunrural(id: number) {
|
|
56
|
-
return ApiService.fetchDataWithAxios<
|
|
66
|
+
return ApiService.fetchDataWithAxios<void>({
|
|
57
67
|
url: TERMO_FUNRURAL_PROJECT_ENDPOINT.reabrir.endpoint + `/${id}`,
|
|
58
68
|
method: TERMO_FUNRURAL_PROJECT_ENDPOINT.reabrir.method,
|
|
59
|
-
data: { id },
|
|
60
69
|
});
|
|
61
70
|
}
|
|
62
71
|
|
|
@@ -73,12 +82,28 @@ export async function apiUploadArquivoAssinado(id: number, formData: FormData) {
|
|
|
73
82
|
|
|
74
83
|
// Termo de Funrural é vitalício (OA-2000): a checagem agora considera apenas o CPF, sem recorte por ano.
|
|
75
84
|
export async function apiExistePorCpfTermoFunrural(cpf: string) {
|
|
76
|
-
return ApiService.fetchDataWithAxios<
|
|
85
|
+
return ApiService.fetchDataWithAxios<TExisteTermoFunruralResponse>({
|
|
77
86
|
url: TERMO_FUNRURAL_PROJECT_ENDPOINT.existePorCpf.endpoint + `?cpf=${cpf}`,
|
|
78
87
|
method: TERMO_FUNRURAL_PROJECT_ENDPOINT.existePorCpf.method,
|
|
79
88
|
});
|
|
80
89
|
}
|
|
81
90
|
|
|
91
|
+
// Informa quais tipos de assinatura (envio) o produtor pode escolher ao emitir o termo e, para os bloqueados, o motivo.
|
|
92
|
+
export async function apiVerificarTiposAssinaturaTermoFunrural(produtorId: number) {
|
|
93
|
+
return ApiService.fetchDataWithAxios<TDisponibilidadeOpcaoTermoFunruralResponse<TTipoAssinaturaTermoFunrural>[]>({
|
|
94
|
+
url: TERMO_FUNRURAL_PROJECT_ENDPOINT.verificarTiposAssinatura.endpoint + `?produtorId=${produtorId}`,
|
|
95
|
+
method: TERMO_FUNRURAL_PROJECT_ENDPOINT.verificarTiposAssinatura.method,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Informa quais tipos de recolhimento o produtor pode escolher ao emitir o termo e, para os bloqueados, o motivo.
|
|
100
|
+
export async function apiVerificarTiposRecolhimentoTermoFunrural(produtorId: number) {
|
|
101
|
+
return ApiService.fetchDataWithAxios<TDisponibilidadeOpcaoTermoFunruralResponse<TTipoRecolhimentoTermoFunrural>[]>({
|
|
102
|
+
url: TERMO_FUNRURAL_PROJECT_ENDPOINT.verificarTiposRecolhimento.endpoint + `?produtorId=${produtorId}`,
|
|
103
|
+
method: TERMO_FUNRURAL_PROJECT_ENDPOINT.verificarTiposRecolhimento.method,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
82
107
|
export async function apiFindTermoFunruralMetrics() {
|
|
83
108
|
return ApiService.fetchDataWithAxios<TFindAllMetricsTermoFunruralResponse>({
|
|
84
109
|
url: TERMO_FUNRURAL_PROJECT_ENDPOINT.findAllMetrics.endpoint,
|
package/package.json
CHANGED