refactor: add emit remove

This commit is contained in:
Net 2024-08-01 15:56:59 +07:00
parent 796af2b704
commit 978a62be78
2 changed files with 20 additions and 2 deletions

View file

@ -173,7 +173,16 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
padding="xs"
color="red"
:class="{ dark: $q.dark.isActive }"
@click.stop="removeData(index)"
@click.stop="
() => {
if (employeeCheckup?.[index].statusSave) {
$emit('remove', index);
removeData(index);
} else {
removeData(index);
}
}
"
/>
</div>
</q-tab>

View file

@ -136,7 +136,16 @@ const workplaceFilter = selectFilterOptionRefMod(
padding="xs"
color="red"
:class="{ dark: $q.dark.isActive }"
@click.stop="removeData(index)"
@click.stop="
() => {
if (employeeWork?.[index].statusSave) {
$emit('remove', index);
removeData(index);
} else {
removeData(index);
}
}
"
/>
</div>
</q-tab>