-

-
+
diff --git a/src/components/Input.vue b/src/components/Input.vue
new file mode 100644
index 0000000..3e8e343
--- /dev/null
+++ b/src/components/Input.vue
@@ -0,0 +1,209 @@
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
+ {{ data.index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ data.value }}
+
+
+
+ {{ data.item.amount | currency }}
+
+
+
+ {{ $enums.Frequency.byId(data.item.frequency).name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Save
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/enums/Frequency.js b/src/enums/Frequency.js
new file mode 100644
index 0000000..bf9bfc2
--- /dev/null
+++ b/src/enums/Frequency.js
@@ -0,0 +1,36 @@
+class Frequency {
+ constructor (name, interval) {
+ this.name = name
+ this.interval = interval
+ }
+}
+
+Frequency.ONCE = new Frequency('Once', 0)
+Frequency.YEARLY = new Frequency('Yearly', 1)
+Frequency.BIMONTHLY = new Frequency('Bi-Monthly', 6)
+Frequency.MONTHLY = new Frequency('Monthly', 12)
+Frequency.BIWEEKLY = new Frequency('Bi-Weekly', 26)
+Frequency.WEEKLY = new Frequency('Weekly', 52)
+Frequency.DAILY = new Frequency('Daily', 52 * 7)
+
+Frequency.byId = id => {
+ try { return Frequency[Object.keys(Frequency)[id]] } catch (e) { return Frequency.ONCE }
+}
+
+Frequency.values = () => {
+ let keys = Object.keys(Frequency)
+ keys.splice(-3, 3)
+
+ return keys.map(k => Frequency[k])
+}
+
+Frequency.options = () => {
+ return Frequency.values().map((f, i) => {
+ return {
+ value: i,
+ text: f.name
+ }
+ })
+}
+
+export default Frequency
diff --git a/src/main.js b/src/main.js
index 684ffac..7b1741c 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,7 +1,32 @@
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
+import enums from 'vue-enums'
import App from './App'
+import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
+
+import 'bootstrap/dist/js/bootstrap'
+import 'bootstrap/dist/css/bootstrap.min.css'
+import 'bootstrap-vue/dist/bootstrap-vue.css'
+
+Vue.use(enums, {namespace: '$enums'})
+
+// Make BootstrapVue available throughout your project
+Vue.use(BootstrapVue)
+// Optionally install the BootstrapVue icon components plugin
+Vue.use(IconsPlugin)
+
+Vue.filter('currency', function (value) {
+ if (typeof value !== 'number') {
+ try {
+ value = parseFloat(value)
+ } catch (e) {
+ return value
+ }
+ }
+
+ return `${value.toFixed(2)} €`
+})
Vue.config.productionTip = false