update
This commit is contained in:
parent
79a24f6ae7
commit
e6bceb9d71
24 changed files with 122 additions and 24 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 6.7 KiB |
|
|
@ -8,12 +8,37 @@
|
|||
>
|
||||
<v-toolbar-title>{{ $store.state.delegateAdminName }}</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn outlined class="mr-3">
|
||||
<v-btn outlined class="mr-3" @click="openPublishModal()">
|
||||
Publier
|
||||
</v-btn>
|
||||
<v-menu bottom close-on-content-click>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn
|
||||
class="mr-2"
|
||||
icon
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>
|
||||
<v-icon>more_vert</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-list>
|
||||
<v-list-item @click="goToPage()">
|
||||
<v-list-item-title>Ouvrir la page publique</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item @click="logout()">
|
||||
<v-list-item-title>Se déconnecter</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<!--
|
||||
<v-btn icon @click="goToPage()">
|
||||
<v-icon>open_in_new</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="logout()">
|
||||
<v-icon>exit_to_app</v-icon>
|
||||
</v-btn>
|
||||
</v-btn> -->
|
||||
<template v-slot:extension>
|
||||
<v-tabs
|
||||
v-model="tab"
|
||||
|
|
@ -83,6 +108,23 @@
|
|||
</v-card-actions>
|
||||
</v-card>
|
||||
</div>
|
||||
<v-dialog v-model="publishModal">
|
||||
<v-card max-width="700px">
|
||||
<v-card-title>
|
||||
Publier les modifications apportés à votre association
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<p>
|
||||
Aliquyam est dolores voluptua consetetur stet erat eos sit. Est eirmod ut et voluptua, et sed eos sanctus sit erat.
|
||||
</p>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn color="primary" text @click="publishModal = false">Fermer</v-btn>
|
||||
<v-spacer />
|
||||
<v-btn :disabled="!canPublish" text @click="askApproval()">Demander une vérification</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-main>
|
||||
</template>
|
||||
|
||||
|
|
@ -94,13 +136,16 @@ export default {
|
|||
token: '',
|
||||
loadingHandle: null,
|
||||
isSaving: false,
|
||||
tab: 0
|
||||
tab: 0,
|
||||
slug: '',
|
||||
canPublish: false,
|
||||
publishModal: false
|
||||
}),
|
||||
created () {
|
||||
this.init()
|
||||
},
|
||||
watch: {
|
||||
$route (to, from) {
|
||||
$route (to) {
|
||||
this.selectRoute(to)
|
||||
}
|
||||
},
|
||||
|
|
@ -163,13 +208,18 @@ export default {
|
|||
this.loading = false
|
||||
this.enabled = true
|
||||
const organization = res.data.data.organization
|
||||
const proposedVersion = res.data.data.organization.proposedVersion
|
||||
const tags = res.data.data.tags
|
||||
if (organization.proposedVersion.tag !== undefined && organization.proposedVersion.tag !== null) {
|
||||
organization.proposedVersion.tag = organization.proposedVersion.tag._id
|
||||
if (
|
||||
proposedVersion.tag !== undefined &&
|
||||
proposedVersion.tag !== null
|
||||
) {
|
||||
proposedVersion.tag = proposedVersion.tag._id
|
||||
}
|
||||
this.slug = organization.slug
|
||||
this.$store.commit('SET_DELEGATE_ADMIN_NAME', organization.adminName)
|
||||
this.$store.commit('SET_DELEGATE_EMAIL', organization.email)
|
||||
this.$store.commit('SET_DATA', organization.proposedVersion)
|
||||
this.$store.commit('SET_DATA', proposedVersion)
|
||||
this.$store.commit('SET_TAGS', tags)
|
||||
this.$nextTick(() => {
|
||||
setTimeout(this.$refs.tabs.callSlider, 200)
|
||||
|
|
@ -178,7 +228,8 @@ export default {
|
|||
setTimeout(this.$refs.tabs.callSlider, 1000)
|
||||
setTimeout(this.$refs.tabs.callSlider, 1500)
|
||||
})
|
||||
}).catch(() => {
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
clearTimeout(this.loadingHandle)
|
||||
this.loading = false
|
||||
if (this.token !== '' || inUrl) {
|
||||
|
|
@ -216,7 +267,8 @@ export default {
|
|||
color: 'success',
|
||||
text: 'Vos changements ont été sauvegardés !'
|
||||
})
|
||||
}).catch(() => {
|
||||
}).catch(err => {
|
||||
console.log(err.data)
|
||||
this.isSaving = false
|
||||
this.$store.commit('ADD_ALERT', {
|
||||
color: 'error',
|
||||
|
|
@ -233,6 +285,16 @@ export default {
|
|||
if (this.token !== '') {
|
||||
this.init()
|
||||
}
|
||||
},
|
||||
goToPage () {
|
||||
window.open(process.env.VUE_APP_BASE_URL + '/association/' + this.slug, '_blank').focus()
|
||||
},
|
||||
openPublishModal () {
|
||||
// compute if the user can ask approval
|
||||
this.publishModal = true
|
||||
},
|
||||
askApproval () {
|
||||
this.publishModal = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,20 @@
|
|||
:style="coverStyle">
|
||||
</div>
|
||||
<div class="cover-common cover-upper">
|
||||
<v-btn
|
||||
@click="$refs.avatarEditor.toggle()"
|
||||
color="white"
|
||||
>Changer la couverture</v-btn>
|
||||
<div>
|
||||
<v-btn
|
||||
@click="$refs.avatarEditor.toggle()"
|
||||
color="white"
|
||||
>Changer la couverture</v-btn>
|
||||
<v-btn
|
||||
v-if="$store.state.data.cover !== null"
|
||||
class="ml-3"
|
||||
@click="clearCover()"
|
||||
color="white"
|
||||
icon
|
||||
outlined
|
||||
><v-icon>clear</v-icon></v-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<AvatarEditor
|
||||
|
|
@ -258,6 +268,11 @@ export default {
|
|||
return m
|
||||
})
|
||||
this.$store.commit('SET_DATA', { gallery })
|
||||
},
|
||||
clearCover () {
|
||||
this.$store.commit('SET_DATA', {
|
||||
cover: null
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ export default {
|
|||
data: () => ({
|
||||
logoLoading: false,
|
||||
rules: {
|
||||
descriptionShort: [v => v.length <= 100 || 'Au maximum 100 caractères'],
|
||||
descriptionShort: [v => v.length <= 200 || 'Au maximum 200 caractères'],
|
||||
logo: [v => !v || v.size < 2000000 || 'La taille du logo doit être inférieur à 2 Mega Octets!']
|
||||
}
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<v-btn small @click="fill()" class="mb-2">Préremplir</v-btn>
|
||||
<tiptap-vuetify
|
||||
v-model="$store.state.data.descriptionLong"
|
||||
:extensions="tiptapExtensions"
|
||||
|
|
@ -43,7 +44,7 @@ export default {
|
|||
OrderedList,
|
||||
[Heading, {
|
||||
options: {
|
||||
levels: [1, 2, 3]
|
||||
levels: [3, 4]
|
||||
}
|
||||
}],
|
||||
Bold,
|
||||
|
|
@ -51,6 +52,23 @@ export default {
|
|||
Paragraph,
|
||||
HardBreak
|
||||
]
|
||||
})
|
||||
}),
|
||||
|
||||
methods: {
|
||||
fill () {
|
||||
this.$store.commit('SET_DATA', {
|
||||
descriptionLong: `
|
||||
<h3>Niveau 3</h3>
|
||||
<p>Diam sit voluptua sadipscing sit et sit diam et labore, invidunt justo eos dolores dolores sit nonumy justo ea et, et eirmod diam kasd eos magna et justo gubergren, lorem at sit vero tempor aliquyam no labore et eos, vero clita no est sadipscing, duo lorem dolor accusam diam dolor diam elitr sit est, voluptua lorem duo elitr sea. Accusam.</p>
|
||||
|
||||
<h3>Niveau 2</h3>
|
||||
<p>Diam sit voluptua sadipscing sit et sit diam et labore, invidunt justo eos dolores dolores sit nonumy justo ea et, et eirmod diam kasd eos magna et justo gubergren, lorem at sit vero tempor aliquyam no labore et eos, vero clita no est sadipscing, duo lorem dolor accusam diam dolor diam elitr sit est, voluptua lorem duo elitr sea. Accusam.</p>
|
||||
|
||||
<h4>Niveau 4</h4>
|
||||
<p>Diam sit voluptua sadipscing sit et sit diam et labore, invidunt justo eos dolores dolores sit nonumy justo ea et, et eirmod diam kasd eos magna et justo gubergren, lorem at sit vero tempor aliquyam no labore et eos, vero clita no est sadipscing, duo lorem dolor accusam diam dolor diam elitr sit est, voluptua lorem duo elitr sea. Accusam.</p>
|
||||
`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -83,6 +83,9 @@
|
|||
label="Description/Sous Titre du tarif"
|
||||
hint="Optionel"
|
||||
/>
|
||||
<div class="d-flex justify-center">
|
||||
<v-btn small @click="loadDummy()">Préremplir</v-btn>
|
||||
</div>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn @click="itemModal = false" text color="primary">
|
||||
|
|
@ -121,24 +124,26 @@ export default {
|
|||
data: () => ({
|
||||
itemModal: false,
|
||||
mode: '',
|
||||
item: {
|
||||
defaultItem: {
|
||||
priceLabel: '',
|
||||
name: '',
|
||||
description: ''
|
||||
},
|
||||
item: {},
|
||||
toDelete: {},
|
||||
deleteModal: false,
|
||||
oldEdit: {}
|
||||
}),
|
||||
created () {
|
||||
this.item = JSON.parse('{"priceLabel":"3.14159 €","name":"Hippie","description":"Vomissures que ce juillets haleurs haleurs dont, roulant"}')
|
||||
},
|
||||
computed: {
|
||||
itemModalTitle () { return this.mode === 'add' ? 'Ajouter' : 'Editer' }
|
||||
},
|
||||
methods: {
|
||||
loadDummy () {
|
||||
this.item = JSON.parse('{"priceLabel":"3.14159 €","name":"Hippie","description":"Vomissures que ce juillets haleurs haleurs dont, roulant"}')
|
||||
},
|
||||
openAddModal () {
|
||||
this.mode = 'add'
|
||||
this.item = this.defaultItem
|
||||
this.itemModal = true
|
||||
},
|
||||
save () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue