mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-25 00:59:50 +00:00
- Fix date format mismatch between Miscellaneous and Organization constants
- Fix default date format casing ('DD MMM yyyy' -> 'DD MMM YYYY')
- Rename address fields from address_1/address_2 to address1/address2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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'),
|
|
};
|
|
};
|