diff --git a/src/frontend/src/Helpers/Utils.js b/src/frontend/src/Helpers/Utils.js index 766411c5a..fa1269c56 100644 --- a/src/frontend/src/Helpers/Utils.js +++ b/src/frontend/src/Helpers/Utils.js @@ -25,7 +25,12 @@ export const convertObjectKeysToSnakeCase = (obj) => { for (const [key, value] of Object.entries(obj)) { const snakeKey = camelToSnake(key) - if (value !== null && typeof value === "object" && !Array.isArray(value)) { + if ( + value !== null && + typeof value === "object" && + value instanceof Date === false && + !Array.isArray(value) + ) { result[snakeKey] = convertObjectKeysToSnakeCase(value) } else if (Array.isArray(value)) { result[snakeKey] = value?.map((item) => diff --git a/src/frontend/src/modules/Client/AddClientModal.vue b/src/frontend/src/modules/Client/AddClientModal.vue index f2b429614..5767d5e67 100644 --- a/src/frontend/src/modules/Client/AddClientModal.vue +++ b/src/frontend/src/modules/Client/AddClientModal.vue @@ -246,6 +246,7 @@ import { notify } from "@/mixins" import { PersonService } from "@/services/PersonService" import { CityService } from "@/services/CityService" import Loader from "@/shared/Loader.vue" +import moment from "moment" export default { name: "AddClientModal", @@ -283,7 +284,9 @@ export default { isPrimary: true, title: this.personService.person.title, education: this.personService.person.education, - birthDate: this.personService.person.birthDate, + birthDate: moment(this.personService.person.birthDate).format( + "YYYY-MM-DD HH:mm:ss", + ), sex: this.personService.person.gender, isCustomer: true, }