Dashboard completed. Demo files added

This commit is contained in:
Bahadır Sofuoğlu
2022-11-03 11:46:46 +03:00
parent f76ef79b21
commit 94092fdb61
165 changed files with 15602 additions and 57 deletions

View File

@@ -0,0 +1,25 @@
export default class CustomerService {
getCustomersSmall() {
return fetch('data/customers-small.json').then(res => res.json()).then(d => d.data);
}
getCustomersMedium() {
return fetch('data/customers-medium.json').then(res => res.json()).then(d => d.data);
}
getCustomersLarge() {
return fetch('data/customers-large.json').then(res => res.json()).then(d => d.data);
}
getCustomersXLarge() {
return fetch('data/customers-xlarge.json').then(res => res.json()).then(d => d.data);
}
getCustomers(params) {
const queryParams = Object.keys(params).map(k => encodeURIComponent(k) + '=' + encodeURIComponent(params[k])).join('&');
return fetch('https://www.primefaces.org/data/customers?' + queryParams).then(res => res.json())
}
}