Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • 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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(