sajjad 3 years ago
parent a94766bff6
commit 701df7a7e2

@ -1,4 +1,5 @@
import { objectToFormData } from "@/utils/objectToFormData";
import { getJson as getJsonCountry } from "./countryResource";
export const getJson = (data) => ({
id: data.id,
first_name: data.first_name,
@ -13,9 +14,7 @@ export const getJson = (data) => ({
address: data.address,
email: data.email,
cell_number: data.cell_number,
is_admin: data.is_admin,
is_trainer: data.is_trainer,
country: data?.country,
country: data.country ? getJsonCountry(data?.country) : {},
country_id: data.country?.id,
created_courses_count: data.created_courses_count,
joined_courses_count: data.joined_courses_count,

@ -1,4 +1,5 @@
import { SetPagination, SetQueriesObject } from "@/utils/setQueriesObject";
import { getJson as getJsonCountry } from "./countryResource";
export const getJson = (data) => {
let role_id = null;
data.roles.map(x => role_id = x.id);
@ -23,8 +24,12 @@ export const getJson = (data) => {
role: role,
roles: data.roles,
role_id: role_id,
country: data.country ? getJsonCountry(data.country) : {},
created_courses_count: data.created_courses_count,
joined_courses_count: data.joined_courses_count
joined_courses_count: data.joined_courses_count,
created_at: data.created_at,
// joined_date -> The correct format of created_at
joined_date: data.created_at?.slice(0, 10),
})
};
export const getArray = ({ data, meta }) => {

@ -41,7 +41,7 @@
<Info title="role" :sub-title="user.role" />
</v-col>
<v-col cols="4">
<Info title="joined date" :sub-title="user.joined" />
<Info title="joined date" :sub-title="user.joined_date" />
</v-col>
<v-col cols="4">
<Info title="BIRTHDAY" :sub-title="user.birthday" />
@ -51,7 +51,7 @@
</v-row>
<v-row>
<v-col cols="3">
<Info title="country" :sub-title="user.country" />
<Info title="country" :sub-title="user.country.name" />
</v-col>
<v-col cols="9">
<Info title="address" :sub-title="user.address" />

@ -52,7 +52,7 @@
</v-row>
<v-row>
<v-col cols="4">
<Info title="suggested course time?" :sub-title="workout.suggested_time" />
<Info title="suggested course time?" :sub-title="workout.suggested_set" />
</v-col>
<v-col cols="4">
<Info
@ -61,7 +61,7 @@
/>
</v-col>
<v-col cols="4">
<Info title="suggested ESTIMATED TIME" :sub-title="workout.estimate_time" />
<Info title="suggested ESTIMATED TIME" :sub-title="workout.suggested_time" />
</v-col>
</v-row>
<v-row>

Loading…
Cancel
Save