Commit 69021457 authored by Mike Greiling's avatar Mike Greiling

resolve camelcase violations

parent c4fae77e
/* eslint-disable no-var, camelcase, vars-on-top, object-shorthand, comma-dangle, eqeqeq, no-mixed-operators, no-return-assign, newline-per-chained-call, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, prefer-template, quotes, no-unused-vars, no-else-return, max-len, class-methods-use-this */ /* eslint-disable no-var, vars-on-top, object-shorthand, comma-dangle, eqeqeq, no-mixed-operators, no-return-assign, newline-per-chained-call, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, prefer-template, quotes, no-unused-vars, no-else-return, max-len, class-methods-use-this */
import d3 from 'd3'; import d3 from 'd3';
...@@ -9,8 +9,8 @@ const LOADING_HTML = ` ...@@ -9,8 +9,8 @@ const LOADING_HTML = `
`; `;
export default class ActivityCalendar { export default class ActivityCalendar {
constructor(timestamps, calendar_activities_path) { constructor(timestamps, calendarActivitiesPath) {
this.calendar_activities_path = calendar_activities_path; this.calendarActivitiesPath = calendarActivitiesPath;
this.clickDay = this.clickDay.bind(this); this.clickDay = this.clickDay.bind(this);
this.currentSelectedDate = ''; this.currentSelectedDate = '';
this.daySpace = 1; this.daySpace = 1;
...@@ -209,15 +209,12 @@ export default class ActivityCalendar { ...@@ -209,15 +209,12 @@ export default class ActivityCalendar {
} }
clickDay(stamp) { clickDay(stamp) {
var formatted_date;
if (this.currentSelectedDate !== stamp.date) { if (this.currentSelectedDate !== stamp.date) {
this.currentSelectedDate = stamp.date; this.currentSelectedDate = stamp.date;
formatted_date = this.currentSelectedDate.getFullYear() + "-" + (this.currentSelectedDate.getMonth() + 1) + "-" + this.currentSelectedDate.getDate(); const date = this.currentSelectedDate.getFullYear() + "-" + (this.currentSelectedDate.getMonth() + 1) + "-" + this.currentSelectedDate.getDate();
return $.ajax({ return $.ajax({
url: this.calendar_activities_path, url: this.calendarActivitiesPath,
data: { data: { date },
date: formatted_date
},
cache: false, cache: false,
dataType: 'html', dataType: 'html',
beforeSend: () => $('.user-calendar-activities').html(LOADING_HTML), beforeSend: () => $('.user-calendar-activities').html(LOADING_HTML),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment