blob: 0c6d5b072718925b013c11a7ae15d7bfde796af2 [file] [log] [blame]
Derick Montaguefded0d12019-12-11 06:16:40 -06001import Vue from 'vue';
2import App from './App.vue';
3import router from './router';
4import store from './store';
Derick Montaguea2988f42020-01-17 13:46:30 -06005import {
Derick Montague676f2fc2019-12-23 20:53:49 -06006 AlertPlugin,
Dixsie Wolmers97d86b32019-12-02 05:07:57 -06007 BadgePlugin,
Derick Montaguea2988f42020-01-17 13:46:30 -06008 ButtonPlugin,
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -08009 BVConfigPlugin,
Derick Montaguea2988f42020-01-17 13:46:30 -060010 CollapsePlugin,
Yoshie Muranaka82cca542020-04-07 10:20:37 -070011 DropdownPlugin,
Derick Montaguee080a1a2019-12-04 16:30:08 -060012 FormPlugin,
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060013 FormCheckboxPlugin,
Yoshie Muranaka68bbba22020-05-18 09:49:37 -070014 FormDatepickerPlugin,
Yoshie Muranaka37393812020-03-24 15:25:24 -070015 FormFilePlugin,
Derick Montaguee080a1a2019-12-04 16:30:08 -060016 FormGroupPlugin,
17 FormInputPlugin,
Yoshie Muranaka463a5702019-12-04 09:09:36 -080018 FormRadioPlugin,
19 FormSelectPlugin,
Yoshie Muranaka532a4b02020-03-27 11:00:50 -070020 FormTagsPlugin,
Yoshie Muranakac4e38ab2020-04-09 12:41:27 -070021 InputGroupPlugin,
Yoshie Muranaka35080ac2020-01-17 15:38:57 -060022 LayoutPlugin,
Derick Montague42c19892020-01-17 16:10:34 -060023 LinkPlugin,
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060024 ListGroupPlugin,
Derick Montague42c19892020-01-17 16:10:34 -060025 ModalPlugin,
26 NavbarPlugin,
27 NavPlugin,
Yoshie Muranakaf9832b02020-05-12 12:04:46 -070028 PaginationPlugin,
Yoshie Muranaka3be801a2020-04-21 11:34:56 -070029 ProgressPlugin,
Yoshie Muranaka0fc91e72020-02-05 11:23:06 -080030 TablePlugin,
Yoshie Muranaka1be6b412020-04-16 12:03:38 -070031 ToastPlugin,
32 TooltipPlugin
Derick Montaguefded0d12019-12-11 06:16:40 -060033} from 'bootstrap-vue';
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080034import Vuelidate from 'vuelidate';
Dixsie Wolmerscbcd2132020-01-30 20:58:37 -060035import i18n from './i18n';
Derick Montaguea2988f42020-01-17 13:46:30 -060036
Dixsie Wolmers97f41872020-02-23 15:56:16 -060037// Filters
38Vue.filter('formatDate', function(value) {
Dixsie Wolmers97f41872020-02-23 15:56:16 -060039 if (value instanceof Date) {
Dixsie Wolmers0e4760e2020-06-05 09:09:02 -050040 return value.toISOString().substring(0, 10);
Dixsie Wolmers97f41872020-02-23 15:56:16 -060041 }
42});
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060043
Dixsie Wolmers97f41872020-02-23 15:56:16 -060044Vue.filter('formatTime', function(value) {
45 const timeOptions = {
46 hour: 'numeric',
47 minute: 'numeric',
48 second: 'numeric',
49 timeZoneName: 'short'
50 };
51 if (value instanceof Date) {
52 return value.toLocaleTimeString('default', timeOptions);
53 }
54});
55
56// Plugins
Derick Montague676f2fc2019-12-23 20:53:49 -060057Vue.use(AlertPlugin);
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060058Vue.use(BadgePlugin);
Derick Montaguea2988f42020-01-17 13:46:30 -060059Vue.use(ButtonPlugin);
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080060Vue.use(BVConfigPlugin, {
Derick Montague7f970a12020-03-02 17:56:09 -060061 BFormText: { textVariant: 'secondary' },
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080062 BTable: {
63 headVariant: 'light',
64 footVariant: 'light'
Yoshie Muranaka532a4b02020-03-27 11:00:50 -070065 },
66 BFormTags: {
67 tagVariant: 'primary',
68 addButtonVariant: 'link-primary'
Yoshie Muranaka82cca542020-04-07 10:20:37 -070069 },
70 BBadge: {
71 variant: 'primary'
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080072 }
73});
Derick Montaguea2988f42020-01-17 13:46:30 -060074Vue.use(CollapsePlugin);
Yoshie Muranaka82cca542020-04-07 10:20:37 -070075Vue.use(DropdownPlugin);
Derick Montaguee080a1a2019-12-04 16:30:08 -060076Vue.use(FormPlugin);
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060077Vue.use(FormCheckboxPlugin);
Yoshie Muranaka68bbba22020-05-18 09:49:37 -070078Vue.use(FormDatepickerPlugin);
Yoshie Muranaka37393812020-03-24 15:25:24 -070079Vue.use(FormFilePlugin);
Derick Montaguee080a1a2019-12-04 16:30:08 -060080Vue.use(FormGroupPlugin);
81Vue.use(FormInputPlugin);
Yoshie Muranaka463a5702019-12-04 09:09:36 -080082Vue.use(FormRadioPlugin);
83Vue.use(FormSelectPlugin);
Yoshie Muranaka532a4b02020-03-27 11:00:50 -070084Vue.use(FormTagsPlugin);
Yoshie Muranakac4e38ab2020-04-09 12:41:27 -070085Vue.use(InputGroupPlugin);
Derick Montaguee080a1a2019-12-04 16:30:08 -060086Vue.use(LayoutPlugin);
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060087Vue.use(LayoutPlugin);
Derick Montaguea2988f42020-01-17 13:46:30 -060088Vue.use(LinkPlugin);
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060089Vue.use(ListGroupPlugin);
Yoshie Muranaka35080ac2020-01-17 15:38:57 -060090Vue.use(ModalPlugin);
Derick Montague42c19892020-01-17 16:10:34 -060091Vue.use(NavbarPlugin);
92Vue.use(NavPlugin);
Yoshie Muranakaf9832b02020-05-12 12:04:46 -070093Vue.use(PaginationPlugin);
Yoshie Muranaka3be801a2020-04-21 11:34:56 -070094Vue.use(ProgressPlugin);
Derick Montague42c19892020-01-17 16:10:34 -060095Vue.use(TablePlugin);
Yoshie Muranaka0fc91e72020-02-05 11:23:06 -080096Vue.use(ToastPlugin);
Yoshie Muranaka1be6b412020-04-16 12:03:38 -070097Vue.use(TooltipPlugin);
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080098Vue.use(Vuelidate);
Derick Montaguea2988f42020-01-17 13:46:30 -060099
Derick Montaguea2988f42020-01-17 13:46:30 -0600100new Vue({
101 router,
102 store,
Dixsie Wolmerscbcd2132020-01-30 20:58:37 -0600103 i18n,
Derick Montaguea2988f42020-01-17 13:46:30 -0600104 render: h => h(App)
Derick Montaguefded0d12019-12-11 06:16:40 -0600105}).$mount('#app');