Skip to content

Commit

Permalink
Merge branch 'release/1.3.0' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
adufr committed Aug 26, 2020
2 parents 71d344e + f1b69e1 commit d86517b
Show file tree
Hide file tree
Showing 41 changed files with 4,780 additions and 3,389 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ notifications:
email: false

node_js:
- "10.15.3"
- "12.18.2"

before_install:
- openssl aes-256-cbc -K $encrypted_d78b2961cf46_key -iv $encrypted_d78b2961cf46_iv
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

# Node latest LTS 10.15.3 with alpine
# Node latest LTS 12.18.2 with alpine
# (a lightweight distribution)
FROM node:10.15.3-alpine
FROM node:12.18.2-alpine
LABEL maintainer="Calendz. <https://calendz.app/>"

# creates a directory for the app
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

Ce repository représente le front de calendz.

## Ecosystème
## Écosystème

Le front de calendz est développé avec les frameworks et outils suivants* :

Expand All @@ -30,7 +30,7 @@ Le front de calendz est développé avec les frameworks et outils suivants* :
| [vee-validate] | 2.2.11 | Template Based Validation Framework for Vue.js |
| [Babel] | 7.4.5 | Babel is a compiler for writing next generation JavaScript. |
| [Node-sass] | 4.12.0 | Node.js bindings to libsass. |
| [Boostrap] | 4.3.1 | The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web. |
| [Bootstrap] | 4.3.1 | The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web. |

**(Liste non exhaustive, uniquement les librairies principales sont présentées)*

Expand All @@ -42,8 +42,8 @@ Le front de calendz est développé avec les frameworks et outils suivants* :
* Créer un fichier `.env` à la source de ce repository contenant les valeurs suivantes (modifiables selon vos besoins)

NODE_ENV=development
APP_PORT=3000
VUE_APP_API_URL=http://localhost:3001/v1
VUE_APP_API_CALENDAR_URL=http://localhost:3000/v1

### Lancement

Expand All @@ -59,4 +59,4 @@ Le front de calendz est développé avec les frameworks et outils suivants* :
[vee-validate]: https://github.com/baianat/vee-validate
[Babel]: https://github.com/babel/babel
[Node-sass]: https://github.com/sass/node-sass
[Boostrap]: https://github.com/twbs/bootstrap
[Bootstrap]: https://github.com/twbs/bootstrap
6,680 changes: 3,787 additions & 2,893 deletions package-lock.json

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions package.json
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "calendz-front",
"version": "1.2.9",
"version": "1.3.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand All @@ -10,50 +10,50 @@
"test": "npm run lint"
},
"dependencies": {
"@fullcalendar/core": "^4.0.2",
"@fullcalendar/daygrid": "^4.0.1",
"@fullcalendar/interaction": "^4.0.2",
"@fullcalendar/timegrid": "^4.0.1",
"@fullcalendar/vue": "^4.0.2-beta",
"@fullcalendar/core": "^4.4.2",
"@fullcalendar/daygrid": "^4.4.2",
"@fullcalendar/interaction": "^4.4.2",
"@fullcalendar/timegrid": "^4.4.2",
"@fullcalendar/vue": "^4.4.2",
"@saeris/vue-spinners": "^1.0.8",
"axios": "^0.19.0",
"bootstrap": "^4.3.1",
"chart.js": "^2.7.1",
"date-fns": "^1.30.1",
"dropzone": "^5.5.1",
"element-ui": "2.4.11",
"axios": "^0.20.0",
"bootstrap": "4.3.1",
"chart.js": "^2.9.3",
"date-fns": "^2.15.0",
"dropzone": "^5.7.2",
"element-ui": "2.13.2",
"es6-promise": "^4.1.1",
"flatpickr": "^4.5.7",
"fuse.js": "^3.2.0",
"nouislider": "^12.1.0",
"perfect-scrollbar": "^1.3.0",
"flatpickr": "^4.6.6",
"fuse.js": "^3.6.1",
"nouislider": "^14.6.1",
"perfect-scrollbar": "^1.5.0",
"quill": "^1.3.7",
"register-service-worker": "^1.6.2",
"sweetalert2": "^8.15.1",
"vee-validate": "^2.2.4",
"vue": "^2.6.10",
"vue-analytics": "^5.17.2",
"vue-chartjs": "^3.4.0",
"vue-clipboard2": "^0.3.0",
"vue-flatpickr-component": "^8.1.2",
"vue-router": "^3.0.6",
"vue2-touch-events": "^2.0.1",
"vue2-transitions": "^0.2.3",
"vuex": "^3.1.1"
"register-service-worker": "^1.7.1",
"sweetalert2": "^9.17.1",
"vee-validate": "^2.2.15",
"vue": "^2.6.12",
"vue-analytics": "^5.22.1",
"vue-chartjs": "^3.5.1",
"vue-clipboard2": "^0.3.1",
"vue-flatpickr-component": "^8.1.5",
"vue-router": "^3.4.3",
"vue2-touch-events": "^2.3.1",
"vue2-transitions": "^0.3.0",
"vuex": "^3.5.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.7.0",
"@vue/cli-plugin-eslint": "^3.7.0",
"@vue/cli-plugin-pwa": "^3.11.0",
"@vue/cli-service": "^3.7.0",
"@vue/cli-plugin-babel": "^3.12.1",
"@vue/cli-plugin-eslint": "^3.12.1",
"@vue/cli-plugin-pwa": "^3.12.1",
"@vue/cli-service": "^3.12.1",
"@vue/eslint-config-standard": "^4.0.0",
"babel-plugin-component": "^1.1.0",
"commitizen": "^4.0.3",
"cz-conventional-changelog": "^3.0.2",
"husky": "^3.0.2",
"node-sass": "^4.12.0",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.6.10"
"commitizen": "^4.2.1",
"cz-conventional-changelog": "^3.2.1",
"husky": "^4.2.5",
"node-sass": "^4.14.1",
"sass-loader": "^9.0.3",
"vue-template-compiler": "^2.6.12"
},
"babel": {
"presets": [
Expand Down
3 changes: 1 addition & 2 deletions src/components/Charts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ function chartOptions (Chart) {
},
ticks: {
padding: 20
},
maxBarThickness: 10
}
})

return options
Expand Down
5 changes: 3 additions & 2 deletions src/components/Inputs/HtmlEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
</div>
</template>
<script>
import Quill from 'quill'
import 'quill/dist/quill.core.css'
export default {
name: 'HtmlEditor',
props: {
Expand Down Expand Up @@ -55,8 +58,6 @@ export default {
}
},
async mounted () {
let Quill = await import('quill')
Quill = Quill.default || Quill
this.editorId = this.randomString()
this.toolbarId = this.randomString()
this.$nextTick(() => {
Expand Down
9 changes: 2 additions & 7 deletions src/components/Inputs/custom/GradeSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class="form-control">
<option
value=""
hidden>Sélectionnez votre niveau</option>
hidden>Votre niveau</option>
<option
v-for="(option, index) in options"
:key="index"
Expand All @@ -26,8 +26,6 @@
</template>

<script>
import store from '@/store'
export default {
props: {
value: {
Expand Down Expand Up @@ -77,7 +75,7 @@ export default {
]
default:
return [
{ value: 'Sélectionnez votre niveau' }
{ value: 'Votre niveau' }
]
}
}
Expand All @@ -87,9 +85,6 @@ export default {
this.$emit('input', newVal)
}
},
mounted () {
this.inputValue = store.getters['account/isLoggedIn'] ? store.state.account.user.grade : ''
},
methods: {
getError (name) {
return this.errors.first(name)
Expand Down
6 changes: 1 addition & 5 deletions src/components/Inputs/custom/GroupsSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
class="form-control">
<option
value=""
hidden>Séléctionnez votre groupe</option>
hidden>Votre groupe</option>
<option
v-for="(option, index) in options"
:key="index"
Expand All @@ -52,7 +52,6 @@
</template>

<script>
import store from '@/store'
import { Select, Option } from 'element-ui'
export default {
Expand Down Expand Up @@ -143,9 +142,6 @@ export default {
this.$emit('input', newVal)
}
},
mounted () {
this.inputValue = store.getters['account/isLoggedIn'] ? store.state.account.user.group : ''
},
methods: {
getError (name) {
return this.errors.first(name)
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Vue.use(VueAnalytics, {

// Set the base URL of the API
ApiService.init(process.env.VUE_APP_API_URL)
ApiCalendarService.init(process.env.VUE_APP_API_CALENDAR_URL, process.env.VUE_APP_API_CALENDAR_TOKEN)
ApiCalendarService.init(process.env.VUE_APP_API_CALENDAR_URL)

/* eslint-disable no-new */
new Vue({
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/veeCustom/customValidators.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Validator.extend('valid_city', {
validate: value => [
'Arras', 'Auxerre', 'Bordeaux', 'Brest',
'Grenoble', 'Lille', 'Lyon', 'Montpellier',
'Nantes', 'Paris', 'Dakar'].indexOf(value) !== -1
'Nantes', 'Paris', 'Rennes', 'Toulouse', 'Dakar'].indexOf(value) !== -1
})

Validator.extend('valid_task_type', {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ router.beforeEach((to, from, next) => {

// if user isn't connected, redirect him to login
if (to.matched.some(record => record.meta.requiresAuth)) {
if (!store.getters['account/isLoggedIn']) return router.push('/login')
if (!store.getters['account/isLoggedIn']) return router.push(`/login?redirect=${to.fullPath}`)
}

// if user isn't admin, redirect him to main dashboard
Expand Down
60 changes: 6 additions & 54 deletions src/services/api-calendar.service.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Vue from 'vue'
import axios from 'axios'

const apiCalendar = axios.create()

const ApiCalendarService = {
init (baseURL, token) {
init (baseURL) {
apiCalendar.defaults.baseURL = baseURL
apiCalendar.defaults.headers.common['x-access-token'] = token
apiCalendar.interceptors.response.use(response => {
return response
}, err => {
Expand All @@ -22,52 +22,8 @@ const ApiCalendarService = {

get (resource) {
return apiCalendar.get(resource)
.then(response => {
return response
})
.catch(error => {
return Promise.reject(error)
})
},

post (resource, data) {
return apiCalendar.post(resource, data)
.then(response => {
return response
})
.catch(error => {
return Promise.reject(error)
})
},

put (resource, data) {
return apiCalendar.put(resource, data)
.then(response => {
return response
})
.catch(error => {
return Promise.reject(error)
})
},

patch (resource, data) {
return apiCalendar.patch(resource, data)
.then(response => {
return response
})
.catch(error => {
return Promise.reject(error)
})
},

delete (resource) {
return apiCalendar.delete(resource)
.then(response => {
return response
})
.catch(error => {
return Promise.reject(error)
})
.then(response => response)
.catch(error => Promise.reject(error))
},

/**
Expand All @@ -83,12 +39,8 @@ const ApiCalendarService = {
**/
customRequest (data) {
return apiCalendar(data)
.then(response => {
return response
})
.catch(error => {
return Promise.reject(error)
})
.then(response => response)
.catch(error => Promise.reject(error))
}
}

Expand Down
Loading

0 comments on commit d86517b

Please sign in to comment.