8191 command k workflow trigger for selected record (#8315)
Closes #8191 https://github.com/user-attachments/assets/694da229-cc91-4df2-97a0-49cd5dabcf12
This commit is contained in:
@ -86,7 +86,7 @@ describe('csvDownloader', () => {
|
||||
|
||||
describe('displayedExportProgress', () => {
|
||||
it.each([
|
||||
[undefined, undefined, 'percentage', 'Export'],
|
||||
[undefined, undefined, 'percentage', 'Export View as CSV'],
|
||||
[20, 50, 'percentage', 'Export (40%)'],
|
||||
[0, 100, 'number', 'Export (0)'],
|
||||
[10, 10, 'percentage', 'Export (100%)'],
|
||||
@ -96,7 +96,7 @@ describe('displayedExportProgress', () => {
|
||||
'displays the export progress',
|
||||
(exportedRecordCount, totalRecordCount, displayType, expected) => {
|
||||
expect(
|
||||
displayedExportProgress({
|
||||
displayedExportProgress('all', {
|
||||
exportedRecordCount,
|
||||
totalRecordCount,
|
||||
displayType: displayType as 'percentage' | 'number',
|
||||
|
||||
@ -108,9 +108,12 @@ const percentage = (part: number, whole: number): number => {
|
||||
return Math.round((part / whole) * 100);
|
||||
};
|
||||
|
||||
export const displayedExportProgress = (progress?: ExportProgress): string => {
|
||||
export const displayedExportProgress = (
|
||||
mode: 'all' | 'selection' = 'all',
|
||||
progress?: ExportProgress,
|
||||
): string => {
|
||||
if (isUndefinedOrNull(progress?.exportedRecordCount)) {
|
||||
return 'Export';
|
||||
return mode === 'all' ? 'Export View as CSV' : 'Export Selection as CSV';
|
||||
}
|
||||
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user