fix(web): type the customer group parent picker
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user