Skip to content

The open alternative to Salesforce, designed for AI.

340 B
Raw Blame
// A figure space is one digit wide, so single-digit labels keep the same width
const FIGURE_SPACE = ' ';

export const formatQueueJobProgressLabel = (progress: number): string => {
  const roundedProgress = Math.round(progress);
  const padding = roundedProgress < 10 ? FIGURE_SPACE : '';

  return `${padding}(${roundedProgress}%)`;
};