This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function indexEqualsValue(a) { | |
let left = 0; | |
let right = a.length - 1; | |
let mid; | |
while (left != right) { | |
mid = Math.floor(((right - left) / 2) + left); | |
if (mid <= a[mid]) { | |
right = mid; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const allData = [...{{state.allData}}]; | |
const page = {{state.offSet}}; | |
const limit = {{state.limit}}; | |
return allData.slice(page * limit, page * limit + limit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return {{state.opportunities}}.filter(item => { | |
return ['Closed—lost', 'Closed—won'].includes(item.fields['Status']); | |
}).length; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dataProduces = {{state.produces}}; | |
const dataSnacks = {{state.snacks}}; | |
const dataMeat = {{state.meat}}; | |
const searchedData = {{data}}; | |
if (!searchedData) { | |
return {produces:dataProduces, snacks:dataSnacks,meat:dataMeat}; | |
} | |
function filter(item, value) { | |
return item.weight.toLowerCase().includes(value) || item.price.toLowerCase().includes(value) || item.product.toLowerCase().includes(value); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const items = {}; | |
return {{result.data}}.map(item => { | |
return { | |
value: item.name, | |
title: item.name, | |
}; | |
}).filter(item => { | |
return items.hasOwnProperty(item.value) ? false : (items[item.value] = true); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
id: { | |
title: 'ID', | |
filter: true | |
}, | |
name: { | |
title: 'Name', | |
filter: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- build:js({.tmp/serve,.tmp/partials,src}) scripts/app.js --> | |
<!-- inject:js --> | |
<!-- js files will be automatically insert here --> | |
<!-- endinject --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const PagesRoutes:RouterConfig = [ | |
{ | |
path: 'pages', | |
component: Pages, | |
children: [ | |
{ | |
path: 'dashboard', | |
component: Dashboard, | |
data: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const PagesRoutes:RouterConfig = [ | |
{ | |
path: 'pages', | |
component: Pages, | |
children: [ | |
{ | |
path: 'dashboard', | |
component: Dashboard | |
}, | |
{ |
NewerOlder