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 default { | |
props: { | |
order: { | |
type: Object, | |
default: () => ({}) | |
} | |
}, | |
computed:{ | |
grandTotal() { | |
let total = (this.order.total + this.order.tax) * (1 - this.order.discount); |
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 default { | |
data() { | |
return { | |
array: [1, 2, 3] | |
}; | |
}, | |
computed: { | |
reversedArray() { | |
return this.array.reverse(); // SIDE EFFECT - mutates a data property | |
} |
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
import AuthService from '@/services/AuthService'; | |
const types = { | |
SET_USER: 'SET_USER', | |
SET_APP_TOKEN: 'SET_APP_TOKEN', | |
SET_LOGGED_IN: 'SET_LOGGED_IN', | |
RESET_STATE: 'RESET_STATE', | |
}; | |
function getDefaultState() { |
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
import Vue from 'vue' | |
import Vuex from 'vuex' | |
import createPersistedState from 'vuex-persistedstate'; | |
import user from '@/store/modules/user'; | |
Vue.use(Vuex); | |
export default new Vuex.Store({ | |
plugins: [createPersistedState({ | |
paths: ['user'] | |
})], |
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
import jwtDecode from 'jwt-decode' | |
let loginRoute = { | |
path: '/login' | |
}; | |
function redirectToLogin(next) { | |
return next(loginRoute); | |
} |
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
<template> | |
<div | |
class="bootstrap-switch bootstrap-switch-wrapper bootstrap-switch-animate" | |
:class="switchClass" | |
> | |
<div class="bootstrap-switch-container" @click="triggerToggle()"> | |
<span class="bootstrap-switch-handle-on "> | |
<slot name="on"> {{ onText }} </slot> | |
</span> | |
<span class="bootstrap-switch-label"></span> |
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
<template> | |
<div id="worldMap" style="height: 300px;"></div> | |
</template> | |
<script> | |
import 'd3'; | |
import * as d3 from 'd3'; | |
import 'topojson'; | |
import DataMap from 'datamaps'; | |
import { throttle } from 'src/util/throttle'; |
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
<template> | |
<div class="container-fluid"> | |
<div class="row"> | |
<div class="col-md-10 ml-auto mr-auto"> | |
<div class="card card-calendar"> | |
<div class="card-body"> | |
<div id="fullCalendar" ref="calendar"></div> | |
</div> | |
</div> | |
</div> |
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
### Keybase proof | |
I hereby claim: | |
* I am cristijora on github. | |
* I am cristijora (https://keybase.io/cristijora) on keybase. | |
* I have a public key ASCi8ExRk54RTKqwGQflklHgGd9hi3F9EV9xlTcTv1Ts4Qo | |
To claim this, I am signing this object: |
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
// simply import the file above. | |
import './pollyfills' |