1import Vue from 'vue'; 2import App from './App.vue'; 3import router from './router'; 4import store from './store'; 5import { 6 AlertPlugin, 7 BadgePlugin, 8 ButtonPlugin, 9 BVConfigPlugin, 10 CollapsePlugin, 11 DropdownPlugin, 12 FormPlugin, 13 FormCheckboxPlugin, 14 FormFilePlugin, 15 FormGroupPlugin, 16 FormInputPlugin, 17 FormRadioPlugin, 18 FormSelectPlugin, 19 FormTagsPlugin, 20 InputGroupPlugin, 21 LayoutPlugin, 22 LinkPlugin, 23 ListGroupPlugin, 24 ModalPlugin, 25 NavbarPlugin, 26 NavPlugin, 27 ProgressPlugin, 28 TablePlugin, 29 ToastPlugin, 30 TooltipPlugin 31} from 'bootstrap-vue'; 32import Vuelidate from 'vuelidate'; 33import i18n from './i18n'; 34 35// Filters 36Vue.filter('formatDate', function(value) { 37 const dateOptions = { 38 year: 'numeric', 39 month: 'short', 40 day: 'numeric' 41 }; 42 if (value instanceof Date) { 43 return value.toLocaleDateString(i18n.locale, dateOptions); 44 } 45}); 46 47Vue.filter('formatTime', function(value) { 48 const timeOptions = { 49 hour: 'numeric', 50 minute: 'numeric', 51 second: 'numeric', 52 timeZoneName: 'short' 53 }; 54 if (value instanceof Date) { 55 return value.toLocaleTimeString('default', timeOptions); 56 } 57}); 58 59// Plugins 60Vue.use(AlertPlugin); 61Vue.use(BadgePlugin); 62Vue.use(ButtonPlugin); 63Vue.use(BVConfigPlugin, { 64 BFormText: { textVariant: 'secondary' }, 65 BTable: { 66 headVariant: 'light', 67 footVariant: 'light' 68 }, 69 BFormTags: { 70 tagVariant: 'primary', 71 addButtonVariant: 'link-primary' 72 }, 73 BBadge: { 74 variant: 'primary' 75 } 76}); 77Vue.use(CollapsePlugin); 78Vue.use(DropdownPlugin); 79Vue.use(FormPlugin); 80Vue.use(FormCheckboxPlugin); 81Vue.use(FormFilePlugin); 82Vue.use(FormGroupPlugin); 83Vue.use(FormInputPlugin); 84Vue.use(FormRadioPlugin); 85Vue.use(FormSelectPlugin); 86Vue.use(FormTagsPlugin); 87Vue.use(InputGroupPlugin); 88Vue.use(LayoutPlugin); 89Vue.use(LayoutPlugin); 90Vue.use(LinkPlugin); 91Vue.use(ListGroupPlugin); 92Vue.use(ModalPlugin); 93Vue.use(NavbarPlugin); 94Vue.use(NavPlugin); 95Vue.use(ProgressPlugin); 96Vue.use(TablePlugin); 97Vue.use(ToastPlugin); 98Vue.use(TooltipPlugin); 99Vue.use(Vuelidate); 100 101new Vue({ 102 router, 103 store, 104 i18n, 105 render: h => h(App) 106}).$mount('#app'); 107