Skip to content
Merged
4 changes: 2 additions & 2 deletions bitwpfi.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: Bit Integrations
* Plugin URI: https://bitapps.pro/bit-integrations
* Description: Bit Integrations is a platform that integrates with over 290+ different platforms to help with various tasks on your WordPress site, like WooCommerce, Form builder, Page builder, LMS, Sales funnels, Bookings, CRM, Webhooks, Email marketing, Social media and Spreadsheets, etc
* Version: 2.6.5
* Version: 2.6.6
* Author: Automation & Integration Plugin - Bit Apps
* Author URI: https://bitapps.pro
* Text Domain: bit-integrations
Expand All @@ -24,7 +24,7 @@
$btcbi_db_version = '1.1';

// Define most essential constants.
define('BTCBI_VERSION', '2.6.5');
define('BTCBI_VERSION', '2.6.6');
define('BTCBI_PLUGIN_MAIN_FILE', __FILE__);

require_once plugin_dir_path(__FILE__) . 'includes/loader.php';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function EditMailerLite({ allIntegURL }) {
const [flow, setFlow] = useRecoilState($newFlow)
const [mailerLiteConf, setMailerLiteConf] = useRecoilState($actionConf)
const [isLoading, setIsLoading] = useState(false)
const [name, setName] = useState(mailerLiteConf?.name || '')
const [loading, setLoading] = useState({
list: false,
field: false,
Expand Down Expand Up @@ -56,6 +57,16 @@ function EditMailerLite({ allIntegURL }) {
}
}, [])

const handleEditIntegName = e => {
setName(e.target.value)

setMailerLiteConf(prevConf =>
create(prevConf, draftConF => {
draftConF.name = e.target.value
})
)
}

return (
<div style={{ width: 900 }}>
<SnackMsg snack={snack} setSnackbar={setSnackbar} />
Expand All @@ -64,9 +75,9 @@ function EditMailerLite({ allIntegURL }) {
<b className="wdt-200 d-in-b">{__('Integration Name:', 'bit-integrations')}</b>
<input
className="btcd-paper-inp w-5"
onChange={e => handleInput(e, mailerLiteConf, setMailerLiteConf, loading, setLoading)}
onChange={handleEditIntegName}
name="name"
value={mailerLiteConf.name}
value={name}
type="text"
placeholder={__('Integration Name...', 'bit-integrations')}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,30 @@ import ConfirmModal from '../../Utilities/ConfirmModal'
import TableCheckBox from '../../Utilities/TableCheckBox'
import 'react-multiple-select-dropdown-lite/dist/index.css'
import { getAllGroups } from './MailerLiteCommonFunc'
import { create } from 'mutative'

export default function MailerLiteActions({ mailerLiteConf, setMailerLiteConf, loading, setLoading }) {
const [actionMdl, setActionMdl] = useState({ show: false, action: () => {} })

const actionHandler = (e, type) => {
const newConf = { ...mailerLiteConf }

if (type === 'group') {
getAllGroups(mailerLiteConf, setMailerLiteConf, loading, setLoading)
}

if (e.target.checked) {
newConf.actions[type] = true
} else {
delete newConf.actions[type]
}

setActionMdl({ show: type })
setMailerLiteConf({ ...newConf })
setMailerLiteConf(prevConf =>
create(prevConf, draftConf => {
draftConf.actions = { ...(draftConf.actions || {}) }

if (e.target.checked) {
draftConf.actions[type] = true
} else {
delete draftConf.actions[type]
}
})
)
}

const clsActionMdl = () => {
setActionMdl({ show: false })
}
Expand Down
Loading