Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Type 'payload' has no properties in common with type 'AxiosRequestConfig'


Hi,

I'm having the above mentioned error throwing all the time when I try to make call to 'ApiService'.

Kindly advice me as It's kind of a blocker for me. Please find the snippet of the code below.

Please suggest me how to solve this problem or what I'm mising the code?

<pre>import ApiService from "@/core/services/ApiService";
setup() {
const payload = reactive({
attributes: "user,consultant",
search: "",
filter: {
callback_date_from: "",
callback_date_to: "",
callback_time_from: "",
callback_time_to: "",
status: [],
branch: [],
source: [],
assigned: [],
assigned_to: 0,
source_blank: 0,
},
widget_filter: "",
});

async function fetchSupportTickets() {
await ApiService.setHeader();
await ApiService.post("callback/get-data", payload)
.then((resource) => {
console.log(resource.data.data.data);
})
.catch((error) => {
console.log(error);
});
}
}</pre?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi,

Sorry for the late reply.

Your code looks fine.

Do you have any errors in your console?

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi,

Yeah I'm still having the same errors sad
Please confirm is it possible to remove the typescript from the theme?



Hi,

Some of our Vue components require typescript also our ts components will not work without it.

But you can disable typescript for some components by removing lang="ts" attribute from the script tag, also you still can use files with .js extention.

Could you please try to wrap your object with params property?

const payload = reactive(
params: {
//put your object properties here
}
);


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(