Skip to content

Commit 6c822aa

Browse files
authored
Merge pull request #112 from Bit-Apps-Pro/rishad-dev-tmp
version updated to v2.6.6 with some bug fixes
2 parents 8972a68 + a094985 commit 6c822aa

File tree

15 files changed

+290
-205
lines changed

15 files changed

+290
-205
lines changed

bitwpfi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Plugin Name: Bit Integrations
55
* Plugin URI: https://bitapps.pro/bit-integrations
66
* 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
7-
* Version: 2.6.5
7+
* Version: 2.6.6
88
* Author: Automation & Integration Plugin - Bit Apps
99
* Author URI: https://bitapps.pro
1010
* Text Domain: bit-integrations
@@ -24,7 +24,7 @@
2424
$btcbi_db_version = '1.1';
2525

2626
// Define most essential constants.
27-
define('BTCBI_VERSION', '2.6.5');
27+
define('BTCBI_VERSION', '2.6.6');
2828
define('BTCBI_PLUGIN_MAIN_FILE', __FILE__);
2929

3030
require_once plugin_dir_path(__FILE__) . 'includes/loader.php';

frontend-dev/src/components/AllIntegrations/MailerLite/EditMailerLite.jsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function EditMailerLite({ allIntegURL }) {
2121
const [flow, setFlow] = useRecoilState($newFlow)
2222
const [mailerLiteConf, setMailerLiteConf] = useRecoilState($actionConf)
2323
const [isLoading, setIsLoading] = useState(false)
24+
const [name, setName] = useState(mailerLiteConf?.name || '')
2425
const [loading, setLoading] = useState({
2526
list: false,
2627
field: false,
@@ -56,6 +57,16 @@ function EditMailerLite({ allIntegURL }) {
5657
}
5758
}, [])
5859

60+
const handleEditIntegName = e => {
61+
setName(e.target.value)
62+
63+
setMailerLiteConf(prevConf =>
64+
create(prevConf, draftConF => {
65+
draftConF.name = e.target.value
66+
})
67+
)
68+
}
69+
5970
return (
6071
<div style={{ width: 900 }}>
6172
<SnackMsg snack={snack} setSnackbar={setSnackbar} />
@@ -64,9 +75,9 @@ function EditMailerLite({ allIntegURL }) {
6475
<b className="wdt-200 d-in-b">{__('Integration Name:', 'bit-integrations')}</b>
6576
<input
6677
className="btcd-paper-inp w-5"
67-
onChange={e => handleInput(e, mailerLiteConf, setMailerLiteConf, loading, setLoading)}
78+
onChange={handleEditIntegName}
6879
name="name"
69-
value={mailerLiteConf.name}
80+
value={name}
7081
type="text"
7182
placeholder={__('Integration Name...', 'bit-integrations')}
7283
/>

frontend-dev/src/components/AllIntegrations/MailerLite/MailerLiteActions.jsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,30 @@ import ConfirmModal from '../../Utilities/ConfirmModal'
99
import TableCheckBox from '../../Utilities/TableCheckBox'
1010
import 'react-multiple-select-dropdown-lite/dist/index.css'
1111
import { getAllGroups } from './MailerLiteCommonFunc'
12+
import { create } from 'mutative'
1213

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

1617
const actionHandler = (e, type) => {
17-
const newConf = { ...mailerLiteConf }
18-
1918
if (type === 'group') {
2019
getAllGroups(mailerLiteConf, setMailerLiteConf, loading, setLoading)
2120
}
2221

23-
if (e.target.checked) {
24-
newConf.actions[type] = true
25-
} else {
26-
delete newConf.actions[type]
27-
}
28-
2922
setActionMdl({ show: type })
30-
setMailerLiteConf({ ...newConf })
23+
setMailerLiteConf(prevConf =>
24+
create(prevConf, draftConf => {
25+
draftConf.actions = { ...(draftConf.actions || {}) }
26+
27+
if (e.target.checked) {
28+
draftConf.actions[type] = true
29+
} else {
30+
delete draftConf.actions[type]
31+
}
32+
})
33+
)
3134
}
35+
3236
const clsActionMdl = () => {
3337
setActionMdl({ show: false })
3438
}

0 commit comments

Comments
 (0)