diff --git a/frontend/src/components/QueueModal/index.js b/frontend/src/components/QueueModal/index.js index d8f5cf9a..c15b424b 100644 --- a/frontend/src/components/QueueModal/index.js +++ b/frontend/src/components/QueueModal/index.js @@ -1,11 +1,11 @@ -import React, { useState, useEffect, useRef } from "react"; +import React, { useEffect, useRef, useState } from "react"; -import * as Yup from "yup"; -import { - Formik, - Form, - Field +import { + Field, + Form, + Formik } from "formik"; +import * as Yup from "yup"; import { Button, @@ -24,10 +24,10 @@ import { green } from "@material-ui/core/colors"; import { toast } from "react-toastify"; import { i18n } from "../../translate/i18n"; -import api from "../../services/api"; +import { Colorize } from "@material-ui/icons"; import toastError from "../../errors/toastError"; +import api from "../../services/api"; import ColorPicker from "../ColorPicker"; -import { Colorize } from "@material-ui/icons"; const useStyles = makeStyles(theme => ({ root: { @@ -223,7 +223,7 @@ const QueueModal = ({ open, onClose, queueId }) => { type="greetingMessage" multiline inputRef={greetingRef} - rows={4} + minRows={4} fullWidth name="greetingMessage" error={ @@ -295,7 +295,7 @@ const QueueModal = ({ open, onClose, queueId }) => { type="absenceMessage" multiline inputRef={absenceRef} - rows={2} + minRows={2} fullWidth name="absenceMessage" error={ diff --git a/frontend/src/components/WhatsAppModal/index.js b/frontend/src/components/WhatsAppModal/index.js index 0dd80c05..6d3bd095 100644 --- a/frontend/src/components/WhatsAppModal/index.js +++ b/frontend/src/components/WhatsAppModal/index.js @@ -169,7 +169,6 @@ const WhatsAppModal = ({ open, onClose, whatsAppId }) => { const handleSaveWhatsApp = async values => { const whatsappData = { ...values, queueIds: selectedQueueIds }; - try { if (isHubSelected && selectedChannel) { const selectedChannelObj = availableChannels.find( @@ -188,7 +187,7 @@ const WhatsAppModal = ({ open, onClose, whatsAppId }) => { } } else { if (whatsAppId) { - await api.put(`/whatsapp/${whatsAppId}`, ...whatsappData); + await api.put(`/whatsapp/${whatsAppId}`, whatsappData); } else { await api.post("/whatsapp", whatsappData); } @@ -348,7 +347,7 @@ const WhatsAppModal = ({ open, onClose, whatsAppId }) => { label={i18n.t("queueModal.form.greetingMessage")} type="greetingMessage" multiline - rows={5} + minRows={5} fullWidth name="greetingMessage" error={ @@ -367,7 +366,7 @@ const WhatsAppModal = ({ open, onClose, whatsAppId }) => { label={i18n.t("whatsappModal.form.farewellMessage")} type="farewellMessage" multiline - rows={5} + minRows={5} fullWidth name="farewellMessage" error={