@orbe-agro/client-core 5.6.309 → 5.6.311
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/components/template/Footer.js +1 -1
- package/dist/@ecme/locales/lang/ptBR/pages.js +1 -1
- package/dist/@ecme/locales/lang/ptBR/pages.js.map +1 -1
- package/dist/@ecme/views/auth/ForgotPassword/ForgotPassword.js +9 -27
- package/dist/@ecme/views/auth/ForgotPassword/ForgotPassword.js.map +1 -1
- package/dist/@ecme/views/auth/ResetPassword/ResetPassword.js +5 -24
- package/dist/@ecme/views/auth/ResetPassword/ResetPassword.js.map +1 -1
- package/dist/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.js +35 -5
- package/dist/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.js.map +1 -1
- package/dist/@ecme/views/auth-demo/ForgotPasswordDemoSide/ForgotPasswordDemoSide.js +1 -1
- package/dist/@ecme/views/auth-demo/ForgotPasswordDemoSide/ForgotPasswordDemoSide.js.map +1 -1
- package/dist/@ecme/views/auth-demo/ForgotPasswordDemoSimple/ForgotPasswordDemoSimple.js +1 -1
- package/dist/@ecme/views/auth-demo/ForgotPasswordDemoSimple/ForgotPasswordDemoSimple.js.map +1 -1
- package/dist/@ecme/views/auth-demo/ForgotPasswordDemoSplit/ForgotPasswordDemoSplit.js +1 -1
- package/dist/@ecme/views/auth-demo/ForgotPasswordDemoSplit/ForgotPasswordDemoSplit.js.map +1 -1
- package/dist/@types/@ecme/store/authStore.d.ts +1 -1
- package/dist/@types/@ecme/store/localeStore.d.ts +1 -1
- package/dist/@types/@ecme/store/themeStore.d.ts +1 -1
- package/dist/@types/@ecme/views/auth/ForgotPassword/ForgotPassword.d.ts +1 -4
- package/dist/@types/@ecme/views/auth/ForgotPassword/ForgotPassword.d.ts.map +1 -1
- package/dist/@types/@ecme/views/auth/ResetPassword/ResetPassword.d.ts +1 -2
- package/dist/@types/@ecme/views/auth/ResetPassword/ResetPassword.d.ts.map +1 -1
- package/dist/@types/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.d.ts +0 -1
- package/dist/@types/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.d.ts.map +1 -1
- package/dist/@types/base/@types/api/response/bayer/TFindAllEntregaBayerExportResponse.d.ts +2 -0
- package/dist/@types/base/@types/api/response/bayer/TFindAllEntregaBayerExportResponse.d.ts.map +1 -1
- package/dist/@types/base/@types/api/response/bayer/TFindAllEntregaBayerResponse.d.ts +2 -0
- package/dist/@types/base/@types/api/response/bayer/TFindAllEntregaBayerResponse.d.ts.map +1 -1
- package/dist/@types/base/@types/api/response/bayer/TFindAllMetricsEntregaBayerResponse.d.ts +2 -0
- package/dist/@types/base/@types/api/response/bayer/TFindAllMetricsEntregaBayerResponse.d.ts.map +1 -1
- package/dist/@types/base/@types/api/response/bayer/types.d.ts +6 -0
- package/dist/@types/base/@types/api/response/bayer/types.d.ts.map +1 -1
- package/dist/@types/base/store/auth/sessionUserData.d.ts +1 -1
- package/dist/@types/base/store/loadingConfigStore.d.ts +1 -1
- package/dist/base/@types/api/response/bayer/types.js.map +1 -1
- package/lib/@ecme/locales/lang/ptBR/pages.ts +1 -1
- package/lib/@ecme/views/auth/ForgotPassword/ForgotPassword.tsx +12 -41
- package/lib/@ecme/views/auth/ResetPassword/ResetPassword.tsx +4 -29
- package/lib/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.tsx +35 -5
- package/lib/@ecme/views/auth-demo/ForgotPasswordDemoSide/ForgotPasswordDemoSide.tsx +1 -1
- package/lib/@ecme/views/auth-demo/ForgotPasswordDemoSimple/ForgotPasswordDemoSimple.tsx +1 -1
- package/lib/@ecme/views/auth-demo/ForgotPasswordDemoSplit/ForgotPasswordDemoSplit.tsx +1 -1
- package/lib/base/@types/api/response/bayer/TFindAllEntregaBayerExportResponse.ts +2 -0
- package/lib/base/@types/api/response/bayer/TFindAllEntregaBayerResponse.ts +2 -0
- package/lib/base/@types/api/response/bayer/TFindAllMetricsEntregaBayerResponse.ts +2 -0
- package/lib/base/@types/api/response/bayer/types.ts +6 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import Container from "../shared/Container.js";
|
|
|
3
3
|
import classNames from "../../utils/classNames.js";
|
|
4
4
|
import { APP_NAME } from "../../constants/app.constant.js";
|
|
5
5
|
import { PAGE_CONTAINER_GUTTER_X } from "../../constants/theme.constant.js";
|
|
6
|
-
const version = true ? "5.6.
|
|
6
|
+
const version = true ? "5.6.311" : "0.0.0";
|
|
7
7
|
const FooterContent = () => {
|
|
8
8
|
return /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-auto items-center justify-between", children: [
|
|
9
9
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -3,7 +3,7 @@ const pages = {
|
|
|
3
3
|
auth: {
|
|
4
4
|
forgotPassword: {
|
|
5
5
|
title: "Recuperar Senha",
|
|
6
|
-
desc: "Por favor, insira seu email para receber um
|
|
6
|
+
desc: "Por favor, insira seu email para receber um código de recuperação.",
|
|
7
7
|
mailSent: "Verifique seu email",
|
|
8
8
|
mailSentDesc: "Enviamos uma recuperação de senha para seu email"
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages.js","sources":["../../../../../lib/@ecme/locales/lang/ptBR/pages.ts"],"sourcesContent":["import EnPages from '../en/pages'\n\nexport default {\n pages: {\n auth: {\n forgotPassword: {\n title: 'Recuperar Senha',\n desc: 'Por favor, insira seu email para receber um
|
|
1
|
+
{"version":3,"file":"pages.js","sources":["../../../../../lib/@ecme/locales/lang/ptBR/pages.ts"],"sourcesContent":["import EnPages from '../en/pages'\n\nexport default {\n pages: {\n auth: {\n forgotPassword: {\n title: 'Recuperar Senha',\n desc: 'Por favor, insira seu email para receber um código de recuperação.',\n mailSent: 'Verifique seu email',\n mailSentDesc:\n 'Enviamos uma recuperação de senha para seu email',\n },\n },\n accessDenied: {\n layout: {\n title: 'Acesso Negado',\n subtitle:\n 'Você não tem permissão para acessar esta página.',\n },\n }\n \n },\n} as typeof EnPages\n"],"names":[],"mappings":"AAEA,MAAA,QAAe;AAAA,EACX,OAAO;AAAA,IACH,MAAM;AAAA,MACF,gBAAgB;AAAA,QACZ,OAAO;AAAA,QACP,MAAM;AAAA,QACN,UAAU;AAAA,QACV,cACI;AAAA,MAAA;AAAA,IACR;AAAA,IAEJ,cAAc;AAAA,MACT,QAAQ;AAAA,QACT,OAAO;AAAA,QACP,UACI;AAAA,MAAA;AAAA,IACR;AAAA,EACA;AAGR;"}
|
|
@@ -1,48 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "../../../components/ui/Alert/index.js";
|
|
3
|
-
import "../../../components/ui/Button/index.js";
|
|
4
3
|
import useTimeOutMessage from "../../../utils/hooks/useTimeOutMessage.js";
|
|
5
4
|
import { useState } from "react";
|
|
6
5
|
import { useTranslation } from "react-i18next";
|
|
7
|
-
import {
|
|
6
|
+
import { Navigate } from "react-router-dom";
|
|
8
7
|
import ForgotPasswordForm from "./components/ForgotPasswordForm.js";
|
|
9
8
|
import Alert from "../../../components/ui/Alert/Alert.js";
|
|
10
|
-
|
|
11
|
-
const ForgotPasswordBase = ({
|
|
12
|
-
signInUrl = "/sign-in"
|
|
13
|
-
}) => {
|
|
9
|
+
const ForgotPasswordBase = () => {
|
|
14
10
|
const [emailSent, setEmailSent] = useState(false);
|
|
15
11
|
const [message, setMessage] = useTimeOutMessage();
|
|
16
|
-
const navigate = useNavigate();
|
|
17
|
-
const handleContinue = () => {
|
|
18
|
-
navigate(signInUrl);
|
|
19
|
-
};
|
|
20
12
|
const { t } = useTranslation();
|
|
13
|
+
if (emailSent) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Navigate, { replace: true, to: "/reset-password" });
|
|
15
|
+
}
|
|
21
16
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */ jsx("h3", { className: "mb-2", children: "Link de redefinição enviado" }),
|
|
24
|
-
/* @__PURE__ */ jsx("p", { className: "font-semibold", children: "Enviamos um link de redefinição para seu e-mail. Ele é válido por 30 minutos." })
|
|
25
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-12 flex flex-col items-center text-center", children: [
|
|
26
18
|
/* @__PURE__ */ jsx("h3", { className: "mb-2", children: t("pages.auth.forgotPassword.title") }),
|
|
27
19
|
/* @__PURE__ */ jsx("p", { className: "font-semibold", children: t("pages.auth.forgotPassword.desc") })
|
|
28
|
-
] })
|
|
20
|
+
] }),
|
|
29
21
|
message && /* @__PURE__ */ jsx(Alert, { showIcon: true, className: "mb-4", type: "danger", children: /* @__PURE__ */ jsx("span", { className: "break-all", children: message }) }),
|
|
30
22
|
/* @__PURE__ */ jsx(
|
|
31
23
|
ForgotPasswordForm,
|
|
32
24
|
{
|
|
33
25
|
emailSent,
|
|
34
26
|
setMessage,
|
|
35
|
-
setEmailSent
|
|
36
|
-
children: /* @__PURE__ */ jsx(
|
|
37
|
-
Button,
|
|
38
|
-
{
|
|
39
|
-
block: true,
|
|
40
|
-
variant: "solid",
|
|
41
|
-
type: "button",
|
|
42
|
-
onClick: handleContinue,
|
|
43
|
-
children: t("common.actions.continue")
|
|
44
|
-
}
|
|
45
|
-
)
|
|
27
|
+
setEmailSent
|
|
46
28
|
}
|
|
47
29
|
)
|
|
48
30
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPassword.js","sources":["../../../../../lib/@ecme/views/auth/ForgotPassword/ForgotPassword.tsx"],"sourcesContent":["import ActionLink from '@/components/shared/ActionLink'\nimport Alert from '@/components/ui/Alert'\nimport
|
|
1
|
+
{"version":3,"file":"ForgotPassword.js","sources":["../../../../../lib/@ecme/views/auth/ForgotPassword/ForgotPassword.tsx"],"sourcesContent":["import ActionLink from '@/components/shared/ActionLink'\nimport Alert from '@/components/ui/Alert'\nimport useTimeOutMessage from '@/utils/hooks/useTimeOutMessage'\nimport { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { Navigate } from 'react-router-dom'\nimport ForgotPasswordForm from './components/ForgotPasswordForm'\n\nexport const ForgotPasswordBase = () => {\n const [emailSent, setEmailSent] = useState(false)\n const [message, setMessage] = useTimeOutMessage()\n\n const { t } = useTranslation()\n\n if (emailSent) {\n return <Navigate replace to=\"/reset-password\" />\n }\n\n return (\n <div>\n <div className=\"mb-12 flex flex-col items-center text-center\">\n <h3 className=\"mb-2\">\n {t('pages.auth.forgotPassword.title')}\n </h3>\n <p className=\"font-semibold\">\n {t('pages.auth.forgotPassword.desc')}\n </p>\n </div>\n {message && (\n <Alert showIcon className=\"mb-4\" type=\"danger\">\n <span className=\"break-all\">{message}</span>\n </Alert>\n )}\n <ForgotPasswordForm\n emailSent={emailSent}\n setMessage={setMessage}\n setEmailSent={setEmailSent}\n />\n </div>\n )\n}\n\nconst ForgotPassword = () => {\n return <ForgotPasswordBase />\n}\n\nexport default ForgotPassword\n"],"names":[],"mappings":";;;;;;;;AAQO,MAAM,qBAAqB,MAAM;AACpC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,CAAC,SAAS,UAAU,IAAI,kBAAA;AAE9B,QAAM,EAAE,EAAA,IAAM,eAAA;AAEd,MAAI,WAAW;AACX,WAAO,oBAAC,UAAA,EAAS,SAAO,MAAC,IAAG,mBAAkB;AAAA,EAClD;AAEA,8BACK,OAAA,EACG,UAAA;AAAA,IAAA,qBAAC,OAAA,EAAI,WAAU,gDACX,UAAA;AAAA,MAAA,oBAAC,MAAA,EAAG,WAAU,QACT,UAAA,EAAE,iCAAiC,GACxC;AAAA,0BACC,KAAA,EAAE,WAAU,iBACR,UAAA,EAAE,gCAAgC,EAAA,CACvC;AAAA,IAAA,GACJ;AAAA,IACC,WACG,oBAAC,OAAA,EAAM,UAAQ,MAAC,WAAU,QAAO,MAAK,UAClC,UAAA,oBAAC,QAAA,EAAK,WAAU,aAAa,mBAAQ,GACzC;AAAA,IAEJ;AAAA,MAAC;AAAA,MAAA;AAAA,QACG;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,GACJ;AAER;AAEA,MAAM,iBAAiB,MAAM;AACzB,6BAAQ,oBAAA,EAAmB;AAC/B;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState
|
|
2
|
+
import { useState } from "react";
|
|
3
3
|
import "../../../components/ui/Alert/index.js";
|
|
4
4
|
import "../../../components/ui/Button/index.js";
|
|
5
5
|
import ActionLink from "../../../components/shared/ActionLink.js";
|
|
6
6
|
import ResetPasswordForm from "./components/ResetPasswordForm.js";
|
|
7
7
|
import useTimeOutMessage from "../../../utils/hooks/useTimeOutMessage.js";
|
|
8
|
-
import { useNavigate
|
|
8
|
+
import { useNavigate } from "react-router-dom";
|
|
9
9
|
import Logo from "../../../components/template/Logo.js";
|
|
10
10
|
import "../../../../base/utils/index.js";
|
|
11
11
|
import "../../../store/index.js";
|
|
@@ -17,8 +17,7 @@ import Alert from "../../../components/ui/Alert/Alert.js";
|
|
|
17
17
|
import Button from "../../../components/ui/Button/Button.js";
|
|
18
18
|
const ResetPasswordBase = ({
|
|
19
19
|
signInUrl = "/sign-in",
|
|
20
|
-
type
|
|
21
|
-
token
|
|
20
|
+
type
|
|
22
21
|
}) => {
|
|
23
22
|
const [resetComplete, setResetComplete] = useState(false);
|
|
24
23
|
const [message, setMessage] = useTimeOutMessage();
|
|
@@ -34,7 +33,7 @@ const ResetPasswordBase = ({
|
|
|
34
33
|
/* @__PURE__ */ jsx("p", { className: "font-semibold", children: "Sua senha foi alterada com sucesso!" })
|
|
35
34
|
] }) : /* @__PURE__ */ jsx(Fragment, { children: type === "RECUPERARSENHA" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36
35
|
/* @__PURE__ */ jsx("h3", { className: "mb-2", children: "Crie sua nova senha" }),
|
|
37
|
-
/* @__PURE__ */ jsx("p", { className: "font-semibold", children: "
|
|
36
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold", children: "Informe o código enviado para seu e-mail e crie sua nova senha." })
|
|
38
37
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
39
38
|
/* @__PURE__ */ jsx(
|
|
40
39
|
Logo,
|
|
@@ -56,7 +55,6 @@ const ResetPasswordBase = ({
|
|
|
56
55
|
setResetComplete,
|
|
57
56
|
type,
|
|
58
57
|
userId: user.userId ?? void 0,
|
|
59
|
-
token,
|
|
60
58
|
children: /* @__PURE__ */ jsx(Button, { block: true, variant: "solid", type: "button", onClick: handleContinue, children: "Continuar" })
|
|
61
59
|
}
|
|
62
60
|
),
|
|
@@ -72,24 +70,7 @@ const ResetPasswordBase = ({
|
|
|
72
70
|
] });
|
|
73
71
|
};
|
|
74
72
|
const ResetPassword = () => {
|
|
75
|
-
|
|
76
|
-
const [token, setToken] = useState(null);
|
|
77
|
-
const [error, setError] = useState(null);
|
|
78
|
-
useEffect(() => {
|
|
79
|
-
const tokenFromUrl = searchParams.get("token");
|
|
80
|
-
if (tokenFromUrl) {
|
|
81
|
-
setToken(tokenFromUrl);
|
|
82
|
-
} else {
|
|
83
|
-
setError("Link de redefinição inválido ou token não encontrado.");
|
|
84
|
-
}
|
|
85
|
-
}, [searchParams]);
|
|
86
|
-
if (error) {
|
|
87
|
-
return /* @__PURE__ */ jsx("div", { className: "text-center text-red-500", children: error });
|
|
88
|
-
}
|
|
89
|
-
if (!token) {
|
|
90
|
-
return /* @__PURE__ */ jsx("div", { className: "text-center", children: "Carregando..." });
|
|
91
|
-
}
|
|
92
|
-
return /* @__PURE__ */ jsx(ResetPasswordBase, { type: "RECUPERARSENHA", token });
|
|
73
|
+
return /* @__PURE__ */ jsx(ResetPasswordBase, { type: "RECUPERARSENHA" });
|
|
93
74
|
};
|
|
94
75
|
export {
|
|
95
76
|
ResetPasswordBase,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPassword.js","sources":["../../../../../lib/@ecme/views/auth/ResetPassword/ResetPassword.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"ResetPassword.js","sources":["../../../../../lib/@ecme/views/auth/ResetPassword/ResetPassword.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport Alert from \"@/components/ui/Alert\";\nimport Button from \"@/components/ui/Button\";\nimport ActionLink from \"@/components/shared/ActionLink\";\nimport ResetPasswordForm from \"./components/ResetPasswordForm\";\nimport useTimeOutMessage from \"@/utils/hooks/useTimeOutMessage\";\nimport { useNavigate } from \"react-router-dom\";\nimport { TAlterarPasswordType } from \"@base/@types/models/auth\";\nimport Logo from \"@/components/template/Logo\";\nimport { getLogoFilename } from \"@base/utils\";\nimport { useThemeStore } from \"@/store\";\nimport { useAuth } from \"@/auth\";\n\ntype ResetPasswordProps = {\n signInUrl?: string;\n type: TAlterarPasswordType;\n};\n\nexport const ResetPasswordBase = ({\n signInUrl = \"/sign-in\",\n type,\n}: ResetPasswordProps) => {\n const [resetComplete, setResetComplete] = useState(false);\n\n const [message, setMessage] = useTimeOutMessage();\n\n const navigate = useNavigate();\n\n const handleContinue = () => {\n navigate(signInUrl);\n };\n\n const { mode } = useThemeStore();\n const { user } = useAuth();\n\n return (\n <div>\n <div className=\"mb-12 flex flex-col items-center\">\n {resetComplete ? (\n <>\n <h3 className=\"mb-2 text-success\">Operação finalizada</h3>\n <p className=\"font-semibold\">Sua senha foi alterada com sucesso!</p>\n </>\n ) : (\n <>\n {type === \"RECUPERARSENHA\" ? (\n <>\n <h3 className=\"mb-2\">Crie sua nova senha</h3>\n <p className=\"font-semibold\">\n Informe o código enviado para seu e-mail e crie sua nova senha.\n </p>\n </>\n ) : (\n <>\n <Logo\n imgClass=\"mb-6 max-h-20\"\n name={getLogoFilename(true, mode)}\n />\n <h3 className=\"mb-2\">Primeiro Acesso</h3>{\" \"}\n <p className=\"font-semibold\">Digite uma nova senha.</p>\n </>\n )}\n </>\n )}\n </div>\n {message && (\n <Alert showIcon className=\"mb-4\" type=\"danger\">\n <span className=\"break-all\">{message}</span>\n </Alert>\n )}\n <ResetPasswordForm\n resetComplete={resetComplete}\n setMessage={setMessage}\n setResetComplete={setResetComplete}\n type={type}\n userId={user.userId ?? undefined}\n >\n <Button block variant=\"solid\" type=\"button\" onClick={handleContinue}>\n Continuar\n </Button>\n </ResetPasswordForm>\n <div className=\"mt-4 text-center\">\n <ActionLink\n to={signInUrl}\n className=\"heading-text font-bold\"\n themeColor={false}\n >\n Voltar\n </ActionLink>\n </div>\n </div>\n );\n};\n\nconst ResetPassword = () => {\n return <ResetPasswordBase type=\"RECUPERARSENHA\" />;\n};\n\nexport default ResetPassword;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkBO,MAAM,oBAAoB,CAAC;AAAA,EAChC,YAAY;AAAA,EACZ;AACF,MAA0B;AACxB,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAS,KAAK;AAExD,QAAM,CAAC,SAAS,UAAU,IAAI,kBAAA;AAE9B,QAAM,WAAW,YAAA;AAEjB,QAAM,iBAAiB,MAAM;AAC3B,aAAS,SAAS;AAAA,EACpB;AAEA,QAAM,EAAE,KAAA,IAAS,cAAA;AACjB,QAAM,EAAE,KAAA,IAAS,QAAA;AAEjB,8BACG,OAAA,EACC,UAAA;AAAA,IAAA,oBAAC,OAAA,EAAI,WAAU,oCACZ,UAAA,gBACC,qBAAA,UAAA,EACE,UAAA;AAAA,MAAA,oBAAC,MAAA,EAAG,WAAU,qBAAoB,UAAA,uBAAmB;AAAA,MACrD,oBAAC,KAAA,EAAE,WAAU,iBAAgB,UAAA,sCAAA,CAAmC;AAAA,IAAA,EAAA,CAClE,IAEA,oBAAA,UAAA,EACG,UAAA,SAAS,mBACR,qBAAA,UAAA,EACE,UAAA;AAAA,MAAA,oBAAC,MAAA,EAAG,WAAU,QAAO,UAAA,uBAAmB;AAAA,MACxC,oBAAC,KAAA,EAAE,WAAU,iBAAgB,UAAA,kEAAA,CAE7B;AAAA,IAAA,EAAA,CACF,IAEA,qBAAA,UAAA,EACE,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,MAAM,gBAAgB,MAAM,IAAI;AAAA,QAAA;AAAA,MAAA;AAAA,MAElC,oBAAC,MAAA,EAAG,WAAU,QAAO,UAAA,mBAAe;AAAA,MAAM;AAAA,MAC1C,oBAAC,KAAA,EAAE,WAAU,iBAAgB,UAAA,yBAAA,CAAsB;AAAA,IAAA,EAAA,CACrD,GAEJ,GAEJ;AAAA,IACC,WACC,oBAAC,OAAA,EAAM,UAAQ,MAAC,WAAU,QAAO,MAAK,UACpC,UAAA,oBAAC,QAAA,EAAK,WAAU,aAAa,mBAAQ,GACvC;AAAA,IAEF;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QAAQ,KAAK,UAAU;AAAA,QAEvB,UAAA,oBAAC,QAAA,EAAO,OAAK,MAAC,SAAQ,SAAQ,MAAK,UAAS,SAAS,gBAAgB,UAAA,YAAA,CAErE;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,oBAAC,OAAA,EAAI,WAAU,oBACb,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,IAAI;AAAA,QACJ,WAAU;AAAA,QACV,YAAY;AAAA,QACb,UAAA;AAAA,MAAA;AAAA,IAAA,EAED,CACF;AAAA,EAAA,GACF;AAEJ;AAEA,MAAM,gBAAgB,MAAM;AAC1B,SAAO,oBAAC,mBAAA,EAAkB,MAAK,iBAAA,CAAiB;AAClD;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import "../../../../components/ui/Button/index.js";
|
|
4
|
+
import "../../../../components/ui/Input/index.js";
|
|
4
5
|
import "../../../../components/ui/Form/index.js";
|
|
5
6
|
import PasswordInput from "../../../../components/shared/PasswordInput.js";
|
|
6
7
|
import { apiResetPassword } from "../../../../services/AuthService.js";
|
|
@@ -15,9 +16,10 @@ import { LAYOUT_COLLAPSIBLE_SIDE } from "../../../../constants/theme.constant.js
|
|
|
15
16
|
import useAuth from "../../../../auth/useAuth.js";
|
|
16
17
|
import { Form } from "../../../../components/ui/Form/Form.js";
|
|
17
18
|
import FormItem from "../../../../components/ui/Form/FormItem.js";
|
|
19
|
+
import Input from "../../../../components/ui/Input/Input.js";
|
|
18
20
|
import Button from "../../../../components/ui/Button/Button.js";
|
|
19
21
|
const validationSchema = z.object({
|
|
20
|
-
token: z.string().optional(),
|
|
22
|
+
token: z.string().trim().optional(),
|
|
21
23
|
id: z.string().optional(),
|
|
22
24
|
newPassword: z.string({ required_error: "Por favor digite uma senha" }),
|
|
23
25
|
confirmPassword: z.string({
|
|
@@ -39,18 +41,23 @@ const ResetPasswordForm = (props) => {
|
|
|
39
41
|
resetComplete,
|
|
40
42
|
children,
|
|
41
43
|
type,
|
|
42
|
-
userId
|
|
43
|
-
token
|
|
44
|
+
userId
|
|
44
45
|
} = props;
|
|
45
46
|
const {
|
|
46
47
|
handleSubmit,
|
|
47
48
|
formState: { errors },
|
|
48
49
|
control
|
|
49
50
|
} = useForm({
|
|
50
|
-
resolver: zodResolver(
|
|
51
|
+
resolver: zodResolver(
|
|
52
|
+
type === "RECUPERARSENHA" ? validationSchema.and(
|
|
53
|
+
z.object({
|
|
54
|
+
token: z.string({ required_error: "Informe o código recebido por e-mail." }).trim().min(1, "Informe o código recebido por e-mail.")
|
|
55
|
+
})
|
|
56
|
+
) : validationSchema
|
|
57
|
+
)
|
|
51
58
|
});
|
|
52
59
|
const onResetPassword = async (values) => {
|
|
53
|
-
const { newPassword } = values;
|
|
60
|
+
const { newPassword, token } = values;
|
|
54
61
|
setSubmitting(true);
|
|
55
62
|
try {
|
|
56
63
|
let payload;
|
|
@@ -77,6 +84,29 @@ const ResetPasswordForm = (props) => {
|
|
|
77
84
|
setSubmitting(false);
|
|
78
85
|
};
|
|
79
86
|
return /* @__PURE__ */ jsx("div", { className, children: !resetComplete ? /* @__PURE__ */ jsxs(Form, { onSubmit: handleSubmit(onResetPassword), children: [
|
|
87
|
+
type === "RECUPERARSENHA" && /* @__PURE__ */ jsx(
|
|
88
|
+
FormItem,
|
|
89
|
+
{
|
|
90
|
+
label: "Código",
|
|
91
|
+
invalid: Boolean(errors.token),
|
|
92
|
+
errorMessage: errors.token?.message,
|
|
93
|
+
children: /* @__PURE__ */ jsx(
|
|
94
|
+
Controller,
|
|
95
|
+
{
|
|
96
|
+
name: "token",
|
|
97
|
+
control,
|
|
98
|
+
render: ({ field }) => /* @__PURE__ */ jsx(
|
|
99
|
+
Input,
|
|
100
|
+
{
|
|
101
|
+
autoComplete: "off",
|
|
102
|
+
placeholder: "Código recebido por e-mail",
|
|
103
|
+
...field
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
),
|
|
80
110
|
/* @__PURE__ */ jsx(
|
|
81
111
|
FormItem,
|
|
82
112
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPasswordForm.js","sources":["../../../../../../lib/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport Button from \"@/components/ui/Button\";\nimport { FormItem, Form } from \"@/components/ui/Form\";\nimport PasswordInput from \"@/components/shared/PasswordInput\";\nimport { apiResetPassword } from \"@/services/AuthService\";\nimport { useForm, Controller } from \"react-hook-form\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport { z } from \"zod\";\nimport type { ZodType } from \"zod\";\nimport type { CommonProps } from \"@/@types/common\";\nimport { TAlterarPasswordType } from \"@base/@types/models/auth\";\nimport { useAuth } from \"@/auth\";\nimport { useNavigate } from \"react-router-dom\";\nimport appConfig from \"@/configs/app.config\";\nimport { useThemeStore } from \"@/store/themeStore\";\nimport { LAYOUT_COLLAPSIBLE_SIDE } from \"@/constants/theme.constant\";\n\ninterface ResetPasswordFormProps extends CommonProps {\n resetComplete: boolean;\n setResetComplete?: (compplete: boolean) => void;\n setMessage?: (message: string) => void;\n type: TAlterarPasswordType;\n userId?: string;\n
|
|
1
|
+
{"version":3,"file":"ResetPasswordForm.js","sources":["../../../../../../lib/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport Button from \"@/components/ui/Button\";\nimport Input from \"@/components/ui/Input\";\nimport { FormItem, Form } from \"@/components/ui/Form\";\nimport PasswordInput from \"@/components/shared/PasswordInput\";\nimport { apiResetPassword } from \"@/services/AuthService\";\nimport { useForm, Controller } from \"react-hook-form\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport { z } from \"zod\";\nimport type { ZodType } from \"zod\";\nimport type { CommonProps } from \"@/@types/common\";\nimport { TAlterarPasswordType } from \"@base/@types/models/auth\";\nimport { useAuth } from \"@/auth\";\nimport { useNavigate } from \"react-router-dom\";\nimport appConfig from \"@/configs/app.config\";\nimport { useThemeStore } from \"@/store/themeStore\";\nimport { LAYOUT_COLLAPSIBLE_SIDE } from \"@/constants/theme.constant\";\n\ninterface ResetPasswordFormProps extends CommonProps {\n resetComplete: boolean;\n setResetComplete?: (compplete: boolean) => void;\n setMessage?: (message: string) => void;\n type: TAlterarPasswordType;\n userId?: string;\n}\n\ntype ResetPasswordFormSchema = {\n token?: string;\n newPassword: string;\n confirmPassword: string;\n};\n\nconst validationSchema: ZodType<ResetPasswordFormSchema> = z\n .object({\n token: z.string().trim().optional(),\n id: z.string().optional(),\n newPassword: z.string({ required_error: \"Por favor digite uma senha\" }),\n confirmPassword: z.string({\n required_error: \"Confirme sua nova senha.\",\n }),\n })\n .refine((data) => data.newPassword === data.confirmPassword, {\n message: \"As senhas não são iguais.\",\n path: [\"confirmPassword\"],\n });\n\nconst ResetPasswordForm = (props: ResetPasswordFormProps) => {\n const [isSubmitting, setSubmitting] = useState<boolean>(false);\n const navigate = useNavigate();\n const { updateUserSession } = useAuth();\n const setLayout = useThemeStore((state) => state.setLayout);\n\n const {\n className,\n setMessage,\n setResetComplete,\n resetComplete,\n children,\n type,\n userId,\n } = props;\n\n const {\n handleSubmit,\n formState: { errors },\n control,\n } = useForm<ResetPasswordFormSchema>({\n resolver: zodResolver(\n type === \"RECUPERARSENHA\"\n ? validationSchema.and(\n z.object({\n token: z\n .string({ required_error: \"Informe o código recebido por e-mail.\" })\n .trim()\n .min(1, \"Informe o código recebido por e-mail.\"),\n })\n )\n : validationSchema\n ),\n });\n\n const onResetPassword = async (values: ResetPasswordFormSchema) => {\n const { newPassword, token } = values;\n setSubmitting(true);\n\n try {\n let payload;\n if (type === \"RECUPERARSENHA\") {\n if (!token) {\n throw new Error(\"Token de recuperação não fornecido.\");\n }\n payload = { token, password: newPassword };\n } else {\n payload = { id: userId ?? \"\", password: newPassword };\n }\n await apiResetPassword(payload);\n\n setSubmitting(false);\n setResetComplete?.(true);\n updateUserSession({ primeiroAcesso: false });\n setLayout(LAYOUT_COLLAPSIBLE_SIDE);\n navigate(appConfig.authenticatedEntryPath);\n } catch (errors) {\n setMessage?.(\n typeof errors === \"string\"\n ? errors\n : \"Houve um erro ao alterar sua senha.\"\n );\n setSubmitting(false);\n }\n\n setSubmitting(false);\n };\n\n return (\n <div className={className}>\n {!resetComplete ? (\n <Form onSubmit={handleSubmit(onResetPassword)}>\n {type === \"RECUPERARSENHA\" && (\n <FormItem\n label=\"Código\"\n invalid={Boolean(errors.token)}\n errorMessage={errors.token?.message}\n >\n <Controller\n name=\"token\"\n control={control}\n render={({ field }) => (\n <Input\n autoComplete=\"off\"\n placeholder=\"Código recebido por e-mail\"\n {...field}\n />\n )}\n />\n </FormItem>\n )}\n <FormItem\n label=\"Senha\"\n invalid={Boolean(errors.newPassword)}\n errorMessage={errors.newPassword?.message}\n >\n <Controller\n name=\"newPassword\"\n control={control}\n render={({ field }) => (\n <PasswordInput\n autoComplete=\"off\"\n placeholder=\"••••••••••••\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Confirmar Senha\"\n invalid={Boolean(errors.confirmPassword)}\n errorMessage={errors.confirmPassword?.message}\n >\n <Controller\n name=\"confirmPassword\"\n control={control}\n render={({ field }) => (\n <PasswordInput\n autoComplete=\"off\"\n placeholder=\"Confirm Password\"\n {...field}\n />\n )}\n />\n </FormItem>\n <Button\n className=\"mt-5\"\n block\n loading={isSubmitting}\n variant=\"solid\"\n type=\"submit\"\n >\n {isSubmitting ? \"Enviando...\" : \"Enviar\"}\n </Button>\n </Form>\n ) : (\n <>{children}</>\n )}\n </div>\n );\n};\n\nexport default ResetPasswordForm;\n"],"names":["errors"],"mappings":"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"}
|
|
@@ -3,7 +3,7 @@ import "../../auth/ForgotPassword/index.js";
|
|
|
3
3
|
import Side from "../../../components/layouts/AuthLayout/Side.js";
|
|
4
4
|
import { ForgotPasswordBase } from "../../auth/ForgotPassword/ForgotPassword.js";
|
|
5
5
|
const ForgotPasswordDemoSide = () => {
|
|
6
|
-
return /* @__PURE__ */ jsx(Side, { children: /* @__PURE__ */ jsx(ForgotPasswordBase, {
|
|
6
|
+
return /* @__PURE__ */ jsx(Side, { children: /* @__PURE__ */ jsx(ForgotPasswordBase, {}) });
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
9
|
ForgotPasswordDemoSide as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPasswordDemoSide.js","sources":["../../../../../lib/@ecme/views/auth-demo/ForgotPasswordDemoSide/ForgotPasswordDemoSide.tsx"],"sourcesContent":["import { ForgotPasswordBase } from '@/views/auth/ForgotPassword'\nimport Side from '@/components/layouts/AuthLayout/Side'\n\nconst ForgotPasswordDemoSide = () => {\n return (\n <Side>\n <ForgotPasswordBase
|
|
1
|
+
{"version":3,"file":"ForgotPasswordDemoSide.js","sources":["../../../../../lib/@ecme/views/auth-demo/ForgotPasswordDemoSide/ForgotPasswordDemoSide.tsx"],"sourcesContent":["import { ForgotPasswordBase } from '@/views/auth/ForgotPassword'\nimport Side from '@/components/layouts/AuthLayout/Side'\n\nconst ForgotPasswordDemoSide = () => {\n return (\n <Side>\n <ForgotPasswordBase />\n </Side>\n )\n}\n\nexport default ForgotPasswordDemoSide\n"],"names":[],"mappings":";;;;AAGA,MAAM,yBAAyB,MAAM;AACjC,SACI,oBAAC,MAAA,EACG,UAAA,oBAAC,oBAAA,CAAA,CAAmB,GACxB;AAER;"}
|
|
@@ -3,7 +3,7 @@ import "../../auth/ForgotPassword/index.js";
|
|
|
3
3
|
import Simple from "../../../components/layouts/AuthLayout/Simple.js";
|
|
4
4
|
import { ForgotPasswordBase } from "../../auth/ForgotPassword/ForgotPassword.js";
|
|
5
5
|
const ForgotPasswordDemoSimple = () => {
|
|
6
|
-
return /* @__PURE__ */ jsx(Simple, { children: /* @__PURE__ */ jsx(ForgotPasswordBase, {
|
|
6
|
+
return /* @__PURE__ */ jsx(Simple, { children: /* @__PURE__ */ jsx(ForgotPasswordBase, {}) });
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
9
|
ForgotPasswordDemoSimple as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPasswordDemoSimple.js","sources":["../../../../../lib/@ecme/views/auth-demo/ForgotPasswordDemoSimple/ForgotPasswordDemoSimple.tsx"],"sourcesContent":["import { ForgotPasswordBase } from '@/views/auth/ForgotPassword'\nimport Simple from '@/components/layouts/AuthLayout/Simple'\n\nconst ForgotPasswordDemoSimple = () => {\n return (\n <Simple>\n <ForgotPasswordBase
|
|
1
|
+
{"version":3,"file":"ForgotPasswordDemoSimple.js","sources":["../../../../../lib/@ecme/views/auth-demo/ForgotPasswordDemoSimple/ForgotPasswordDemoSimple.tsx"],"sourcesContent":["import { ForgotPasswordBase } from '@/views/auth/ForgotPassword'\nimport Simple from '@/components/layouts/AuthLayout/Simple'\n\nconst ForgotPasswordDemoSimple = () => {\n return (\n <Simple>\n <ForgotPasswordBase />\n </Simple>\n )\n}\n\nexport default ForgotPasswordDemoSimple\n"],"names":[],"mappings":";;;;AAGA,MAAM,2BAA2B,MAAM;AACnC,SACI,oBAAC,QAAA,EACG,UAAA,oBAAC,oBAAA,CAAA,CAAmB,GACxB;AAER;"}
|
|
@@ -3,7 +3,7 @@ import "../../auth/ForgotPassword/index.js";
|
|
|
3
3
|
import Split from "../../../components/layouts/AuthLayout/Split.js";
|
|
4
4
|
import { ForgotPasswordBase } from "../../auth/ForgotPassword/ForgotPassword.js";
|
|
5
5
|
const ForgotPasswordDemoSplit = () => {
|
|
6
|
-
return /* @__PURE__ */ jsx(Split, { children: /* @__PURE__ */ jsx(ForgotPasswordBase, {
|
|
6
|
+
return /* @__PURE__ */ jsx(Split, { children: /* @__PURE__ */ jsx(ForgotPasswordBase, {}) });
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
9
|
ForgotPasswordDemoSplit as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPasswordDemoSplit.js","sources":["../../../../../lib/@ecme/views/auth-demo/ForgotPasswordDemoSplit/ForgotPasswordDemoSplit.tsx"],"sourcesContent":["import { ForgotPasswordBase } from '@/views/auth/ForgotPassword'\nimport Split from '@/components/layouts/AuthLayout/Split'\n\nconst ForgotPasswordDemoSplit = () => {\n return (\n <Split>\n <ForgotPasswordBase
|
|
1
|
+
{"version":3,"file":"ForgotPasswordDemoSplit.js","sources":["../../../../../lib/@ecme/views/auth-demo/ForgotPasswordDemoSplit/ForgotPasswordDemoSplit.tsx"],"sourcesContent":["import { ForgotPasswordBase } from '@/views/auth/ForgotPassword'\nimport Split from '@/components/layouts/AuthLayout/Split'\n\nconst ForgotPasswordDemoSplit = () => {\n return (\n <Split>\n <ForgotPasswordBase />\n </Split>\n )\n}\n\nexport default ForgotPasswordDemoSplit\n"],"names":[],"mappings":";;;;AAGA,MAAM,0BAA0B,MAAM;AAClC,SACI,oBAAC,OAAA,EACG,UAAA,oBAAC,oBAAA,CAAA,CAAmB,GACxB;AAER;"}
|
|
@@ -42,7 +42,7 @@ export declare const useSessionUser: import("zustand").UseBoundStore<Omit<Omit<i
|
|
|
42
42
|
persist: {
|
|
43
43
|
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<AuthState & AuthAction, unknown, unknown>>) => void;
|
|
44
44
|
clearStorage: () => void;
|
|
45
|
-
rehydrate: () => Promise<void
|
|
45
|
+
rehydrate: () => Promise<void>;
|
|
46
46
|
hasHydrated: () => boolean;
|
|
47
47
|
onHydrate: (fn: (state: AuthState & AuthAction) => void) => () => void;
|
|
48
48
|
onFinishHydration: (fn: (state: AuthState & AuthAction) => void) => () => void;
|
|
@@ -34,7 +34,7 @@ export declare const useLocaleStore: import("zustand").UseBoundStore<Omit<Omit<i
|
|
|
34
34
|
persist: {
|
|
35
35
|
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<LocaleState, LocaleState, unknown>>) => void;
|
|
36
36
|
clearStorage: () => void;
|
|
37
|
-
rehydrate: () => Promise<void
|
|
37
|
+
rehydrate: () => Promise<void>;
|
|
38
38
|
hasHydrated: () => boolean;
|
|
39
39
|
onHydrate: (fn: (state: LocaleState) => void) => () => void;
|
|
40
40
|
onFinishHydration: (fn: (state: LocaleState) => void) => () => void;
|
|
@@ -40,7 +40,7 @@ export declare const useThemeStore: import("zustand").UseBoundStore<Omit<import(
|
|
|
40
40
|
loading?: boolean;
|
|
41
41
|
} & ThemeAction, unknown>>) => void;
|
|
42
42
|
clearStorage: () => void;
|
|
43
|
-
rehydrate: () => Promise<void
|
|
43
|
+
rehydrate: () => Promise<void>;
|
|
44
44
|
hasHydrated: () => boolean;
|
|
45
45
|
onHydrate: (fn: (state: Theme & {
|
|
46
46
|
loading?: boolean;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
signInUrl?: string;
|
|
3
|
-
};
|
|
4
|
-
export declare const ForgotPasswordBase: ({ signInUrl, }: ForgotPasswordProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare const ForgotPasswordBase: () => import("react/jsx-runtime").JSX.Element;
|
|
5
2
|
declare const ForgotPassword: () => import("react/jsx-runtime").JSX.Element;
|
|
6
3
|
export default ForgotPassword;
|
|
7
4
|
//# sourceMappingURL=ForgotPassword.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPassword.d.ts","sourceRoot":"","sources":["../../../../../../lib/@ecme/views/auth/ForgotPassword/ForgotPassword.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ForgotPassword.d.ts","sourceRoot":"","sources":["../../../../../../lib/@ecme/views/auth/ForgotPassword/ForgotPassword.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,kBAAkB,+CAgC9B,CAAA;AAED,QAAA,MAAM,cAAc,+CAEnB,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -2,9 +2,8 @@ import { TAlterarPasswordType } from "@base/@types/models/auth";
|
|
|
2
2
|
type ResetPasswordProps = {
|
|
3
3
|
signInUrl?: string;
|
|
4
4
|
type: TAlterarPasswordType;
|
|
5
|
-
token?: string;
|
|
6
5
|
};
|
|
7
|
-
export declare const ResetPasswordBase: ({ signInUrl, type,
|
|
6
|
+
export declare const ResetPasswordBase: ({ signInUrl, type, }: ResetPasswordProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
declare const ResetPassword: () => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default ResetPassword;
|
|
10
9
|
//# sourceMappingURL=ResetPassword.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPassword.d.ts","sourceRoot":"","sources":["../../../../../../lib/@ecme/views/auth/ResetPassword/ResetPassword.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAMhE,KAAK,kBAAkB,GAAG;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ResetPassword.d.ts","sourceRoot":"","sources":["../../../../../../lib/@ecme/views/auth/ResetPassword/ResetPassword.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAMhE,KAAK,kBAAkB,GAAG;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,oBAAoB,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,sBAG/B,kBAAkB,4CAuEpB,CAAC;AAEF,QAAA,MAAM,aAAa,+CAElB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -6,7 +6,6 @@ interface ResetPasswordFormProps extends CommonProps {
|
|
|
6
6
|
setMessage?: (message: string) => void;
|
|
7
7
|
type: TAlterarPasswordType;
|
|
8
8
|
userId?: string;
|
|
9
|
-
token?: string;
|
|
10
9
|
}
|
|
11
10
|
declare const ResetPasswordForm: (props: ResetPasswordFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export default ResetPasswordForm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPasswordForm.d.ts","sourceRoot":"","sources":["../../../../../../../lib/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResetPasswordForm.d.ts","sourceRoot":"","sources":["../../../../../../../lib/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAOhE,UAAU,sBAAuB,SAAQ,WAAW;IAClD,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAsBD,QAAA,MAAM,iBAAiB,GAAI,OAAO,sBAAsB,4CA4IvD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -21,6 +21,8 @@ export type TFindAllEntregaBayerExportResponse = {
|
|
|
21
21
|
quantidadeEntregue?: number | null;
|
|
22
22
|
quantidadePendente?: number | null;
|
|
23
23
|
quantidadeRetida?: number | null;
|
|
24
|
+
quantidadePendenteConsumidaTransferencia: number;
|
|
25
|
+
quantidadeRetidaTransferencia: number;
|
|
24
26
|
quantidadeDisponivel?: number | null;
|
|
25
27
|
safra?: string | null;
|
|
26
28
|
status?: string | null;
|
package/dist/@types/base/@types/api/response/bayer/TFindAllEntregaBayerExportResponse.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TFindAllEntregaBayerExportResponse.d.ts","sourceRoot":"","sources":["../../../../../../../lib/base/@types/api/response/bayer/TFindAllEntregaBayerExportResponse.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,0BAA0B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAAC"}
|
|
1
|
+
{"version":3,"file":"TFindAllEntregaBayerExportResponse.d.ts","sourceRoot":"","sources":["../../../../../../../lib/base/@types/api/response/bayer/TFindAllEntregaBayerExportResponse.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,0BAA0B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,wCAAwC,EAAE,MAAM,CAAC;IACjD,6BAA6B,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAAC"}
|
|
@@ -17,6 +17,8 @@ export type TFindAllEntregaBayerResponse = {
|
|
|
17
17
|
quantidadePendente?: number | null;
|
|
18
18
|
quantidadeRetida?: number | null;
|
|
19
19
|
quantidadeBaixadaConsumida?: number | null;
|
|
20
|
+
quantidadePendenteConsumidaTransferencia: number;
|
|
21
|
+
quantidadeRetidaTransferencia: number;
|
|
20
22
|
dataEntrega?: string | null;
|
|
21
23
|
status?: StatusTesteCarga | null;
|
|
22
24
|
retornoEntrega?: TRetornoEntregaResponse | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TFindAllEntregaBayerResponse.d.ts","sourceRoot":"","sources":["../../../../../../../lib/base/@types/api/response/bayer/TFindAllEntregaBayerResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEpF,MAAM,MAAM,4BAA4B,GAAG;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,+BAA+B,GAAG,IAAI,CAAC;IAClD,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,0BAA0B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAChD,WAAW,EAAE,OAAO,CAAC;CACxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"TFindAllEntregaBayerResponse.d.ts","sourceRoot":"","sources":["../../../../../../../lib/base/@types/api/response/bayer/TFindAllEntregaBayerResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEpF,MAAM,MAAM,4BAA4B,GAAG;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,+BAA+B,GAAG,IAAI,CAAC;IAClD,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,0BAA0B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,wCAAwC,EAAE,MAAM,CAAC;IACjD,6BAA6B,EAAE,MAAM,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAChD,WAAW,EAAE,OAAO,CAAC;CACxB,CAAC"}
|
|
@@ -5,5 +5,7 @@ export type TFindAllMetricsEntregaBayerResponse = {
|
|
|
5
5
|
quantidadePendente: number;
|
|
6
6
|
quantidadeRetida: number;
|
|
7
7
|
quantidadeBaixadaConsumida: number;
|
|
8
|
+
quantidadePendenteConsumidaTransferencia: number;
|
|
9
|
+
quantidadeRetidaTransferencia: number;
|
|
8
10
|
};
|
|
9
11
|
//# sourceMappingURL=TFindAllMetricsEntregaBayerResponse.d.ts.map
|
package/dist/@types/base/@types/api/response/bayer/TFindAllMetricsEntregaBayerResponse.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TFindAllMetricsEntregaBayerResponse.d.ts","sourceRoot":"","sources":["../../../../../../../lib/base/@types/api/response/bayer/TFindAllMetricsEntregaBayerResponse.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mCAAmC,GAAG;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,0BAA0B,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"TFindAllMetricsEntregaBayerResponse.d.ts","sourceRoot":"","sources":["../../../../../../../lib/base/@types/api/response/bayer/TFindAllMetricsEntregaBayerResponse.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mCAAmC,GAAG;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,0BAA0B,EAAE,MAAM,CAAC;IACnC,wCAAwC,EAAE,MAAM,CAAC;IACjD,6BAA6B,EAAE,MAAM,CAAC;CACzC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TRetornoEntregaResponse } from "./TRetornoEntregaResponse";
|
|
2
|
+
import { StatusRetornoEntrega } from "@base/@types/enums/bayer/StatusRetornoEntrega";
|
|
2
3
|
export interface RoyaltiesBusinessPartnerResponse {
|
|
3
4
|
codigoBusinessPartner: string;
|
|
4
5
|
}
|
|
@@ -58,6 +59,8 @@ export interface FindEntregaResponse {
|
|
|
58
59
|
quantidadePendente: number;
|
|
59
60
|
quantidadeRetida: number;
|
|
60
61
|
quantidadeBaixadaConsumida: number;
|
|
62
|
+
quantidadePendenteConsumidaTransferencia: number;
|
|
63
|
+
quantidadeRetidaTransferencia: number;
|
|
61
64
|
quantidadeDisponivel?: number;
|
|
62
65
|
dataEntrega: string;
|
|
63
66
|
status: 'POSITIVE' | 'NEGATIVE' | 'DECLARED' | 'ORIUNDO';
|
|
@@ -94,6 +97,9 @@ export interface AtualizarQuantidadesEntregaRequest {
|
|
|
94
97
|
quantidadePendente: number;
|
|
95
98
|
quantidadeRetida: number;
|
|
96
99
|
quantidadeBaixadaConsumida: number;
|
|
100
|
+
quantidadePendenteConsumidaTransferencia: number;
|
|
101
|
+
quantidadeRetidaTransferencia: number;
|
|
102
|
+
statusRetornoEntrega?: StatusRetornoEntrega | null;
|
|
97
103
|
}
|
|
98
104
|
export declare enum StatusTransacaoEntrega {
|
|
99
105
|
CONSUMO = "CONSUMO",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../lib/base/@types/api/response/bayer/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../lib/base/@types/api/response/bayer/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAErF,MAAM,WAAW,gCAAgC;IAC/C,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,qCAAqC;IACpD,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,uBAAuB,EAAE,MAAM,CAAC;IAChC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,+BAA+B,EAAE,MAAM,CAAC;CACzC;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,gCAAgC,EAAE,CAAC;CAChD;AAED,MAAM,WAAW,sCAAsC;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,uCAAuC;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,+BAA+B,EAAE,MAAM,CAAC;IACxC,uBAAuB,EAAE,MAAM,CAAC;IAChC,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,SAAS,GAAG,aAAa,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,8BAA8B,GAAG,gBAAgB,CAAC;IAC7I,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,0BAA0B,EAAE,MAAM,CAAC;IACnC,wCAAwC,EAAE,MAAM,CAAC;IACjD,6BAA6B,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IACzD,cAAc,EAAE,uBAAuB,CAAC;CACzC;AAED,MAAM,WAAW,kDAAkD;IACjE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,8CAA8C;IAC7D,KAAK,EAAE,kDAAkD,EAAE,CAAC;CAC7D;AAED,MAAM,WAAW,wCAAwC;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,oCAAoC;IACnD,wBAAwB,EAAE,MAAM,CAAC;IACjC,KAAK,EAAE,wCAAwC,EAAE,CAAC;CACnD;AAED,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,2BAA2B,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,kCAAkC;IACjD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,0BAA0B,EAAE,MAAM,CAAC;IACnC,wCAAwC,EAAE,MAAM,CAAC;IACjD,6BAA6B,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACpD;AAED,oBAAY,sBAAsB;IAChC,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,0BAA0B,EAAE,MAAM,CAAC;IACnC,gBAAgB,EAAE,MAAM,CAAC;IACzB,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gCAAgC;IAC/C,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC"}
|
|
@@ -48,7 +48,7 @@ export declare const useSessionUserDataStore: import("zustand").UseBoundStore<Om
|
|
|
48
48
|
persist: {
|
|
49
49
|
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<TSessionUserDataStore, unknown, unknown>>) => void;
|
|
50
50
|
clearStorage: () => void;
|
|
51
|
-
rehydrate: () => Promise<void
|
|
51
|
+
rehydrate: () => Promise<void>;
|
|
52
52
|
hasHydrated: () => boolean;
|
|
53
53
|
onHydrate: (fn: (state: TSessionUserDataStore) => void) => () => void;
|
|
54
54
|
onFinishHydration: (fn: (state: TSessionUserDataStore) => void) => () => void;
|
|
@@ -16,7 +16,7 @@ export declare const useLoadingConfigStore: import("zustand").UseBoundStore<Omit
|
|
|
16
16
|
persist: {
|
|
17
17
|
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<LoadingConfigState & LoadingConfigActions, LoadingConfigState & LoadingConfigActions, unknown>>) => void;
|
|
18
18
|
clearStorage: () => void;
|
|
19
|
-
rehydrate: () => Promise<void
|
|
19
|
+
rehydrate: () => Promise<void>;
|
|
20
20
|
hasHydrated: () => boolean;
|
|
21
21
|
onHydrate: (fn: (state: LoadingConfigState & LoadingConfigActions) => void) => () => void;
|
|
22
22
|
onFinishHydration: (fn: (state: LoadingConfigState & LoadingConfigActions) => void) => () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../../../../lib/base/@types/api/response/bayer/types.ts"],"sourcesContent":["import { TRetornoEntregaResponse } from \"./TRetornoEntregaResponse\";\n\nexport interface RoyaltiesBusinessPartnerResponse {\n codigoBusinessPartner: string;\n}\n\nexport interface CreateRoyaltiesBusinessPartnerRequest {\n codigoBusinessPartner: string;\n}\n\nexport interface EntregaResponse {\n id: number;\n}\n\nexport interface FindEntregaFilterRequest {\n produtorId: number;\n produtoId: number[];\n dataInicial: string;\n dataFinal: string;\n codigoCentro: string[];\n safraId: number;\n}\n\nexport interface SomatorioEntregaPorGrupoResponse {\n grupo: string;\n totalQuantidadeEntregue: number;\n totalQuantidadeBaixada: number;\n totalQuantidadePendente: number;\n totalQuantidadeRetida: number;\n totalQuantidadeBaixadaConsumida: number;\n}\n\nexport interface SomatorioEntregaResponse {\n somatorios: SomatorioEntregaPorGrupoResponse[];\n}\n\nexport interface SomatorioEntregaExtratoProdutorRequest {\n produtorId: number;\n produtoId: number[];\n dataInicial: string;\n dataFinal: string;\n codigoCentro: string[];\n safraId: number;\n}\n\nexport interface SomatorioEntregaExtratoProdutorResponse {\n transgenia: string;\n totalQuantidadeEntregue: number;\n totalQuantidadeBaixada: number;\n totalQuantidadeBaixadaConsumida: number;\n totalQuantidadePendente: number;\n totalQuantidadeRetida: number;\n}\n\nexport interface FindEntregaResponse {\n id: number;\n saldoEntradaGraosId: number;\n ticketId: number;\n codigoCentro: string;\n codigoDeposito: string;\n produtoId: number;\n safraId: number;\n produtorId: number;\n transgenia: 'INTACTA' | 'NAO_INTACTA' | 'INTACTA_NAO_DECLARADA' | 'ORIUNDO_PARTICIPANTE' | 'INTACTA_ORIUNDO_PARTICIPANTE' | 'SEM_TRANSGENIA';\n quantidadeEntregue: number;\n quantidadeBaixada: number;\n quantidadePendente: number;\n quantidadeRetida: number;\n quantidadeBaixadaConsumida: number;\n quantidadeDisponivel?: number;\n dataEntrega: string;\n status: 'POSITIVE' | 'NEGATIVE' | 'DECLARED' | 'ORIUNDO';\n retornoEntrega: TRetornoEntregaResponse;\n}\n\nexport interface ItemQuantidadeConsumidaPorSaldoEntradaGraosRequest {\n saldoEntradaGraosId: number;\n quantidadeConsumida: number;\n}\n\nexport interface QuantidadeConsumidaPorSaldoEntradaGraosRequest {\n itens: ItemQuantidadeConsumidaPorSaldoEntradaGraosRequest[];\n}\n\nexport interface ItemQuantidadeASerRetidaPorSaldoResponse {\n entregaId: number;\n saldoEntradaGraosId: number;\n quantidadeASerRetida: number;\n}\n\nexport interface QuantidadeASerRetidaPorSaldoResponse {\n businessPartnerRoyalties: string;\n itens: ItemQuantidadeASerRetidaPorSaldoResponse[];\n}\n\nexport interface ItemAplicarRetencaoResponse {\n entregaId: number;\n saldoEntradaGraosId: number;\n quantidadeRetida: number;\n fixacaoId: string;\n}\n\nexport interface AplicarRetencaoResponse {\n itens: ItemAplicarRetencaoResponse[];\n}\n\nexport interface AtualizarQuantidadesEntregaRequest {\n quantidadeEntregue: number;\n quantidadeBaixada: number;\n quantidadePendente: number;\n quantidadeRetida: number;\n quantidadeBaixadaConsumida: number;\n}\n\nexport enum StatusTransacaoEntrega {\n CONSUMO = 'CONSUMO',\n ESTORNO = 'ESTORNO',\n}\n\nexport interface TTransacaoEntregaResponse {\n id: number;\n entregaId: number;\n saldoEntradaGraosId: number;\n liquidacaoId: number;\n quantidadeBaixadaConsumida: number;\n quantidadeRetida: number;\n statusTransacaoEntrega: StatusTransacaoEntrega;\n dataTransacao: string;\n}\n\nexport interface FindAllEntregaBayerExportRequest {\n dataEntregaDe?: string | null;\n dataEntregaAte?: string | null;\n}\n"],"names":["StatusTransacaoEntrega"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../../../../lib/base/@types/api/response/bayer/types.ts"],"sourcesContent":["import { TRetornoEntregaResponse } from \"./TRetornoEntregaResponse\";\nimport { StatusRetornoEntrega } from \"@base/@types/enums/bayer/StatusRetornoEntrega\";\n\nexport interface RoyaltiesBusinessPartnerResponse {\n codigoBusinessPartner: string;\n}\n\nexport interface CreateRoyaltiesBusinessPartnerRequest {\n codigoBusinessPartner: string;\n}\n\nexport interface EntregaResponse {\n id: number;\n}\n\nexport interface FindEntregaFilterRequest {\n produtorId: number;\n produtoId: number[];\n dataInicial: string;\n dataFinal: string;\n codigoCentro: string[];\n safraId: number;\n}\n\nexport interface SomatorioEntregaPorGrupoResponse {\n grupo: string;\n totalQuantidadeEntregue: number;\n totalQuantidadeBaixada: number;\n totalQuantidadePendente: number;\n totalQuantidadeRetida: number;\n totalQuantidadeBaixadaConsumida: number;\n}\n\nexport interface SomatorioEntregaResponse {\n somatorios: SomatorioEntregaPorGrupoResponse[];\n}\n\nexport interface SomatorioEntregaExtratoProdutorRequest {\n produtorId: number;\n produtoId: number[];\n dataInicial: string;\n dataFinal: string;\n codigoCentro: string[];\n safraId: number;\n}\n\nexport interface SomatorioEntregaExtratoProdutorResponse {\n transgenia: string;\n totalQuantidadeEntregue: number;\n totalQuantidadeBaixada: number;\n totalQuantidadeBaixadaConsumida: number;\n totalQuantidadePendente: number;\n totalQuantidadeRetida: number;\n}\n\nexport interface FindEntregaResponse {\n id: number;\n saldoEntradaGraosId: number;\n ticketId: number;\n codigoCentro: string;\n codigoDeposito: string;\n produtoId: number;\n safraId: number;\n produtorId: number;\n transgenia: 'INTACTA' | 'NAO_INTACTA' | 'INTACTA_NAO_DECLARADA' | 'ORIUNDO_PARTICIPANTE' | 'INTACTA_ORIUNDO_PARTICIPANTE' | 'SEM_TRANSGENIA';\n quantidadeEntregue: number;\n quantidadeBaixada: number;\n quantidadePendente: number;\n quantidadeRetida: number;\n quantidadeBaixadaConsumida: number;\n quantidadePendenteConsumidaTransferencia: number;\n quantidadeRetidaTransferencia: number;\n quantidadeDisponivel?: number;\n dataEntrega: string;\n status: 'POSITIVE' | 'NEGATIVE' | 'DECLARED' | 'ORIUNDO';\n retornoEntrega: TRetornoEntregaResponse;\n}\n\nexport interface ItemQuantidadeConsumidaPorSaldoEntradaGraosRequest {\n saldoEntradaGraosId: number;\n quantidadeConsumida: number;\n}\n\nexport interface QuantidadeConsumidaPorSaldoEntradaGraosRequest {\n itens: ItemQuantidadeConsumidaPorSaldoEntradaGraosRequest[];\n}\n\nexport interface ItemQuantidadeASerRetidaPorSaldoResponse {\n entregaId: number;\n saldoEntradaGraosId: number;\n quantidadeASerRetida: number;\n}\n\nexport interface QuantidadeASerRetidaPorSaldoResponse {\n businessPartnerRoyalties: string;\n itens: ItemQuantidadeASerRetidaPorSaldoResponse[];\n}\n\nexport interface ItemAplicarRetencaoResponse {\n entregaId: number;\n saldoEntradaGraosId: number;\n quantidadeRetida: number;\n fixacaoId: string;\n}\n\nexport interface AplicarRetencaoResponse {\n itens: ItemAplicarRetencaoResponse[];\n}\n\nexport interface AtualizarQuantidadesEntregaRequest {\n quantidadeEntregue: number;\n quantidadeBaixada: number;\n quantidadePendente: number;\n quantidadeRetida: number;\n quantidadeBaixadaConsumida: number;\n quantidadePendenteConsumidaTransferencia: number;\n quantidadeRetidaTransferencia: number;\n statusRetornoEntrega?: StatusRetornoEntrega | null;\n}\n\nexport enum StatusTransacaoEntrega {\n CONSUMO = 'CONSUMO',\n ESTORNO = 'ESTORNO',\n}\n\nexport interface TTransacaoEntregaResponse {\n id: number;\n entregaId: number;\n saldoEntradaGraosId: number;\n liquidacaoId: number;\n quantidadeBaixadaConsumida: number;\n quantidadeRetida: number;\n statusTransacaoEntrega: StatusTransacaoEntrega;\n dataTransacao: string;\n}\n\nexport interface FindAllEntregaBayerExportRequest {\n dataEntregaDe?: string | null;\n dataEntregaAte?: string | null;\n}\n"],"names":["StatusTransacaoEntrega"],"mappings":"AAwHO,IAAK,2CAAAA,4BAAL;AACLA,0BAAA,SAAA,IAAU;AACVA,0BAAA,SAAA,IAAU;AAFA,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;"}
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
auth: {
|
|
6
6
|
forgotPassword: {
|
|
7
7
|
title: 'Recuperar Senha',
|
|
8
|
-
desc: 'Por favor, insira seu email para receber um
|
|
8
|
+
desc: 'Por favor, insira seu email para receber um código de recuperação.',
|
|
9
9
|
mailSent: 'Verifique seu email',
|
|
10
10
|
mailSentDesc:
|
|
11
11
|
'Enviamos uma recuperação de senha para seu email',
|
|
@@ -1,50 +1,30 @@
|
|
|
1
1
|
import ActionLink from '@/components/shared/ActionLink'
|
|
2
2
|
import Alert from '@/components/ui/Alert'
|
|
3
|
-
import Button from '@/components/ui/Button'
|
|
4
3
|
import useTimeOutMessage from '@/utils/hooks/useTimeOutMessage'
|
|
5
4
|
import { useState } from 'react'
|
|
6
5
|
import { useTranslation } from 'react-i18next'
|
|
7
|
-
import {
|
|
6
|
+
import { Navigate } from 'react-router-dom'
|
|
8
7
|
import ForgotPasswordForm from './components/ForgotPasswordForm'
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
signInUrl?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const ForgotPasswordBase = ({
|
|
15
|
-
signInUrl = '/sign-in',
|
|
16
|
-
}: ForgotPasswordProps) => {
|
|
9
|
+
export const ForgotPasswordBase = () => {
|
|
17
10
|
const [emailSent, setEmailSent] = useState(false)
|
|
18
11
|
const [message, setMessage] = useTimeOutMessage()
|
|
19
12
|
|
|
20
|
-
const
|
|
13
|
+
const { t } = useTranslation()
|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
if (emailSent) {
|
|
16
|
+
return <Navigate replace to="/reset-password" />
|
|
24
17
|
}
|
|
25
18
|
|
|
26
|
-
const { t } = useTranslation()
|
|
27
|
-
|
|
28
19
|
return (
|
|
29
20
|
<div>
|
|
30
21
|
<div className="mb-12 flex flex-col items-center text-center">
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</>
|
|
38
|
-
) : (
|
|
39
|
-
<>
|
|
40
|
-
<h3 className="mb-2">
|
|
41
|
-
{t('pages.auth.forgotPassword.title')}
|
|
42
|
-
</h3>
|
|
43
|
-
<p className="font-semibold">
|
|
44
|
-
{t('pages.auth.forgotPassword.desc')}
|
|
45
|
-
</p>
|
|
46
|
-
</>
|
|
47
|
-
)}
|
|
22
|
+
<h3 className="mb-2">
|
|
23
|
+
{t('pages.auth.forgotPassword.title')}
|
|
24
|
+
</h3>
|
|
25
|
+
<p className="font-semibold">
|
|
26
|
+
{t('pages.auth.forgotPassword.desc')}
|
|
27
|
+
</p>
|
|
48
28
|
</div>
|
|
49
29
|
{message && (
|
|
50
30
|
<Alert showIcon className="mb-4" type="danger">
|
|
@@ -55,16 +35,7 @@ export const ForgotPasswordBase = ({
|
|
|
55
35
|
emailSent={emailSent}
|
|
56
36
|
setMessage={setMessage}
|
|
57
37
|
setEmailSent={setEmailSent}
|
|
58
|
-
|
|
59
|
-
<Button
|
|
60
|
-
block
|
|
61
|
-
variant="solid"
|
|
62
|
-
type="button"
|
|
63
|
-
onClick={handleContinue}
|
|
64
|
-
>
|
|
65
|
-
{t('common.actions.continue')}
|
|
66
|
-
</Button>
|
|
67
|
-
</ForgotPasswordForm>
|
|
38
|
+
/>
|
|
68
39
|
</div>
|
|
69
40
|
)
|
|
70
41
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useState } from "react";
|
|
2
2
|
import Alert from "@/components/ui/Alert";
|
|
3
3
|
import Button from "@/components/ui/Button";
|
|
4
4
|
import ActionLink from "@/components/shared/ActionLink";
|
|
5
5
|
import ResetPasswordForm from "./components/ResetPasswordForm";
|
|
6
6
|
import useTimeOutMessage from "@/utils/hooks/useTimeOutMessage";
|
|
7
|
-
import { useNavigate
|
|
7
|
+
import { useNavigate } from "react-router-dom";
|
|
8
8
|
import { TAlterarPasswordType } from "@base/@types/models/auth";
|
|
9
9
|
import Logo from "@/components/template/Logo";
|
|
10
10
|
import { getLogoFilename } from "@base/utils";
|
|
@@ -14,13 +14,11 @@ import { useAuth } from "@/auth";
|
|
|
14
14
|
type ResetPasswordProps = {
|
|
15
15
|
signInUrl?: string;
|
|
16
16
|
type: TAlterarPasswordType;
|
|
17
|
-
token?: string;
|
|
18
17
|
};
|
|
19
18
|
|
|
20
19
|
export const ResetPasswordBase = ({
|
|
21
20
|
signInUrl = "/sign-in",
|
|
22
21
|
type,
|
|
23
|
-
token,
|
|
24
22
|
}: ResetPasswordProps) => {
|
|
25
23
|
const [resetComplete, setResetComplete] = useState(false);
|
|
26
24
|
|
|
@@ -49,7 +47,7 @@ export const ResetPasswordBase = ({
|
|
|
49
47
|
<>
|
|
50
48
|
<h3 className="mb-2">Crie sua nova senha</h3>
|
|
51
49
|
<p className="font-semibold">
|
|
52
|
-
|
|
50
|
+
Informe o código enviado para seu e-mail e crie sua nova senha.
|
|
53
51
|
</p>
|
|
54
52
|
</>
|
|
55
53
|
) : (
|
|
@@ -76,7 +74,6 @@ export const ResetPasswordBase = ({
|
|
|
76
74
|
setResetComplete={setResetComplete}
|
|
77
75
|
type={type}
|
|
78
76
|
userId={user.userId ?? undefined}
|
|
79
|
-
token={token}
|
|
80
77
|
>
|
|
81
78
|
<Button block variant="solid" type="button" onClick={handleContinue}>
|
|
82
79
|
Continuar
|
|
@@ -96,29 +93,7 @@ export const ResetPasswordBase = ({
|
|
|
96
93
|
};
|
|
97
94
|
|
|
98
95
|
const ResetPassword = () => {
|
|
99
|
-
|
|
100
|
-
const [token, setToken] = useState<string | null>(null);
|
|
101
|
-
const [error, setError] = useState<string | null>(null);
|
|
102
|
-
|
|
103
|
-
useEffect(() => {
|
|
104
|
-
const tokenFromUrl = searchParams.get("token");
|
|
105
|
-
|
|
106
|
-
if (tokenFromUrl) {
|
|
107
|
-
setToken(tokenFromUrl);
|
|
108
|
-
} else {
|
|
109
|
-
setError("Link de redefinição inválido ou token não encontrado.");
|
|
110
|
-
}
|
|
111
|
-
}, [searchParams]);
|
|
112
|
-
|
|
113
|
-
if (error) {
|
|
114
|
-
return <div className="text-center text-red-500">{error}</div>;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (!token) {
|
|
118
|
-
return <div className="text-center">Carregando...</div>;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
return <ResetPasswordBase type="RECUPERARSENHA" token={token} />;
|
|
96
|
+
return <ResetPasswordBase type="RECUPERARSENHA" />;
|
|
122
97
|
};
|
|
123
98
|
|
|
124
99
|
export default ResetPassword;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
import Button from "@/components/ui/Button";
|
|
3
|
+
import Input from "@/components/ui/Input";
|
|
3
4
|
import { FormItem, Form } from "@/components/ui/Form";
|
|
4
5
|
import PasswordInput from "@/components/shared/PasswordInput";
|
|
5
6
|
import { apiResetPassword } from "@/services/AuthService";
|
|
@@ -21,17 +22,17 @@ interface ResetPasswordFormProps extends CommonProps {
|
|
|
21
22
|
setMessage?: (message: string) => void;
|
|
22
23
|
type: TAlterarPasswordType;
|
|
23
24
|
userId?: string;
|
|
24
|
-
token?: string;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
type ResetPasswordFormSchema = {
|
|
28
|
+
token?: string;
|
|
28
29
|
newPassword: string;
|
|
29
30
|
confirmPassword: string;
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
const validationSchema: ZodType<ResetPasswordFormSchema> = z
|
|
33
34
|
.object({
|
|
34
|
-
token: z.string().optional(),
|
|
35
|
+
token: z.string().trim().optional(),
|
|
35
36
|
id: z.string().optional(),
|
|
36
37
|
newPassword: z.string({ required_error: "Por favor digite uma senha" }),
|
|
37
38
|
confirmPassword: z.string({
|
|
@@ -57,7 +58,6 @@ const ResetPasswordForm = (props: ResetPasswordFormProps) => {
|
|
|
57
58
|
children,
|
|
58
59
|
type,
|
|
59
60
|
userId,
|
|
60
|
-
token,
|
|
61
61
|
} = props;
|
|
62
62
|
|
|
63
63
|
const {
|
|
@@ -65,11 +65,22 @@ const ResetPasswordForm = (props: ResetPasswordFormProps) => {
|
|
|
65
65
|
formState: { errors },
|
|
66
66
|
control,
|
|
67
67
|
} = useForm<ResetPasswordFormSchema>({
|
|
68
|
-
resolver: zodResolver(
|
|
68
|
+
resolver: zodResolver(
|
|
69
|
+
type === "RECUPERARSENHA"
|
|
70
|
+
? validationSchema.and(
|
|
71
|
+
z.object({
|
|
72
|
+
token: z
|
|
73
|
+
.string({ required_error: "Informe o código recebido por e-mail." })
|
|
74
|
+
.trim()
|
|
75
|
+
.min(1, "Informe o código recebido por e-mail."),
|
|
76
|
+
})
|
|
77
|
+
)
|
|
78
|
+
: validationSchema
|
|
79
|
+
),
|
|
69
80
|
});
|
|
70
81
|
|
|
71
82
|
const onResetPassword = async (values: ResetPasswordFormSchema) => {
|
|
72
|
-
const { newPassword } = values;
|
|
83
|
+
const { newPassword, token } = values;
|
|
73
84
|
setSubmitting(true);
|
|
74
85
|
|
|
75
86
|
try {
|
|
@@ -105,6 +116,25 @@ const ResetPasswordForm = (props: ResetPasswordFormProps) => {
|
|
|
105
116
|
<div className={className}>
|
|
106
117
|
{!resetComplete ? (
|
|
107
118
|
<Form onSubmit={handleSubmit(onResetPassword)}>
|
|
119
|
+
{type === "RECUPERARSENHA" && (
|
|
120
|
+
<FormItem
|
|
121
|
+
label="Código"
|
|
122
|
+
invalid={Boolean(errors.token)}
|
|
123
|
+
errorMessage={errors.token?.message}
|
|
124
|
+
>
|
|
125
|
+
<Controller
|
|
126
|
+
name="token"
|
|
127
|
+
control={control}
|
|
128
|
+
render={({ field }) => (
|
|
129
|
+
<Input
|
|
130
|
+
autoComplete="off"
|
|
131
|
+
placeholder="Código recebido por e-mail"
|
|
132
|
+
{...field}
|
|
133
|
+
/>
|
|
134
|
+
)}
|
|
135
|
+
/>
|
|
136
|
+
</FormItem>
|
|
137
|
+
)}
|
|
108
138
|
<FormItem
|
|
109
139
|
label="Senha"
|
|
110
140
|
invalid={Boolean(errors.newPassword)}
|
|
@@ -21,6 +21,8 @@ export type TFindAllEntregaBayerExportResponse = {
|
|
|
21
21
|
quantidadeEntregue?: number | null;
|
|
22
22
|
quantidadePendente?: number | null;
|
|
23
23
|
quantidadeRetida?: number | null;
|
|
24
|
+
quantidadePendenteConsumidaTransferencia: number;
|
|
25
|
+
quantidadeRetidaTransferencia: number;
|
|
24
26
|
quantidadeDisponivel?: number | null;
|
|
25
27
|
safra?: string | null;
|
|
26
28
|
status?: string | null;
|
|
@@ -18,6 +18,8 @@ export type TFindAllEntregaBayerResponse = {
|
|
|
18
18
|
quantidadePendente?: number | null;
|
|
19
19
|
quantidadeRetida?: number | null;
|
|
20
20
|
quantidadeBaixadaConsumida?: number | null;
|
|
21
|
+
quantidadePendenteConsumidaTransferencia: number;
|
|
22
|
+
quantidadeRetidaTransferencia: number;
|
|
21
23
|
dataEntrega?: string | null;
|
|
22
24
|
status?: StatusTesteCarga | null;
|
|
23
25
|
retornoEntrega?: TRetornoEntregaResponse | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TRetornoEntregaResponse } from "./TRetornoEntregaResponse";
|
|
2
|
+
import { StatusRetornoEntrega } from "@base/@types/enums/bayer/StatusRetornoEntrega";
|
|
2
3
|
|
|
3
4
|
export interface RoyaltiesBusinessPartnerResponse {
|
|
4
5
|
codigoBusinessPartner: string;
|
|
@@ -67,6 +68,8 @@ export interface FindEntregaResponse {
|
|
|
67
68
|
quantidadePendente: number;
|
|
68
69
|
quantidadeRetida: number;
|
|
69
70
|
quantidadeBaixadaConsumida: number;
|
|
71
|
+
quantidadePendenteConsumidaTransferencia: number;
|
|
72
|
+
quantidadeRetidaTransferencia: number;
|
|
70
73
|
quantidadeDisponivel?: number;
|
|
71
74
|
dataEntrega: string;
|
|
72
75
|
status: 'POSITIVE' | 'NEGATIVE' | 'DECLARED' | 'ORIUNDO';
|
|
@@ -110,6 +113,9 @@ export interface AtualizarQuantidadesEntregaRequest {
|
|
|
110
113
|
quantidadePendente: number;
|
|
111
114
|
quantidadeRetida: number;
|
|
112
115
|
quantidadeBaixadaConsumida: number;
|
|
116
|
+
quantidadePendenteConsumidaTransferencia: number;
|
|
117
|
+
quantidadeRetidaTransferencia: number;
|
|
118
|
+
statusRetornoEntrega?: StatusRetornoEntrega | null;
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
export enum StatusTransacaoEntrega {
|
package/package.json
CHANGED