Merge branch 'master' into ie/fix-toggler
This commit is contained in:
28
js/components/forms/ccpo_approval.js
Normal file
28
js/components/forms/ccpo_approval.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import textinput from '../text_input'
|
||||
|
||||
export default {
|
||||
name: 'ccpo-approval',
|
||||
|
||||
components: {
|
||||
textinput
|
||||
},
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
approving: false,
|
||||
denying: false
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
setReview: function (e) {
|
||||
if (e.target.value === 'approving') {
|
||||
this.approving = true
|
||||
this.denying = false
|
||||
} else {
|
||||
this.approving = false
|
||||
this.denying = true
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
21
js/components/local_datetime.js
Normal file
21
js/components/local_datetime.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import { format } from 'date-fns'
|
||||
|
||||
export default {
|
||||
name: 'local-datetime',
|
||||
|
||||
props: {
|
||||
timestamp: String,
|
||||
format: {
|
||||
type: String,
|
||||
default: 'MMM D YYYY H:mm'
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
displayTime: function () {
|
||||
return format(this.timestamp, this.format)
|
||||
}
|
||||
},
|
||||
|
||||
template: '<time v-bind:datetime="timestamp">{{ this.displayTime }}</time>'
|
||||
}
|
@@ -19,7 +19,8 @@ export default {
|
||||
default: () => ''
|
||||
},
|
||||
initialErrors: Array,
|
||||
paragraph: String
|
||||
paragraph: String,
|
||||
noMaxWidth: String
|
||||
},
|
||||
|
||||
data: function () {
|
||||
|
@@ -17,6 +17,8 @@ import Modal from './mixins/modal'
|
||||
import selector from './components/selector'
|
||||
import BudgetChart from './components/charts/budget_chart'
|
||||
import SpendTable from './components/tables/spend_table'
|
||||
import CcpoApproval from './components/forms/ccpo_approval'
|
||||
import LocalDatetime from './components/local_datetime'
|
||||
|
||||
Vue.use(VTooltip)
|
||||
|
||||
@@ -35,7 +37,9 @@ const app = new Vue({
|
||||
NewProject,
|
||||
selector,
|
||||
BudgetChart,
|
||||
SpendTable
|
||||
SpendTable,
|
||||
CcpoApproval,
|
||||
LocalDatetime
|
||||
},
|
||||
mounted: function() {
|
||||
const modalOpen = document.querySelector("#modalOpen")
|
||||
|
Reference in New Issue
Block a user