feat: removed optionNumber from queues assocs

This commit is contained in:
canove
2021-01-11 06:38:45 -03:00
parent a75eb49b31
commit be320fa34b
11 changed files with 39 additions and 94 deletions

View File

@@ -75,7 +75,7 @@ const WhatsAppModal = ({ open, onClose, whatsAppId }) => {
const { data } = await api.get(`whatsapp/${whatsAppId}`);
setWhatsApp(data);
const whatsQueueIds = data.whatsappQueues?.map(q => q.queue.id);
const whatsQueueIds = data.queues?.map(queue => queue.id);
setSelectedQueueIds(whatsQueueIds);
} catch (err) {
toastError(err);
@@ -94,10 +94,10 @@ const WhatsAppModal = ({ open, onClose, whatsAppId }) => {
await api.post("/whatsapp", whatsappData);
}
toast.success(i18n.t("whatsappModal.success"));
handleClose();
} catch (err) {
toastError(err);
}
handleClose();
};
const handleClose = () => {