- Delete Event with ask confirmation
- Fix dateStart only 1 view if is the same day - Sending a message from the Event Page: to a user or to a "Event" - Add button "Ask Info" - Starting view msg into the messagepopup component
This commit is contained in:
@@ -1,35 +1,33 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop } from 'vue-property-decorator'
|
||||
|
||||
import { GlobalStore } from '@store'
|
||||
import { IPost } from '../../../model/index'
|
||||
import { GlobalStore, CalendarStore } from '@store'
|
||||
import { ICalendarState, IMessage, IPost, IUserState } from '../../../model/index'
|
||||
|
||||
import './messagePopover.scss'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { ITodo, ITodosState } from '../../../model'
|
||||
import { Getter } from 'vuex-class'
|
||||
|
||||
const namespace = 'UserModule'
|
||||
|
||||
@Component({
|
||||
})
|
||||
export default class MessagePopover extends Vue {
|
||||
posts: IPost[] = []
|
||||
|
||||
@Getter('getlasts_messages', { namespace })
|
||||
public lasts_messages: (state: IUserState) => IMessage[]
|
||||
|
||||
public created() {
|
||||
if (GlobalStore.state.posts.length < 1) {
|
||||
this.requestPosts()
|
||||
}
|
||||
// if (GlobalStore.state.posts.length < 1) {
|
||||
// this.requestPosts()
|
||||
// }
|
||||
}
|
||||
|
||||
get filteredPosts() {
|
||||
if (this.posts.length >= 1)
|
||||
return this.posts.slice(0, 5)
|
||||
else
|
||||
return []
|
||||
}
|
||||
|
||||
|
||||
public randomDate(): Date {
|
||||
let myval = Math.floor(Math.random() * 10000000000)
|
||||
return new Date(tools.getTimestampsNow() - myval)
|
||||
return tools.getstrDateTime(new Date(tools.getTimestampsNow() - myval))
|
||||
}
|
||||
|
||||
public randomAvatarUrl() {
|
||||
@@ -63,10 +61,14 @@ export default class MessagePopover extends Vue {
|
||||
*/
|
||||
}
|
||||
|
||||
public requestPosts() {
|
||||
// console.log('requestPosts...')
|
||||
let prova = [{ title: 'primo' }, { title: 'Secondo' }]
|
||||
this.posts.push(...prova)
|
||||
|
||||
get tools() {
|
||||
return tools
|
||||
}
|
||||
|
||||
// public requestPosts() {
|
||||
// // console.log('requestPosts...')
|
||||
// let prova = [{ title: 'primo' }, { title: 'Secondo' }]
|
||||
// this.posts.push(...prova)
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user