PageSourceSearch

https://www.londrinaon.com.br/assets/NovaSolicitacaoSuporte-IxcUfRHH.js

js londrinaon.com.br collected 2026-10-01 16:06:18 UTC 10,306 bytes, 244 lines download raw bytes

1import { a1 as classnames, aB as React, bs as PropTypes, j as jsxRuntimeExports, a5 as Link, r as reactExports, E as useSelector, ae as Card$1, aA as Loader } from "./index-ByBBMRkj.js";
2import { C as CardBody, N as NovaSolicitacao } from "./NovaSolicitacao-CGcOKx2Z.js";
3import { D as DynamicIcon } from "./index-Bid2S9rp.js";
4import { m as mapToCssModules, t as tagPropType } from "./utils-DJNFFZ4h.js";
5import { C as Col } from "./Col-CIN05s8H.js";
6import { A as Alert } from "./fileOrigin-BiXQCXXR.js";
7import { R as Row } from "./Row-CKKSrdS5.js";
8import { F as Form } from "./Form-Dfnb5oAg.js";
9import "./FormControl-vCfknE7X.js";
10var _excluded = ["className", "cssModule", "color", "body", "inverse", "outline", "tag", "innerRef"];
11function _extends() {
12  _extends = Object.assign ? Object.assign.bind() : function(target) {
13    for (var i = 1; i < arguments.length; i++) {
14      var source = arguments[i];
15      for (var key in source) {
16        if (Object.prototype.hasOwnProperty.call(source, key)) {
17          target[key] = source[key];
18        }
19      }
20    }
21    return target;
22  };
23  return _extends.apply(this, arguments);
24}
25function _objectWithoutProperties(source, excluded) {
26  if (source == null) return {};
27  var target = _objectWithoutPropertiesLoose(source, excluded);
28  var key, i;
29  if (Object.getOwnPropertySymbols) {
30    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
31    for (i = 0; i < sourceSymbolKeys.length; i++) {
32      key = sourceSymbolKeys[i];
33      if (excluded.indexOf(key) >= 0) continue;
34      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
35      target[key] = source[key];
36    }
37  }
38  return target;
39}
40function _objectWithoutPropertiesLoose(source, excluded) {
41  if (source == null) return {};
42  var target = {};
43  var sourceKeys = Object.keys(source);
44  var key, i;
45  for (i = 0; i < sourceKeys.length; i++) {
46    key = sourceKeys[i];
47    if (excluded.indexOf(key) >= 0) continue;
48    target[key] = source[key];
49  }
50  return target;
51}
52var propTypes = {
53  /** Toggles card padding using `.card-body` */
54  body: PropTypes.bool,
55  /** Add custom class */
56  className: PropTypes.string,
57  /** Change background color of component */
58  color: PropTypes.string,
59  /** Change underlying component's CSS base class name */
60  cssModule: PropTypes.object,
61  innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func]),
62  /** Inverts the color */
63  inverse: PropTypes.bool,
64  /** Changes the card to have only outline */
65  outline: PropTypes.bool,
66  /** Set a custom element for this component */
67  tag: tagPropType
68};
69function Card(props) {
70  var className = props.className, cssModule = props.cssModule, color = props.color, body = props.body, inverse = props.inverse, outline = props.outline, _props$tag = props.tag, Tag = _props$tag === void 0 ? "div" : _props$tag, innerRef = props.innerRef, attributes = _objectWithoutProperties(props, _excluded);
71  var classes = mapToCssModules(classnames(className, "card", inverse ? "text-white" : false, body ? "card-body" : false, color ? "".concat(outline ? "border" : "bg", "-").concat(color) : false), cssModule);
72  return /* @__PURE__ */ React.createElement(Tag, _extends({}, attributes, {
73    className: classes,
74    ref: innerRef
75  }));
76}
77Card.propTypes = propTypes;
78const simulatedLabel = "_simulatedLabel_2x0al_104";
79const styles = {
80  simulatedLabel
81};
82const CardServicos = ({
83  servicos
84}) => {
85  return /* @__PURE__ */ jsxRuntimeExports.jsx(Col, {
86    sm: 12,
87    md: 6,
88    lg: 6,
89    children: /* @__PURE__ */ jsxRuntimeExports.jsx(Link, {
90      to: "/detalhe-criar-solicitacao/" + servicos.processId + "/" + servicos.id,
91      children: /* @__PURE__ */ jsxRuntimeExports.jsx(Card, {
92        className: `hover-border-primary box-shadow`,
93        children: /* @__PURE__ */ jsxRuntimeExports.jsx(CardBody, {
94          children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
95            className: "email-media",
96            children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
97              className: "mt-0 d-sm-flex",
98              children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
99                className: `p-5 border-none d-flex justify-content-center mx-0 me-sm-3 ${servicos?.color}`,
100                children: /* @__PURE__ */ jsxRuntimeExports.jsx(DynamicIcon, {
101                  size: 40,
102                  name: servicos?.icon,
103                  className: ""
104                })
105              }
105), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
106                className: "media-body pt-0 overflow-visible",
107                children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
108                  className: "h4 text-dark fw-semibold mt-0-5 mb-1 truncate-1",
109                  children: servicos?.name
110                }), /* @__PURE__ */ jsxRuntimeExports.jsx("p", {
111                  className: "mb-0 limite-texto-2 truncate-1 ",
112                  dangerouslySetInnerHTML: {
113                    __html: servicos.description
114                  }
115                })]
116              })]
117            })
118          })
119        })
120      })
121    })
122  });
123};
124const Home = () => {
125  const [show, setShow] = reactExports.useState(false);
126  const dadosUsuario = useSelector((state) => state.auth);
127  const [servicos, setServicos] = reactExports.useState([]);
128  const [pesquisar, setPesquisar] = reactExports.useState("");
129  const [loading, setLoading] = reactExports.useState(true);
130  reactExports.useEffect(() => {
131    if (dadosUsuario.lastClassification.length == 0) {
132      window.location.href = "/home";
133      return;
134    }
135    getServicosByUserClassification();
136  }, []);
137  const getServicosByUserClassification = async () => {
138    setLoading(true);
139    await NovaSolicitacao.getServiceByUserClassification(dadosUsuario.userData.id, dadosUsuario.lastClassification.classificationId, pesquisar, "Suporte").then((res) => {
140      if (res) {
141        const newRes = res.filter((e) => e.environment.id == 2);
142        setServicos(newRes);
143        setLoading(false);
144      } else {
145        setServicos([]);
146        setLoading(false);
147      }
148    }).catch((e) => {
149      console.error("Error: ", e);
150      setLoading(false);
151    });
152  };
153  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
154    children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Card$1, {
155      className: "box-shadow",
156      children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Card$1.Body, {
157        children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Row, {
158          children: /* @__PURE__ */ jsxRuntimeExports.jsx(Col, {
159            sm: 12,
160            className: "border-top-0 mb-2",
161            children: /* @__PURE__ */ jsxRuntimeExports.jsx("h4", {
162              className: "fw-semibold",
163              children: "Solicitar Suporte"
164            })
165          })
166        }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
167          className: "ps-0",
168          children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, {
169            children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Col, {
170              md: 10,
171              children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
172                children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Form.Label, {
173                  children: "Pesquisar Serviços"
174                }), /* @__PURE__ */ jsxRuntimeExports.jsx("input", {
175                  onChange: (e) => setPesquisar(e.target.value),
176                  className: "form-control ",
177                  type: "text",
178                  id: "login-password"
179                })]
180              })
181            }), /* @__PURE__ */ jsxRuntimeExports.jsx(Col, {
182              md: 2,
183              children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
184                children: /* @__PURE__ */ jsxRuntimeExports.jsxs("button", {
185                  className: `btn btn-block btn-primary ${styles.simulatedLabel}`,
186                  onClick: () => getServicosByUserClassification(),
187                  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(DynamicIcon, {
188                    name: "BsSearch",
189                    className: "me-1",
190                    size: 15
191                  }), "Pesquisar"]
192                })
193              })
194            })]
195          })
196        })]
197      })
198    }), /* @__PURE__ */ jsxRuntimeExports.jsx(Row, {
199      className: "Row-sm",
200      children: /* @__PURE__ */ jsxRuntimeExports.jsx(Col, {
201        lg: 12,
202        xl: 12,
203        children: /* @__PURE__ */ jsxRuntimeExports.jsx(Card$1, {
204          className: "overflow-hidden box-shadow",
205          children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
206            children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, {
207              children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Col, {
208                sm: 12,
209                children: /* @__PURE__ */ jsxRuntimeExports.jsx(Card$1.Header, {
210                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Card$1.Title, {
211                    as: "h3",
212                    className: "mb-0",
213                    children: "Selecione o serviço"
214                  })
215                })
216              }
216), /* @__PURE__ */ jsxRuntimeExports.jsx(Card$1.Body, {
217                children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
218                  className: "mx-3",
219                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Row, {
220                    children: loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, {}) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
221                      children: [servicos.length == 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(Col, {
222                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, {
223                          className: "bg-light text-body",
224                          children: "Nenhum serviço de suporte disponível para esta classificação."
225                        })
226                      }), !loading ? servicos.map((item, index) => {
227                        return /* @__PURE__ */ jsxRuntimeExports.jsx(CardServicos, {
228                          servicos: item
229                        }, index);
230                      }) : null]
231                    })
232                  })
233                })
234              })]
235            })
236          })
237        })
238      })
239    })]
240  });
241};
242export {
243  Home as default
244};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.