fix: tighten account bulk edit target typing
This commit is contained in:
parent
a161f9d045
commit
53b24bc2d8
@ -318,7 +318,7 @@
|
|||||||
:account-ids="selIds"
|
:account-ids="selIds"
|
||||||
:selected-platforms="selPlatforms"
|
:selected-platforms="selPlatforms"
|
||||||
:selected-types="selTypes"
|
:selected-types="selTypes"
|
||||||
:target="bulkEditTarget"
|
:target="bulkEditTarget ?? undefined"
|
||||||
:proxies="proxies"
|
:proxies="proxies"
|
||||||
:groups="groups"
|
:groups="groups"
|
||||||
@close="showBulkEdit = false"
|
@close="showBulkEdit = false"
|
||||||
@ -1262,6 +1262,7 @@ const handleBulkToggleSchedulable = async (schedulable: boolean) => {
|
|||||||
}
|
}
|
||||||
const buildBulkEditFilterSnapshot = () => {
|
const buildBulkEditFilterSnapshot = () => {
|
||||||
const rawParams = toRaw(params) as Record<string, unknown>
|
const rawParams = toRaw(params) as Record<string, unknown>
|
||||||
|
const sortOrder: AccountSortOrder = rawParams.sort_order === 'desc' ? 'desc' : 'asc'
|
||||||
return {
|
return {
|
||||||
platform: typeof rawParams.platform === 'string' ? rawParams.platform : '',
|
platform: typeof rawParams.platform === 'string' ? rawParams.platform : '',
|
||||||
type: typeof rawParams.type === 'string' ? rawParams.type : '',
|
type: typeof rawParams.type === 'string' ? rawParams.type : '',
|
||||||
@ -1270,7 +1271,7 @@ const buildBulkEditFilterSnapshot = () => {
|
|||||||
search: typeof rawParams.search === 'string' ? rawParams.search : '',
|
search: typeof rawParams.search === 'string' ? rawParams.search : '',
|
||||||
privacy_mode: typeof rawParams.privacy_mode === 'string' ? rawParams.privacy_mode : '',
|
privacy_mode: typeof rawParams.privacy_mode === 'string' ? rawParams.privacy_mode : '',
|
||||||
sort_by: typeof rawParams.sort_by === 'string' ? rawParams.sort_by : '',
|
sort_by: typeof rawParams.sort_by === 'string' ? rawParams.sort_by : '',
|
||||||
sort_order: rawParams.sort_order === 'desc' ? 'desc' : 'asc'
|
sort_order: sortOrder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user