finesse on Blobs
This commit is contained in:
@@ -1,18 +1,18 @@
|
|||||||
<template lang='pug'>
|
<template lang='pug'>
|
||||||
v-container
|
v-container
|
||||||
v-card-title {{$t('common.cohort')}}
|
v-card-title {{$t('common.blobs')}}
|
||||||
v-spacer
|
v-spacer
|
||||||
v-text-field(v-model='search'
|
v-text-field(v-model='search'
|
||||||
:append-icon='mdiMagnify' outlined rounded
|
:append-icon='mdiMagnify' outlined rounded
|
||||||
label='Search'
|
label='Search'
|
||||||
single-line hide-details)
|
single-line hide-details)
|
||||||
v-card-subtitle(v-html="$t('admin.cohort_description')")
|
v-card-subtitle(v-html="$t('admin.blobs_description')")
|
||||||
|
|
||||||
v-btn(color='primary' text @click='newCohort') <v-icon v-text='mdiPlus'></v-icon> {{$t('common.new')}}
|
v-btn(color='primary' text @click='newCohort') <v-icon v-text='mdiPlus'></v-icon> {{$t('admin.new_blob')}}
|
||||||
|
|
||||||
v-dialog(v-model='dialog' width='800' destroy-on-close :fullscreen='$vuetify.breakpoint.xsOnly')
|
v-dialog(v-model='dialog' width='800' destroy-on-close :fullscreen='$vuetify.breakpoint.xsOnly')
|
||||||
v-card(color='secondary')
|
v-card(color='secondary')
|
||||||
v-card-title {{$t('admin.edit_cohort')}}
|
v-card-title {{$t('admin.edit_blob')}}
|
||||||
v-card-text
|
v-card-text
|
||||||
v-form(v-model='valid' ref='form')
|
v-form(v-model='valid' ref='form')
|
||||||
v-text-field(
|
v-text-field(
|
||||||
@@ -39,6 +39,9 @@ v-container
|
|||||||
:delimiters="[',', ';']"
|
:delimiters="[',', ';']"
|
||||||
:items="tags"
|
:items="tags"
|
||||||
:label="$t('common.tags')")
|
:label="$t('common.tags')")
|
||||||
|
template(v-slot:selection="{ item, on, attrs, selected, parent}")
|
||||||
|
v-chip(v-bind="attrs" close :close-icon='mdiCloseCircle' @click:close='parent.selectItem(item)'
|
||||||
|
:input-value="selected" label small) {{item}}
|
||||||
|
|
||||||
v-col(cols=5)
|
v-col(cols=5)
|
||||||
v-autocomplete(v-model='filterPlaces'
|
v-autocomplete(v-model='filterPlaces'
|
||||||
@@ -54,6 +57,10 @@ v-container
|
|||||||
:delimiters="[',', ';']"
|
:delimiters="[',', ';']"
|
||||||
:items="places"
|
:items="places"
|
||||||
:label="$t('common.places')")
|
:label="$t('common.places')")
|
||||||
|
template(v-slot:selection="{ item, on, attrs, selected, parent}")
|
||||||
|
v-chip(v-bind="attrs" close :close-icon='mdiCloseCircle' @click:close='parent.selectItem(item)'
|
||||||
|
:input-value="selected" label small) {{item.name}}
|
||||||
|
|
||||||
//- template(v-slot:item="{ item, attrs, on }")
|
//- template(v-slot:item="{ item, attrs, on }")
|
||||||
//- v-list-item(v-bind='attrs' v-on='on')
|
//- v-list-item(v-bind='attrs' v-on='on')
|
||||||
//- v-list-item-content(two-line)
|
//- v-list-item-content(two-line)
|
||||||
@@ -76,14 +83,11 @@ v-container
|
|||||||
v-chip.ma-1(small v-for='tag in item.tags' v-text='tag' :key='tag')
|
v-chip.ma-1(small v-for='tag in item.tags' v-text='tag' :key='tag')
|
||||||
template(v-slot:item.places='{item}')
|
template(v-slot:item.places='{item}')
|
||||||
v-chip.ma-1(small v-for='place in item.places' v-text='place.name' :key='place.id' )
|
v-chip.ma-1(small v-for='place in item.places' v-text='place.name' :key='place.id' )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
v-card-actions
|
v-card-actions
|
||||||
v-spacer
|
v-spacer
|
||||||
v-btn(text @click='dialog=false' color='warning') {{$t('common.close')}}
|
v-btn(text @click='dialog=false' color='warning') {{$t('common.close')}}
|
||||||
//- v-btn(text @click='saveCohort' color='primary' :loading='loading'
|
|
||||||
//- :disable='!valid || loading') {{$t('common.save')}}
|
|
||||||
|
|
||||||
v-card-text
|
v-card-text
|
||||||
v-data-table(
|
v-data-table(
|
||||||
@@ -168,13 +172,14 @@ export default {
|
|||||||
this.dialog = true
|
this.dialog = true
|
||||||
},
|
},
|
||||||
newCohort () {
|
newCohort () {
|
||||||
this.cohort = { name: '', id: null },
|
this.cohort = { name: '', id: null }
|
||||||
this.filters = []
|
this.filters = []
|
||||||
this.dialog = true
|
this.dialog = true
|
||||||
},
|
},
|
||||||
async saveCohort () {
|
async saveCohort () {
|
||||||
if (!this.$refs.form.validate()) return
|
if (!this.$refs.form.validate()) return
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
this.cohort.name = this.cohort.name.trim()
|
||||||
this.cohort = await this.$axios.$post('/cohorts', this.cohort)
|
this.cohort = await this.$axios.$post('/cohorts', this.cohort)
|
||||||
this.$fetch()
|
this.$fetch()
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export default {
|
|||||||
if (!this.$refs.form.validate()) return
|
if (!this.$refs.form.validate()) return
|
||||||
this.loading = true
|
this.loading = true
|
||||||
await this.$axios.$put('/place', this.place)
|
await this.$axios.$put('/place', this.place)
|
||||||
this.updateMeta()
|
await this.$fetch()
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.dialog = false
|
this.dialog = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,8 @@
|
|||||||
"import": "Import",
|
"import": "Import",
|
||||||
"max_events": "N. max events",
|
"max_events": "N. max events",
|
||||||
"label": "Label",
|
"label": "Label",
|
||||||
"blobs": "Blobs"
|
"blobs": "Blobs",
|
||||||
|
"close": "Close"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"description": "By logging in you can publish new events.",
|
"description": "By logging in you can publish new events.",
|
||||||
@@ -233,7 +234,10 @@
|
|||||||
"smtp_test_button": "Send a test email",
|
"smtp_test_button": "Send a test email",
|
||||||
"admin_email": "Admin e-mail",
|
"admin_email": "Admin e-mail",
|
||||||
"widget": "Widget",
|
"widget": "Widget",
|
||||||
"wrong_domain_warning": "The baseurl configured in config.json <b>({baseurl})</b> differs from the one you're visiting <b>({url})</b>"
|
"wrong_domain_warning": "The baseurl configured in config.json <b>({baseurl})</b> differs from the one you're visiting <b>({url})</b>",
|
||||||
|
"new_blob": "New blob",
|
||||||
|
"blobs_description": "Blobs are groupings of events by tags and places. They will be displayed on the home page",
|
||||||
|
"edit_blob": "Edit Blob"
|
||||||
},
|
},
|
||||||
"auth": {
|
"auth": {
|
||||||
"not_confirmed": "Not confirmed yet…",
|
"not_confirmed": "Not confirmed yet…",
|
||||||
|
|||||||
@@ -231,7 +231,11 @@
|
|||||||
"smtp_hostname": "SMTP Hostname",
|
"smtp_hostname": "SMTP Hostname",
|
||||||
"smtp_test_success": "Una mail di test è stata inviata all'indirizzo {admin_email}, controlla la tua casella di posta",
|
"smtp_test_success": "Una mail di test è stata inviata all'indirizzo {admin_email}, controlla la tua casella di posta",
|
||||||
"smtp_test_button": "Invia una mail di prova",
|
"smtp_test_button": "Invia una mail di prova",
|
||||||
"admin_email": "E-mail dell'admin"
|
"admin_email": "E-mail dell'admin",
|
||||||
|
"new_blob": "Crea bolla",
|
||||||
|
"wrong_domain_warning": "Il \"baseurl\" configurato in config.json <b>({baseurl})</b> è diverso da quello che stai visitando <b>({url})</b>",
|
||||||
|
"blobs_description": "Le bolle sono raggruppamenti di eventi per tag e posti.",
|
||||||
|
"edit_blob": "Modifica bolla"
|
||||||
},
|
},
|
||||||
"auth": {
|
"auth": {
|
||||||
"not_confirmed": "Non ancora confermato…",
|
"not_confirmed": "Non ancora confermato…",
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
"@nuxtjs/auth": "^4.9.1",
|
"@nuxtjs/auth": "^4.9.1",
|
||||||
"@nuxtjs/axios": "^5.13.5",
|
"@nuxtjs/axios": "^5.13.5",
|
||||||
"@nuxtjs/sitemap": "^2.4.0",
|
"@nuxtjs/sitemap": "^2.4.0",
|
||||||
"@snyk/protect": "latest",
|
|
||||||
"accept-language": "^3.0.18",
|
"accept-language": "^3.0.18",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
chips small-chips multiple deletable-chips hide-no-data hide-selected persistent-hint
|
chips small-chips multiple deletable-chips hide-no-data hide-selected persistent-hint
|
||||||
cache-items
|
cache-items
|
||||||
@input.native='searchTags'
|
@input.native='searchTags'
|
||||||
:delimiters="[',', ';']"
|
:delimiters="[',', ';', '#']"
|
||||||
:items="tags"
|
:items="tags"
|
||||||
:menu-props="{ maxWidth: 400, eager: true }"
|
:menu-props="{ maxWidth: 400, eager: true }"
|
||||||
:label="$t('common.tags')")
|
:label="$t('common.tags')")
|
||||||
|
|||||||
@@ -1897,11 +1897,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@sinonjs/commons" "^1.7.0"
|
"@sinonjs/commons" "^1.7.0"
|
||||||
|
|
||||||
"@snyk/protect@^1.946.0":
|
|
||||||
version "1.946.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@snyk/protect/-/protect-1.946.0.tgz#4960ad4079145615d16fcbf2644ef016f08a7fdc"
|
|
||||||
integrity sha512-LdqVSuI3gFX87dLfZsUvlb5lp7XuURa22uY2oDuOyNxk4Z0gsSOoYxYrFXUW2RreH+mch1T6rU5HztQkoL38YQ==
|
|
||||||
|
|
||||||
"@tootallnate/once@1":
|
"@tootallnate/once@1":
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
|
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
|
||||||
|
|||||||
Reference in New Issue
Block a user