mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 04:09:26 +00:00
fix default whatsapp in connection page
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user