refactor: ให้ ส่ง index ด้วย

This commit is contained in:
Net 2024-07-05 15:13:23 +07:00
parent a600e52b08
commit 2296a65c80

View file

@ -47,7 +47,7 @@ const prop = withDefaults(
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'back'): void; (e: 'back'): void;
(e: 'viewDetail', branch: CustomerBranch[]): void; (e: 'viewDetail', branch: CustomerBranch, index: number): void;
(e: 'dialog'): void; (e: 'dialog'): void;
}>(); }>();
@ -209,7 +209,7 @@ watch(currentStatus, async () => {
status: 'ดำเนินการอยู่', status: 'ดำเนินการอยู่',
totalEmployee: br._count?.employee, totalEmployee: br._count?.employee,
}" }"
@view-detail="emit('viewDetail', [br])" @view-detail="emit('viewDetail', br, i)"
/> />
</div> </div>
</div> </div>