working auto
This commit is contained in:
@@ -269,8 +269,6 @@ export default defineComponent({
|
||||
this.userStatus();
|
||||
},
|
||||
mounted() {
|
||||
console.log('VITE_VOIPMS_URL:', import.meta.env.VITE_VOIPMS_URL);
|
||||
console.log('VITE_VOIPMS_TOKEN:', import.meta.env.VITE_VOIPMS_TOKEN);
|
||||
this.updatestatus();
|
||||
this.fetchCurrentPhone();
|
||||
},
|
||||
@@ -285,7 +283,6 @@ export default defineComponent({
|
||||
|
||||
})
|
||||
.then((response: any) => {
|
||||
console.log(this.user)
|
||||
if (response.data.ok) {
|
||||
this.user = response.data.user;
|
||||
} else {
|
||||
@@ -307,7 +304,6 @@ export default defineComponent({
|
||||
})
|
||||
},
|
||||
logout() {
|
||||
console.log("Logging out...");
|
||||
// Clear auth data
|
||||
const authStore = useAuthStore();
|
||||
authStore.clearAuth();
|
||||
@@ -331,9 +327,7 @@ export default defineComponent({
|
||||
});
|
||||
},
|
||||
routeTo(route: string): Promise<any> {
|
||||
console.log('Routing to:', route);
|
||||
const path = `${import.meta.env.VITE_VOIPMS_URL}/route/${route}`;
|
||||
console.log('API path:', path);
|
||||
return axios({
|
||||
method: 'post',
|
||||
url: path,
|
||||
@@ -342,13 +336,11 @@ export default defineComponent({
|
||||
},
|
||||
})
|
||||
.then((response: any) => {
|
||||
console.log('Success routing to:', route);
|
||||
this.routeResponse = response.data;
|
||||
// Find the corresponding label
|
||||
const option = this.routingOptions.find(opt => opt.value === route);
|
||||
if (option) {
|
||||
this.currentPhone = option.label;
|
||||
console.log('Updated currentPhone to:', this.currentPhone);
|
||||
}
|
||||
return response.data;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user