fix WhereInput
This commit is contained in:
@@ -131,9 +131,8 @@ export default {
|
||||
},
|
||||
openLinkModal () {
|
||||
// this.link = { href: '', label: '' }
|
||||
// console.error(this.$refs)
|
||||
this.linkModal = true
|
||||
this.$nextTick( () => this.$refs.linkModalForm.reset() )
|
||||
this.$nextTick(() => this.$refs.linkModalForm.reset())
|
||||
},
|
||||
addFooterLink () {
|
||||
const link = Object.assign({}, this.link)
|
||||
@@ -151,7 +150,6 @@ export default {
|
||||
editFooterLink (item) {
|
||||
this.link = { href: item.href, label: item.label }
|
||||
this.linkModal = true
|
||||
|
||||
},
|
||||
async uploadLogo (file) {
|
||||
const formData = new FormData()
|
||||
|
||||
16
package.json
16
package.json
@@ -40,14 +40,14 @@
|
||||
"cross-env": "^7.0.2",
|
||||
"date-fns": "^2.16.1",
|
||||
"dayjs": "^1.9.4",
|
||||
"dompurify": "^2.2.0",
|
||||
"dompurify": "^2.2.2",
|
||||
"email-templates": "^7.1.2",
|
||||
"express": "^4.17.1",
|
||||
"express-oauth-server": "^2.0.0",
|
||||
"fs": "^0.0.1-security",
|
||||
"http-signature": "^1.3.5",
|
||||
"ical.js": "^1.4.0",
|
||||
"ics": "^2.26.0",
|
||||
"ics": "^2.26.1",
|
||||
"inquirer": "^7.3.3",
|
||||
"jsdom": "^16.4.0",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
@@ -61,7 +61,7 @@
|
||||
"multer": "^1.4.2",
|
||||
"nuxt": "^2.14.7",
|
||||
"nuxt-express-module": "^0.0.11",
|
||||
"pg": "^8.4.1",
|
||||
"pg": "^8.4.2",
|
||||
"sequelize": "^6.3.5",
|
||||
"sequelize-cli": "^6.2.0",
|
||||
"sharp": "^0.26.2",
|
||||
@@ -79,9 +79,9 @@
|
||||
"@nuxtjs/eslint-config": "^4.0.0",
|
||||
"@nuxtjs/vuetify": "^1.11.2",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"eslint": "^7.12.0",
|
||||
"eslint-config-prettier": "^6.14.0",
|
||||
"eslint-config-standard": "^15.0.0",
|
||||
"eslint": "^7.12.1",
|
||||
"eslint-config-prettier": "^6.15.0",
|
||||
"eslint-config-standard": "^16.0.1",
|
||||
"eslint-loader": "^4.0.2",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-node": ">=11.1.0",
|
||||
@@ -94,8 +94,8 @@
|
||||
"nodemon": "^2.0.6",
|
||||
"prettier": "^2.1.2",
|
||||
"pug-plain-loader": "^1.0.0",
|
||||
"sass": "^1.27.0",
|
||||
"sass-loader": "^10.0.4",
|
||||
"sass": "^1.28.0",
|
||||
"sass-loader": "^10.0.5",
|
||||
"vue-cli-plugin-vuetify": "~2.0.7",
|
||||
"vuetify-loader": "^1.3.0",
|
||||
"webpack-cli": "^4.1.0"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
template(v-slot:activator='{ on }')
|
||||
v-text-field(
|
||||
:label="$t('event.from')"
|
||||
prepend-icon='mdi-clock'
|
||||
:rules="[$validators.required('event.from')]"
|
||||
:value='value.start'
|
||||
v-on='on'
|
||||
@@ -40,6 +41,7 @@
|
||||
min-width="290px")
|
||||
template(v-slot:activator='{ on }')
|
||||
v-text-field(
|
||||
prepend-icon='mdi-clock'
|
||||
:label="$t('event.due')"
|
||||
:value='value.end'
|
||||
v-on='on'
|
||||
@@ -61,7 +63,6 @@ export default {
|
||||
value: { type: Object, default: () => { } }
|
||||
},
|
||||
data () {
|
||||
// console.error('sono dentro data ', this.value)
|
||||
return {
|
||||
// time: { start: this.value.start, end: this.value.end },
|
||||
time: {},
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
v-btn(@click='importGeneric' :loading='loading' :disabled='loading'
|
||||
color='primary') {{$t('common.import')}}
|
||||
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import ical from 'ical.js'
|
||||
@@ -51,18 +50,18 @@ export default {
|
||||
this.importURL()
|
||||
}
|
||||
},
|
||||
async importICS() {
|
||||
importICS () {
|
||||
const reader = new FileReader()
|
||||
reader.readAsText(this.file)
|
||||
reader.onload = () => {
|
||||
const data = reader.result
|
||||
const event = ical.parse(data)
|
||||
this.event = {
|
||||
title: event.name
|
||||
title: event.name
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async importURL() {
|
||||
async importURL () {
|
||||
if (!this.URL) {
|
||||
this.errorMessage = this.$validators.required('common.URL')('')
|
||||
this.error = true
|
||||
@@ -73,7 +72,7 @@ export default {
|
||||
this.loading = true
|
||||
|
||||
try {
|
||||
const ret = await this.$axios.$get('/event/import', { params: { URL: this.URL }})
|
||||
const ret = await this.$axios.$get('/event/import', { params: { URL: this.URL } })
|
||||
this.event = ret
|
||||
// check if contain an h-event
|
||||
this.$emit('imported', ret)
|
||||
@@ -87,4 +86,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -6,16 +6,18 @@
|
||||
:hint="$t('event.where_description')"
|
||||
:hide-no-data="!place._name"
|
||||
:search-input.sync="place._name"
|
||||
prepend-icon='mdi-map-marker'
|
||||
persistent-hint
|
||||
:value="value.name"
|
||||
:items="places"
|
||||
item-text='name'
|
||||
@change='selectPlace')
|
||||
template(v-slot:no-data)
|
||||
v-list-item
|
||||
p Create {{place._name}}
|
||||
v-list-item(@click='createPlace')
|
||||
v-list-item-content Create {{place._name}}
|
||||
|
||||
v-text-field.col-md-6(ref='address'
|
||||
prepend-icon='mdi-map'
|
||||
:disabled='disableAddress'
|
||||
:rules="[$validators.required('common.address')]"
|
||||
:label="$t('common.address')"
|
||||
@@ -42,21 +44,26 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
selectPlace (p) {
|
||||
const place = p && this.places.find(place => place.id === p.id)
|
||||
if (place && place.address) {
|
||||
if (typeof p === 'object') {
|
||||
if (p === null) { return }
|
||||
this.place.name = p.name
|
||||
this.place.address = place.address
|
||||
this.place.address = p.address
|
||||
this.disableAddress = true
|
||||
} else {
|
||||
} else { // this is a new place
|
||||
this.place.name = p
|
||||
this.disableAddress = false
|
||||
this.$refs.place.blur()
|
||||
this.$refs.address.focus()
|
||||
}
|
||||
this.$emit('input', this.place)
|
||||
this.$emit('input', { ...this.place })
|
||||
},
|
||||
changeAddress (v) {
|
||||
this.place.address = v
|
||||
this.$emit('input', this.place)
|
||||
this.$emit('input', { ...this.place })
|
||||
},
|
||||
createPlace (v) {
|
||||
this.$refs.place.blur()
|
||||
this.$refs.address.focus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
:value = 'event.title'
|
||||
:rules="[$validators.required('common.title')]"
|
||||
:hint="$t('event.what_description')"
|
||||
prepend-icon='mdi-format-title'
|
||||
:label="$t('common.title')"
|
||||
autofocus
|
||||
ref='title')
|
||||
@@ -53,6 +54,7 @@
|
||||
|
||||
//- tags
|
||||
v-combobox.col-6.mt-3(v-model='event.tags'
|
||||
prepend-icon="mdi-tag-multiple"
|
||||
chips small-chips multiple deletable-chips hide-no-data hide-selected persistent-hint
|
||||
:delimiters="[',', ' ']"
|
||||
:items="tags.map(t => t.tag)"
|
||||
@@ -169,7 +171,6 @@ export default {
|
||||
this.loading = true
|
||||
let start_datetime, end_datetime
|
||||
const [start_hour, start_minute] = this.time.start.split(':')
|
||||
console.error('TIME: hour', start_hour, this.time)
|
||||
if (!this.time.end) {
|
||||
this.time.end = (Number(start_hour) + 2) + ':' + start_minute
|
||||
}
|
||||
@@ -183,7 +184,6 @@ export default {
|
||||
end_datetime = dayjs(this.date.date[1])
|
||||
.set('hour', end_hour).set('minute', end_minute)
|
||||
} else if (this.date.type === 'normal') {
|
||||
console.error('dentro type normal', this.date.type)
|
||||
start_datetime = dayjs(this.date.date).set('hour', start_hour).set('minute', start_minute)
|
||||
end_datetime = dayjs(this.date.date).set('hour', end_hour).set('minute', end_minute)
|
||||
if (end_hour < start_hour) {
|
||||
|
||||
Reference in New Issue
Block a user