このコミットが含まれているのは:
@@ -304,11 +304,18 @@ export const isCountsState = (params: URLSearchParams): boolean =>
|
||||
params.get ('definition') !== 'history'
|
||||
|
||||
|
||||
export const countsUseLatest = (params: URLSearchParams): boolean =>
|
||||
params.get ('current') === '1'
|
||||
|| (params.get ('current') !== '0' && !params.get ('at'))
|
||||
|
||||
|
||||
export const countsRequestParams = (params: URLSearchParams): URLSearchParams => {
|
||||
const result = new URLSearchParams (params)
|
||||
for (const key of ['columns', 'summary_columns', 'children', 'child_sort',
|
||||
'nested_json', 'order', 'basis', 'axis', 'latest', 'grain'])
|
||||
'nested_json', 'order', 'basis', 'axis', 'latest', 'grain',
|
||||
'current', 'row_numbers'])
|
||||
result.delete (key)
|
||||
if (isCountsState (params) && countsUseLatest (params)) result.delete ('at')
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -331,10 +338,16 @@ export const exportCounts = (
|
||||
headers: string[],
|
||||
labels: Record<string, string>,
|
||||
onError?: () => void,
|
||||
): Promise<void> => apiDownload ('/counts/export', {
|
||||
...Object.fromEntries (params), resource, format,
|
||||
columns: columns.join (','), headers: JSON.stringify (headers),
|
||||
labels: JSON.stringify (labels) }, locale, onError)
|
||||
): Promise<void> => {
|
||||
const payload = new URLSearchParams (params)
|
||||
payload.delete ('current')
|
||||
payload.delete ('row_numbers')
|
||||
if (isCountsState (params) && countsUseLatest (params)) payload.delete ('at')
|
||||
return apiDownload ('/counts/export', {
|
||||
...Object.fromEntries (payload), resource, format,
|
||||
columns: columns.join (','), headers: JSON.stringify (headers),
|
||||
labels: JSON.stringify (labels) }, locale, onError)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする