Dashboard completed. Demo files added
This commit is contained in:
Executable
+6
@@ -0,0 +1,6 @@
|
||||
export default class CountryService {
|
||||
|
||||
getCountries() {
|
||||
return fetch('data/countries.json').then(res => res.json()).then(d => d.data);
|
||||
}
|
||||
}
|
||||
Executable
+25
@@ -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())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
export default class NodeService {
|
||||
|
||||
getTreeTableNodes() {
|
||||
return fetch('data/treetablenodes.json').then(res => res.json()).then(d => d.root);
|
||||
}
|
||||
|
||||
getTreeNodes() {
|
||||
return fetch('data/treenodes.json').then(res => res.json()).then(d => d.root);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export default class PhotoService {
|
||||
|
||||
getImages() {
|
||||
return fetch('data/photos.json').then(res => res.json())
|
||||
.then(d => d.data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
export default class ProductService {
|
||||
|
||||
getProductsSmall() {
|
||||
return fetch('data/products-small.json').then(res => res.json()).then(d => d.data);
|
||||
}
|
||||
|
||||
getProducts() {
|
||||
return fetch('data/products.json').then(res => res.json()).then(d => d.data);
|
||||
}
|
||||
|
||||
getProductsWithOrdersSmall() {
|
||||
return fetch('data/products-orders-small.json').then(res => res.json()).then(d => d.data);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user