@orbe-agro/client-core 5.3.49 → 5.3.50
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/@types/base/components/shared/AdicionarHistoricoDialog.d.ts.map +1 -1
- package/dist/@types/base/components/shared/CancelarProcessoDialog.d.ts.map +1 -1
- package/dist/@types/base/components/shared/ConcluirProcessoDialog.d.ts.map +1 -1
- package/dist/@types/base/components/shared/ReabrirProcessoDialog.d.ts.map +1 -1
- package/dist/@types/base/components/shared/RetornarFluxAtendimentoDialog.d.ts.map +1 -1
- package/dist/@types/base/components/shared/TransferirParaAtendenteDialog.d.ts.map +1 -1
- package/dist/@types/base/components/shared/TransferirParaSolicitanteDialog.d.ts.map +1 -1
- package/dist/@types/base/components/shared/TransferirProcessoDialog.d.ts.map +1 -1
- package/dist/@types/base/hooks/flux/useAceitarProcesso.d.ts +2 -2
- package/dist/@types/base/hooks/flux/useAceitarProcesso.d.ts.map +1 -1
- package/dist/@types/base/hooks/flux/useTransferirProcesso.d.ts +2 -2
- package/dist/@types/base/hooks/flux/useTransferirProcesso.d.ts.map +1 -1
- package/dist/base/components/shared/AdicionarHistoricoDialog.js +27 -25
- package/dist/base/components/shared/AdicionarHistoricoDialog.js.map +1 -1
- package/dist/base/components/shared/CancelarProcessoDialog.js +29 -27
- package/dist/base/components/shared/CancelarProcessoDialog.js.map +1 -1
- package/dist/base/components/shared/ConcluirProcessoDialog.js +33 -29
- package/dist/base/components/shared/ConcluirProcessoDialog.js.map +1 -1
- package/dist/base/components/shared/ReabrirProcessoDialog.js +23 -21
- package/dist/base/components/shared/ReabrirProcessoDialog.js.map +1 -1
- package/dist/base/components/shared/RetornarFluxAtendimentoDialog.js +30 -28
- package/dist/base/components/shared/RetornarFluxAtendimentoDialog.js.map +1 -1
- package/dist/base/components/shared/TransferirParaAtendenteDialog.js +25 -23
- package/dist/base/components/shared/TransferirParaAtendenteDialog.js.map +1 -1
- package/dist/base/components/shared/TransferirParaSolicitanteDialog.js +28 -26
- package/dist/base/components/shared/TransferirParaSolicitanteDialog.js.map +1 -1
- package/dist/base/components/shared/TransferirProcessoDialog.js +43 -41
- package/dist/base/components/shared/TransferirProcessoDialog.js.map +1 -1
- package/dist/base/hooks/flux/useAceitarProcesso.js +14 -14
- package/dist/base/hooks/flux/useAceitarProcesso.js.map +1 -1
- package/dist/base/hooks/flux/useTransferirProcesso.js +14 -14
- package/dist/base/hooks/flux/useTransferirProcesso.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdicionarHistoricoDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/AdicionarHistoricoDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AdicionarHistoricoDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/AdicionarHistoricoDialog.tsx"],"names":[],"mappings":"AAKA,UAAU,6BAA6B;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,wBAAwB,GAAI,kCAI/B,6BAA6B,4CAyD/B,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CancelarProcessoDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/CancelarProcessoDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CancelarProcessoDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/CancelarProcessoDialog.tsx"],"names":[],"mappings":"AAMA,UAAU,2BAA2B;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,sBAAsB,GAAI,kCAI7B,2BAA2B,4CA0D7B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConcluirProcessoDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/ConcluirProcessoDialog.tsx"],"names":[],"mappings":"AAMA,UAAU,2BAA2B;
|
|
1
|
+
{"version":3,"file":"ConcluirProcessoDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/ConcluirProcessoDialog.tsx"],"names":[],"mappings":"AAMA,UAAU,2BAA2B;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,sBAAsB,GAAI,kCAI7B,2BAA2B,4CAyD7B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReabrirProcessoDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/ReabrirProcessoDialog.tsx"],"names":[],"mappings":"AAMA,UAAU,0BAA0B;
|
|
1
|
+
{"version":3,"file":"ReabrirProcessoDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/ReabrirProcessoDialog.tsx"],"names":[],"mappings":"AAMA,UAAU,0BAA0B;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,qBAAqB,GAAI,kCAI5B,0BAA0B,4CAyD5B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RetornarFluxAtendimentoDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/RetornarFluxAtendimentoDialog.tsx"],"names":[],"mappings":"AAMA,UAAU,kCAAkC;
|
|
1
|
+
{"version":3,"file":"RetornarFluxAtendimentoDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/RetornarFluxAtendimentoDialog.tsx"],"names":[],"mappings":"AAMA,UAAU,kCAAkC;IAC1C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,6BAA6B,GAAI,kCAIpC,kCAAkC,4CA0DpC,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferirParaAtendenteDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/TransferirParaAtendenteDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TransferirParaAtendenteDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/TransferirParaAtendenteDialog.tsx"],"names":[],"mappings":"AAKA,UAAU,kCAAkC;IAC1C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,6BAA6B,GAAI,kCAIpC,kCAAkC,4CA0DpC,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferirParaSolicitanteDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/TransferirParaSolicitanteDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TransferirParaSolicitanteDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/TransferirParaSolicitanteDialog.tsx"],"names":[],"mappings":"AAKA,UAAU,oCAAoC;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,+BAA+B,GAAI,kCAItC,oCAAoC,4CA0DtC,CAAC;AAEF,eAAe,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferirProcessoDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/TransferirProcessoDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TransferirProcessoDialog.d.ts","sourceRoot":"","sources":["../../../../../lib/base/components/shared/TransferirProcessoDialog.tsx"],"names":[],"mappings":"AAMA,UAAU,6BAA6B;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,wBAAwB,GAAI,kCAI/B,6BAA6B,4CAiF/B,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TProcesso } from
|
|
2
|
-
export default function useAceitarProcesso(): import("@tanstack/react-query").UseMutationResult<TProcesso, Error, number, unknown>;
|
|
1
|
+
import { TProcesso } from "@base/@types/models/flux/processo";
|
|
2
|
+
export default function useAceitarProcesso(onClose?: () => void, onReset?: () => void): import("@tanstack/react-query").UseMutationResult<TProcesso, Error, number, unknown>;
|
|
3
3
|
//# sourceMappingURL=useAceitarProcesso.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAceitarProcesso.d.ts","sourceRoot":"","sources":["../../../../../lib/base/hooks/flux/useAceitarProcesso.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,
|
|
1
|
+
{"version":3,"file":"useAceitarProcesso.d.ts","sourceRoot":"","sources":["../../../../../lib/base/hooks/flux/useAceitarProcesso.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAI9D,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,OAAO,CAAC,EAAE,MAAM,IAAI,EACpB,OAAO,CAAC,EAAE,MAAM,IAAI,wFAqBrB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TActionProcesso, TProcesso } from
|
|
2
|
-
export default function useTransferirProcesso(): import("@tanstack/react-query").UseMutationResult<TProcesso, Error, TActionProcesso, unknown>;
|
|
1
|
+
import { TActionProcesso, TProcesso } from "@base/@types/models/flux/processo";
|
|
2
|
+
export default function useTransferirProcesso(onClose?: () => void, onReset?: () => void): import("@tanstack/react-query").UseMutationResult<TProcesso, Error, TActionProcesso, unknown>;
|
|
3
3
|
//# sourceMappingURL=useTransferirProcesso.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTransferirProcesso.d.ts","sourceRoot":"","sources":["../../../../../lib/base/hooks/flux/useTransferirProcesso.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,mCAAmC,
|
|
1
|
+
{"version":3,"file":"useTransferirProcesso.d.ts","sourceRoot":"","sources":["../../../../../lib/base/hooks/flux/useTransferirProcesso.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAI/E,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,OAAO,CAAC,EAAE,MAAM,IAAI,EACpB,OAAO,CAAC,EAAE,MAAM,IAAI,iGAqBrB"}
|
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as r, Fragment as a } from "react/jsx-runtime";
|
|
2
2
|
import "../../../@ecme/components/index.js";
|
|
3
|
-
import { useState as
|
|
3
|
+
import { useState as p } from "react";
|
|
4
4
|
import f from "../../hooks/flux/useAdicionarHistorico.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import h from "../../../@ecme/components/ui/
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import s from "../../../@ecme/components/ui/Button/Button.js";
|
|
6
|
+
import u from "../../../@ecme/components/ui/Tooltip/Tooltip.js";
|
|
7
|
+
import h from "../../../@ecme/components/ui/Drawer/Drawer.js";
|
|
8
|
+
import x from "../../../@ecme/components/ui/Input/Input.js";
|
|
9
|
+
const H = ({
|
|
10
|
+
isOpen: c,
|
|
10
11
|
onClose: e,
|
|
11
|
-
idProcesso:
|
|
12
|
+
idProcesso: l
|
|
12
13
|
}) => {
|
|
13
14
|
const { mutate: n } = f(
|
|
14
15
|
e,
|
|
15
16
|
() => i("")
|
|
16
|
-
), [
|
|
17
|
-
n(
|
|
17
|
+
), [o, i] = p(""), m = (t) => {
|
|
18
|
+
n(t);
|
|
18
19
|
};
|
|
19
|
-
return /* @__PURE__ */ r(
|
|
20
|
-
|
|
20
|
+
return /* @__PURE__ */ r(a, { children: /* @__PURE__ */ r(
|
|
21
|
+
h,
|
|
21
22
|
{
|
|
22
23
|
title: "Adicionar Histórico",
|
|
23
|
-
isOpen:
|
|
24
|
+
isOpen: c,
|
|
24
25
|
onClose: e,
|
|
25
26
|
onRequestClose: e,
|
|
26
|
-
footer: /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */ r(
|
|
28
|
-
/* @__PURE__ */ r(
|
|
29
|
-
|
|
27
|
+
footer: /* @__PURE__ */ d("div", { className: "flex w-full items-start", children: [
|
|
28
|
+
/* @__PURE__ */ r(s, { block: !0, className: "mx-2", onClick: () => e(), children: "Cancelar" }),
|
|
29
|
+
/* @__PURE__ */ r(u, { title: o ? /* @__PURE__ */ r(a, {}) : "Motivo obrigatório", placement: "top", children: /* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(
|
|
30
|
+
s,
|
|
30
31
|
{
|
|
31
32
|
block: !0,
|
|
32
33
|
className: "mx-2",
|
|
33
34
|
variant: "solid",
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
disabled: !o,
|
|
36
|
+
onClick: () => m({
|
|
37
|
+
idProcesso: l,
|
|
38
|
+
mensagemInteracao: o
|
|
37
39
|
}),
|
|
38
40
|
children: "Confirmar"
|
|
39
41
|
}
|
|
40
|
-
)
|
|
42
|
+
) }) })
|
|
41
43
|
] }),
|
|
42
44
|
children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-4 p-4", children: /* @__PURE__ */ r(
|
|
43
|
-
|
|
45
|
+
x,
|
|
44
46
|
{
|
|
45
47
|
textArea: !0,
|
|
46
48
|
required: !0,
|
|
47
49
|
rows: 4,
|
|
48
50
|
placeholder: "Mensagem",
|
|
49
|
-
value:
|
|
50
|
-
onChange: (
|
|
51
|
+
value: o,
|
|
52
|
+
onChange: (t) => i(t.target.value)
|
|
51
53
|
}
|
|
52
54
|
) })
|
|
53
55
|
}
|
|
54
56
|
) });
|
|
55
57
|
};
|
|
56
58
|
export {
|
|
57
|
-
|
|
59
|
+
H as default
|
|
58
60
|
};
|
|
59
61
|
//# sourceMappingURL=AdicionarHistoricoDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdicionarHistoricoDialog.js","sources":["../../../../lib/base/components/shared/AdicionarHistoricoDialog.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"AdicionarHistoricoDialog.js","sources":["../../../../lib/base/components/shared/AdicionarHistoricoDialog.tsx"],"sourcesContent":["import { Button, Drawer, Input, Tooltip } from \"@/components\";\nimport { useState } from \"react\";\nimport useAdicionarHistorico from \"@base/hooks/flux/useAdicionarHistorico\";\nimport { TActionProcesso } from \"@base/@types/models/flux/processo\";\n\ninterface AdicionarHistoricoDialogProps {\n isOpen: boolean;\n onClose: () => void;\n idProcesso: number;\n}\n\nconst AdicionarHistoricoDialog = ({\n isOpen,\n onClose,\n idProcesso,\n}: AdicionarHistoricoDialogProps) => {\n const { mutate: transferirProcesso } = useAdicionarHistorico(onClose, () =>\n setMotivo(\"\")\n );\n const [motivo, setMotivo] = useState<string>(\"\");\n\n const handleTransferirProcesso = (dados: TActionProcesso) => {\n transferirProcesso(dados);\n };\n const Footer = (\n <div className=\"flex w-full items-start\">\n <Button block className=\"mx-2\" onClick={() => onClose()}>\n Cancelar\n </Button>\n <Tooltip title={!motivo ? \"Motivo obrigatório\" : <></>} placement=\"top\">\n <span>\n <Button\n block\n className=\"mx-2\"\n variant=\"solid\"\n disabled={!motivo}\n onClick={() =>\n handleTransferirProcesso({\n idProcesso,\n mensagemInteracao: motivo,\n })\n }\n >\n Confirmar\n </Button>\n </span>\n </Tooltip>\n </div>\n );\n\n return (\n <>\n <Drawer\n title=\"Adicionar Histórico\"\n isOpen={isOpen}\n onClose={onClose}\n onRequestClose={onClose}\n footer={Footer}\n >\n <div className=\"flex flex-col gap-4 p-4\">\n <Input\n textArea\n required\n rows={4}\n placeholder=\"Mensagem\"\n value={motivo}\n onChange={(e: any) => setMotivo(e.target.value)}\n />\n </div>\n </Drawer>\n </>\n );\n};\n\nexport default AdicionarHistoricoDialog;\n"],"names":["AdicionarHistoricoDialog","isOpen","onClose","idProcesso","transferirProcesso","useAdicionarHistorico","setMotivo","motivo","useState","handleTransferirProcesso","dados","jsx","Fragment","Drawer","jsxs","Button","Tooltip","Input","e"],"mappings":";;;;;;;;AAWA,MAAMA,IAA2B,CAAC;AAAA,EAChC,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,MAAqC;AACnC,QAAM,EAAE,QAAQC,EAAA,IAAuBC;AAAA,IAAsBH;AAAA,IAAS,MACpEI,EAAU,EAAE;AAAA,EAAA,GAER,CAACC,GAAQD,CAAS,IAAIE,EAAiB,EAAE,GAEzCC,IAA2B,CAACC,MAA2B;AAC3D,IAAAN,EAAmBM,CAAK;AAAA,EAC1B;AA2BA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA,gBAAAD;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAAZ;AAAA,MACA,SAAAC;AAAA,MACA,gBAAgBA;AAAA,MAChB,QAhCJ,gBAAAY,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,QAAA,gBAAAH,EAACI,GAAA,EAAO,OAAK,IAAC,WAAU,QAAO,SAAS,MAAMb,EAAA,GAAW,UAAA,WAAA,CAEzD;AAAA,QACA,gBAAAS,EAACK,GAAA,EAAQ,OAAQT,IAAgC,gBAAAI,EAAAC,GAAA,CAAA,CAAE,IAAzB,sBAA8B,WAAU,OAChE,UAAA,gBAAAD,EAAC,QAAA,EACC,UAAA,gBAAAA;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,OAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAQ;AAAA,YACR,UAAU,CAACR;AAAA,YACX,SAAS,MACPE,EAAyB;AAAA,cACvB,YAAAN;AAAA,cACA,mBAAmBI;AAAA,YAAA,CACpB;AAAA,YAEJ,UAAA;AAAA,UAAA;AAAA,QAAA,GAGH,EAAA,CACF;AAAA,MAAA,GACF;AAAA,MAYI,UAAA,gBAAAI,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA,gBAAAA;AAAA,QAACM;AAAA,QAAA;AAAA,UACC,UAAQ;AAAA,UACR,UAAQ;AAAA,UACR,MAAM;AAAA,UACN,aAAY;AAAA,UACZ,OAAOV;AAAA,UACP,UAAU,CAACW,MAAWZ,EAAUY,EAAE,OAAO,KAAK;AAAA,QAAA;AAAA,MAAA,EAChD,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,60 +1,62 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as e, Fragment as l } from "react/jsx-runtime";
|
|
2
2
|
import "../../../@ecme/components/ui/index.js";
|
|
3
3
|
import "../../../@ecme/components/index.js";
|
|
4
|
-
import { useState as
|
|
5
|
-
import
|
|
4
|
+
import { useState as p } from "react";
|
|
5
|
+
import u from "../../hooks/flux/useCancelarProcesso.js";
|
|
6
6
|
import c from "../../../@ecme/components/ui/Button/Button.js";
|
|
7
|
-
import
|
|
8
|
-
import h from "../../../@ecme/components/ui/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
import f from "../../../@ecme/components/ui/Tooltip/Tooltip.js";
|
|
8
|
+
import h from "../../../@ecme/components/ui/Drawer/Drawer.js";
|
|
9
|
+
import v from "../../../@ecme/components/ui/Input/Input.js";
|
|
10
|
+
const j = ({
|
|
11
|
+
isOpen: i,
|
|
12
|
+
onClose: o,
|
|
12
13
|
idProcesso: s
|
|
13
14
|
}) => {
|
|
14
|
-
const { mutate: n } =
|
|
15
|
-
|
|
15
|
+
const { mutate: n } = u(
|
|
16
|
+
o,
|
|
16
17
|
() => a("")
|
|
17
|
-
), [
|
|
18
|
-
n(
|
|
18
|
+
), [r, a] = p(""), m = (t) => {
|
|
19
|
+
n(t);
|
|
19
20
|
};
|
|
20
|
-
return /* @__PURE__ */ e(
|
|
21
|
-
|
|
21
|
+
return /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(
|
|
22
|
+
h,
|
|
22
23
|
{
|
|
23
24
|
title: "Cancelar Processo",
|
|
24
|
-
isOpen:
|
|
25
|
-
onClose:
|
|
26
|
-
onRequestClose:
|
|
27
|
-
footer: /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */ e(c, { block: !0, className: "mx-2", onClick: () =>
|
|
29
|
-
/* @__PURE__ */ e(
|
|
25
|
+
isOpen: i,
|
|
26
|
+
onClose: o,
|
|
27
|
+
onRequestClose: o,
|
|
28
|
+
footer: /* @__PURE__ */ d("div", { className: "flex w-full items-start", children: [
|
|
29
|
+
/* @__PURE__ */ e(c, { block: !0, className: "mx-2", onClick: () => o(), children: "Cancelar" }),
|
|
30
|
+
/* @__PURE__ */ e(f, { title: r ? /* @__PURE__ */ e(l, {}) : "Motivo obrigatório", placement: "top", children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
|
|
30
31
|
c,
|
|
31
32
|
{
|
|
32
33
|
block: !0,
|
|
33
34
|
className: "mx-2",
|
|
34
35
|
variant: "solid",
|
|
35
|
-
|
|
36
|
+
disabled: !r,
|
|
37
|
+
onClick: () => m({
|
|
36
38
|
idProcesso: s,
|
|
37
|
-
mensagemInteracao:
|
|
39
|
+
mensagemInteracao: r
|
|
38
40
|
}),
|
|
39
41
|
children: "Confirmar"
|
|
40
42
|
}
|
|
41
|
-
)
|
|
43
|
+
) }) })
|
|
42
44
|
] }),
|
|
43
45
|
children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-4 p-4", children: /* @__PURE__ */ e(
|
|
44
|
-
|
|
46
|
+
v,
|
|
45
47
|
{
|
|
46
48
|
textArea: !0,
|
|
47
49
|
required: !0,
|
|
48
50
|
rows: 4,
|
|
49
51
|
placeholder: "Motivo do cancelamento",
|
|
50
|
-
value:
|
|
51
|
-
onChange: (
|
|
52
|
+
value: r,
|
|
53
|
+
onChange: (t) => a(t.target.value)
|
|
52
54
|
}
|
|
53
55
|
) })
|
|
54
56
|
}
|
|
55
57
|
) });
|
|
56
58
|
};
|
|
57
59
|
export {
|
|
58
|
-
|
|
60
|
+
j as default
|
|
59
61
|
};
|
|
60
62
|
//# sourceMappingURL=CancelarProcessoDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CancelarProcessoDialog.js","sources":["../../../../lib/base/components/shared/CancelarProcessoDialog.tsx"],"sourcesContent":["import { Drawer, Input } from
|
|
1
|
+
{"version":3,"file":"CancelarProcessoDialog.js","sources":["../../../../lib/base/components/shared/CancelarProcessoDialog.tsx"],"sourcesContent":["import { Drawer, Input, Tooltip } from \"@/components/ui\";\nimport { TActionProcesso } from \"@base/@types/models/flux/processo\";\nimport { Button, Dialog } from \"@/components\";\nimport { useState } from \"react\";\nimport useCancelarProcesso from \"@base/hooks/flux/useCancelarProcesso\";\n\ninterface CancelarProcessoDialogProps {\n isOpen: boolean;\n onClose: () => void;\n idProcesso: number;\n}\n\nconst CancelarProcessoDialog = ({\n isOpen,\n onClose,\n idProcesso,\n}: CancelarProcessoDialogProps) => {\n const { mutate: cancelarProcesso } = useCancelarProcesso(onClose, () =>\n setMotivo(\"\")\n );\n const [motivo, setMotivo] = useState<string>(\"\");\n\n const handleCancelarProcesso = (dados: TActionProcesso) => {\n cancelarProcesso(dados);\n };\n\n const Footer = (\n <div className=\"flex w-full items-start\">\n <Button block className=\"mx-2\" onClick={() => onClose()}>\n Cancelar\n </Button>\n <Tooltip title={!motivo ? \"Motivo obrigatório\" : <></>} placement=\"top\">\n <span>\n <Button\n block\n className=\"mx-2\"\n variant=\"solid\"\n disabled={!motivo}\n onClick={() =>\n handleCancelarProcesso({\n idProcesso,\n mensagemInteracao: motivo,\n })\n }\n >\n Confirmar\n </Button>\n </span>\n </Tooltip>\n </div>\n );\n\n return (\n <>\n <Drawer\n title=\"Cancelar Processo\"\n isOpen={isOpen}\n onClose={onClose}\n onRequestClose={onClose}\n footer={Footer}\n >\n <div className=\"flex flex-col gap-4 p-4\">\n <Input\n textArea\n required\n rows={4}\n placeholder=\"Motivo do cancelamento\"\n value={motivo}\n onChange={(e) => setMotivo(e.target.value)}\n />\n </div>\n </Drawer>\n </>\n );\n};\n\nexport default CancelarProcessoDialog;\n"],"names":["CancelarProcessoDialog","isOpen","onClose","idProcesso","cancelarProcesso","useCancelarProcesso","setMotivo","motivo","useState","handleCancelarProcesso","dados","jsx","Fragment","Drawer","jsxs","Button","Tooltip","Input","e"],"mappings":";;;;;;;;;AAYA,MAAMA,IAAyB,CAAC;AAAA,EAC9B,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,MAAmC;AACjC,QAAM,EAAE,QAAQC,EAAA,IAAqBC;AAAA,IAAoBH;AAAA,IAAS,MAChEI,EAAU,EAAE;AAAA,EAAA,GAER,CAACC,GAAQD,CAAS,IAAIE,EAAiB,EAAE,GAEzCC,IAAyB,CAACC,MAA2B;AACzD,IAAAN,EAAiBM,CAAK;AAAA,EACxB;AA4BA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA,gBAAAD;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAAZ;AAAA,MACA,SAAAC;AAAA,MACA,gBAAgBA;AAAA,MAChB,QAhCJ,gBAAAY,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,QAAA,gBAAAH,EAACI,GAAA,EAAO,OAAK,IAAC,WAAU,QAAO,SAAS,MAAMb,EAAA,GAAW,UAAA,WAAA,CAEzD;AAAA,QACA,gBAAAS,EAACK,GAAA,EAAQ,OAAQT,IAAgC,gBAAAI,EAAAC,GAAA,CAAA,CAAE,IAAzB,sBAA8B,WAAU,OAChE,UAAA,gBAAAD,EAAC,QAAA,EACC,UAAA,gBAAAA;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,OAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAQ;AAAA,YACR,UAAU,CAACR;AAAA,YACX,SAAS,MACPE,EAAuB;AAAA,cACrB,YAAAN;AAAA,cACA,mBAAmBI;AAAA,YAAA,CACpB;AAAA,YAEJ,UAAA;AAAA,UAAA;AAAA,QAAA,GAGH,EAAA,CACF;AAAA,MAAA,GACF;AAAA,MAYI,UAAA,gBAAAI,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA,gBAAAA;AAAA,QAACM;AAAA,QAAA;AAAA,UACC,UAAQ;AAAA,UACR,UAAQ;AAAA,UACR,MAAM;AAAA,UACN,aAAY;AAAA,UACZ,OAAOV;AAAA,UACP,UAAU,CAACW,MAAMZ,EAAUY,EAAE,OAAO,KAAK;AAAA,QAAA;AAAA,MAAA,EAC3C,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,59 +1,63 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as u, jsx as o, Fragment as l } from "react/jsx-runtime";
|
|
2
2
|
import "../../../@ecme/components/ui/index.js";
|
|
3
3
|
import "../../../@ecme/components/index.js";
|
|
4
|
-
import { useState as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import h from "../../../@ecme/components/ui/
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
import { useState as p } from "react";
|
|
5
|
+
import d from "../../hooks/flux/useConcluirProcesso.js";
|
|
6
|
+
import c from "../../../@ecme/components/ui/Button/Button.js";
|
|
7
|
+
import f from "../../../@ecme/components/ui/Tooltip/Tooltip.js";
|
|
8
|
+
import h from "../../../@ecme/components/ui/Drawer/Drawer.js";
|
|
9
|
+
import v from "../../../@ecme/components/ui/Input/Input.js";
|
|
10
|
+
const j = ({
|
|
11
|
+
isOpen: a,
|
|
11
12
|
onClose: r,
|
|
12
|
-
idProcesso:
|
|
13
|
+
idProcesso: s
|
|
13
14
|
}) => {
|
|
14
|
-
const { mutate:
|
|
15
|
+
const { mutate: n } = d(
|
|
15
16
|
r,
|
|
16
|
-
() =>
|
|
17
|
-
), [
|
|
18
|
-
|
|
17
|
+
() => i("")
|
|
18
|
+
), [e, i] = p(""), m = (t) => {
|
|
19
|
+
n(t);
|
|
19
20
|
};
|
|
20
|
-
return /* @__PURE__ */ o(
|
|
21
|
-
|
|
21
|
+
return /* @__PURE__ */ o(l, { children: /* @__PURE__ */ o(
|
|
22
|
+
h,
|
|
22
23
|
{
|
|
23
24
|
title: "Concluir Processo",
|
|
24
|
-
isOpen:
|
|
25
|
+
isOpen: a,
|
|
25
26
|
onClose: r,
|
|
26
27
|
onRequestClose: r,
|
|
27
|
-
footer: /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */ o(
|
|
29
|
-
/* @__PURE__ */ o(
|
|
30
|
-
|
|
28
|
+
footer: /* @__PURE__ */ u("div", { className: "flex w-full items-start", children: [
|
|
29
|
+
/* @__PURE__ */ o(c, { block: !0, className: "mx-2", onClick: () => r(), children: "Cancelar" }),
|
|
30
|
+
/* @__PURE__ */ o(f, { title: e ? /* @__PURE__ */ o(l, {}) : "Motivo obrigatório", placement: "top", children: /* @__PURE__ */ o("span", { children: /* @__PURE__ */ o(
|
|
31
|
+
c,
|
|
31
32
|
{
|
|
32
33
|
block: !0,
|
|
33
34
|
className: "mx-2",
|
|
34
35
|
variant: "solid",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
disabled: !e,
|
|
37
|
+
onClick: () => {
|
|
38
|
+
m({
|
|
39
|
+
idProcesso: s,
|
|
40
|
+
mensagemInteracao: e
|
|
41
|
+
});
|
|
42
|
+
},
|
|
39
43
|
children: "Confirmar"
|
|
40
44
|
}
|
|
41
|
-
)
|
|
45
|
+
) }) })
|
|
42
46
|
] }),
|
|
43
47
|
children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-4 p-4", children: /* @__PURE__ */ o(
|
|
44
|
-
|
|
48
|
+
v,
|
|
45
49
|
{
|
|
46
50
|
textArea: !0,
|
|
47
51
|
rows: 4,
|
|
48
52
|
placeholder: "Motivo da conclusão",
|
|
49
|
-
value:
|
|
50
|
-
onChange: (
|
|
53
|
+
value: e,
|
|
54
|
+
onChange: (t) => i(t.target.value)
|
|
51
55
|
}
|
|
52
56
|
) })
|
|
53
57
|
}
|
|
54
58
|
) });
|
|
55
59
|
};
|
|
56
60
|
export {
|
|
57
|
-
|
|
61
|
+
j as default
|
|
58
62
|
};
|
|
59
63
|
//# sourceMappingURL=ConcluirProcessoDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConcluirProcessoDialog.js","sources":["../../../../lib/base/components/shared/ConcluirProcessoDialog.tsx"],"sourcesContent":["import { Drawer, Input } from
|
|
1
|
+
{"version":3,"file":"ConcluirProcessoDialog.js","sources":["../../../../lib/base/components/shared/ConcluirProcessoDialog.tsx"],"sourcesContent":["import { Drawer, Input, Tooltip } from \"@/components/ui\";\nimport { TActionProcesso } from \"@base/@types/models/flux/processo\";\nimport { Button } from \"@/components\";\nimport { useState } from \"react\";\nimport useConcluirProcesso from \"@base/hooks/flux/useConcluirProcesso\";\n\ninterface ConcluirProcessoDialogProps {\n isOpen: boolean;\n onClose: () => void;\n idProcesso: number;\n}\n\nconst ConcluirProcessoDialog = ({\n isOpen,\n onClose,\n idProcesso,\n}: ConcluirProcessoDialogProps) => {\n const { mutate: concluirProcesso } = useConcluirProcesso(onClose, () =>\n setMotivo(\"\")\n );\n const [motivo, setMotivo] = useState<string>(\"\");\n\n const handleConcluirProcesso = (dados: TActionProcesso) => {\n concluirProcesso(dados);\n };\n\n const Footer = (\n <div className=\"flex w-full items-start\">\n <Button block className=\"mx-2\" onClick={() => onClose()}>\n Cancelar\n </Button>\n <Tooltip title={!motivo ? \"Motivo obrigatório\" : <></>} placement=\"top\">\n <span>\n <Button\n block\n className=\"mx-2\"\n variant=\"solid\"\n disabled={!motivo}\n onClick={() => {\n handleConcluirProcesso({\n idProcesso,\n mensagemInteracao: motivo,\n });\n }}\n >\n Confirmar\n </Button>\n </span>\n </Tooltip>\n </div>\n );\n\n return (\n <>\n <Drawer\n title=\"Concluir Processo\"\n isOpen={isOpen}\n onClose={onClose}\n onRequestClose={onClose}\n footer={Footer}\n >\n <div className=\"flex flex-col gap-4 p-4\">\n <Input\n textArea\n rows={4}\n placeholder=\"Motivo da conclusão\"\n value={motivo}\n onChange={(e) => setMotivo(e.target.value)}\n />\n </div>\n </Drawer>\n </>\n );\n};\n\nexport default ConcluirProcessoDialog;\n"],"names":["ConcluirProcessoDialog","isOpen","onClose","idProcesso","concluirProcesso","useConcluirProcesso","setMotivo","motivo","useState","handleConcluirProcesso","dados","jsx","Fragment","Drawer","jsxs","Button","Tooltip","Input","e"],"mappings":";;;;;;;;;AAYA,MAAMA,IAAyB,CAAC;AAAA,EAC9B,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,MAAmC;AACjC,QAAM,EAAE,QAAQC,EAAA,IAAqBC;AAAA,IAAoBH;AAAA,IAAS,MAChEI,EAAU,EAAE;AAAA,EAAA,GAER,CAACC,GAAQD,CAAS,IAAIE,EAAiB,EAAE,GAEzCC,IAAyB,CAACC,MAA2B;AACzD,IAAAN,EAAiBM,CAAK;AAAA,EACxB;AA4BA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA,gBAAAD;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAAZ;AAAA,MACA,SAAAC;AAAA,MACA,gBAAgBA;AAAA,MAChB,QAhCJ,gBAAAY,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,QAAA,gBAAAH,EAACI,GAAA,EAAO,OAAK,IAAC,WAAU,QAAO,SAAS,MAAMb,EAAA,GAAW,UAAA,WAAA,CAEzD;AAAA,QACA,gBAAAS,EAACK,GAAA,EAAQ,OAAQT,IAAgC,gBAAAI,EAAAC,GAAA,CAAA,CAAE,IAAzB,sBAA8B,WAAU,OAChE,UAAA,gBAAAD,EAAC,QAAA,EACC,UAAA,gBAAAA;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,OAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAQ;AAAA,YACR,UAAU,CAACR;AAAA,YACX,SAAS,MAAM;AACb,cAAAE,EAAuB;AAAA,gBACrB,YAAAN;AAAA,gBACA,mBAAmBI;AAAA,cAAA,CACpB;AAAA,YACH;AAAA,YACD,UAAA;AAAA,UAAA;AAAA,QAAA,GAGH,EAAA,CACF;AAAA,MAAA,GACF;AAAA,MAYI,UAAA,gBAAAI,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA,gBAAAA;AAAA,QAACM;AAAA,QAAA;AAAA,UACC,UAAQ;AAAA,UACR,MAAM;AAAA,UACN,aAAY;AAAA,UACZ,OAAOV;AAAA,UACP,UAAU,CAACW,MAAMZ,EAAUY,EAAE,OAAO,KAAK;AAAA,QAAA;AAAA,MAAA,EAC3C,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as p, jsx as r, Fragment as i } from "react/jsx-runtime";
|
|
2
2
|
import "../../../@ecme/components/ui/index.js";
|
|
3
3
|
import "../../../@ecme/components/index.js";
|
|
4
4
|
import { useState as d } from "react";
|
|
5
|
-
import
|
|
5
|
+
import u from "../../hooks/flux/useReabrirProcesso.js";
|
|
6
6
|
import s from "../../../@ecme/components/ui/Button/Button.js";
|
|
7
|
-
import
|
|
8
|
-
import h from "../../../@ecme/components/ui/
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import f from "../../../@ecme/components/ui/Tooltip/Tooltip.js";
|
|
8
|
+
import h from "../../../@ecme/components/ui/Drawer/Drawer.js";
|
|
9
|
+
import b from "../../../@ecme/components/ui/Input/Input.js";
|
|
10
|
+
const M = ({
|
|
11
|
+
isOpen: l,
|
|
11
12
|
onClose: e,
|
|
12
13
|
idProcesso: c
|
|
13
14
|
}) => {
|
|
14
|
-
const { mutate:
|
|
15
|
+
const { mutate: m } = u(
|
|
15
16
|
e,
|
|
16
17
|
() => a("")
|
|
17
|
-
), [
|
|
18
|
-
|
|
18
|
+
), [o, a] = d(""), n = (t) => {
|
|
19
|
+
m(t);
|
|
19
20
|
};
|
|
20
|
-
return /* @__PURE__ */ r(
|
|
21
|
-
|
|
21
|
+
return /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(
|
|
22
|
+
h,
|
|
22
23
|
{
|
|
23
24
|
title: "Reabrir Processo",
|
|
24
|
-
isOpen:
|
|
25
|
+
isOpen: l,
|
|
25
26
|
onClose: e,
|
|
26
27
|
onRequestClose: e,
|
|
27
|
-
footer: /* @__PURE__ */
|
|
28
|
+
footer: /* @__PURE__ */ p("div", { className: "flex w-full items-start", children: [
|
|
28
29
|
/* @__PURE__ */ r(s, { block: !0, className: "mx-2", onClick: () => e(), children: "Cancelar" }),
|
|
29
|
-
/* @__PURE__ */ r(
|
|
30
|
+
/* @__PURE__ */ r(f, { title: o ? /* @__PURE__ */ r(i, {}) : "Motivo obrigatório", placement: "top", children: /* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(
|
|
30
31
|
s,
|
|
31
32
|
{
|
|
32
33
|
block: !0,
|
|
33
34
|
className: "mx-2",
|
|
34
35
|
variant: "solid",
|
|
35
|
-
|
|
36
|
+
disabled: !o,
|
|
37
|
+
onClick: () => n({
|
|
36
38
|
idProcesso: c,
|
|
37
|
-
mensagemInteracao:
|
|
39
|
+
mensagemInteracao: o
|
|
38
40
|
}),
|
|
39
41
|
children: "Confirmar"
|
|
40
42
|
}
|
|
41
|
-
)
|
|
43
|
+
) }) })
|
|
42
44
|
] }),
|
|
43
45
|
children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-4 p-4", children: /* @__PURE__ */ r(
|
|
44
|
-
|
|
46
|
+
b,
|
|
45
47
|
{
|
|
46
48
|
textArea: !0,
|
|
47
49
|
rows: 4,
|
|
48
50
|
placeholder: "Motivo da reabertura",
|
|
49
|
-
value:
|
|
50
|
-
onChange: (
|
|
51
|
+
value: o,
|
|
52
|
+
onChange: (t) => a(t.target.value)
|
|
51
53
|
}
|
|
52
54
|
) })
|
|
53
55
|
}
|
|
54
56
|
) });
|
|
55
57
|
};
|
|
56
58
|
export {
|
|
57
|
-
|
|
59
|
+
M as default
|
|
58
60
|
};
|
|
59
61
|
//# sourceMappingURL=ReabrirProcessoDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReabrirProcessoDialog.js","sources":["../../../../lib/base/components/shared/ReabrirProcessoDialog.tsx"],"sourcesContent":["import { Drawer, Input } from
|
|
1
|
+
{"version":3,"file":"ReabrirProcessoDialog.js","sources":["../../../../lib/base/components/shared/ReabrirProcessoDialog.tsx"],"sourcesContent":["import { Drawer, Input, Tooltip } from \"@/components/ui\";\nimport { TActionProcesso } from \"@base/@types/models/flux/processo\";\nimport { Button } from \"@/components\";\nimport { useState } from \"react\";\nimport useReabrirProcesso from \"@base/hooks/flux/useReabrirProcesso\";\n\ninterface ReabrirProcessoDialogProps {\n isOpen: boolean;\n onClose: () => void;\n idProcesso: number;\n}\n\nconst ReabrirProcessoDialog = ({\n isOpen,\n onClose,\n idProcesso,\n}: ReabrirProcessoDialogProps) => {\n const { mutate: reabrirProcesso } = useReabrirProcesso(onClose, () =>\n setMotivo(\"\")\n );\n const [motivo, setMotivo] = useState<string>(\"\");\n\n const handleReabrirProcesso = (dados: TActionProcesso) => {\n reabrirProcesso(dados);\n };\n\n const Footer = (\n <div className=\"flex w-full items-start\">\n <Button block className=\"mx-2\" onClick={() => onClose()}>\n Cancelar\n </Button>\n <Tooltip title={!motivo ? \"Motivo obrigatório\" : <></>} placement=\"top\">\n <span>\n <Button\n block\n className=\"mx-2\"\n variant=\"solid\"\n disabled={!motivo}\n onClick={() =>\n handleReabrirProcesso({\n idProcesso,\n mensagemInteracao: motivo,\n })\n }\n >\n Confirmar\n </Button>\n </span>\n </Tooltip>\n </div>\n );\n\n return (\n <>\n <Drawer\n title=\"Reabrir Processo\"\n isOpen={isOpen}\n onClose={onClose}\n onRequestClose={onClose}\n footer={Footer}\n >\n <div className=\"flex flex-col gap-4 p-4\">\n <Input\n textArea\n rows={4}\n placeholder=\"Motivo da reabertura\"\n value={motivo}\n onChange={(e) => setMotivo(e.target.value)}\n />\n </div>\n </Drawer>\n </>\n );\n};\n\nexport default ReabrirProcessoDialog;\n"],"names":["ReabrirProcessoDialog","isOpen","onClose","idProcesso","reabrirProcesso","useReabrirProcesso","setMotivo","motivo","useState","handleReabrirProcesso","dados","jsx","Fragment","Drawer","jsxs","Button","Tooltip","Input","e"],"mappings":";;;;;;;;;AAYA,MAAMA,IAAwB,CAAC;AAAA,EAC7B,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,MAAkC;AAChC,QAAM,EAAE,QAAQC,EAAA,IAAoBC;AAAA,IAAmBH;AAAA,IAAS,MAC9DI,EAAU,EAAE;AAAA,EAAA,GAER,CAACC,GAAQD,CAAS,IAAIE,EAAiB,EAAE,GAEzCC,IAAwB,CAACC,MAA2B;AACxD,IAAAN,EAAgBM,CAAK;AAAA,EACvB;AA4BA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA,gBAAAD;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAAZ;AAAA,MACA,SAAAC;AAAA,MACA,gBAAgBA;AAAA,MAChB,QAhCJ,gBAAAY,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,QAAA,gBAAAH,EAACI,GAAA,EAAO,OAAK,IAAC,WAAU,QAAO,SAAS,MAAMb,EAAA,GAAW,UAAA,WAAA,CAEzD;AAAA,QACA,gBAAAS,EAACK,GAAA,EAAQ,OAAQT,IAAgC,gBAAAI,EAAAC,GAAA,CAAA,CAAE,IAAzB,sBAA8B,WAAU,OAChE,UAAA,gBAAAD,EAAC,QAAA,EACC,UAAA,gBAAAA;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,OAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAQ;AAAA,YACR,UAAU,CAACR;AAAA,YACX,SAAS,MACPE,EAAsB;AAAA,cACpB,YAAAN;AAAA,cACA,mBAAmBI;AAAA,YAAA,CACpB;AAAA,YAEJ,UAAA;AAAA,UAAA;AAAA,QAAA,GAGH,EAAA,CACF;AAAA,MAAA,GACF;AAAA,MAYI,UAAA,gBAAAI,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA,gBAAAA;AAAA,QAACM;AAAA,QAAA;AAAA,UACC,UAAQ;AAAA,UACR,MAAM;AAAA,UACN,aAAY;AAAA,UACZ,OAAOV;AAAA,UACP,UAAU,CAACW,MAAMZ,EAAUY,EAAE,OAAO,KAAK;AAAA,QAAA;AAAA,MAAA,EAC3C,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as o, Fragment as i } from "react/jsx-runtime";
|
|
2
2
|
import "../../../@ecme/components/ui/index.js";
|
|
3
3
|
import "../../../@ecme/components/index.js";
|
|
4
|
-
import { useState as
|
|
5
|
-
import
|
|
4
|
+
import { useState as p } from "react";
|
|
5
|
+
import u from "../../hooks/flux/useRetornarFluxoAtendimento.js";
|
|
6
6
|
import n from "../../../@ecme/components/ui/Button/Button.js";
|
|
7
|
-
import
|
|
8
|
-
import x from "../../../@ecme/components/ui/
|
|
9
|
-
|
|
7
|
+
import f from "../../../@ecme/components/ui/Tooltip/Tooltip.js";
|
|
8
|
+
import x from "../../../@ecme/components/ui/Drawer/Drawer.js";
|
|
9
|
+
import h from "../../../@ecme/components/ui/Input/Input.js";
|
|
10
|
+
const M = ({
|
|
10
11
|
isOpen: l,
|
|
11
|
-
onClose:
|
|
12
|
-
idProcesso:
|
|
12
|
+
onClose: t,
|
|
13
|
+
idProcesso: m
|
|
13
14
|
}) => {
|
|
14
|
-
const { mutate:
|
|
15
|
-
|
|
15
|
+
const { mutate: s } = u(
|
|
16
|
+
t,
|
|
16
17
|
() => a("")
|
|
17
|
-
), [
|
|
18
|
-
|
|
18
|
+
), [e, a] = p(""), c = (r) => {
|
|
19
|
+
s(r);
|
|
19
20
|
};
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
21
|
+
return /* @__PURE__ */ o(i, { children: /* @__PURE__ */ o(
|
|
22
|
+
x,
|
|
22
23
|
{
|
|
23
24
|
title: "Retornar Fluxo de Atendimento",
|
|
24
25
|
isOpen: l,
|
|
25
|
-
onClose:
|
|
26
|
-
onRequestClose:
|
|
27
|
-
footer: /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */ e(
|
|
26
|
+
onClose: t,
|
|
27
|
+
onRequestClose: t,
|
|
28
|
+
footer: /* @__PURE__ */ d("div", { className: "flex w-full items-start", children: [
|
|
29
|
+
/* @__PURE__ */ o(n, { block: !0, className: "mx-2", onClick: () => t(), children: "Cancelar" }),
|
|
30
|
+
/* @__PURE__ */ o(f, { title: e ? /* @__PURE__ */ o(i, {}) : "Motivo obrigatório", placement: "top", children: /* @__PURE__ */ o("span", { children: /* @__PURE__ */ o(
|
|
30
31
|
n,
|
|
31
32
|
{
|
|
32
33
|
block: !0,
|
|
33
34
|
className: "mx-2",
|
|
34
35
|
variant: "solid",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
disabled: !e,
|
|
37
|
+
onClick: () => c({
|
|
38
|
+
idProcesso: m,
|
|
39
|
+
mensagemInteracao: e
|
|
38
40
|
}),
|
|
39
41
|
children: "Confirmar"
|
|
40
42
|
}
|
|
41
|
-
)
|
|
43
|
+
) }) })
|
|
42
44
|
] }),
|
|
43
|
-
children: /* @__PURE__ */
|
|
44
|
-
|
|
45
|
+
children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-4 p-4", children: /* @__PURE__ */ o(
|
|
46
|
+
h,
|
|
45
47
|
{
|
|
46
48
|
textArea: !0,
|
|
47
49
|
rows: 4,
|
|
48
50
|
placeholder: "Motivo do retorno",
|
|
49
|
-
value:
|
|
50
|
-
onChange: (
|
|
51
|
+
value: e,
|
|
52
|
+
onChange: (r) => a(r.target.value)
|
|
51
53
|
}
|
|
52
54
|
) })
|
|
53
55
|
}
|
|
54
56
|
) });
|
|
55
57
|
};
|
|
56
58
|
export {
|
|
57
|
-
|
|
59
|
+
M as default
|
|
58
60
|
};
|
|
59
61
|
//# sourceMappingURL=RetornarFluxAtendimentoDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RetornarFluxAtendimentoDialog.js","sources":["../../../../lib/base/components/shared/RetornarFluxAtendimentoDialog.tsx"],"sourcesContent":["import { Drawer, Input } from
|
|
1
|
+
{"version":3,"file":"RetornarFluxAtendimentoDialog.js","sources":["../../../../lib/base/components/shared/RetornarFluxAtendimentoDialog.tsx"],"sourcesContent":["import { Drawer, Input, Tooltip } from \"@/components/ui\";\nimport { TActionProcesso } from \"@base/@types/models/flux/processo\";\nimport { Button } from \"@/components\";\nimport { useState } from \"react\";\nimport useRetornarFluxoAtendimento from \"@base/hooks/flux/useRetornarFluxoAtendimento\";\n\ninterface RetornarFluxAtendimentoDialogProps {\n isOpen: boolean;\n onClose: () => void;\n idProcesso: number;\n}\n\nconst RetornarFluxAtendimentoDialog = ({\n isOpen,\n onClose,\n idProcesso,\n}: RetornarFluxAtendimentoDialogProps) => {\n const { mutate: retornarProcesso } = useRetornarFluxoAtendimento(\n onClose,\n () => setMotivo(\"\")\n );\n const [motivo, setMotivo] = useState<string>(\"\");\n\n const handleRetornarProcesso = (dados: TActionProcesso) => {\n retornarProcesso(dados);\n };\n\n const Footer = (\n <div className=\"flex w-full items-start\">\n <Button block className=\"mx-2\" onClick={() => onClose()}>\n Cancelar\n </Button>\n <Tooltip title={!motivo ? \"Motivo obrigatório\" : <></>} placement=\"top\">\n <span>\n <Button\n block\n className=\"mx-2\"\n variant=\"solid\"\n disabled={!motivo}\n onClick={() =>\n handleRetornarProcesso({\n idProcesso,\n mensagemInteracao: motivo,\n })\n }\n >\n Confirmar\n </Button>\n </span>\n </Tooltip>\n </div>\n );\n\n return (\n <>\n <Drawer\n title=\"Retornar Fluxo de Atendimento\"\n isOpen={isOpen}\n onClose={onClose}\n onRequestClose={onClose}\n footer={Footer}\n >\n <div className=\"flex flex-col gap-4 p-4\">\n <Input\n textArea\n rows={4}\n placeholder=\"Motivo do retorno\"\n value={motivo}\n onChange={(e) => setMotivo(e.target.value)}\n />\n </div>\n </Drawer>\n </>\n );\n};\n\nexport default RetornarFluxAtendimentoDialog;\n"],"names":["RetornarFluxAtendimentoDialog","isOpen","onClose","idProcesso","retornarProcesso","useRetornarFluxoAtendimento","setMotivo","motivo","useState","handleRetornarProcesso","dados","jsx","Fragment","Drawer","jsxs","Button","Tooltip","Input","e"],"mappings":";;;;;;;;;AAYA,MAAMA,IAAgC,CAAC;AAAA,EACrC,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,MAA0C;AACxC,QAAM,EAAE,QAAQC,EAAA,IAAqBC;AAAA,IACnCH;AAAA,IACA,MAAMI,EAAU,EAAE;AAAA,EAAA,GAEd,CAACC,GAAQD,CAAS,IAAIE,EAAiB,EAAE,GAEzCC,IAAyB,CAACC,MAA2B;AACzD,IAAAN,EAAiBM,CAAK;AAAA,EACxB;AA4BA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA,gBAAAD;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAAZ;AAAA,MACA,SAAAC;AAAA,MACA,gBAAgBA;AAAA,MAChB,QAhCJ,gBAAAY,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,QAAA,gBAAAH,EAACI,GAAA,EAAO,OAAK,IAAC,WAAU,QAAO,SAAS,MAAMb,EAAA,GAAW,UAAA,WAAA,CAEzD;AAAA,QACA,gBAAAS,EAACK,GAAA,EAAQ,OAAQT,IAAgC,gBAAAI,EAAAC,GAAA,CAAA,CAAE,IAAzB,sBAA8B,WAAU,OAChE,UAAA,gBAAAD,EAAC,QAAA,EACC,UAAA,gBAAAA;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,OAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAQ;AAAA,YACR,UAAU,CAACR;AAAA,YACX,SAAS,MACPE,EAAuB;AAAA,cACrB,YAAAN;AAAA,cACA,mBAAmBI;AAAA,YAAA,CACpB;AAAA,YAEJ,UAAA;AAAA,UAAA;AAAA,QAAA,GAGH,EAAA,CACF;AAAA,MAAA,GACF;AAAA,MAYI,UAAA,gBAAAI,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA,gBAAAA;AAAA,QAACM;AAAA,QAAA;AAAA,UACC,UAAQ;AAAA,UACR,MAAM;AAAA,UACN,aAAY;AAAA,UACZ,OAAOV;AAAA,UACP,UAAU,CAACW,MAAMZ,EAAUY,EAAE,OAAO,KAAK;AAAA,QAAA;AAAA,MAAA,EAC3C,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as r, Fragment as i } from "react/jsx-runtime";
|
|
2
2
|
import "../../../@ecme/components/index.js";
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
3
|
+
import { useState as f } from "react";
|
|
4
|
+
import p from "../../hooks/flux/useTransferirParaAtendente.js";
|
|
5
5
|
import n from "../../../@ecme/components/ui/Button/Button.js";
|
|
6
|
-
import
|
|
7
|
-
import h from "../../../@ecme/components/ui/
|
|
8
|
-
|
|
6
|
+
import u from "../../../@ecme/components/ui/Tooltip/Tooltip.js";
|
|
7
|
+
import h from "../../../@ecme/components/ui/Drawer/Drawer.js";
|
|
8
|
+
import v from "../../../@ecme/components/ui/Input/Input.js";
|
|
9
|
+
const C = ({
|
|
9
10
|
isOpen: s,
|
|
10
11
|
onClose: e,
|
|
11
|
-
idProcesso:
|
|
12
|
+
idProcesso: l
|
|
12
13
|
}) => {
|
|
13
|
-
const { mutate:
|
|
14
|
+
const { mutate: c } = p(
|
|
14
15
|
e,
|
|
15
|
-
() =>
|
|
16
|
-
), [
|
|
17
|
-
|
|
16
|
+
() => a("")
|
|
17
|
+
), [t, a] = f(""), m = (o) => {
|
|
18
|
+
c(o);
|
|
18
19
|
};
|
|
19
|
-
return /* @__PURE__ */ r(
|
|
20
|
-
|
|
20
|
+
return /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(
|
|
21
|
+
h,
|
|
21
22
|
{
|
|
22
23
|
title: "Transferir Processo para Atendente",
|
|
23
24
|
isOpen: s,
|
|
24
25
|
onClose: e,
|
|
25
26
|
onRequestClose: e,
|
|
26
|
-
footer: /* @__PURE__ */
|
|
27
|
+
footer: /* @__PURE__ */ d("div", { className: "flex w-full items-start", children: [
|
|
27
28
|
/* @__PURE__ */ r(n, { block: !0, className: "mx-2", onClick: () => e(), children: "Cancelar" }),
|
|
28
|
-
/* @__PURE__ */ r(
|
|
29
|
+
/* @__PURE__ */ r(u, { title: t ? /* @__PURE__ */ r(i, {}) : "Motivo obrigatório", placement: "top", children: /* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(
|
|
29
30
|
n,
|
|
30
31
|
{
|
|
31
32
|
block: !0,
|
|
32
33
|
className: "mx-2",
|
|
33
34
|
variant: "solid",
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
disabled: !t,
|
|
36
|
+
onClick: () => m({
|
|
37
|
+
idProcesso: l,
|
|
38
|
+
mensagemInteracao: t
|
|
37
39
|
}),
|
|
38
40
|
children: "Confirmar"
|
|
39
41
|
}
|
|
40
|
-
)
|
|
42
|
+
) }) })
|
|
41
43
|
] }),
|
|
42
44
|
children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-4 p-4", children: /* @__PURE__ */ r(
|
|
43
|
-
|
|
45
|
+
v,
|
|
44
46
|
{
|
|
45
47
|
textArea: !0,
|
|
46
48
|
required: !0,
|
|
47
49
|
rows: 4,
|
|
48
50
|
placeholder: "Motivo da transferência",
|
|
49
|
-
value:
|
|
50
|
-
onChange: (
|
|
51
|
+
value: t,
|
|
52
|
+
onChange: (o) => a(o.target.value)
|
|
51
53
|
}
|
|
52
54
|
) })
|
|
53
55
|
}
|
|
54
56
|
) });
|
|
55
57
|
};
|
|
56
58
|
export {
|
|
57
|
-
|
|
59
|
+
C as default
|
|
58
60
|
};
|
|
59
61
|
//# sourceMappingURL=TransferirParaAtendenteDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferirParaAtendenteDialog.js","sources":["../../../../lib/base/components/shared/TransferirParaAtendenteDialog.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"TransferirParaAtendenteDialog.js","sources":["../../../../lib/base/components/shared/TransferirParaAtendenteDialog.tsx"],"sourcesContent":["import { Button, Drawer, Input, Tooltip } from \"@/components\";\nimport { TActionProcesso } from \"@base/@types/models/flux/processo\";\nimport { useState } from \"react\";\nimport useTransferirParaAtendente from \"@base/hooks/flux/useTransferirParaAtendente\";\n\ninterface TransferirParaAtendenteDialogProps {\n isOpen: boolean;\n onClose: () => void;\n idProcesso: number;\n}\n\nconst TransferirParaAtendenteDialog = ({\n isOpen,\n onClose,\n idProcesso,\n}: TransferirParaAtendenteDialogProps) => {\n const { mutate: transferirProcesso } = useTransferirParaAtendente(\n onClose,\n () => setMotivo(\"\")\n );\n const [motivo, setMotivo] = useState<string>(\"\");\n\n const handleTransferirProcesso = (dados: TActionProcesso) => {\n transferirProcesso(dados);\n };\n const Footer = (\n <div className=\"flex w-full items-start\">\n <Button block className=\"mx-2\" onClick={() => onClose()}>\n Cancelar\n </Button>\n <Tooltip title={!motivo ? \"Motivo obrigatório\" : <></>} placement=\"top\">\n <span>\n <Button\n block\n className=\"mx-2\"\n variant=\"solid\"\n disabled={!motivo}\n onClick={() =>\n handleTransferirProcesso({\n idProcesso,\n mensagemInteracao: motivo,\n })\n }\n >\n Confirmar\n </Button>\n </span>\n </Tooltip>\n </div>\n );\n\n return (\n <>\n <Drawer\n title=\"Transferir Processo para Atendente\"\n isOpen={isOpen}\n onClose={onClose}\n onRequestClose={onClose}\n footer={Footer}\n >\n <div className=\"flex flex-col gap-4 p-4\">\n <Input\n textArea\n required\n rows={4}\n placeholder=\"Motivo da transferência\"\n value={motivo}\n onChange={(e: any) => setMotivo(e.target.value)}\n />\n </div>\n </Drawer>\n </>\n );\n};\n\nexport default TransferirParaAtendenteDialog;\n"],"names":["TransferirParaAtendenteDialog","isOpen","onClose","idProcesso","transferirProcesso","useTransferirParaAtendente","setMotivo","motivo","useState","handleTransferirProcesso","dados","jsx","Fragment","Drawer","jsxs","Button","Tooltip","Input","e"],"mappings":";;;;;;;;AAWA,MAAMA,IAAgC,CAAC;AAAA,EACrC,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,MAA0C;AACxC,QAAM,EAAE,QAAQC,EAAA,IAAuBC;AAAA,IACrCH;AAAA,IACA,MAAMI,EAAU,EAAE;AAAA,EAAA,GAEd,CAACC,GAAQD,CAAS,IAAIE,EAAiB,EAAE,GAEzCC,IAA2B,CAACC,MAA2B;AAC3D,IAAAN,EAAmBM,CAAK;AAAA,EAC1B;AA2BA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA,gBAAAD;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAAZ;AAAA,MACA,SAAAC;AAAA,MACA,gBAAgBA;AAAA,MAChB,QAhCJ,gBAAAY,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,QAAA,gBAAAH,EAACI,GAAA,EAAO,OAAK,IAAC,WAAU,QAAO,SAAS,MAAMb,EAAA,GAAW,UAAA,WAAA,CAEzD;AAAA,QACA,gBAAAS,EAACK,GAAA,EAAQ,OAAQT,IAAgC,gBAAAI,EAAAC,GAAA,CAAA,CAAE,IAAzB,sBAA8B,WAAU,OAChE,UAAA,gBAAAD,EAAC,QAAA,EACC,UAAA,gBAAAA;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,OAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAQ;AAAA,YACR,UAAU,CAACR;AAAA,YACX,SAAS,MACPE,EAAyB;AAAA,cACvB,YAAAN;AAAA,cACA,mBAAmBI;AAAA,YAAA,CACpB;AAAA,YAEJ,UAAA;AAAA,UAAA;AAAA,QAAA,GAGH,EAAA,CACF;AAAA,MAAA,GACF;AAAA,MAYI,UAAA,gBAAAI,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA,gBAAAA;AAAA,QAACM;AAAA,QAAA;AAAA,UACC,UAAQ;AAAA,UACR,UAAQ;AAAA,UACR,MAAM;AAAA,UACN,aAAY;AAAA,UACZ,OAAOV;AAAA,UACP,UAAU,CAACW,MAAWZ,EAAUY,EAAE,OAAO,KAAK;AAAA,QAAA;AAAA,MAAA,EAChD,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as f, jsx as r, Fragment as i } from "react/jsx-runtime";
|
|
2
2
|
import "../../../@ecme/components/index.js";
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import h from "../../../@ecme/components/ui/
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { useState as d } from "react";
|
|
4
|
+
import p from "../../hooks/flux/useTransferirParaSolicitante.js";
|
|
5
|
+
import s from "../../../@ecme/components/ui/Button/Button.js";
|
|
6
|
+
import u from "../../../@ecme/components/ui/Tooltip/Tooltip.js";
|
|
7
|
+
import h from "../../../@ecme/components/ui/Drawer/Drawer.js";
|
|
8
|
+
import v from "../../../@ecme/components/ui/Input/Input.js";
|
|
9
|
+
const C = ({
|
|
10
|
+
isOpen: l,
|
|
10
11
|
onClose: e,
|
|
11
12
|
idProcesso: n
|
|
12
13
|
}) => {
|
|
13
|
-
const { mutate:
|
|
14
|
+
const { mutate: c } = p(
|
|
14
15
|
e,
|
|
15
|
-
() =>
|
|
16
|
-
), [
|
|
17
|
-
|
|
16
|
+
() => a("")
|
|
17
|
+
), [t, a] = d(""), m = (o) => {
|
|
18
|
+
c(o);
|
|
18
19
|
};
|
|
19
|
-
return /* @__PURE__ */ r(
|
|
20
|
-
|
|
20
|
+
return /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(
|
|
21
|
+
h,
|
|
21
22
|
{
|
|
22
23
|
title: "Transferir Processo para Solicitante",
|
|
23
|
-
isOpen:
|
|
24
|
+
isOpen: l,
|
|
24
25
|
onClose: e,
|
|
25
26
|
onRequestClose: e,
|
|
26
|
-
footer: /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */ r(
|
|
28
|
-
/* @__PURE__ */ r(
|
|
29
|
-
|
|
27
|
+
footer: /* @__PURE__ */ f("div", { className: "flex w-full items-start", children: [
|
|
28
|
+
/* @__PURE__ */ r(s, { block: !0, className: "mx-2", onClick: () => e(), children: "Cancelar" }),
|
|
29
|
+
/* @__PURE__ */ r(u, { title: t ? /* @__PURE__ */ r(i, {}) : "Motivo obrigatório", placement: "top", children: /* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(
|
|
30
|
+
s,
|
|
30
31
|
{
|
|
31
32
|
block: !0,
|
|
32
33
|
className: "mx-2",
|
|
33
34
|
variant: "solid",
|
|
34
|
-
|
|
35
|
+
disabled: !t,
|
|
36
|
+
onClick: () => m({
|
|
35
37
|
idProcesso: n,
|
|
36
|
-
mensagemInteracao:
|
|
38
|
+
mensagemInteracao: t
|
|
37
39
|
}),
|
|
38
40
|
children: "Confirmar"
|
|
39
41
|
}
|
|
40
|
-
)
|
|
42
|
+
) }) })
|
|
41
43
|
] }),
|
|
42
44
|
children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-4 p-4", children: /* @__PURE__ */ r(
|
|
43
|
-
|
|
45
|
+
v,
|
|
44
46
|
{
|
|
45
47
|
textArea: !0,
|
|
46
48
|
rows: 4,
|
|
47
49
|
placeholder: "Motivo da transferência",
|
|
48
|
-
value:
|
|
50
|
+
value: t,
|
|
49
51
|
required: !0,
|
|
50
|
-
onChange: (
|
|
52
|
+
onChange: (o) => a(o.target.value)
|
|
51
53
|
}
|
|
52
54
|
) })
|
|
53
55
|
}
|
|
54
56
|
) });
|
|
55
57
|
};
|
|
56
58
|
export {
|
|
57
|
-
|
|
59
|
+
C as default
|
|
58
60
|
};
|
|
59
61
|
//# sourceMappingURL=TransferirParaSolicitanteDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferirParaSolicitanteDialog.js","sources":["../../../../lib/base/components/shared/TransferirParaSolicitanteDialog.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"TransferirParaSolicitanteDialog.js","sources":["../../../../lib/base/components/shared/TransferirParaSolicitanteDialog.tsx"],"sourcesContent":["import { Button, Drawer, Input, Tooltip } from \"@/components\";\nimport { TActionProcesso } from \"@base/@types/models/flux/processo\";\nimport { useState } from \"react\";\nimport useTransferirParaSolicitante from \"@base/hooks/flux/useTransferirParaSolicitante\";\n\ninterface TransferirParaSolicitanteDialogProps {\n isOpen: boolean;\n onClose: () => void;\n idProcesso: number;\n}\n\nconst TransferirParaSolicitanteDialog = ({\n isOpen,\n onClose,\n idProcesso,\n}: TransferirParaSolicitanteDialogProps) => {\n const { mutate: transferirProcesso } = useTransferirParaSolicitante(\n onClose,\n () => setMotivo(\"\")\n );\n const [motivo, setMotivo] = useState<string>(\"\");\n\n const handleTransferirProcesso = (dados: TActionProcesso) => {\n transferirProcesso(dados);\n };\n const Footer = (\n <div className=\"flex w-full items-start\">\n <Button block className=\"mx-2\" onClick={() => onClose()}>\n Cancelar\n </Button>\n <Tooltip title={!motivo ? \"Motivo obrigatório\" : <></>} placement=\"top\">\n <span>\n <Button\n block\n className=\"mx-2\"\n variant=\"solid\"\n disabled={!motivo}\n onClick={() =>\n handleTransferirProcesso({\n idProcesso,\n mensagemInteracao: motivo,\n })\n }\n >\n Confirmar\n </Button>\n </span>\n </Tooltip>\n </div>\n );\n\n return (\n <>\n <Drawer\n title=\"Transferir Processo para Solicitante\"\n isOpen={isOpen}\n onClose={onClose}\n onRequestClose={onClose}\n footer={Footer}\n >\n <div className=\"flex flex-col gap-4 p-4\">\n <Input\n textArea\n rows={4}\n placeholder=\"Motivo da transferência\"\n value={motivo}\n required\n onChange={(e) => setMotivo(e.target.value)}\n />\n </div>\n </Drawer>\n </>\n );\n};\n\nexport default TransferirParaSolicitanteDialog;\n"],"names":["TransferirParaSolicitanteDialog","isOpen","onClose","idProcesso","transferirProcesso","useTransferirParaSolicitante","setMotivo","motivo","useState","handleTransferirProcesso","dados","jsx","Fragment","Drawer","jsxs","Button","Tooltip","Input","e"],"mappings":";;;;;;;;AAWA,MAAMA,IAAkC,CAAC;AAAA,EACvC,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,MAA4C;AAC1C,QAAM,EAAE,QAAQC,EAAA,IAAuBC;AAAA,IACrCH;AAAA,IACA,MAAMI,EAAU,EAAE;AAAA,EAAA,GAEd,CAACC,GAAQD,CAAS,IAAIE,EAAiB,EAAE,GAEzCC,IAA2B,CAACC,MAA2B;AAC3D,IAAAN,EAAmBM,CAAK;AAAA,EAC1B;AA2BA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA,gBAAAD;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAAZ;AAAA,MACA,SAAAC;AAAA,MACA,gBAAgBA;AAAA,MAChB,QAhCJ,gBAAAY,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,QAAA,gBAAAH,EAACI,GAAA,EAAO,OAAK,IAAC,WAAU,QAAO,SAAS,MAAMb,EAAA,GAAW,UAAA,WAAA,CAEzD;AAAA,QACA,gBAAAS,EAACK,GAAA,EAAQ,OAAQT,IAAgC,gBAAAI,EAAAC,GAAA,CAAA,CAAE,IAAzB,sBAA8B,WAAU,OAChE,UAAA,gBAAAD,EAAC,QAAA,EACC,UAAA,gBAAAA;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,OAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAQ;AAAA,YACR,UAAU,CAACR;AAAA,YACX,SAAS,MACPE,EAAyB;AAAA,cACvB,YAAAN;AAAA,cACA,mBAAmBI;AAAA,YAAA,CACpB;AAAA,YAEJ,UAAA;AAAA,UAAA;AAAA,QAAA,GAGH,EAAA,CACF;AAAA,MAAA,GACF;AAAA,MAYI,UAAA,gBAAAI,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA,gBAAAA;AAAA,QAACM;AAAA,QAAA;AAAA,UACC,UAAQ;AAAA,UACR,MAAM;AAAA,UACN,aAAY;AAAA,UACZ,OAAOV;AAAA,UACP,UAAQ;AAAA,UACR,UAAU,CAACW,MAAMZ,EAAUY,EAAE,OAAO,KAAK;AAAA,QAAA;AAAA,MAAA,EAC3C,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, jsx as o, Fragment as c } from "react/jsx-runtime";
|
|
2
2
|
import "../../../@ecme/components/index.js";
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
3
|
+
import { useState as t, useEffect as C } from "react";
|
|
4
|
+
import P from "../../hooks/flux/useTransferirProcesso.js";
|
|
5
5
|
import "../../services/index.js";
|
|
6
|
-
import { apiGetUsers as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
import { apiGetUsers as T } from "../../services/modules/AdmService.js";
|
|
7
|
+
import l from "../../../@ecme/components/ui/Button/Button.js";
|
|
8
|
+
import U from "../../../@ecme/components/ui/Tooltip/Tooltip.js";
|
|
9
|
+
import k from "../../../@ecme/components/ui/Drawer/Drawer.js";
|
|
10
|
+
import w from "../../../@ecme/components/ui/Select/Select.js";
|
|
11
|
+
import N from "../../../@ecme/components/ui/Input/Input.js";
|
|
12
|
+
const R = ({
|
|
13
|
+
isOpen: m,
|
|
14
|
+
onClose: s,
|
|
15
|
+
idProcesso: f
|
|
15
16
|
}) => {
|
|
16
|
-
const { mutate:
|
|
17
|
-
|
|
17
|
+
const { mutate: p } = P(), [u, d] = t(null), [e, h] = t(""), [v, g] = t([]);
|
|
18
|
+
C(() => {
|
|
18
19
|
async function r() {
|
|
19
20
|
try {
|
|
20
|
-
const
|
|
21
|
-
value:
|
|
22
|
-
label:
|
|
21
|
+
const b = (await T({})).content.map((i) => ({
|
|
22
|
+
value: i.id,
|
|
23
|
+
label: i.nome
|
|
23
24
|
}));
|
|
24
|
-
|
|
25
|
+
g(b);
|
|
25
26
|
} catch (a) {
|
|
26
27
|
console.error("Erro ao carregar tipos de processo:", a);
|
|
27
28
|
}
|
|
@@ -29,49 +30,50 @@ const B = ({
|
|
|
29
30
|
r();
|
|
30
31
|
}, []);
|
|
31
32
|
const x = (r) => {
|
|
32
|
-
|
|
33
|
+
p(r);
|
|
33
34
|
};
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
|
|
35
|
+
return /* @__PURE__ */ o(c, { children: /* @__PURE__ */ o(
|
|
36
|
+
k,
|
|
36
37
|
{
|
|
37
38
|
title: "Transferir Processo",
|
|
38
|
-
isOpen:
|
|
39
|
-
onClose:
|
|
40
|
-
onRequestClose:
|
|
41
|
-
footer: /* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */ e(
|
|
44
|
-
|
|
39
|
+
isOpen: m,
|
|
40
|
+
onClose: s,
|
|
41
|
+
onRequestClose: s,
|
|
42
|
+
footer: /* @__PURE__ */ n("div", { className: "flex w-full items-start", children: [
|
|
43
|
+
/* @__PURE__ */ o(l, { block: !0, className: "mx-2", onClick: () => s(), children: "Cancelar" }),
|
|
44
|
+
/* @__PURE__ */ o(U, { title: e ? /* @__PURE__ */ o(c, {}) : "Motivo obrigatório", placement: "top", children: /* @__PURE__ */ o("span", { children: /* @__PURE__ */ o(
|
|
45
|
+
l,
|
|
45
46
|
{
|
|
46
47
|
block: !0,
|
|
47
48
|
className: "mx-2",
|
|
48
49
|
variant: "solid",
|
|
50
|
+
disabled: !e,
|
|
49
51
|
onClick: () => x({
|
|
50
|
-
idProcesso:
|
|
52
|
+
idProcesso: f,
|
|
51
53
|
idUsuario: u,
|
|
52
|
-
mensagemInteracao:
|
|
54
|
+
mensagemInteracao: e
|
|
53
55
|
}),
|
|
54
56
|
children: "Confirmar"
|
|
55
57
|
}
|
|
56
|
-
)
|
|
58
|
+
) }) })
|
|
57
59
|
] }),
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
|
|
60
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-4 p-4", children: [
|
|
61
|
+
/* @__PURE__ */ o(
|
|
62
|
+
w,
|
|
61
63
|
{
|
|
62
64
|
placeholder: "Selecione um usuário",
|
|
63
|
-
options:
|
|
64
|
-
onChange: (r) =>
|
|
65
|
+
options: v,
|
|
66
|
+
onChange: (r) => d(r == null ? void 0 : r.value)
|
|
65
67
|
}
|
|
66
68
|
),
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
|
|
69
|
+
/* @__PURE__ */ o(
|
|
70
|
+
N,
|
|
69
71
|
{
|
|
70
72
|
textArea: !0,
|
|
71
73
|
rows: 4,
|
|
72
74
|
placeholder: "Motivo da transferência",
|
|
73
|
-
value:
|
|
74
|
-
onChange: (r) =>
|
|
75
|
+
value: e,
|
|
76
|
+
onChange: (r) => h(r.target.value)
|
|
75
77
|
}
|
|
76
78
|
)
|
|
77
79
|
] })
|
|
@@ -79,6 +81,6 @@ const B = ({
|
|
|
79
81
|
) });
|
|
80
82
|
};
|
|
81
83
|
export {
|
|
82
|
-
|
|
84
|
+
R as default
|
|
83
85
|
};
|
|
84
86
|
//# sourceMappingURL=TransferirProcessoDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferirProcessoDialog.js","sources":["../../../../lib/base/components/shared/TransferirProcessoDialog.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"TransferirProcessoDialog.js","sources":["../../../../lib/base/components/shared/TransferirProcessoDialog.tsx"],"sourcesContent":["import { Button, Drawer, Input, Select, Tooltip } from \"@/components\";\nimport { TActionProcesso } from \"@base/@types/models/flux/processo\";\nimport { useEffect, useState } from \"react\";\nimport useTransferirProcesso from \"@base/hooks/flux/useTransferirProcesso\";\nimport { apiGetUsers } from \"@base/services\";\n//import { apiGetUsers } from '@orbe-agro/client-core/base/services/modules/AdmService'\ninterface TransferirProcessoDialogProps {\n isOpen: boolean;\n onClose: () => void;\n idProcesso: number;\n}\n\nconst TransferirProcessoDialog = ({\n isOpen,\n onClose,\n idProcesso,\n}: TransferirProcessoDialogProps) => {\n const { mutate: transferirProcesso } = useTransferirProcesso();\n const [idUsuario, setIdUsuario] = useState<any>(null);\n const [motivo, setMotivo] = useState<string>(\"\");\n const [usersOptions, setUsersOptions] = useState<\n { value: number; label: string }[]\n >([]);\n\n useEffect(() => {\n async function fetchUsers() {\n try {\n const filtros = {};\n const response = await apiGetUsers(filtros);\n const options = response.content.map((item: any) => ({\n value: item.id,\n label: item.nome,\n }));\n setUsersOptions(options);\n } catch (error) {\n console.error(\"Erro ao carregar tipos de processo:\", error);\n }\n }\n fetchUsers();\n }, []);\n\n const handleTransferirProcesso = (dados: TActionProcesso) => {\n transferirProcesso(dados);\n };\n const Footer = (\n <div className=\"flex w-full items-start\">\n <Button block className=\"mx-2\" onClick={() => onClose()}>\n Cancelar\n </Button>\n <Tooltip title={!motivo ? \"Motivo obrigatório\" : <></>} placement=\"top\">\n <span>\n <Button\n block\n className=\"mx-2\"\n variant=\"solid\"\n disabled={!motivo}\n onClick={() =>\n handleTransferirProcesso({\n idProcesso,\n idUsuario,\n mensagemInteracao: motivo,\n })\n }\n >\n Confirmar\n </Button>\n </span>\n </Tooltip>\n </div>\n );\n\n return (\n <>\n <Drawer\n title=\"Transferir Processo\"\n isOpen={isOpen}\n onClose={onClose}\n onRequestClose={onClose}\n footer={Footer}\n >\n <div className=\"flex flex-col gap-4 p-4\">\n <Select\n placeholder=\"Selecione um usuário\"\n options={usersOptions}\n onChange={(opt: any) => setIdUsuario(opt?.value)}\n />\n <Input\n textArea\n rows={4}\n placeholder=\"Motivo da transferência\"\n value={motivo}\n onChange={(e: any) => setMotivo(e.target.value)}\n />\n </div>\n </Drawer>\n </>\n );\n};\n\nexport default TransferirProcessoDialog;\n"],"names":["TransferirProcessoDialog","isOpen","onClose","idProcesso","transferirProcesso","useTransferirProcesso","idUsuario","setIdUsuario","useState","motivo","setMotivo","usersOptions","setUsersOptions","useEffect","fetchUsers","options","apiGetUsers","item","error","handleTransferirProcesso","dados","jsx","Fragment","Drawer","jsxs","Button","Tooltip","Select","opt","Input","e"],"mappings":";;;;;;;;;;;AAYA,MAAMA,IAA2B,CAAC;AAAA,EAChC,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,MAAqC;AACnC,QAAM,EAAE,QAAQC,EAAA,IAAuBC,EAAA,GACjC,CAACC,GAAWC,CAAY,IAAIC,EAAc,IAAI,GAC9C,CAACC,GAAQC,CAAS,IAAIF,EAAiB,EAAE,GACzC,CAACG,GAAcC,CAAe,IAAIJ,EAEtC,CAAA,CAAE;AAEJ,EAAAK,EAAU,MAAM;AACd,mBAAeC,IAAa;AAC1B,UAAI;AAGF,cAAMC,KADW,MAAMC,EADP,CAAA,CAC0B,GACjB,QAAQ,IAAI,CAACC,OAAe;AAAA,UACnD,OAAOA,EAAK;AAAA,UACZ,OAAOA,EAAK;AAAA,QAAA,EACZ;AACF,QAAAL,EAAgBG,CAAO;AAAA,MACzB,SAASG,GAAO;AACd,gBAAQ,MAAM,uCAAuCA,CAAK;AAAA,MAC5D;AAAA,IACF;AACA,IAAAJ,EAAA;AAAA,EACF,GAAG,CAAA,CAAE;AAEL,QAAMK,IAA2B,CAACC,MAA2B;AAC3D,IAAAhB,EAAmBgB,CAAK;AAAA,EAC1B;AA4BA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA,gBAAAD;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAAtB;AAAA,MACA,SAAAC;AAAA,MACA,gBAAgBA;AAAA,MAChB,QAjCJ,gBAAAsB,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,QAAA,gBAAAH,EAACI,GAAA,EAAO,OAAK,IAAC,WAAU,QAAO,SAAS,MAAMvB,EAAA,GAAW,UAAA,WAAA,CAEzD;AAAA,QACA,gBAAAmB,EAACK,GAAA,EAAQ,OAAQjB,IAAgC,gBAAAY,EAAAC,GAAA,CAAA,CAAE,IAAzB,sBAA8B,WAAU,OAChE,UAAA,gBAAAD,EAAC,QAAA,EACC,UAAA,gBAAAA;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,OAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAQ;AAAA,YACR,UAAU,CAAChB;AAAA,YACX,SAAS,MACPU,EAAyB;AAAA,cACvB,YAAAhB;AAAA,cACA,WAAAG;AAAA,cACA,mBAAmBG;AAAA,YAAA,CACpB;AAAA,YAEJ,UAAA;AAAA,UAAA;AAAA,QAAA,GAGH,EAAA,CACF;AAAA,MAAA,GACF;AAAA,MAYI,UAAA,gBAAAe,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,QAAA,gBAAAH;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,aAAY;AAAA,YACZ,SAAShB;AAAA,YACT,UAAU,CAACiB,MAAarB,EAAaqB,KAAA,gBAAAA,EAAK,KAAK;AAAA,UAAA;AAAA,QAAA;AAAA,QAEjD,gBAAAP;AAAA,UAACQ;AAAA,UAAA;AAAA,YACC,UAAQ;AAAA,YACR,MAAM;AAAA,YACN,aAAY;AAAA,YACZ,OAAOpB;AAAA,YACP,UAAU,CAACqB,MAAWpB,EAAUoB,EAAE,OAAO,KAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MAChD,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import "../../../@ecme/components/index.js";
|
|
3
|
-
import { apiAceitarProcesso as
|
|
4
|
-
import { useMutation as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
function
|
|
8
|
-
return
|
|
9
|
-
mutationFn:
|
|
3
|
+
import { apiAceitarProcesso as c } from "../../services/modules/flux/FluxService.js";
|
|
4
|
+
import { useMutation as m } from "@tanstack/react-query";
|
|
5
|
+
import s from "../../../@ecme/components/ui/toast/toast.js";
|
|
6
|
+
import i from "../../../@ecme/components/ui/Notification/Notification.js";
|
|
7
|
+
function h(o, r) {
|
|
8
|
+
return m({
|
|
9
|
+
mutationFn: c,
|
|
10
10
|
onSuccess: () => {
|
|
11
|
-
r.push(
|
|
12
|
-
/* @__PURE__ */
|
|
11
|
+
o && o(), r && r(), s.push(
|
|
12
|
+
/* @__PURE__ */ t(i, { title: "Sucesso", type: "success", children: "Processo aceito com sucesso" })
|
|
13
13
|
);
|
|
14
14
|
},
|
|
15
|
-
onError: (
|
|
16
|
-
|
|
17
|
-
/* @__PURE__ */
|
|
15
|
+
onError: (e) => {
|
|
16
|
+
s.push(
|
|
17
|
+
/* @__PURE__ */ t(i, { title: "Erro", type: "danger", children: e.message })
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
h as default
|
|
24
24
|
};
|
|
25
25
|
//# sourceMappingURL=useAceitarProcesso.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAceitarProcesso.js","sources":["../../../../lib/base/hooks/flux/useAceitarProcesso.tsx"],"sourcesContent":["import { Notification, toast } from
|
|
1
|
+
{"version":3,"file":"useAceitarProcesso.js","sources":["../../../../lib/base/hooks/flux/useAceitarProcesso.tsx"],"sourcesContent":["import { Notification, toast } from \"@/components\";\nimport { TProcesso } from \"@base/@types/models/flux/processo\";\nimport { apiAceitarProcesso } from \"@base/services/modules/flux/FluxService\";\nimport { useMutation } from \"@tanstack/react-query\";\n\nexport default function useAceitarProcesso(\n onClose?: () => void,\n onReset?: () => void\n) {\n return useMutation<TProcesso, Error, number>({\n mutationFn: apiAceitarProcesso,\n onSuccess: () => {\n if (onClose) onClose();\n if (onReset) onReset();\n toast.push(\n <Notification title=\"Sucesso\" type=\"success\">\n Processo aceito com sucesso\n </Notification>\n );\n },\n onError: (error) => {\n toast.push(\n <Notification title=\"Erro\" type=\"danger\">\n {error.message}\n </Notification>\n );\n },\n });\n}\n"],"names":["useAceitarProcesso","onClose","onReset","useMutation","apiAceitarProcesso","toast","Notification","error"],"mappings":";;;;;;AAKA,SAAwBA,EACtBC,GACAC,GACA;AACA,SAAOC,EAAsC;AAAA,IAC3C,YAAYC;AAAA,IACZ,WAAW,MAAM;AACf,MAAIH,KAASA,EAAA,GACTC,KAASA,EAAA,GACbG,EAAM;AAAA,0BACHC,GAAA,EAAa,OAAM,WAAU,MAAK,WAAU,UAAA,8BAAA,CAE7C;AAAA,MAAA;AAAA,IAEJ;AAAA,IACA,SAAS,CAACC,MAAU;AAClB,MAAAF,EAAM;AAAA,0BACHC,GAAA,EAAa,OAAM,QAAO,MAAK,UAC7B,YAAM,QAAA,CACT;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA,CACD;AACH;"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import "../../../@ecme/components/index.js";
|
|
3
|
-
import { apiTransferirProcesso as
|
|
4
|
-
import { useMutation as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
function
|
|
8
|
-
return
|
|
9
|
-
mutationFn:
|
|
3
|
+
import { apiTransferirProcesso as c } from "../../services/modules/flux/FluxService.js";
|
|
4
|
+
import { useMutation as m } from "@tanstack/react-query";
|
|
5
|
+
import t from "../../../@ecme/components/ui/toast/toast.js";
|
|
6
|
+
import i from "../../../@ecme/components/ui/Notification/Notification.js";
|
|
7
|
+
function h(r, o) {
|
|
8
|
+
return m({
|
|
9
|
+
mutationFn: c,
|
|
10
10
|
onSuccess: () => {
|
|
11
|
-
o.push(
|
|
12
|
-
/* @__PURE__ */
|
|
11
|
+
r && r(), o && o(), t.push(
|
|
12
|
+
/* @__PURE__ */ s(i, { title: "Sucesso", type: "success", children: "Processo transferido com sucesso" })
|
|
13
13
|
);
|
|
14
14
|
},
|
|
15
|
-
onError: (
|
|
16
|
-
|
|
17
|
-
/* @__PURE__ */
|
|
15
|
+
onError: (e) => {
|
|
16
|
+
t.push(
|
|
17
|
+
/* @__PURE__ */ s(i, { title: "Erro", type: "danger", children: e.message })
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
h as default
|
|
24
24
|
};
|
|
25
25
|
//# sourceMappingURL=useTransferirProcesso.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTransferirProcesso.js","sources":["../../../../lib/base/hooks/flux/useTransferirProcesso.tsx"],"sourcesContent":["import { Notification, toast } from
|
|
1
|
+
{"version":3,"file":"useTransferirProcesso.js","sources":["../../../../lib/base/hooks/flux/useTransferirProcesso.tsx"],"sourcesContent":["import { Notification, toast } from \"@/components\";\nimport { TActionProcesso, TProcesso } from \"@base/@types/models/flux/processo\";\nimport { apiTransferirProcesso } from \"@base/services/modules/flux/FluxService\";\nimport { useMutation } from \"@tanstack/react-query\";\n\nexport default function useTransferirProcesso(\n onClose?: () => void,\n onReset?: () => void\n) {\n return useMutation<TProcesso, Error, TActionProcesso>({\n mutationFn: apiTransferirProcesso,\n onSuccess: () => {\n if (onClose) onClose();\n if (onReset) onReset();\n toast.push(\n <Notification title=\"Sucesso\" type=\"success\">\n Processo transferido com sucesso\n </Notification>\n );\n },\n onError: (error: Error) => {\n toast.push(\n <Notification title=\"Erro\" type=\"danger\">\n {error.message}\n </Notification>\n );\n },\n });\n}\n"],"names":["useTransferirProcesso","onClose","onReset","useMutation","apiTransferirProcesso","toast","Notification","error"],"mappings":";;;;;;AAKA,SAAwBA,EACtBC,GACAC,GACA;AACA,SAAOC,EAA+C;AAAA,IACpD,YAAYC;AAAA,IACZ,WAAW,MAAM;AACf,MAAIH,KAASA,EAAA,GACTC,KAASA,EAAA,GACbG,EAAM;AAAA,0BACHC,GAAA,EAAa,OAAM,WAAU,MAAK,WAAU,UAAA,mCAAA,CAE7C;AAAA,MAAA;AAAA,IAEJ;AAAA,IACA,SAAS,CAACC,MAAiB;AACzB,MAAAF,EAAM;AAAA,0BACHC,GAAA,EAAa,OAAM,QAAO,MAAK,UAC7B,YAAM,QAAA,CACT;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA,CACD;AACH;"}
|