mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
14 lines
434 B
TypeScript
14 lines
434 B
TypeScript
import { ACCEPT_TYPE } from '@/common/constants/http.constants';
|
|
import { ExportFormat } from './common';
|
|
|
|
export const convertAcceptFormatToFormat = (accept: string): ExportFormat => {
|
|
switch (accept) {
|
|
default:
|
|
case ACCEPT_TYPE.APPLICATION_CSV:
|
|
return ExportFormat.Csv;
|
|
case ACCEPT_TYPE.APPLICATION_PDF:
|
|
return ExportFormat.Pdf;
|
|
case ACCEPT_TYPE.APPLICATION_XLSX:
|
|
return ExportFormat.Xlsx;
|
|
}
|
|
}; |