build 01.10
This commit is contained in:
parent
8141d05858
commit
184e7697ba
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -12,7 +12,7 @@ function request(method) {
|
|||
return (url, body, isFormData = false) => {
|
||||
// check internet connection
|
||||
if (!navigator.onLine) {
|
||||
console.log("in if: ", i18nn);
|
||||
//console.log("in if: ", i18nn);
|
||||
const alertStore = useAlertStore();
|
||||
alertStore.error(i18nn.global.t("INT_CONN_ERROR"));
|
||||
return Promise.reject("internet connection error");
|
||||
|
|
@ -53,7 +53,7 @@ async function handleResponse(response) {
|
|||
?.includes("application/json");
|
||||
const data = isJson ? await response.json() : null;
|
||||
|
||||
// console.log("response data: ", JSON.stringify(data));
|
||||
////console.log("response data: ", JSON.stringify(data));
|
||||
|
||||
const alertStore = useAlertStore();
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ const authStore = useAuthStore();
|
|||
const { user } = storeToRefs(authStore);
|
||||
|
||||
const onLogout = async () => {
|
||||
console.log("Logout");
|
||||
//console.log("Logout");
|
||||
const authStore = useAuthStore();
|
||||
await authStore.logout();
|
||||
};
|
||||
|
|
@ -112,7 +112,7 @@ const onLogout = async () => {
|
|||
const onProfileUpdate = () => router.push({ path: "/update-profile" });
|
||||
|
||||
onUnmounted(() => {
|
||||
console.log("onUnmounted TOP");
|
||||
//console.log("onUnmounted TOP");
|
||||
});
|
||||
|
||||
const goToMessagesList = (ticketId) => {
|
||||
|
|
|
|||
|
|
@ -38,14 +38,14 @@ export const useAuthStore = defineStore({
|
|||
async logout() {
|
||||
try {
|
||||
const response = await fetchWrapper.post(`${baseUrl}/logout`);
|
||||
console.log("logout response: ", response);
|
||||
//console.log("logout response: ", response);
|
||||
|
||||
localStorage.clear();
|
||||
this.user = null;
|
||||
|
||||
router.push({ path: "/login" });
|
||||
} catch (error) {
|
||||
console.log("logout err :", error);
|
||||
//console.log("logout err :", error);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ export const useAuthStore = defineStore({
|
|||
} else {
|
||||
router.push({ path: "/email-verify" });
|
||||
}
|
||||
// console.warn(response.data);
|
||||
////console.warn(response.data);
|
||||
//
|
||||
|
||||
// redirect to Email verification page
|
||||
|
|
@ -126,7 +126,7 @@ export const useAuthStore = defineStore({
|
|||
email,
|
||||
});
|
||||
|
||||
console.log("forgot password", response);
|
||||
//console.log("forgot password", response);
|
||||
|
||||
alertStore.success(response.message);
|
||||
|
||||
|
|
|
|||
|
|
@ -146,6 +146,6 @@ onBeforeMount(async () => {
|
|||
if(!application.value) {
|
||||
router.push({ name: "error-page" });
|
||||
}
|
||||
console.log(application.value);
|
||||
//console.log(application.value);
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ watch(date, (currentValue, oldValue) => {
|
|||
});
|
||||
|
||||
const onRegister = async () => {
|
||||
console.log("formData.account_date: ", formData.account_date);
|
||||
//console.log("formData.account_date: ", formData.account_date);
|
||||
|
||||
validate.value.$touch();
|
||||
|
||||
|
|
@ -229,7 +229,7 @@ const onRegister = async () => {
|
|||
formData
|
||||
);
|
||||
isLoading.value = false;
|
||||
console.log("response onRegister: ", response);
|
||||
//console.log("response onRegister: ", response);
|
||||
|
||||
// refresh LS "bankAccount"
|
||||
localStorage.removeItem("bankAccount");
|
||||
|
|
@ -246,7 +246,7 @@ onMounted(() => {
|
|||
? JSON.parse(localStorage.getItem("bankAccount"))
|
||||
: route.params;
|
||||
|
||||
console.log("Params: ", params);
|
||||
//console.log("Params: ", params);
|
||||
|
||||
if (params) {
|
||||
localStorage.setItem("bankAccount", JSON.stringify(params));
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ const rules = {
|
|||
const validate = useVuelidate(rules, toRefs(formData));
|
||||
|
||||
watch(date, (currentValue, oldValue) => {
|
||||
console.log("currentValue: " + currentValue)
|
||||
// console.log("currentValue: " + currentValue)
|
||||
formData.date_of_birth = $h.changeDateFormat(currentValue);
|
||||
});
|
||||
|
||||
|
|
@ -258,21 +258,21 @@ const onCountryChange = (value) => {
|
|||
};
|
||||
|
||||
const onRegister = async () => {
|
||||
console.log("onRegister");
|
||||
console.log("formData.account_date: ", formData.date_of_birth);
|
||||
// console.log("onRegister");
|
||||
// console.log("formData.account_date: ", formData.date_of_birth);
|
||||
|
||||
console.log("formData: ", formData);
|
||||
// console.log("formData: ", formData);
|
||||
|
||||
if (!formData.citizenship_id) { isCitizenshipValid.value = false; }
|
||||
|
||||
validate.value.$touch();
|
||||
|
||||
if (validate.value.$invalid) { console.log("invalid form: "); return; }
|
||||
if (validate.value.$invalid) { return; }
|
||||
|
||||
try {
|
||||
isLoading.value = true;
|
||||
|
||||
console.log('form data validation success');
|
||||
// console.log('form data validation success');
|
||||
|
||||
const response = await fetchWrapper.put(
|
||||
`${baseUrl}/account/profile`,
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ const onRegister = async () => {
|
|||
|
||||
if (validate.value.$invalid) return;
|
||||
|
||||
console.log("onRegister: ", formData);
|
||||
//console.log("onRegister: ", formData);
|
||||
|
||||
try {
|
||||
isLoading.value = true;
|
||||
|
|
@ -266,7 +266,7 @@ const onRegister = async () => {
|
|||
);
|
||||
|
||||
isLoading.value = false;
|
||||
console.log("response onRegister: ", response);
|
||||
//console.log("response onRegister: ", response);
|
||||
|
||||
// refresh LS "profile"
|
||||
localStorage.removeItem("profile");
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ const onRegister = async () => {
|
|||
);
|
||||
|
||||
isLoading.value = false;
|
||||
console.log("response onRegister: ", response);
|
||||
//console.log("response onRegister: ", response);
|
||||
|
||||
// refresh LS "contacts"
|
||||
localStorage.removeItem("contacts");
|
||||
|
|
@ -187,7 +187,7 @@ onMounted(() => {
|
|||
? JSON.parse(localStorage.getItem("contacts"))
|
||||
: route.params;
|
||||
|
||||
console.log("Params: ", params);
|
||||
//console.log("Params: ", params);
|
||||
|
||||
if (params) {
|
||||
localStorage.setItem("contacts", JSON.stringify(params));
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ const onEdit = (name, params) => {
|
|||
};
|
||||
|
||||
const onLegalBtnTapped = async () => {
|
||||
console.log("onLegalBtnTapped");
|
||||
//console.log("onLegalBtnTapped");
|
||||
if (
|
||||
!legalAppStatus.value ||
|
||||
legalCanExtend.value
|
||||
|
|
@ -284,7 +284,7 @@ const createApplication = async () => {
|
|||
};
|
||||
|
||||
const prepareLegalBtnTitle = () => {
|
||||
console.log("prepareLegalBtnTitle: ", legalBtnTitle.value);
|
||||
//console.log("prepareLegalBtnTitle: ", legalBtnTitle.value);
|
||||
|
||||
if (legalCanExtend.value) {
|
||||
legalBtnTitle.value = "Extend";
|
||||
|
|
@ -303,14 +303,14 @@ const prepareLegalBtnTitle = () => {
|
|||
};
|
||||
|
||||
const fetchAccount = async () => {
|
||||
console.log("fetchAccount");
|
||||
//console.log("fetchAccount");
|
||||
try {
|
||||
isLoading.value = true;
|
||||
|
||||
const response = await fetchWrapper.get(`${baseUrl}/account`);
|
||||
const data = response.data;
|
||||
|
||||
console.log("fetchAccount data: ", data);
|
||||
//console.log("fetchAccount data: ", data);
|
||||
|
||||
legalAppStatus.value = data.legal_app_status;
|
||||
legalExpiresAt.value = data.legal_expires_at;
|
||||
|
|
@ -355,22 +355,22 @@ const fetchAccount = async () => {
|
|||
|
||||
// get the account from localStorage
|
||||
/* const getAccount = async () => {
|
||||
console.log("getAccount ");
|
||||
//console.log("getAccount ");
|
||||
|
||||
try {
|
||||
isLoading.value = true;
|
||||
|
||||
const contactsLS = JSON.parse(localStorage.getItem("contacts"));
|
||||
|
||||
console.log("contactsLS: ", contactsLS);
|
||||
//console.log("contactsLS: ", contactsLS);
|
||||
|
||||
const bankAccountLS = JSON.parse(localStorage.getItem("bankAccount"));
|
||||
|
||||
console.log("bankAccountLS: ", bankAccountLS);
|
||||
//console.log("bankAccountLS: ", bankAccountLS);
|
||||
|
||||
const profileLS = JSON.parse(localStorage.getItem("profile"));
|
||||
|
||||
console.log("Profile LS: " + profileLS);
|
||||
//console.log("Profile LS: " + profileLS);
|
||||
|
||||
accountType.value = localStorage.getItem("account_type");
|
||||
|
||||
|
|
@ -381,7 +381,7 @@ const fetchAccount = async () => {
|
|||
) {
|
||||
await fetchAccount();
|
||||
} else {
|
||||
console.log("IN ELSE");
|
||||
//console.log("IN ELSE");
|
||||
Object.assign(contacts, contactsLS);
|
||||
Object.assign(bankAccount, bankAccountLS);
|
||||
Object.assign(profile, profileLS);
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ onBeforeMount(async () => {
|
|||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
console.log("onUnmounted TICKET LIST");
|
||||
//console.log("onUnmounted TICKET LIST");
|
||||
});
|
||||
|
||||
watch(
|
||||
|
|
@ -219,7 +219,7 @@ watch(
|
|||
showChatBox(route.params.ticketId);
|
||||
|
||||
}
|
||||
console.log(route.params.ticketId);
|
||||
//console.log(route.params.ticketId);
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ const onLogin = () => router.push({ path: "/" });
|
|||
const onUpdate = async () => {
|
||||
validate.value.$touch();
|
||||
|
||||
console.log("formData: ", formData);
|
||||
//console.log("formData: ", formData);
|
||||
// check form validation
|
||||
if (validate.value.$invalid) return;
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ const onUpdate = async () => {
|
|||
formData,
|
||||
});
|
||||
|
||||
console.log("update password", response);
|
||||
//console.log("update password", response);
|
||||
|
||||
isLoading.value = false;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue