41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
import { dateFormaterForAndroid } from '../../utils/date';
|
|
import DB from '../../components/storage';
|
|
|
|
export const createMerchantDetails = async () => {
|
|
let u = await DB.profile();
|
|
|
|
return {
|
|
"firstName": u.data.firstname,
|
|
"middleName": u.data.middlename,
|
|
"lastName": u.data.lastname,
|
|
"birthday": dateFormaterForAndroid(u.data.birthdate),
|
|
"customerSince": dateFormaterForAndroid(u.data.birthdate),
|
|
"sex": u.data.gender_code,
|
|
"contact": {
|
|
"phone": "+" + u.data.mobile,
|
|
"email": u.data.email
|
|
},
|
|
"shippingAddress": {
|
|
"firstName": u.data.firstname,
|
|
"middleName": u.data.middlename,
|
|
"lastName": u.data.lastname,
|
|
"phone": "+" + u.data.mobile,
|
|
"email": u.data.email,
|
|
"line1": "",
|
|
"line2": "",
|
|
"city": "",
|
|
"state": u.data.address,
|
|
"zipCode": "",
|
|
"countryCode": "PH",
|
|
"shippingType": ""
|
|
},
|
|
"billingAddress": {
|
|
"line1": "",
|
|
"line2": "",
|
|
"city": "",
|
|
"state": u.data.address,
|
|
"zipCode": "",
|
|
"countryCode": "PH"
|
|
}
|
|
}
|
|
} |