fix default whatsapp in connection page

This commit is contained in:
canove
2020-09-20 11:13:46 -03:00
parent 0f0d9470c5
commit c56f848fa6
2 changed files with 4 additions and 4 deletions

View File

@@ -86,7 +86,7 @@ const WhatsAppModal = ({ open, onClose, whatsAppId }) => {
if (whatsAppId) {
await api.put(`/whatsapp/${whatsAppId}`, {
name: values.name,
default: values.default,
isDefault: values.isDefault,
});
} else {
await api.post("/whatsapp", values);
@@ -140,8 +140,8 @@ const WhatsAppModal = ({ open, onClose, whatsAppId }) => {
<Field
as={Switch}
color="primary"
name="default"
checked={values.default}
name="isDefault"
checked={values.isDefault}
/>
}
label="Default"

View File

@@ -262,7 +262,7 @@ const Connections = () => {
{format(parseISO(whatsApp.updatedAt), "dd/MM/yy HH:mm")}
</TableCell>
<TableCell align="center">
{whatsApp.default && (
{whatsApp.isDefault && (
<CheckCircle style={{ color: green[500] }} />
)}
</TableCell>