Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
STG-LV-Havana 2021-05-10 08:39:04 +03:00
commit b02b208af0
6 changed files with 41 additions and 31 deletions

View file

@ -234,12 +234,16 @@ module.exports = {
}, },
copyToClipBoard(text) { copyToClipBoard(text) {
const getUrl = window.location; const getUrl = window.location;
const baseUrl = let baseUrl =
getUrl.protocol + getUrl.protocol +
"//" + "//" +
getUrl.host + getUrl.host +
"/" + "/" +
getUrl.pathname.split("/")[1]; getUrl.pathname.split("/")[1];
if (baseUrl.endsWith("/")) {
baseUrl = baseUrl.slice(0, -1);
}
navigator.clipboard.writeText(`${baseUrl}${text}`).then( navigator.clipboard.writeText(`${baseUrl}${text}`).then(
function () { function () {
alert("lien copié dans le presse-papier"); alert("lien copié dans le presse-papier");

View file

@ -171,8 +171,11 @@
<script> <script>
const getUrl = window.location; const getUrl = window.location;
const baseUrl = let baseUrl =
getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1]; getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
if (baseUrl.endsWith("/")) {
baseUrl = baseUrl.slice(0, -1);
}
module.exports = { module.exports = {
data() { data() {
return { return {
@ -236,9 +239,9 @@ module.exports = {
url: `${baseUrl}/ws/agenda/calendars/${this.$route.query.id}`, url: `${baseUrl}/ws/agenda/calendars/${this.$route.query.id}`,
data: this.editionProgram, data: this.editionProgram,
}); });
console.log(success) console.log(success);
swal("Succès!", "L'agenda a été modifié", "success").then((value) => { swal("Succès!", "L'agenda a été modifié", "success").then((value) => {
this.program = {...this.editionProgram} this.program = { ...this.editionProgram };
this.isEditMode = false; this.isEditMode = false;
}); });
} catch (error) { } catch (error) {

View file

@ -28,10 +28,10 @@
<span class="block">{{ selectedDate.toISOString() }}</span> <span class="block">{{ selectedDate.toISOString() }}</span>
<label class="block space-top"> <!-- <label class="block space-top">
<span>image</span> <span>image</span>
<input type="text" v-model="img" /> <input type="text" v-model="img" />
</label> </label> -->
<label class="block space-top"> <label class="block space-top">
<span>URL (si nécessaire)</span> <span>URL (si nécessaire)</span>
@ -67,7 +67,6 @@
</div> </div>
</template> </template>
<style scoped> <style scoped>
.box-container { .box-container {
border: 1px solid #a1a3a1; border: 1px solid #a1a3a1;
@ -130,11 +129,13 @@
} }
</style> </style>
<script> <script>
const getUrl = window.location; const getUrl = window.location;
const baseUrl = let baseUrl =
getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1]; getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
if (baseUrl.endsWith("/")) {
baseUrl = baseUrl.slice(0, -1);
}
module.exports = { module.exports = {
data() { data() {
return { return {
@ -142,7 +143,7 @@ module.exports = {
text: "", text: "",
expirationDate: "", expirationDate: "",
url: "", url: "",
img: "", //img: "",
selectedDate: new Date(), selectedDate: new Date(),
timezone: "", timezone: "",
isInserted: false, isInserted: false,
@ -170,7 +171,7 @@ module.exports = {
date: selectedDate, date: selectedDate,
}, },
}); });
console.log(resp) console.log(resp);
this.name = ""; this.name = "";
this.text = ""; this.text = "";
@ -179,7 +180,6 @@ module.exports = {
this.selectedDate = new Date(); this.selectedDate = new Date();
swal("Succès!", "L'agenda a été créé", "success"); swal("Succès!", "L'agenda a été créé", "success");
} catch (error) { } catch (error) {
swal("Erreur!", `${error}`, "error"); swal("Erreur!", `${error}`, "error");
console.error(error); console.error(error);

View file

@ -56,17 +56,14 @@
<img <img
alt="image" alt="image"
class="category-picture" class="category-picture"
src='assets/img/calendar.png' src="assets/img/calendar.png"
/> />
</div> </div>
<div> <div>
<h2 v-bind:title="program.title">{{ program.title }}</h2> <h2 v-bind:title="program.title">{{ program.title }}</h2>
</div> </div>
<div class="card-footer light-color"> <div class="card-footer light-color">
<span <span>Le {{ new Date(program.date).toLocaleString() }}</span>
>Le
{{ new Date(program.date).toLocaleString() }}</span
>
</div> </div>
</router-link> </router-link>
</div> </div>
@ -107,8 +104,11 @@
<script> <script>
const getUrl = window.location; const getUrl = window.location;
const baseUrl = let baseUrl =
getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1]; getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
if (baseUrl.endsWith("/")) {
baseUrl = baseUrl.slice(0, -1);
}
module.exports = { module.exports = {
data() { data() {
return { return {

View file

@ -65,9 +65,7 @@
@click="vote(subtheme, `NEUTRAL`)" @click="vote(subtheme, `NEUTRAL`)"
v-if="checkVoteAvalaibility(subtheme.id)" v-if="checkVoteAvalaibility(subtheme.id)"
> >
<span <span>Participation possible | {{ subtheme.neutral }}</span>
>Participation possible | {{ subtheme.neutral }}</span
>
</button> </button>
</td> </td>
</tr> </tr>
@ -88,7 +86,9 @@
:key="subtheme.id" :key="subtheme.id"
class="text-centered" class="text-centered"
> >
<span class="nb-total-vote">{{ subtheme.for }} participant(s) </span> <span class="nb-total-vote"
>{{ subtheme.for }} participant(s)
</span>
</td> </td>
</tr> </tr>
</table> </table>
@ -212,8 +212,11 @@
</style> </style>
<script> <script>
const getUrl = window.location; const getUrl = window.location;
const baseUrl = let baseUrl =
getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1]; getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
if (baseUrl.endsWith("/")) {
baseUrl = baseUrl.slice(0, -1);
}
module.exports = { module.exports = {
data() { data() {
return { return {
@ -276,7 +279,7 @@ module.exports = {
(el) => el.subThemeId.id || el.subThemeId (el) => el.subThemeId.id || el.subThemeId
); );
const arr = filteredBySubTheme.filter(el => el == _subthemeId); const arr = filteredBySubTheme.filter((el) => el == _subthemeId);
return arr.length <= 0; return arr.length <= 0;
}, },

View file

@ -241,11 +241,9 @@
</button> </button>
</div> </div>
</base-layout> </base-layout>
</div> </div>
</template> </template>
<style scoped> <style scoped>
.box-container { .box-container {
border: 1px solid #a1a3a1; border: 1px solid #a1a3a1;
@ -313,11 +311,13 @@
} }
</style> </style>
<script> <script>
const getUrl = window.location; const getUrl = window.location;
const baseUrl = let baseUrl =
getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1]; getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
if (baseUrl.endsWith("/")) {
baseUrl = baseUrl.slice(0, -1);
}
Vue.component("modal", { Vue.component("modal", {
template: "#modal-template", template: "#modal-template",
}); });