Add a default limit participations of 10, fix dockerfile and lint some things
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -289,6 +289,8 @@ import IdentityPickerWrapper from '@/views/Account/IdentityPickerWrapper.vue';
|
||||
import { RouteName } from '@/router';
|
||||
import 'intersection-observer';
|
||||
|
||||
const DEFAULT_LIMIT_NUMBER_OF_PLACES = 10;
|
||||
|
||||
@Component({
|
||||
components: { IdentityPickerWrapper, AddressAutoComplete, TagInput, DateTimePicker, PictureUpload, Editor: EditorComponent },
|
||||
apollo: {
|
||||
@@ -576,10 +578,12 @@ export default class EditEvent extends Vue {
|
||||
|
||||
@Watch('limitedPlaces')
|
||||
updatedEventCapacityOptions(limitedPlaces: boolean) {
|
||||
if (! limitedPlaces) {
|
||||
this.event.options.maximumAttendeeCapacity = 0
|
||||
this.event.options.remainingAttendeeCapacity = 0
|
||||
this.event.options.showRemainingAttendeeCapacity = false
|
||||
if (!limitedPlaces) {
|
||||
this.event.options.maximumAttendeeCapacity = 0;
|
||||
this.event.options.remainingAttendeeCapacity = 0;
|
||||
this.event.options.showRemainingAttendeeCapacity = false;
|
||||
} else {
|
||||
this.event.options.maximumAttendeeCapacity = this.event.options.maximumAttendeeCapacity || DEFAULT_LIMIT_NUMBER_OF_PLACES;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ export default class SendPasswordReset extends Vue {
|
||||
}
|
||||
|
||||
removeError(message: string) {
|
||||
this.errors.splice(this.errors.indexOf(message))
|
||||
this.errors.splice(this.errors.indexOf(message));
|
||||
}
|
||||
|
||||
async sendResetPasswordTokenAction(e) {
|
||||
@@ -81,7 +81,7 @@ export default class SendPasswordReset extends Vue {
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
err.graphQLErrors.forEach(({ message }) => {
|
||||
if (this.errors.indexOf(message) < 0){
|
||||
if (this.errors.indexOf(message) < 0) {
|
||||
this.errors.push(message);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user