date display format

remotes/origin/hasaccess
Sanasol 8 years ago
parent 54f73ac87b
commit 0d8356c18a
  1. 16
      web/src/components/LessonsAdmin.vue

@ -4,18 +4,18 @@
<div class="lessons__list">
<div class="lessons__item" v-for="(lesson, index) in lessons">
<div class="lessons__actions lessons__actions__no-hover">
<button type="button" class="lessons__action" @click="removeLesson(lesson.fields.id)">
<button type="button" class="lessons__action" @click="removeLesson(lesson.pk)">
<svg class="icon icon-delete">
<use xlink:href="/static/img/sprite.svg#icon-delete"></use>
</svg>
</button>
<button type="button" class="lessons__action" @click="editLesson(lesson.fields.id)">
<button type="button" class="lessons__action" @click="editLesson(lesson.pk)">
<svg class="icon icon-edit">
<use xlink:href="/static/img/sprite.svg#icon-edit"></use>
</svg>
</button>
</div>
<div class="lessons__subtitle subtitle">{{lesson.fields.date}} // {{ lesson.fields.title }}</div>
<div class="lessons__subtitle subtitle">{{ moment(lesson.fields.date).format("dd, D MMM") }} // {{ lesson.fields.title }}</div>
<div class="lessons__row">
<div class="lessons__content">{{ lesson.fields.short_description }}</div>
</div>
@ -47,12 +47,20 @@
// import Draggable from 'vuedraggable';
import {showNotification} from "../js/modules/notification";
// import createHistory from "history/createBrowserHistory";
// import moment from 'moment'
import moment from 'moment'
// import _ from 'lodash'
moment.locale('ru');
export default {
name: "leessons-admin",
props: ["lessons"],
mounted() {
},
data() {
return {
moment: moment
}
},
methods: {
addLesson() {
window.location = '/course/create/live';

Loading…
Cancel
Save