better date filter, fix event mail confirmation filter
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -8,6 +8,8 @@ uploads
|
||||
# local env files
|
||||
.env.production
|
||||
|
||||
db.sqlite
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
|
||||
@@ -5,7 +5,7 @@ an event manager for radical communities
|
||||
if something is not working as expected, it's expected :D
|
||||
|
||||
#### Install
|
||||
We provide a docker way to run **gancio**.
|
||||
We provide a docker way to run **gancio** but you can also manually install it.
|
||||
```
|
||||
git clone https://git.lattuga.net/lesion/gancio.git
|
||||
cd gancio
|
||||
@@ -33,4 +33,9 @@ cd client
|
||||
yarn
|
||||
# run front-end in development mode
|
||||
yarn dev
|
||||
```
|
||||
```
|
||||
|
||||
|
||||
#### Migrate / Backup
|
||||
- db
|
||||
- images
|
||||
|
||||
@@ -30,7 +30,7 @@ const eventController = {
|
||||
if (!filters) return true
|
||||
|
||||
// check for visibility
|
||||
if (filters.is_visible && filters.is_visible !== event.is_visible) return false
|
||||
if (typeof filters.is_visible !== 'undefined' && filters.is_visible !== event.is_visible) return false
|
||||
|
||||
if (!filters.tags && !filters.places) return true
|
||||
if (!filters.tags.length && !filters.places.length) return true
|
||||
@@ -136,8 +136,13 @@ const eventController = {
|
||||
},
|
||||
|
||||
async getAll (req, res) {
|
||||
const start = moment().year(req.params.year).month(req.params.month).startOf('month').subtract(1, 'week')
|
||||
const end = moment().year(req.params.year).month(req.params.month).endOf('month').add(1, 'week')
|
||||
// this is due how v-calendar shows dates
|
||||
let start = moment().year(req.params.year).month(req.params.month)
|
||||
.startOf('month').startOf('isoWeek')
|
||||
let end = moment().year(req.params.year).month(req.params.month).endOf('month')
|
||||
const shownDays = end.diff(start, 'days')
|
||||
if (shownDays <= 34) end = end.add(1, 'week')
|
||||
end = end.endOf('isoWeek')
|
||||
const events = await Event.findAll({
|
||||
where: {
|
||||
is_visible: true,
|
||||
|
||||
@@ -45,7 +45,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
let color = event.tags.length && event.tags[0].color ? event.tags[0].color : 'rgba(200,200,200,0.5)'
|
||||
let color = event.tags.length && event.tags[0].color ? event.tags[0].color : 'rgba(170,170,250,0.7)'
|
||||
if (event.past) color = 'rgba(200,200,200,0.5)'
|
||||
if (event.multidate) {
|
||||
e.dates = {
|
||||
|
||||
@@ -18,7 +18,7 @@ services:
|
||||
ports:
|
||||
- '12300:12300'
|
||||
volumes:
|
||||
- ./app/uploads:/usr/src/app/app/uploads
|
||||
- ./uploads:/usr/src/app/uploads
|
||||
|
||||
links:
|
||||
- db
|
||||
|
||||
Reference in New Issue
Block a user