1👍
You just have different parameters in your function and when you call it.
When you call it:
@click="openModal(2,emp.name,emp.email,emp.phone,emp.business_start_time,emp.business_finish_time,emp.department_id,emp.id)">
Your function parameters expect:
const openModal = (op,name,email,phone,department,business_start_time,business_finish_time,employee)
As you can see, you just forgot the department
parameter on your @click
, so your parameters are not in the right order.
You should think about using TypeScript to have better completion and error management.
Source:stackexchange.com