mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-25 17:19:48 +00:00
18 lines
480 B
TypeScript
18 lines
480 B
TypeScript
import { defaultTo } from 'lodash';
|
|
import { IOrganizationBuildDTO } from './Organization.types';
|
|
import { BuildOrganizationDto } from './dtos/Organization.dto';
|
|
|
|
/**
|
|
* Transformes build DTO object.
|
|
* @param {IOrganizationBuildDTO} buildDTO
|
|
* @returns {IOrganizationBuildDTO}
|
|
*/
|
|
export const transformBuildDto = (
|
|
buildDTO: BuildOrganizationDto,
|
|
): BuildOrganizationDto => {
|
|
return {
|
|
...buildDTO,
|
|
dateFormat: defaultTo(buildDTO.dateFormat, 'DD MMM yyyy'),
|
|
};
|
|
};
|