Skip to content

Commit d2d0e93

Browse files
committed
fix: allow contacts-only mining when no folders are selected
The Start Mining button was disabled when no email folders were selected, even when Google Contacts sync was enabled. Now the button stays enabled and startMiningBoxes() proceeds when googleContactsSyncEnabled is true, allowing contacts-only mining without folder selection.
1 parent 87480c0 commit d2d0e93

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

frontend/src/components/mining/stepper-panels/mine/MinePanel.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@
4747
v-if="!$leadminerStore.activeMiningTask"
4848
id="mine-stepper-start-button"
4949
:disabled="
50+
(sourceType === 'email' && $leadminerStore.isLoadingBoxes) ||
5051
(sourceType === 'email' &&
51-
($leadminerStore.isLoadingBoxes || totalEmails === 0)) ||
52+
totalEmails === 0 &&
53+
!$leadminerStore.googleContactsSyncEnabled) ||
5254
$leadminerStore.isLoadingStartMining
5355
"
5456
:loading="$leadminerStore.isLoadingStartMining"
@@ -397,11 +399,12 @@ function openMiningSettings() {
397399
}
398400
399401
async function startMiningBoxes() {
400-
if (
402+
const hasCheckedBoxes =
401403
Object.keys(selectedBoxes.value).filter(
402404
(key) => selectedBoxes.value[key].checked && key !== '',
403-
).length === 0
404-
) {
405+
).length > 0;
406+
407+
if (!hasCheckedBoxes && !$leadminerStore.googleContactsSyncEnabled) {
405408
openMiningSettings();
406409
$toast.add({
407410
severity: 'error',

0 commit comments

Comments
 (0)