fix(web): type the customer group parent picker

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-26 11:14:30 +03:30
co-authored by Cursor
parent 2ff35e55fc
commit 8ae6a928f4
@@ -174,7 +174,8 @@ const linkedGroups = computed(() =>
(customerGroups.value as CustomerGroupDto[]).filter((g) => g.parentId && g.parentName),
);
function onChildGroup(id: string | undefined) {
function onChildGroup(value: unknown) {
const id = typeof value === 'string' ? value : undefined;
childGroupId.value = id;
const current = (customerGroups.value as CustomerGroupDto[]).find((g) => g.id === id);
parentGroupId.value = current?.parentId ?? undefined;
@@ -667,7 +668,7 @@ onUnmounted(() => stopPoll());
placeholder="جستجوی گروه"
option-filter-prop="label"
:options="childGroupOptions"
@change="(value: string | undefined) => onChildGroup(value)"
@change="onChildGroup"
/>
</a-form-item>
</a-col>