Skip to content

Commit

Permalink
Merge pull request #349 from noharm-ai/develop
Browse files Browse the repository at this point in the history
v3.2.4
  • Loading branch information
marceloarocha authored Aug 13, 2024
2 parents 656164b + c6b4850 commit d1a6fca
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "noharm-app",
"version": "3.2.3",
"version": "3.2.4",
"private": true,
"dependencies": {
"@ckeditor/ckeditor5-build-classic": "^35.0.1",
Expand Down
31 changes: 29 additions & 2 deletions src/features/support/SupportForm/Base.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next";
import { Upload, notification } from "antd";
import { UploadOutlined } from "@ant-design/icons";

import { Select } from "components/Inputs";
import { Select, Input } from "components/Inputs";
import Editor from "components/Editor";
import Button from "components/Button";
import IntegrationStatus from "models/IntegrationStatus";
Expand Down Expand Up @@ -49,7 +49,7 @@ function BaseForm() {
}`}
>
<div className="form-label">
<label>{t("labels.subject")}:</label>
<label>{t("labels.ticketType")}:</label>
</div>
<div className="form-input">
<Select
Expand All @@ -58,6 +58,7 @@ function BaseForm() {
status={errors.category && touched.category ? "error" : null}
optionFilterProp="children"
showSearch
placeholder="Selecione"
>
<Select.Option key={0} value="Dúvida">
Dúvida
Expand All @@ -80,6 +81,27 @@ function BaseForm() {
)}
</div>

<div
className={`form-row ${
errors.category && touched.category ? "error" : ""
}`}
>
<div className="form-label">
<label>{t("labels.subject")}:</label>
</div>
<div className="form-input">
<Input
placeholder="Ex: Erro ao checar prescrição"
value={values.title}
onChange={({ target }) => setFieldValue("title", target.value)}
maxLength={150}
/>
</div>
{errors.title && touched.title && (
<div className="form-error">{errors.title}</div>
)}
</div>

<div
className={`form-row ${
errors.description && touched.description ? "error" : ""
Expand All @@ -105,9 +127,14 @@ function BaseForm() {
/>
</EditorBox>
</div>

{errors.description && touched.description && (
<div className="form-error">{errors.description}</div>
)}
<div className="form-info">
Lembre-se de dar exemplos com número de Atendimento e/ou número de
Prescrição para facilitar a resolução do seu chamado.
</div>
</div>

<div className={`form-row ${errors.fileList ? "error" : ""}`}>
Expand Down
8 changes: 7 additions & 1 deletion src/features/support/SupportForm/SupportForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default function SupportForm() {
const status = useSelector((state) => state.support.form.status);

const validationSchema = Yup.object().shape({
title: Yup.string().nullable().required(t("validation.requiredField")),
category: Yup.string().nullable().required(t("validation.requiredField")),
description: Yup.string()
.nullable()
Expand All @@ -45,6 +46,7 @@ export default function SupportForm() {
});

const initialValues = {
title: null,
category: null,
description: null,
fileList: [],
Expand Down Expand Up @@ -165,7 +167,11 @@ export default function SupportForm() {
Estamos aqui para ajudar a resolver suas dúvidas e problemas da
melhor maneira possível. Para garantir que possamos oferecer o
suporte mais eficaz, é crucial que você forneça o{" "}
<strong>máximo de detalhes</strong> possível sobre sua questão.
<strong>máximo de detalhes</strong> possível sobre sua questão.{" "}
<span style={{ color: "#f5222d" }}>
Principalmente trazendo exemplos de Atendimentos e/ou
prescrições.
</span>
</p>

<p>
Expand Down
5 changes: 4 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,10 @@
"useful": "Useful",
"notUseful": "Has errors",
"observations": "Observations",
"drugAttributes": "Drug attributes"
"drugAttributes": "Drug attributes",
"title": "Title",
"category": "Category",
"ticketType": "Ticket type"
},
"titles": {
"addDrugMeasureUnit": "Add Drug Unit"
Expand Down
5 changes: 4 additions & 1 deletion src/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,10 @@
"useful": "Útil",
"notUseful": "Possui erros",
"observations": "Observações",
"drugAttributes": "Atributos do medicamento"
"drugAttributes": "Atributos do medicamento",
"title": "Título",
"category": "Categoria",
"ticketType": "Tipo de chamado"
},
"titles": {
"addDrugMeasureUnit": "Adicionar Unidade de Medida"
Expand Down

0 comments on commit d1a6fca

Please sign in to comment.