mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-22 06:49:35 +00:00
[tm@modals] Refactoring
This commit is contained in:
1 parent
96954845a1
commit
0a038b7771
19 files changed
+302
-582
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
enrichEmployeesByFullName(employees) {
|
||||
return employees.map(employee => ({...employee, _fullName: `${ employee.name } ${ employee.surname }`}))
|
||||
},
|
||||
|
||||
formatDateTime(date) {
|
||||
return moment(date).format('DD.MM.yyyy, HH:mm')
|
||||
},
|
||||
|
||||
isBefore(date, compareTo = null) {
|
||||
return moment(date).isBefore(moment(compareTo))
|
||||
},
|
||||
|
||||
isAfter(date, compareTo = null) {
|
||||
return moment(date).isAfter(moment(compareTo))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user