Skip to content

Commit 920a284

Browse files
authored
Merge pull request #33 from Bit-Apps-Pro/niloy-dev
update: Version updated to 2.2.2
2 parents a945a23 + dadc5a3 commit 920a284

39 files changed

+1475
-742
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 200+ 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.2.1
7+
* Version: 2.2.2
88
* Author: Automation & Integration Plugin - Bit Apps
99
* Author URI: https://bitapps.pro
1010
* Text Domain: bit-integrations
@@ -23,7 +23,7 @@
2323
$btcbi_db_version = '1.0';
2424

2525
// Define most essential constants.
26-
define('BTCBI_VERSION', '2.2.1');
26+
define('BTCBI_VERSION', '2.2.2');
2727
define('BTCBI_PLUGIN_MAIN_FILE', __FILE__);
2828

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

frontend-dev/src/components/AllIntegrations/EditFormInteg.jsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ import {
7979
getWPForoTopics,
8080
getWPForoUsers
8181
} from '../Triggers/TriggerHelpers/WPForoHelper/WPForoCommonFunction.js'
82+
import {
83+
getWPJobManagerJobs,
84+
getWPJobManagerJobTypes
85+
} from '../Triggers/TriggerHelpers/WPJobManager/WPJobManagerCommonFunction.js'
8286

8387
function EditFormInteg({ setSnackbar, className = '' }) {
8488
const [forms, setForms] = useState([])
@@ -335,6 +339,24 @@ function EditFormInteg({ setSnackbar, className = '' }) {
335339
getWPForoUsers(data, setFlow)
336340
}
337341
}
342+
343+
if (trigger === 'WPJobManager') {
344+
if (
345+
data.triggered_entity_id === 'wp_job_manager-1' ||
346+
data.triggered_entity_id === 'wp_job_manager-4' ||
347+
data.triggered_entity_id === 'wp_job_manager-5'
348+
) {
349+
getWPJobManagerJobTypes(data, setFlow)
350+
}
351+
if (
352+
data.triggered_entity_id === 'wp_job_manager-2' ||
353+
data.triggered_entity_id === 'wp_job_manager-3' ||
354+
data.triggered_entity_id === 'wp_job_manager-6' ||
355+
data.triggered_entity_id === 'wp_job_manager-7'
356+
) {
357+
getWPJobManagerJobs(data, setFlow)
358+
}
359+
}
338360
}
339361

340362
useEffect(() => {

frontend-dev/src/components/AllIntegrations/GetResponse/GetResponseActions.jsx

Lines changed: 105 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,20 @@ import ConfirmModal from '../../Utilities/ConfirmModal'
88
import TableCheckBox from '../../Utilities/TableCheckBox'
99
import 'react-multiple-select-dropdown-lite/dist/index.css'
1010
import { getAllTags } from './GetResponseCommonFunc'
11+
import { useRecoilValue } from 'recoil'
12+
import { $btcbi } from '../../../GlobalStates'
13+
14+
export default function GetResponseActions({
15+
getResponseConf,
16+
setGetResponseConf,
17+
formFields,
18+
loading,
19+
setLoading
20+
}) {
21+
const [actionMdl, setActionMdl] = useState({ show: false, action: () => {} })
22+
const btcbi = useRecoilValue($btcbi)
23+
const { isPro } = btcbi
1124

12-
export default function GetResponseActions({ getResponseConf, setGetResponseConf, formFields, loading, setLoading }) {
13-
const [actionMdl, setActionMdl] = useState({ show: false, action: () => { } })
1425
const actionHandler = (e, type) => {
1526
const newConf = { ...getResponseConf }
1627
if (type === 'tag') {
@@ -22,31 +33,71 @@ export default function GetResponseActions({ getResponseConf, setGetResponseConf
2233
delete newConf.actions.tags
2334
}
2435
setActionMdl({ show: 'tag' })
25-
}
26-
if (type === 'update') {
36+
} else if (type === 'update') {
2737
if (e.target.checked) {
2838
newConf.actions.update = true
2939
} else {
3040
delete newConf.actions.update
3141
}
42+
} else if (type === 'dayOfCycle') {
43+
if (e.target.checked) {
44+
newConf.actions.dayOfCycle = true
45+
} else {
46+
delete newConf.actions.dayOfCycle
47+
}
48+
setActionMdl({ show: 'dayOfCycle' })
3249
}
50+
3351
setGetResponseConf({ ...newConf })
3452
}
3553

3654
const clsActionMdl = () => {
3755
setActionMdl({ show: false })
3856
}
3957

40-
const setChanges = (val) => {
58+
const setChanges = (val, name) => {
4159
const newConf = { ...getResponseConf }
42-
newConf['selectedTags'] = val
60+
if (name === 'selectedTags') {
61+
newConf['selectedTags'] = val
62+
} else if (name === 'dayOfCycle') {
63+
newConf['dayOfCycle'] = val
64+
}
4365
setGetResponseConf({ ...newConf })
4466
}
4567

4668
return (
4769
<div className="pos-rel d-flx w-8">
48-
<TableCheckBox checked={getResponseConf?.selectedTags.length || false} onChange={(e) => actionHandler(e, 'tag')} className="wdt-200 mt-4 mr-2" value="tag" title={__('Add Tags', 'bit-integrations')} subTitle={__('Add tags contact', 'bit-integrations')} />
49-
<TableCheckBox checked={getResponseConf.actions?.update || false} onChange={(e) => actionHandler(e, 'update')} className="wdt-200 mt-4 mr-2" value="update_contact" title={__('Update Contact', 'bit-integrations')} subTitle={__('Update Responses with GetResponse exist contact?', 'bit-integrations')} />
70+
<TableCheckBox
71+
checked={getResponseConf?.selectedTags.length || false}
72+
onChange={(e) => actionHandler(e, 'tag')}
73+
className="wdt-200 mt-4 mr-2"
74+
value="tag"
75+
title={__('Add Tags', 'bit-integrations')}
76+
subTitle={__('Add tags contact', 'bit-integrations')}
77+
/>
78+
<TableCheckBox
79+
checked={getResponseConf.actions?.update || false}
80+
onChange={(e) => actionHandler(e, 'update')}
81+
className="wdt-200 mt-4 mr-2"
82+
value="update_contact"
83+
title={__('Update Contact', 'bit-integrations')}
84+
subTitle={__('Update Responses with GetResponse exist contact?', 'bit-integrations')}
85+
/>
86+
{
87+
<TableCheckBox
88+
checked={getResponseConf?.dayOfCycle || false}
89+
onChange={(e) => actionHandler(e, 'dayOfCycle')}
90+
className="wdt-200 mt-4 mr-2"
91+
value="dayOfCycle"
92+
title={__(`Autoresponder day ${!isPro ? '(Pro)' : ''}`, 'bit-integrations')}
93+
subTitle={__(
94+
`${isPro ? 'The day on which the contact is in the Autoresponder cycle' : 'The Bit Integration Pro v(2.1.9) plugin needs to be installed and activated to enable the Autoresponder day feature'}`,
95+
'bit-integrations'
96+
)}
97+
isInfo={!isPro}
98+
/>
99+
}
100+
50101
<ConfirmModal
51102
className="custom-conf-mdl"
52103
mainMdlCls="o-v"
@@ -55,35 +106,62 @@ export default function GetResponseActions({ getResponseConf, setGetResponseConf
55106
show={actionMdl.show === 'tag'}
56107
close={clsActionMdl}
57108
action={clsActionMdl}
58-
title={__('Tags', 'bit-integrations')}
59-
>
109+
title={__('Tags', 'bit-integrations')}>
60110
<div className="btcd-hr mt-2 mb-2" />
61111
<div className="mt-2">{__('Select contact Tags', 'bit-integrations')}</div>
62-
{
63-
loading.tags ? (
64-
<Loader style={{
112+
{loading.tags ? (
113+
<Loader
114+
style={{
65115
display: 'flex',
66116
justifyContent: 'center',
67117
alignItems: 'center',
68118
height: 45,
69-
transform: 'scale(0.5)',
119+
transform: 'scale(0.5)'
70120
}}
121+
/>
122+
) : (
123+
<div className="flx flx-between mt-2">
124+
<MultiSelect
125+
options={getResponseConf?.tags?.map((tag) => ({ label: tag.name, value: tag.tagId }))}
126+
className="msl-wrp-options"
127+
defaultValue={getResponseConf?.selectedTags}
128+
onChange={(val) => setChanges(val, 'selectedTags')}
71129
/>
72-
)
73-
: (
74-
<div className="flx flx-between mt-2">
75-
<MultiSelect
76-
options={getResponseConf?.tags?.map(tag => ({ label: tag.name, value: tag.tagId }))}
77-
className="msl-wrp-options"
78-
defaultValue={getResponseConf?.selectedTags}
79-
onChange={val => setChanges(val)}
80-
/>
81-
<button onClick={() => getAllTags(getResponseConf, setGetResponseConf, setLoading)} className="icn-btn sh-sm ml-2 mr-2 tooltip" style={{ '--tooltip-txt': `${__('Refresh Groups', 'bit-integrations')}'` }} type="button">&#x21BB;</button>
82-
</div>
83-
)}
84-
130+
<button
131+
onClick={() => getAllTags(getResponseConf, setGetResponseConf, setLoading)}
132+
className="icn-btn sh-sm ml-2 mr-2 tooltip"
133+
style={{ '--tooltip-txt': `${__('Refresh Groups', 'bit-integrations')}'` }}
134+
type="button">
135+
&#x21BB;
136+
</button>
137+
</div>
138+
)}
85139
</ConfirmModal>
86140

141+
{isPro && (
142+
<ConfirmModal
143+
className="custom-conf-mdl"
144+
mainMdlCls="o-v"
145+
btnClass="purple"
146+
btnTxt={__('Ok', 'bit-integrations')}
147+
show={actionMdl.show === 'dayOfCycle'}
148+
close={clsActionMdl}
149+
action={clsActionMdl}
150+
title={__('Autoresponder day', 'bit-integrations')}>
151+
<div className="btcd-hr mt-2 mb-2" />
152+
<div className="mt-3">
153+
<b>{__('Autoresponder day', 'bit-integrations')}</b>
154+
</div>
155+
<input
156+
className="btcd-paper-inp mt-1"
157+
onChange={(e) => setChanges(e.target.value, 'dayOfCycle')}
158+
type="number"
159+
name="dayOfCycle"
160+
value={getResponseConf.dayOfCycle}
161+
placeholder={__('Autoresponder day...', 'bit-integrations')}
162+
/>
163+
</ConfirmModal>
164+
)}
87165
</div>
88166
)
89167
}

0 commit comments

Comments
 (0)