forked from mirrors/easyappointments
Use the App.Vars prop
This commit is contained in:
parent
c53cd000d8
commit
c91bf6bf51
10 changed files with 47 additions and 47 deletions
|
@ -21,7 +21,7 @@ window.App.Http.Admins = (function () {
|
|||
const url = App.Utils.Url.siteUrl('admins/create');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
admin: admin
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,7 @@ window.App.Http.Admins = (function () {
|
|||
const url = App.Utils.Url.siteUrl('admins/update');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
admin: admin
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ window.App.Http.Admins = (function () {
|
|||
const url = App.Utils.Url.siteUrl('admins/destroy');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
admin_id: adminId
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,7 @@ window.App.Http.Admins = (function () {
|
|||
const url = App.Utils.Url.siteUrl('admins/search');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
keyword,
|
||||
limit,
|
||||
offset,
|
||||
|
@ -99,7 +99,7 @@ window.App.Http.Admins = (function () {
|
|||
const url = App.Utils.Url.siteUrl('admins/find');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
admin_id: adminId
|
||||
};
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ window.App.Http.Appointments = (function () {
|
|||
const url = App.Utils.Url.siteUrl('appointments/create');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
appointment: appointment
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,7 @@ window.App.Http.Appointments = (function () {
|
|||
const url = App.Utils.Url.siteUrl('appointments/update');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
appointment: appointment
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ window.App.Http.Appointments = (function () {
|
|||
const url = App.Utils.Url.siteUrl('appointments/destroy');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
appointment_id: appointmentId
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,7 @@ window.App.Http.Appointments = (function () {
|
|||
const url = App.Utils.Url.siteUrl('appointments/search');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
keyword,
|
||||
limit,
|
||||
offset,
|
||||
|
@ -99,7 +99,7 @@ window.App.Http.Appointments = (function () {
|
|||
const url = App.Utils.Url.siteUrl('appointments/find');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
appointment_id: appointmentId
|
||||
};
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ window.App.Http.Categories = (function () {
|
|||
const url = App.Utils.Url.siteUrl('categories/create');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
category: category
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,7 @@ window.App.Http.Categories = (function () {
|
|||
const url = App.Utils.Url.siteUrl('categories/update');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
category: category
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ window.App.Http.Categories = (function () {
|
|||
const url = App.Utils.Url.siteUrl('categories/destroy');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
category_id: categoryId
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,7 @@ window.App.Http.Categories = (function () {
|
|||
const url = App.Utils.Url.siteUrl('categories/search');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
keyword,
|
||||
limit,
|
||||
offset,
|
||||
|
@ -99,7 +99,7 @@ window.App.Http.Categories = (function () {
|
|||
const url = App.Utils.Url.siteUrl('categories/find');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
category_id: categoryId
|
||||
};
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ window.App.Http.Customers = (function () {
|
|||
const url = App.Utils.Url.siteUrl('customers/create');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
customer: customer
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,7 @@ window.App.Http.Customers = (function () {
|
|||
const url = App.Utils.Url.siteUrl('customers/update');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
customer: customer
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ window.App.Http.Customers = (function () {
|
|||
const url = App.Utils.Url.siteUrl('customers/destroy');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
customer_id: customerId
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,7 @@ window.App.Http.Customers = (function () {
|
|||
const url = App.Utils.Url.siteUrl('customers/search');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
keyword,
|
||||
limit,
|
||||
offset,
|
||||
|
@ -99,7 +99,7 @@ window.App.Http.Customers = (function () {
|
|||
const url = App.Utils.Url.siteUrl('customers/find');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
customer_id: customerId
|
||||
};
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ window.App.Http.Providers = (function () {
|
|||
const url = App.Utils.Url.siteUrl('providers/create');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
provider: provider
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,7 @@ window.App.Http.Providers = (function () {
|
|||
const url = App.Utils.Url.siteUrl('providers/update');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
provider: provider
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ window.App.Http.Providers = (function () {
|
|||
const url = App.Utils.Url.siteUrl('providers/destroy');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
provider_id: providerId
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,7 @@ window.App.Http.Providers = (function () {
|
|||
const url = App.Utils.Url.siteUrl('providers/search');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
keyword,
|
||||
limit,
|
||||
offset,
|
||||
|
@ -99,7 +99,7 @@ window.App.Http.Providers = (function () {
|
|||
const url = App.Utils.Url.siteUrl('providers/find');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
provider_id: providerId
|
||||
};
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ window.App.Http.Secretaries = (function () {
|
|||
const url = App.Utils.Url.siteUrl('secretaries/create');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
secretary: secretary
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,7 @@ window.App.Http.Secretaries = (function () {
|
|||
const url = App.Utils.Url.siteUrl('secretaries/update');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
secretary: secretary
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ window.App.Http.Secretaries = (function () {
|
|||
const url = App.Utils.Url.siteUrl('secretaries/destroy');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
secretary_id: secretaryId
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,7 @@ window.App.Http.Secretaries = (function () {
|
|||
const url = App.Utils.Url.siteUrl('secretaries/search');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
keyword,
|
||||
limit,
|
||||
offset,
|
||||
|
@ -99,7 +99,7 @@ window.App.Http.Secretaries = (function () {
|
|||
const url = App.Utils.Url.siteUrl('secretaries/find');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
secretary_id: secretaryId
|
||||
};
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ window.App.Http.Services = (function () {
|
|||
const url = App.Utils.Url.siteUrl('services/create');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
service: service
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,7 @@ window.App.Http.Services = (function () {
|
|||
const url = App.Utils.Url.siteUrl('services/update');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
service: service
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ window.App.Http.Services = (function () {
|
|||
const url = App.Utils.Url.siteUrl('services/destroy');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
service_id: serviceId
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,7 @@ window.App.Http.Services = (function () {
|
|||
const url = App.Utils.Url.siteUrl('services/search');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
keyword,
|
||||
limit,
|
||||
offset,
|
||||
|
@ -99,7 +99,7 @@ window.App.Http.Services = (function () {
|
|||
const url = App.Utils.Url.siteUrl('services/find');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
service_id: serviceId
|
||||
};
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ window.App.Http.Settings = (function () {
|
|||
const url = App.Utils.Url.siteUrl('settings/create');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
setting: setting
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,7 @@ window.App.Http.Settings = (function () {
|
|||
const url = App.Utils.Url.siteUrl('settings/update');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
setting: setting
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ window.App.Http.Settings = (function () {
|
|||
const url = App.Utils.Url.siteUrl('settings/destroy');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
setting_id: settingId
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,7 @@ window.App.Http.Settings = (function () {
|
|||
const url = App.Utils.Url.siteUrl('settings/search');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
keyword,
|
||||
limit,
|
||||
offset,
|
||||
|
@ -99,7 +99,7 @@ window.App.Http.Settings = (function () {
|
|||
const url = App.Utils.Url.siteUrl('settings/find');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
setting_id: settingId
|
||||
};
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ window.App.Http.Unavailabilities = (function () {
|
|||
const url = App.Utils.Url.siteUrl('unavailabilities/create');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
unavailability: unavailability
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,7 @@ window.App.Http.Unavailabilities = (function () {
|
|||
const url = App.Utils.Url.siteUrl('unavailabilities/update');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
unavailability: unavailability
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ window.App.Http.Unavailabilities = (function () {
|
|||
const url = App.Utils.Url.siteUrl('unavailabilities/destroy');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
unavailability_id: unavailabilityId
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,7 @@ window.App.Http.Unavailabilities = (function () {
|
|||
const url = App.Utils.Url.siteUrl('unavailabilities/search');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
keyword,
|
||||
limit,
|
||||
offset,
|
||||
|
@ -99,7 +99,7 @@ window.App.Http.Unavailabilities = (function () {
|
|||
const url = App.Utils.Url.siteUrl('unavailabilities/find');
|
||||
|
||||
const data = {
|
||||
csrf_token: App.Config.csrf_token,
|
||||
csrf_token: App.Vars.csrf_token,
|
||||
unavailability_id: unavailabilityId
|
||||
};
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ window.App.Utils.Url = (function () {
|
|||
* @return {String}
|
||||
*/
|
||||
function baseUrl(uri) {
|
||||
return `${App.Config.base_url}/${uri}`;
|
||||
return `${App.Vars.base_url}/${uri}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,7 +29,7 @@ window.App.Utils.Url = (function () {
|
|||
* @returns {String}
|
||||
*/
|
||||
function siteUrl(uri) {
|
||||
return `${App.Config.base_url}${App.Config.index_page ? '/' + App.Config.index_page : ''}/${uri}`;
|
||||
return `${App.Vars.base_url}${App.Vars.index_page ? '/' + App.Vars.index_page : ''}/${uri}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue