Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by viktor on 15.10.2017.
- */
- const _documents = [
- {
- id: 1,
- lang: 'ua',
- type: 'policy',
- text: 'policy'
- },
- {
- id: 2,
- lang: 'ua',
- type: 'responsibility',
- text: 'responsibility'
- },
- {
- id: 3,
- lang: 'ua',
- type: 'dispatch',
- text: 'dispatch'
- },
- {
- id: 7,
- lang: 'ua',
- type: 'agreement',
- text: 'agreement text ua'
- },
- {
- id: 4,
- lang: 'ru',
- type: 'policy',
- text: 'policy'
- },
- {
- id: 5,
- lang: 'ru',
- type: 'responsibility',
- text: 'responsibility'
- },
- {
- id: 6,
- lang: 'ru',
- type: 'dispatch',
- text: 'dispatch'
- },
- {
- id: 8,
- lang: 'ru',
- type: 'agreement',
- text: 'agreement text ru'
- }
- ]
- export default {
- getDocument (cb, lang, type) {
- setTimeout(() => {
- cb(_documents.filter(document => document.lang === lang).filter(document => document.type === type))
- }, 100)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement