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B4XF;y0AAn##kcIi#R4C&})zRqtxQ&%FeE`5wU3^^4}U
ztsd<+h_#?^=VU#MzDzigFxCCIz@Z$G3D%we+;sH{pB4pS?>__`Z4tEhHo_=
z|N5s-pAmrQl4YtDAZh>rc)o{hi%JDG_+xDL${kC9p91X_yFi8>!i?iE%H*eyVo8`zlOTM(Xm)-gvq3w#49<
literal 0
HcmV?d00001
From aa3a5b3fa4483961e8585448468b42f3363e715e Mon Sep 17 00:00:00 2001
From: Rishad Alam <101513331+RishadAlam@users.noreply.github.com>
Date: Sat, 25 Apr 2026 13:33:32 +0600
Subject: [PATCH 2/6] feat: wp erp utilities added
---
.../AllIntegrations/WpErp/WpErpActions.jsx | 38 +++++++++++++++++++
.../WpErp/WpErpIntegLayout.jsx | 7 ++++
.../AllIntegrations/WpErp/staticData.js | 7 +---
3 files changed, 47 insertions(+), 5 deletions(-)
create mode 100644 frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx
diff --git a/frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx b/frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx
new file mode 100644
index 000000000..96eb28ce7
--- /dev/null
+++ b/frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx
@@ -0,0 +1,38 @@
+/* eslint-disable no-param-reassign */
+
+import 'react-multiple-select-dropdown-lite/dist/index.css'
+import { __ } from '../../../Utils/i18nwrap'
+import TableCheckBox from '../../Utilities/TableCheckBox'
+
+const deleteActions = ['deleteContact', 'deleteCompany']
+export default function WpErpActions({ wpErpConf, setWpErpConf }) {
+
+ const actionHandler = (e, type) => {
+ const newConf = { ...wpErpConf }
+
+ if (e.target.checked) {
+ newConf.utilities[type] = true
+ } else {
+ delete newConf.utilities[type]
+ }
+
+ setWpErpConf({ ...newConf })
+ }
+
+ return (
+
+ {deleteActions.includes(wpErpConf.mainAction) &&
+ (
+ < TableCheckBox
+ checked={wpErpConf.utilities?.force_delete || false}
+ onChange={e => actionHandler(e, 'force_delete')}
+ className="wdt-200 mt-4 mr-2"
+ value="force_delete"
+ title={__('Force Delete', 'bit-integrations')}
+ subTitle={__('Permanently delete without soft delete?', 'bit-integrations')}
+ />
+ )
+ }
+
+ )
+}
diff --git a/frontend/src/components/AllIntegrations/WpErp/WpErpIntegLayout.jsx b/frontend/src/components/AllIntegrations/WpErp/WpErpIntegLayout.jsx
index 478ff56f7..a698b8e67 100644
--- a/frontend/src/components/AllIntegrations/WpErp/WpErpIntegLayout.jsx
+++ b/frontend/src/components/AllIntegrations/WpErp/WpErpIntegLayout.jsx
@@ -15,6 +15,7 @@ import {
refreshLifeStages
} from './WpErpCommonFunc'
import WpErpFieldMap from './WpErpFieldMap'
+import WpErpActions from './WpErpActions'
import {
CompanyDeleteFields,
CompanyFields,
@@ -272,6 +273,12 @@ export default function WpErpIntegLayout({
+
+
+ {__('Utilities', 'bit-integrations')}
+
+
+
)}
>
diff --git a/frontend/src/components/AllIntegrations/WpErp/staticData.js b/frontend/src/components/AllIntegrations/WpErp/staticData.js
index 402c5fc71..ac8362f5d 100644
--- a/frontend/src/components/AllIntegrations/WpErp/staticData.js
+++ b/frontend/src/components/AllIntegrations/WpErp/staticData.js
@@ -61,8 +61,7 @@ export const ContactUpdateFields = [
]
export const ContactDeleteFields = [
- { key: 'contact_id', label: __('Contact ID', 'bit-integrations'), required: true },
- { key: 'force_delete', label: __('Force Delete (1/0)', 'bit-integrations'), required: false }
+ { key: 'contact_id', label: __('Contact ID', 'bit-integrations'), required: true }
]
export const CompanyFields = [
@@ -85,8 +84,7 @@ export const CompanyUpdateFields = [
]
export const CompanyDeleteFields = [
- { key: 'company_id', label: __('Company ID', 'bit-integrations'), required: true },
- { key: 'force_delete', label: __('Force Delete (1/0)', 'bit-integrations'), required: false }
+ { key: 'company_id', label: __('Company ID', 'bit-integrations'), required: true }
]
export const ContactGroupFields = [
@@ -96,7 +94,6 @@ export const ContactGroupFields = [
export const GroupSubscriberFields = [
{ key: 'contact_id', label: __('Contact ID', 'bit-integrations'), required: true },
- { key: 'group_id', label: __('Group ID', 'bit-integrations'), required: true }
]
export const NoteFields = [
From 272f24ca9d12c8df717980e6081421407007ddc3 Mon Sep 17 00:00:00 2001
From: Rishad Alam <101513331+RishadAlam@users.noreply.github.com>
Date: Sat, 25 Apr 2026 14:14:49 +0600
Subject: [PATCH 3/6] refactor: wp erp action frontend
---
backend/Actions/WpErp/RecordApiHelper.php | 2 +-
frontend/src/components/AllIntegrations/EditInteg.jsx | 1 -
frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/backend/Actions/WpErp/RecordApiHelper.php b/backend/Actions/WpErp/RecordApiHelper.php
index 77debf398..86b4046ab 100644
--- a/backend/Actions/WpErp/RecordApiHelper.php
+++ b/backend/Actions/WpErp/RecordApiHelper.php
@@ -38,7 +38,7 @@ public function execute($fieldValues, $fieldMap, $utilities)
$defaultResponse = [
'success' => false,
// translators: %s: Plugin name
- 'message' => wp_sprintf(__('%s plugin is not installed or activate', 'bit-integrations'), 'Bit Integrations Pro')
+ 'message' => wp_sprintf(__('%s plugin is not installed or activated', 'bit-integrations'), 'Bit Integrations Pro')
];
$hookMap = [
diff --git a/frontend/src/components/AllIntegrations/EditInteg.jsx b/frontend/src/components/AllIntegrations/EditInteg.jsx
index 1741d436b..9ab52d73c 100644
--- a/frontend/src/components/AllIntegrations/EditInteg.jsx
+++ b/frontend/src/components/AllIntegrations/EditInteg.jsx
@@ -259,7 +259,6 @@ export default function EditInteg({ allIntegURL }) {
)
}
const IntegType = memo(({ allIntegURL, flow }) => {
- console.log(flow?.flow_details?.type)
switch (flow?.flow_details?.type) {
case 'Zoho CRM':
return
diff --git a/frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx b/frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx
index 96eb28ce7..37c644ee2 100644
--- a/frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx
+++ b/frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx
@@ -23,7 +23,7 @@ export default function WpErpActions({ wpErpConf, setWpErpConf }) {
{deleteActions.includes(wpErpConf.mainAction) &&
(
- < TableCheckBox
+
actionHandler(e, 'force_delete')}
className="wdt-200 mt-4 mr-2"
From d857ec15a549e7af64dd08cb78783ed7d798fe3f Mon Sep 17 00:00:00 2001
From: Rishad Alam <101513331+RishadAlam@users.noreply.github.com>
Date: Wed, 6 May 2026 10:55:43 +0600
Subject: [PATCH 4/6] refactor: remove employee and delete actions from WpErp
integration components
---
backend/Actions/WpErp/RecordApiHelper.php | 4 --
.../AllIntegrations/WpErp/WpErpActions.jsx | 38 -----------
.../WpErp/WpErpIntegLayout.jsx | 68 -------------------
.../AllIntegrations/WpErp/staticData.js | 45 ------------
4 files changed, 155 deletions(-)
delete mode 100644 frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx
diff --git a/backend/Actions/WpErp/RecordApiHelper.php b/backend/Actions/WpErp/RecordApiHelper.php
index 86b4046ab..19f412c6f 100644
--- a/backend/Actions/WpErp/RecordApiHelper.php
+++ b/backend/Actions/WpErp/RecordApiHelper.php
@@ -44,17 +44,13 @@ public function execute($fieldValues, $fieldMap, $utilities)
$hookMap = [
'createContact' => ['hook' => 'wperp_create_contact', 'type' => 'contact'],
'updateContact' => ['hook' => 'wperp_update_contact', 'type' => 'contact'],
- 'deleteContact' => ['hook' => 'wperp_delete_contact', 'type' => 'contact'],
'createCompany' => ['hook' => 'wperp_create_company', 'type' => 'company'],
'updateCompany' => ['hook' => 'wperp_update_company', 'type' => 'company'],
- 'deleteCompany' => ['hook' => 'wperp_delete_company', 'type' => 'company'],
'createContactGroup' => ['hook' => 'wperp_create_contact_group', 'type' => 'contact_group'],
'addContactToGroup' => ['hook' => 'wperp_add_contact_to_group', 'type' => 'contact_group'],
'removeContactFromGroup' => ['hook' => 'wperp_remove_contact_from_group', 'type' => 'contact_group'],
'addNote' => ['hook' => 'wperp_add_note', 'type' => 'note'],
'createTask' => ['hook' => 'wperp_create_task', 'type' => 'task'],
- 'createEmployee' => ['hook' => 'wperp_create_employee', 'type' => 'employee'],
- 'updateEmployee' => ['hook' => 'wperp_update_employee', 'type' => 'employee'],
'createDepartment' => ['hook' => 'wperp_create_department', 'type' => 'department'],
'createDesignation' => ['hook' => 'wperp_create_designation', 'type' => 'designation'],
'createHoliday' => ['hook' => 'wperp_create_holiday', 'type' => 'holiday'],
diff --git a/frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx b/frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx
deleted file mode 100644
index 37c644ee2..000000000
--- a/frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx
+++ /dev/null
@@ -1,38 +0,0 @@
-/* eslint-disable no-param-reassign */
-
-import 'react-multiple-select-dropdown-lite/dist/index.css'
-import { __ } from '../../../Utils/i18nwrap'
-import TableCheckBox from '../../Utilities/TableCheckBox'
-
-const deleteActions = ['deleteContact', 'deleteCompany']
-export default function WpErpActions({ wpErpConf, setWpErpConf }) {
-
- const actionHandler = (e, type) => {
- const newConf = { ...wpErpConf }
-
- if (e.target.checked) {
- newConf.utilities[type] = true
- } else {
- delete newConf.utilities[type]
- }
-
- setWpErpConf({ ...newConf })
- }
-
- return (
-
- {deleteActions.includes(wpErpConf.mainAction) &&
- (
-
actionHandler(e, 'force_delete')}
- className="wdt-200 mt-4 mr-2"
- value="force_delete"
- title={__('Force Delete', 'bit-integrations')}
- subTitle={__('Permanently delete without soft delete?', 'bit-integrations')}
- />
- )
- }
-
- )
-}
diff --git a/frontend/src/components/AllIntegrations/WpErp/WpErpIntegLayout.jsx b/frontend/src/components/AllIntegrations/WpErp/WpErpIntegLayout.jsx
index a698b8e67..c0bb57116 100644
--- a/frontend/src/components/AllIntegrations/WpErp/WpErpIntegLayout.jsx
+++ b/frontend/src/components/AllIntegrations/WpErp/WpErpIntegLayout.jsx
@@ -10,24 +10,17 @@ import { addFieldMap } from '../IntegrationHelpers/IntegrationHelpers'
import {
generateMappedField,
refreshContactGroups,
- refreshDepartments,
- refreshDesignations,
refreshLifeStages
} from './WpErpCommonFunc'
import WpErpFieldMap from './WpErpFieldMap'
-import WpErpActions from './WpErpActions'
import {
- CompanyDeleteFields,
CompanyFields,
CompanyUpdateFields,
- ContactDeleteFields,
ContactFields,
ContactGroupFields,
ContactUpdateFields,
DepartmentFields,
DesignationFields,
- EmployeeFields,
- EmployeeUpdateFields,
ExpenseFields,
GroupSubscriberFields,
HolidayFields,
@@ -40,17 +33,13 @@ import {
const FIELDS_BY_ACTION = {
createContact: ContactFields,
updateContact: ContactUpdateFields,
- deleteContact: ContactDeleteFields,
createCompany: CompanyFields,
updateCompany: CompanyUpdateFields,
- deleteCompany: CompanyDeleteFields,
createContactGroup: ContactGroupFields,
addContactToGroup: GroupSubscriberFields,
removeContactFromGroup: GroupSubscriberFields,
addNote: NoteFields,
createTask: TaskFields,
- createEmployee: EmployeeFields,
- updateEmployee: EmployeeUpdateFields,
createDepartment: DepartmentFields,
createDesignation: DesignationFields,
createHoliday: HolidayFields,
@@ -60,7 +49,6 @@ const FIELDS_BY_ACTION = {
const CRM_GROUP_ACTIONS = ['createContact', 'updateContact', 'addContactToGroup', 'removeContactFromGroup']
const LIFE_STAGE_ACTIONS = ['createContact', 'updateContact']
-const HRM_DEPT_ACTIONS = ['createEmployee', 'updateEmployee']
export default function WpErpIntegLayout({
formFields,
@@ -83,10 +71,6 @@ export default function WpErpIntegLayout({
if (CRM_GROUP_ACTIONS.includes(value)) refreshContactGroups(setWpErpConf, setIsLoading)
if (LIFE_STAGE_ACTIONS.includes(value)) refreshLifeStages(setWpErpConf, setIsLoading)
- if (HRM_DEPT_ACTIONS.includes(value)) {
- refreshDepartments(setWpErpConf, setIsLoading)
- refreshDesignations(setWpErpConf, setIsLoading)
- }
}
useEffect(() => {
@@ -180,53 +164,6 @@ export default function WpErpIntegLayout({
>
)}
- {HRM_DEPT_ACTIONS.includes(wpErpConf?.mainAction) && (
- <>
-
-
- {__('Department:', 'bit-integrations')}
- ({ label: dept?.label, value: dept?.value?.toString() }))}
- onChange={val => setUtility('department', val)}
- singleSelect
- closeOnSelect
- />
-
-
-
-
- {__('Designation:', 'bit-integrations')}
- ({ label: designation?.label, value: designation?.value?.toString() }))}
- onChange={val => setUtility('designation', val)}
- singleSelect
- closeOnSelect
- />
-
-
- >
- )}
-
{isLoading && (
-
- {__('Utilities', 'bit-integrations')}
-
-
-
)}
>
diff --git a/frontend/src/components/AllIntegrations/WpErp/staticData.js b/frontend/src/components/AllIntegrations/WpErp/staticData.js
index ac8362f5d..138d94710 100644
--- a/frontend/src/components/AllIntegrations/WpErp/staticData.js
+++ b/frontend/src/components/AllIntegrations/WpErp/staticData.js
@@ -4,18 +4,14 @@ export const modules = [
// CRM
{ name: 'createContact', label: __('Create Contact', 'bit-integrations'), is_pro: true, group: 'CRM' },
{ name: 'updateContact', label: __('Update Contact', 'bit-integrations'), is_pro: true, group: 'CRM' },
- { name: 'deleteContact', label: __('Delete Contact', 'bit-integrations'), is_pro: true, group: 'CRM' },
{ name: 'createCompany', label: __('Create Company', 'bit-integrations'), is_pro: true, group: 'CRM' },
{ name: 'updateCompany', label: __('Update Company', 'bit-integrations'), is_pro: true, group: 'CRM' },
- { name: 'deleteCompany', label: __('Delete Company', 'bit-integrations'), is_pro: true, group: 'CRM' },
{ name: 'createContactGroup', label: __('Create Contact Group', 'bit-integrations'), is_pro: true, group: 'CRM' },
{ name: 'addContactToGroup', label: __('Add Contact To Group', 'bit-integrations'), is_pro: true, group: 'CRM' },
{ name: 'removeContactFromGroup', label: __('Remove Contact From Group', 'bit-integrations'), is_pro: true, group: 'CRM' },
{ name: 'addNote', label: __('Add Note To Contact', 'bit-integrations'), is_pro: true, group: 'CRM' },
{ name: 'createTask', label: __('Create Task', 'bit-integrations'), is_pro: true, group: 'CRM' },
// HRM
- { name: 'createEmployee', label: __('Create Employee', 'bit-integrations'), is_pro: true, group: 'HRM' },
- { name: 'updateEmployee', label: __('Update Employee', 'bit-integrations'), is_pro: true, group: 'HRM' },
{ name: 'createDepartment', label: __('Create Department', 'bit-integrations'), is_pro: true, group: 'HRM' },
{ name: 'createDesignation', label: __('Create Designation', 'bit-integrations'), is_pro: true, group: 'HRM' },
{ name: 'createHoliday', label: __('Create Holiday', 'bit-integrations'), is_pro: true, group: 'HRM' },
@@ -60,10 +56,6 @@ export const ContactUpdateFields = [
{ key: 'country', label: __('Country', 'bit-integrations'), required: false }
]
-export const ContactDeleteFields = [
- { key: 'contact_id', label: __('Contact ID', 'bit-integrations'), required: true }
-]
-
export const CompanyFields = [
{ key: 'company', label: __('Company Name', 'bit-integrations'), required: true },
{ key: 'email', label: __('Email', 'bit-integrations'), required: true },
@@ -83,10 +75,6 @@ export const CompanyUpdateFields = [
...CompanyFields.map(f => ({ ...f, required: false })).filter(f => f.key !== 'id')
]
-export const CompanyDeleteFields = [
- { key: 'company_id', label: __('Company ID', 'bit-integrations'), required: true }
-]
-
export const ContactGroupFields = [
{ key: 'name', label: __('Group Name', 'bit-integrations'), required: true },
{ key: 'description', label: __('Description', 'bit-integrations'), required: false }
@@ -110,39 +98,6 @@ export const TaskFields = [
{ key: 'assigned_to', label: __('Assigned To User ID', 'bit-integrations'), required: false }
]
-export const EmployeeFields = [
- { key: 'first_name', label: __('First Name', 'bit-integrations'), required: true },
- { key: 'last_name', label: __('Last Name', 'bit-integrations'), required: true },
- { key: 'user_email', label: __('Email', 'bit-integrations'), required: true },
- { key: 'middle_name', label: __('Middle Name', 'bit-integrations'), required: false },
- { key: 'phone', label: __('Phone', 'bit-integrations'), required: false },
- { key: 'mobile', label: __('Mobile', 'bit-integrations'), required: false },
- { key: 'employee_id', label: __('Employee ID', 'bit-integrations'), required: false },
- { key: 'date_of_birth', label: __('Date of Birth', 'bit-integrations'), required: false },
- { key: 'hiring_date', label: __('Hiring Date', 'bit-integrations'), required: false },
- { key: 'location', label: __('Location', 'bit-integrations'), required: false },
- { key: 'type', label: __('Employment Type', 'bit-integrations'), required: false },
- { key: 'status', label: __('Status', 'bit-integrations'), required: false },
- { key: 'gender', label: __('Gender', 'bit-integrations'), required: false },
- { key: 'marital_status', label: __('Marital Status', 'bit-integrations'), required: false },
- { key: 'nationality', label: __('Nationality', 'bit-integrations'), required: false },
- { key: 'reporting_to', label: __('Reporting To', 'bit-integrations'), required: false },
- { key: 'pay_rate', label: __('Pay Rate', 'bit-integrations'), required: false },
- { key: 'pay_type', label: __('Pay Type', 'bit-integrations'), required: false },
- { key: 'personal_email', label: __('Personal Email', 'bit-integrations'), required: false },
- { key: 'street_1', label: __('Street 1', 'bit-integrations'), required: false },
- { key: 'street_2', label: __('Street 2', 'bit-integrations'), required: false },
- { key: 'city', label: __('City', 'bit-integrations'), required: false },
- { key: 'state', label: __('State', 'bit-integrations'), required: false },
- { key: 'postal_code', label: __('Postal Code', 'bit-integrations'), required: false },
- { key: 'country', label: __('Country', 'bit-integrations'), required: false }
-]
-
-export const EmployeeUpdateFields = [
- { key: 'user_id', label: __('User ID', 'bit-integrations'), required: true },
- ...EmployeeFields.map(f => ({ ...f, required: false }))
-]
-
export const DepartmentFields = [
{ key: 'title', label: __('Department Title', 'bit-integrations'), required: true },
{ key: 'description', label: __('Description', 'bit-integrations'), required: false },
From a033cdc1b3f40c50a23cbb7b05cf93bd47f807cf Mon Sep 17 00:00:00 2001
From: Rishad Alam <101513331+RishadAlam@users.noreply.github.com>
Date: Wed, 6 May 2026 11:21:20 +0600
Subject: [PATCH 5/6] fix: enhance response handling and improve button
visibility in WpErp integration components
---
backend/Actions/WpErp/RecordApiHelper.php | 2 +-
backend/Actions/WpErp/WpErpController.php | 2 +-
.../WpErp/WpErpAuthorization.jsx | 46 +++++++++++--------
3 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/backend/Actions/WpErp/RecordApiHelper.php b/backend/Actions/WpErp/RecordApiHelper.php
index 19f412c6f..630e8e17f 100644
--- a/backend/Actions/WpErp/RecordApiHelper.php
+++ b/backend/Actions/WpErp/RecordApiHelper.php
@@ -77,7 +77,7 @@ public function execute($fieldValues, $fieldMap, $utilities)
$actionType = $mainAction;
}
- $responseType = isset($response['success']) && $response['success'] ? 'success' : 'error';
+ $responseType = (!is_wp_error($response) && isset($response['success']) && $response['success']) ? 'success' : 'error';
LogHandler::save($this->_integrationID, ['type' => $type, 'type_name' => $actionType], $responseType, $response);
return $response;
diff --git a/backend/Actions/WpErp/WpErpController.php b/backend/Actions/WpErp/WpErpController.php
index fd8235aae..5d08cd517 100644
--- a/backend/Actions/WpErp/WpErpController.php
+++ b/backend/Actions/WpErp/WpErpController.php
@@ -104,7 +104,7 @@ public function execute($integrationData, $fieldValues)
$integrationDetails = $integrationData->flow_details;
$integId = $integrationData->id;
$fieldMap = $integrationDetails->field_map;
- $utilities = isset($integrationDetails->utilities) ? $integrationDetails->utilities : [];
+ $utilities = $integrationDetails->utilities ?? [];
if (empty($fieldMap)) {
return new WP_Error('field_map_empty', __('Field map is empty', 'bit-integrations'));
diff --git a/frontend/src/components/AllIntegrations/WpErp/WpErpAuthorization.jsx b/frontend/src/components/AllIntegrations/WpErp/WpErpAuthorization.jsx
index 418fd7344..382e48254 100644
--- a/frontend/src/components/AllIntegrations/WpErp/WpErpAuthorization.jsx
+++ b/frontend/src/components/AllIntegrations/WpErp/WpErpAuthorization.jsx
@@ -11,7 +11,8 @@ export default function WpErpAuthorization({
nextPage,
isLoading,
setIsLoading,
- setSnackbar
+ setSnackbar,
+ isInfo
}) {
const [isAuthorized, setIsAuthorized] = useState(false)
const [showAuthMsg, setShowAuthMsg] = useState(false)
@@ -51,6 +52,7 @@ export default function WpErpAuthorization({
value={wpErpConf.name}
type="text"
placeholder={__('Integration Name...', 'bit-integrations')}
+ disabled={isInfo}
/>
{isLoading === 'auth' && (
@@ -82,25 +84,29 @@ export default function WpErpAuthorization({
)}
-
-
-
+ {!isInfo && (
+ <>
+
+
+
+ >
+ )}
)
}
From 3d6aa2dd87cf08ee9de0514f1d8be2085e64be6d Mon Sep 17 00:00:00 2001
From: Rishad Alam <101513331+RishadAlam@users.noreply.github.com>
Date: Wed, 6 May 2026 14:14:52 +0600
Subject: [PATCH 6/6] fix: enhance button disable logic in WpErp integration
component
---
frontend/src/components/AllIntegrations/WpErp/WpErp.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/src/components/AllIntegrations/WpErp/WpErp.jsx b/frontend/src/components/AllIntegrations/WpErp/WpErp.jsx
index 65942aaf2..f7d863c46 100644
--- a/frontend/src/components/AllIntegrations/WpErp/WpErp.jsx
+++ b/frontend/src/components/AllIntegrations/WpErp/WpErp.jsx
@@ -83,7 +83,7 @@ export default function WpErp({ formFields, setFlow, flow, allIntegURL }) {