mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 10:02:33 +03:00
Converted normal functions to arrow functions
This commit is contained in:
parent
34fbd2060d
commit
f14643725d
2 changed files with 6 additions and 6 deletions
|
@ -48,7 +48,7 @@ App.Pages.Account = (function () {
|
||||||
|
|
||||||
let missingRequiredFields = false;
|
let missingRequiredFields = false;
|
||||||
|
|
||||||
$('#account .required').each(function (index, requiredField) {
|
$('#account .required').each((index, requiredField) => {
|
||||||
const $requiredField = $(requiredField);
|
const $requiredField = $(requiredField);
|
||||||
|
|
||||||
if (!$requiredField.val()) {
|
if (!$requiredField.val()) {
|
||||||
|
@ -154,7 +154,7 @@ App.Pages.Account = (function () {
|
||||||
|
|
||||||
const account = serialize();
|
const account = serialize();
|
||||||
|
|
||||||
App.Http.Account.save(account).done(function () {
|
App.Http.Account.save(account).done(() => {
|
||||||
Backend.displayNotification(App.Lang.settings_saved);
|
Backend.displayNotification(App.Lang.settings_saved);
|
||||||
|
|
||||||
$footerUserDisplayName.text('Hello, ' + $firstName.val() + ' ' + $lastName.val() + '!');
|
$footerUserDisplayName.text('Hello, ' + $firstName.val() + ' ' + $lastName.val() + '!');
|
||||||
|
|
|
@ -30,7 +30,7 @@ App.Pages.GeneralSettings = (function () {
|
||||||
|
|
||||||
let missingRequiredFields = false;
|
let missingRequiredFields = false;
|
||||||
|
|
||||||
$('#general-settings .required').each(function (index, requiredField) {
|
$('#general-settings .required').each((index, requiredField) => {
|
||||||
const $requiredField = $(requiredField);
|
const $requiredField = $(requiredField);
|
||||||
|
|
||||||
if (!$requiredField.val()) {
|
if (!$requiredField.val()) {
|
||||||
|
@ -51,7 +51,7 @@ App.Pages.GeneralSettings = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
function serialize(generalSettings) {
|
function serialize(generalSettings) {
|
||||||
generalSettings.forEach(function (generalSetting) {
|
generalSettings.forEach((generalSetting) => {
|
||||||
$('[data-field="' + generalSetting.name + '"]').val(generalSetting.value);
|
$('[data-field="' + generalSetting.name + '"]').val(generalSetting.value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ App.Pages.GeneralSettings = (function () {
|
||||||
function deserialize() {
|
function deserialize() {
|
||||||
const generalSettings = [];
|
const generalSettings = [];
|
||||||
|
|
||||||
$('[data-field]').each(function (index, field) {
|
$('[data-field]').each((index, field) => {
|
||||||
const $field = $(field);
|
const $field = $(field);
|
||||||
|
|
||||||
generalSettings.push({
|
generalSettings.push({
|
||||||
|
@ -83,7 +83,7 @@ App.Pages.GeneralSettings = (function () {
|
||||||
|
|
||||||
const generalSettings = deserialize();
|
const generalSettings = deserialize();
|
||||||
|
|
||||||
App.Http.GeneralSettings.save(generalSettings).done(function () {
|
App.Http.GeneralSettings.save(generalSettings).done(() => {
|
||||||
Backend.displayNotification(App.Lang.settings_saved);
|
Backend.displayNotification(App.Lang.settings_saved);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue