google api commented
This commit is contained in:
parent
68a1b8bbce
commit
c84c9c69d0
|
|
@ -1,6 +1,6 @@
|
|||
import "zoom-vanilla.js/dist/zoom-vanilla.min.js";
|
||||
import Chart from "./chart/Main.vue";
|
||||
import GoogleMapLoader from "./google-map-loader/Main.vue";
|
||||
// import GoogleMapLoader from "./google-map-loader/Main.vue";
|
||||
import Litepicker from "./litepicker/Main.vue";
|
||||
import Tippy from "./tippy/Main.vue";
|
||||
import TippyContent from "./tippy-content/Main.vue";
|
||||
|
|
@ -46,7 +46,7 @@ import LucideIcons from "./lucide";
|
|||
|
||||
export default (app) => {
|
||||
app.component("Chart", Chart);
|
||||
app.component("GoogleMapLoader", GoogleMapLoader);
|
||||
// app.component("GoogleMapLoader", GoogleMapLoader);
|
||||
app.component("Litepicker", Litepicker);
|
||||
app.component("Tippy", Tippy);
|
||||
app.component("TippyContent", TippyContent);
|
||||
|
|
|
|||
|
|
@ -354,11 +354,11 @@ const onRegister = async () => {
|
|||
|
||||
formData.date_of_birth = year + "-" + month + "-" + day;
|
||||
|
||||
console.log("formData: ", formData);
|
||||
console.log("formData: ", formData.value);
|
||||
|
||||
validate.value.$touch();
|
||||
|
||||
if (validate.value.$invalid) return;
|
||||
if (validate.value.$invalid) { console.log("invalid form: "); return; }
|
||||
|
||||
console.log("onRegister");
|
||||
|
||||
|
|
@ -366,7 +366,7 @@ const onRegister = async () => {
|
|||
isLoading.value = true;
|
||||
|
||||
const response = await fetchWrapper.put(
|
||||
`${baseUrl}/account/profilee`,
|
||||
`${baseUrl}/account/profile`,
|
||||
formData
|
||||
);
|
||||
|
||||
|
|
@ -396,5 +396,9 @@ onMounted(() => {
|
|||
Object.assign(formData, params);
|
||||
date.value = $h.formatDate(formData.date_of_birth, "DD.MM.YYYY");
|
||||
}
|
||||
|
||||
const country = JSON.parse(localStorage.getItem("country"));
|
||||
console.log("country: ", country);
|
||||
formData.citizenship_id = country.id;
|
||||
});
|
||||
</script>
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
</div>
|
||||
<div class="flex m-2">
|
||||
<div class="flex font-medium">Citizenship:</div>
|
||||
<div class="flex pl-2">{{ country }}</div>
|
||||
<div class="flex pl-2">{{ country.name }}</div>
|
||||
</div>
|
||||
<div class="flex m-2">
|
||||
<div class="flex font-medium">Registration address:</div>
|
||||
|
|
@ -283,7 +283,7 @@ const accountType = ref("");
|
|||
|
||||
const dateOfBirth = ref("");
|
||||
|
||||
const country = ref("");
|
||||
const country = reactive({});
|
||||
|
||||
const profile = reactive({});
|
||||
|
||||
|
|
@ -377,13 +377,11 @@ const fetchAccount = async () => {
|
|||
Object.assign(profile, data.profile);
|
||||
localStorage.setItem("profile", JSON.stringify(profile));
|
||||
dateOfBirth.value = $h.formatDate(profile.date_of_birth, "DD.MM.YYYY");
|
||||
|
||||
console.log("profile.date_of_birth ", profile.date_of_birth);
|
||||
}
|
||||
|
||||
if (data.country) {
|
||||
country.value = data.country;
|
||||
localStorage.setItem("country", data.country);
|
||||
Object.assign(country, data.country);
|
||||
localStorage.setItem("country", JSON.stringify(country));
|
||||
}
|
||||
|
||||
if (data.account_type) {
|
||||
|
|
@ -412,7 +410,7 @@ const getAccount = async () => {
|
|||
|
||||
const profileLS = JSON.parse(localStorage.getItem("profile"));
|
||||
|
||||
const countryLS = localStorage.getItem("country");
|
||||
const countryLS = JSON.parse(localStorage.getItem("country"));
|
||||
|
||||
accountType.value = localStorage.getItem("account_type");
|
||||
|
||||
|
|
@ -428,7 +426,7 @@ const getAccount = async () => {
|
|||
Object.assign(bankAccount, bankAccountLS);
|
||||
Object.assign(profile, profileLS);
|
||||
dateOfBirth.value = $h.formatDate(profile.date_of_birth, "DD.MM.YYYY");
|
||||
country.value = countryLS;
|
||||
Object.assign(country, profileLS);
|
||||
prepareLegalBtnTitle();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue