forked from mirrors/easyappointments
Merge branch 'master' into develop
This commit is contained in:
commit
299c840d28
150 changed files with 586 additions and 509 deletions
20
CHANGELOG.md
20
CHANGELOG.md
|
@ -6,6 +6,25 @@ developers to maintain and readjust their custom modifications on the main proje
|
|||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.3.1]
|
||||
|
||||
### Added
|
||||
|
||||
- #410: Time format from American style to European
|
||||
- #441: Added time format selection
|
||||
- #452: Provide more information when errors occur during the installation.
|
||||
|
||||
## Fixed
|
||||
|
||||
- #433: Selected date when editing an appointment
|
||||
- #436: All days unavailable in agendaDay view
|
||||
- #438: Error on update process from 1.2.1 to 1.3.0
|
||||
- #440: Correct label text for customer phone number in back-end calendar event popup.
|
||||
- #453: Unavailable periods not taken into account when more than one customer
|
||||
- #455: French Spelling
|
||||
- #459: Aggregate Appointment API crashes when a break was added
|
||||
- #461: Invalid working plan parsing for foreign languages on day view of the default calendar view.
|
||||
|
||||
## [1.3.0]
|
||||
|
||||
### Added
|
||||
|
@ -28,7 +47,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
- #401: Replace loading spinner graphic with a newer one.
|
||||
- #403: All calendars will start with Sunday as the first day.
|
||||
|
||||
|
||||
### Fixed
|
||||
|
||||
- #155: Appointment management modal is not updated after appointment duration resize.
|
||||
|
|
|
@ -39,6 +39,6 @@ class Config {
|
|||
}
|
||||
```
|
||||
|
||||
*This document applies to Easy!Appointments v1.3.0.*
|
||||
*This document applies to Easy!Appointments v1.3.1.*
|
||||
|
||||
[Back](readme.md)
|
||||
|
|
|
@ -54,6 +54,6 @@ You get this warning because PHP is not configured with a timezone setting. This
|
|||
`date_default_timezone_set('America/Los_Angeles'); // Use your own timezone string.`
|
||||
|
||||
|
||||
*This document applies to Easy!Appointments v1.3.0.*
|
||||
*This document applies to Easy!Appointments v1.3.1.*
|
||||
|
||||
[Back](readme.md)
|
||||
|
|
|
@ -20,6 +20,6 @@ You are more than welcome to help with the translation progress of the user inte
|
|||
|
||||
It would be much appreciated if you would take 5 minutes of your time to fill this small form on your experience with Easy!Appointments. User feedback is very important and will help with the future planning of the project. Fill the [E!A Feedback Form](https://docs.google.com/forms/d/15dw1jl7lUgw4q-XXMn13Gx_e8zJxAiyWYMOdqtZqIHU/viewform).
|
||||
|
||||
*This document applies to Easy!Appointments v1.3.0.*
|
||||
*This document applies to Easy!Appointments v1.3.1.*
|
||||
|
||||
[Back](readme.md)
|
||||
|
|
|
@ -49,6 +49,6 @@ Google Developers – https://developers.google.com/google-apps/calendar
|
|||
|
||||
E!A Support Group – https://groups.google.com/forum/#!forum/easy-appointments
|
||||
|
||||
*This document applies to Easy!Appointments v1.3.0.*
|
||||
*This document applies to Easy!Appointments v1.3.1.*
|
||||
|
||||
[Back](readme.md)
|
||||
|
|
|
@ -29,6 +29,6 @@ Finally just add a link in your website that points to your Easy!Appointments in
|
|||
|
||||
Happy Bookin'!
|
||||
|
||||
*This document applies to Easy!Appointments v1.3.0.*
|
||||
*This document applies to Easy!Appointments v1.3.1.*
|
||||
|
||||
[Back](readme.md)
|
||||
|
|
|
@ -14,6 +14,6 @@ Easy!Appointments is based upon CodeIgniter (PHP Framework) and it uses its buil
|
|||
|
||||
Follow these steps in order to add or adjust your translations and modify the message of the user interface of Easy!Appointments. If you want contribute to the translation process of Easy!Appointments please read the [Get Involved](https://github.com/alextselegidis/easyappointments/wiki/Get-Involved!) wiki page for more information. Please share your translations with the user community.
|
||||
|
||||
*This document applies to Easy!Appointments v1.3.0.*
|
||||
*This document applies to Easy!Appointments v1.3.1.*
|
||||
|
||||
[Back](readme.md)
|
||||
|
|
|
@ -10,4 +10,4 @@ Welcome to the documentation pages of Easy!Appointments. Navigate through the av
|
|||
- [Docker](docker.md)
|
||||
- [FAQ](faq.md)
|
||||
|
||||
*This document applies to Easy!Appointments v1.3.0.*
|
||||
*This document applies to Easy!Appointments v1.3.1.*
|
||||
|
|
|
@ -443,6 +443,6 @@ fastcgi_param PHP_AUTH_PW $http_authorization;
|
|||
|
||||
[[Source]](http://serverfault.com/a/520943)
|
||||
|
||||
*This document applies to Easy!Appointments v1.3.0.*
|
||||
*This document applies to Easy!Appointments v1.3.1.*
|
||||
|
||||
[Back](readme.md)
|
||||
|
|
|
@ -16,6 +16,6 @@ Version v1.2 introduces two new folders in the root directory of the project, th
|
|||
|
||||
Many core files were changed in v1.1 and it would be better if you replace all the Easy!Appointments files of version 1.0 with the new ones. Use the data of the old `configuration.php` file in the new `config.php` and open the `http://url-to-ea-installation/index.php/backend/update` as already mentioned. Your new version should work just fine!
|
||||
|
||||
*This document applies to Easy!Appointments v1.3.0.*
|
||||
*This document applies to Easy!Appointments v1.3.1.*
|
||||
|
||||
[Back](readme.md)
|
||||
|
|
16
package-lock.json
generated
16
package-lock.json
generated
|
@ -1090,7 +1090,7 @@
|
|||
"integrity": "sha1-C5tiseaX1S05wRGK+eTkEeUEVZA=",
|
||||
"requires": {
|
||||
"jquery": "3.2.1",
|
||||
"moment": "2.19.1"
|
||||
"moment": "2.21.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"jquery": {
|
||||
|
@ -1791,7 +1791,7 @@
|
|||
"escape-string-regexp": "1.0.5",
|
||||
"js2xmlparser": "3.0.0",
|
||||
"klaw": "2.0.0",
|
||||
"marked": "0.3.6",
|
||||
"marked": "0.3.17",
|
||||
"mkdirp": "0.5.1",
|
||||
"requizzle": "0.2.1",
|
||||
"strip-json-comments": "2.0.1",
|
||||
|
@ -2118,9 +2118,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"marked": {
|
||||
"version": "0.3.6",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz",
|
||||
"integrity": "sha1-ssbGGPzOzk74bE/Gy4p8v1rtqNc=",
|
||||
"version": "0.3.17",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-0.3.17.tgz",
|
||||
"integrity": "sha512-+AKbNsjZl6jFfLPwHhWmGTqE009wTKn3RTmn9K8oUKHrX/abPJjtcRtXpYB/FFrwPJRUA86LX/de3T0knkPCmQ==",
|
||||
"dev": true
|
||||
},
|
||||
"micromatch": {
|
||||
|
@ -2177,9 +2177,9 @@
|
|||
}
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.19.1",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.19.1.tgz",
|
||||
"integrity": "sha1-VtoaLRy/AdOLfhr8McELz6GSkWc="
|
||||
"version": "2.21.0",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.21.0.tgz",
|
||||
"integrity": "sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ=="
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"del": "^2.2.0",
|
||||
"fs-extra": "^0.26.3",
|
||||
"gulp": "^3.9.0",
|
||||
"jsdoc": "^3.3.2",
|
||||
"jsdoc": "^3.5.5",
|
||||
"plato": "^1.5.0",
|
||||
"zip-dir": "^1.0.0"
|
||||
},
|
||||
|
@ -36,6 +36,7 @@
|
|||
"fullcalendar": "^3.6.1",
|
||||
"jquery": "^3.0.0",
|
||||
"jquery-ui": "^1.12.0",
|
||||
"moment": "^2.21.0",
|
||||
"qtip2": "^3.0.3",
|
||||
"sticky-table-headers": "^0.1.19"
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd"
|
||||
backupGlobals="true"
|
||||
backupStaticAttributes="false"
|
||||
bootstrap="bootstrap.php"
|
||||
bootstrap="test/php/bootstrap.php"
|
||||
cacheTokens="false"
|
||||
colors="false"
|
||||
convertErrorsToExceptions="true"
|
||||
|
@ -25,7 +25,7 @@
|
|||
verbose="false">
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">../src/engine</directory>
|
||||
<directory suffix=".php">src/engine</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
|
||||
|
||||
INSERT INTO `ea_roles` (`id`, `name`, `slug`, `is_admin`, `appointments`, `customers`, `services`, `users`, `system_settings`, `user_settings`) VALUES
|
||||
(1, 'Administrator', 'admin', 1, 15, 15, 15, 15, 15, 15),
|
||||
(2, 'Provider', 'provider', 0, 15, 15, 0, 0, 0, 15),
|
||||
(3, 'Customer', 'customer', 0, 0, 0, 0, 0, 0, 0),
|
||||
(4, 'Secretary', 'secretary', 0, 15, 15, 0, 0, 0, 15);
|
||||
|
||||
INSERT INTO `ea_secretaries_providers` (`id_users_secretary`, `id_users_provider`) VALUES
|
||||
(87, 85);
|
||||
|
||||
INSERT INTO `ea_services` (`id`, `name`, `duration`, `price`, `currency`, `description`, `availabilities_type`, `attendants_number`, `id_service_categories`) VALUES
|
||||
(13, 'Test Service', 30, '50.00', 'Euro', 'This is a test service automatically inserted by the installer.', 'flexible', 1, NULL);
|
||||
|
||||
INSERT INTO `ea_services_providers` (`id_users`, `id_services`) VALUES
|
||||
(85, 13);
|
||||
|
||||
INSERT INTO `ea_service_categories` (`id`, `name`, `description`) VALUES
|
||||
(24, 'Test Category', 'This is a test service category.');
|
||||
|
||||
INSERT INTO `ea_settings` (`id`, `name`, `value`) VALUES
|
||||
(16, 'company_working_plan', '{"monday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]},"tuesday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]},"wednesday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]},"thursday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]},"friday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]},"saturday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]},"sunday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]}}'),
|
||||
(17, 'book_advance_timeout', '30'),
|
||||
(18, 'google_analytics_code', ''),
|
||||
(19, 'customer_notifications', '1'),
|
||||
(20, 'date_format', 'DMY'),
|
||||
(21, 'require_captcha', '0'),
|
||||
(22, 'company_name', 'JD & Co'),
|
||||
(23, 'company_email', 'john@doe12345.com'),
|
||||
(24, 'company_link', 'http://doe12345.com');
|
||||
|
||||
INSERT INTO `ea_users` (`id`, `first_name`, `last_name`, `email`, `mobile_number`, `phone_number`, `address`, `city`, `state`, `zip_code`, `notes`, `id_roles`) VALUES
|
||||
(84, 'John', 'Doe', 'john@doe12345.com', '123123123', '123123123', 'Some Str 123', 'Some City', 'Some State', '12345', 'This is a test administrator.', 1),
|
||||
(85, 'Jane', 'Doe', 'jane@doe12345.com', '0123456789', '0123456789', 'Some Str 123', 'Some City', 'Some State', '12345', 'This is a test provider', 2),
|
||||
(86, 'Chris', 'Doe', 'chris@doe12345.com', NULL, '123123123', 'Some Str 123', 'Some City', NULL, '12345', 'This is a test customer.', 3),
|
||||
(87, 'Chloe', 'Doe', 'chloe@doe12345.com', '123123123', '123123123', 'Some Str 123', 'Some City', 'Some State', '12345', 'This is a test secretary.', 4);
|
||||
|
||||
INSERT INTO `ea_user_settings` (`id_users`, `username`, `password`, `salt`, `working_plan`, `notifications`, `google_sync`, `google_token`, `google_calendar`, `sync_past_days`, `sync_future_days`, `calendar_view`) VALUES
|
||||
(84, 'administrator', 'c1871d3852f8b78503c5e4f585f3979d0580b4d0339533ae5b55abbe3dba7a4b', '703006e3a7c61db01c943eda81b50ac4ca567e1e61fd677b6a8b431c8bd95eeb', NULL, 0, 0, NULL, NULL, 5, 5, 'default'),
|
||||
(85, 'jane@doe12345.com', '29cc4447507f0ea740a5d666944e997059b02cc0a968fa3f29eb5574cc1df2e7', 'f7b509c4b37f734ed1c3c65466b62843979bf4a354c3c3a1ab4752f9399df95c', '{"monday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"tuesday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"wednesday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"thursday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"friday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"saturday":null,"sunday":null}', 0, 0, NULL, NULL, 5, 5, 'default'),
|
||||
(87, 'chloe@doe12345.com', '2ad09a6c7b100048a48c380290206c35d953ed224c706d6f61d2198a9413c115', '8701d60910fb5994d4700f8057cebb16e94326d397241c7baac7c9b9c61012e6', NULL, 0, 0, NULL, NULL, 5, 5, 'default');
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
@ -1,186 +0,0 @@
|
|||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS = @@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION = @@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
|
||||
|
||||
CREATE TABLE `ea_appointments` (
|
||||
`id` INT(11) AUTO_INCREMENT NOT NULL,
|
||||
`book_datetime` DATETIME DEFAULT NULL,
|
||||
`start_datetime` DATETIME DEFAULT NULL,
|
||||
`end_datetime` DATETIME DEFAULT NULL,
|
||||
`notes` TEXT,
|
||||
`hash` TEXT,
|
||||
`is_unavailable` TINYINT(4) DEFAULT '0',
|
||||
`id_users_provider` INT(11) DEFAULT NULL,
|
||||
`id_users_customer` INT(11) DEFAULT NULL,
|
||||
`id_services` INT(11) DEFAULT NULL,
|
||||
`id_google_calendar` TEXT,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `id_users_customer` (`id_users_customer`),
|
||||
KEY `id_services` (`id_services`),
|
||||
KEY `id_users_provider` (`id_users_provider`)
|
||||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8;
|
||||
|
||||
CREATE TABLE `ea_migrations` (
|
||||
`version` INT(11) NOT NULL
|
||||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8;
|
||||
|
||||
CREATE TABLE `ea_roles` (
|
||||
`id` INT(11) AUTO_INCREMENT NOT NULL,
|
||||
`name` VARCHAR(256) DEFAULT NULL,
|
||||
`slug` VARCHAR(256) DEFAULT NULL,
|
||||
`is_admin` TINYINT(4) DEFAULT NULL,
|
||||
`appointments` INT(11) DEFAULT NULL,
|
||||
`customers` INT(11) DEFAULT NULL,
|
||||
`services` INT(11) DEFAULT NULL,
|
||||
`users` INT(11) DEFAULT NULL,
|
||||
`system_settings` INT(11) DEFAULT NULL,
|
||||
`user_settings` INT(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8;
|
||||
|
||||
CREATE TABLE `ea_secretaries_providers` (
|
||||
`id_users_secretary` INT(11) NOT NULL,
|
||||
`id_users_provider` INT(11) NOT NULL,
|
||||
PRIMARY KEY (`id_users_secretary`, `id_users_provider`),
|
||||
KEY `fk_ea_secretaries_providers_1` (`id_users_secretary`),
|
||||
KEY `fk_ea_secretaries_providers_2` (`id_users_provider`)
|
||||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8;
|
||||
|
||||
CREATE TABLE `ea_services` (
|
||||
`id` INT(11) AUTO_INCREMENT NOT NULL,
|
||||
`name` VARCHAR(256) DEFAULT NULL,
|
||||
`duration` INT(11) DEFAULT NULL,
|
||||
`price` DECIMAL(10, 2) DEFAULT NULL,
|
||||
`currency` VARCHAR(32) DEFAULT NULL,
|
||||
`description` TEXT,
|
||||
`availabilities_type` VARCHAR(32) DEFAULT 'flexible',
|
||||
`attendants_number` INT(11) DEFAULT '1',
|
||||
`id_service_categories` INT(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `id_service_categories` (`id_service_categories`)
|
||||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8;
|
||||
|
||||
CREATE TABLE `ea_services_providers` (
|
||||
`id_users` INT(11) NOT NULL,
|
||||
`id_services` INT(11) NOT NULL,
|
||||
PRIMARY KEY (`id_users`, `id_services`),
|
||||
KEY `id_services` (`id_services`)
|
||||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8;
|
||||
|
||||
CREATE TABLE `ea_service_categories` (
|
||||
`id` INT(11) AUTO_INCREMENT NOT NULL,
|
||||
`name` VARCHAR(256) DEFAULT NULL,
|
||||
`description` TEXT,
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8;
|
||||
|
||||
CREATE TABLE `ea_settings` (
|
||||
`id` INT(11) AUTO_INCREMENT NOT NULL,
|
||||
`name` VARCHAR(512) DEFAULT NULL,
|
||||
`value` TEXT,
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8;
|
||||
|
||||
CREATE TABLE `ea_users` (
|
||||
`id` INT(11) AUTO_INCREMENT NOT NULL,
|
||||
`first_name` VARCHAR(256) DEFAULT NULL,
|
||||
`last_name` VARCHAR(512) DEFAULT NULL,
|
||||
`email` VARCHAR(512) DEFAULT NULL,
|
||||
`mobile_number` VARCHAR(128) DEFAULT NULL,
|
||||
`phone_number` VARCHAR(128) DEFAULT NULL,
|
||||
`address` VARCHAR(256) DEFAULT NULL,
|
||||
`city` VARCHAR(256) DEFAULT NULL,
|
||||
`state` VARCHAR(128) DEFAULT NULL,
|
||||
`zip_code` VARCHAR(64) DEFAULT NULL,
|
||||
`notes` TEXT,
|
||||
`id_roles` INT(11) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `id_roles` (`id_roles`)
|
||||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8;
|
||||
|
||||
CREATE TABLE `ea_user_settings` (
|
||||
`id_users` INT(11) NOT NULL,
|
||||
`username` VARCHAR(256) DEFAULT NULL,
|
||||
`password` VARCHAR(512) DEFAULT NULL,
|
||||
`salt` VARCHAR(512) DEFAULT NULL,
|
||||
`working_plan` TEXT,
|
||||
`notifications` TINYINT(4) DEFAULT '0',
|
||||
`google_sync` TINYINT(4) DEFAULT '0',
|
||||
`google_token` TEXT,
|
||||
`google_calendar` VARCHAR(128) DEFAULT NULL,
|
||||
`sync_past_days` INT(11) DEFAULT '5',
|
||||
`sync_future_days` INT(11) DEFAULT '5',
|
||||
`calendar_view` VARCHAR(32) DEFAULT 'default',
|
||||
PRIMARY KEY (`id_users`)
|
||||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8;
|
||||
|
||||
ALTER TABLE `ea_appointments`
|
||||
ADD CONSTRAINT `ea_appointments_ea_users_customer` FOREIGN KEY (`id_users_customer`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_appointments_ea_services` FOREIGN KEY (`id_services`) REFERENCES `ea_services` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_appointments_ea_users_provider` FOREIGN KEY (`id_users_provider`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `ea_secretaries_providers`
|
||||
ADD CONSTRAINT `ea_secretaries_ea_users_secretary` FOREIGN KEY (`id_users_secretary`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_secretaries_ea_users_provider` FOREIGN KEY (`id_users_provider`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `ea_services`
|
||||
ADD CONSTRAINT `ea_services_ea_service_categories` FOREIGN KEY (`id_service_categories`) REFERENCES `ea_service_categories` (`id`)
|
||||
ON DELETE SET NULL
|
||||
ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `ea_services_providers`
|
||||
ADD CONSTRAINT `ea_services_providers_ea_users_provider` FOREIGN KEY (`id_users`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_services_providers_ea_services` FOREIGN KEY (`id_services`) REFERENCES `ea_services` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `ea_users`
|
||||
ADD CONSTRAINT `ea_users_ea_roles` FOREIGN KEY (`id_roles`) REFERENCES `ea_roles` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `ea_user_settings`
|
||||
ADD CONSTRAINT `ea_user_settings_ea_users` FOREIGN KEY (`id_users`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE;
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT = @OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS = @OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION = @OLD_COLLATION_CONNECTION */;
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 7 KiB After Width: | Height: | Size: 7 KiB |
|
@ -8,7 +8,7 @@
|
|||
| Declare some of the global config values of Easy!Appointments.
|
||||
|
|
||||
*/
|
||||
$config['version'] = '1.3.0'; // This must be changed manually.
|
||||
$config['version'] = '1.3.1'; // This must be changed manually.
|
||||
$config['release_label'] = ''; // Leave empty for no title or add Alpha, Beta etc ...
|
||||
$config['google_sync_feature'] = Config::GOOGLE_SYNC_FEATURE;
|
||||
|
||||
|
@ -273,7 +273,7 @@ $config['cache_path'] = __DIR__ . '/../../storage/cache/';
|
|||
| new release.
|
||||
|
|
||||
*/
|
||||
$config['cache_busting_token'] = '9G7D4';
|
||||
$config['cache_busting_token'] = '93GE1';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -37,7 +37,7 @@ $config['migration_table'] = 'ea_migrations';
|
|||
| be upgraded / downgraded to.
|
||||
|
|
||||
*/
|
||||
$config['migration_version'] = 10; // current
|
||||
$config['migration_version'] = 11; // current
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
@ -609,12 +609,34 @@ class Appointments extends CI_Controller {
|
|||
$selected_date = new DateTime($selected_date_string);
|
||||
$number_of_days_in_month = (int)$selected_date->format('t');
|
||||
$unavailable_dates = [];
|
||||
$manage_mode = filter_var($this->input->get('manage_mode'), FILTER_VALIDATE_BOOLEAN);
|
||||
|
||||
$exclude_appointments = ($_REQUEST['manage_mode'] === 'true')
|
||||
? [$_REQUEST['appointment_id']]
|
||||
: [];
|
||||
|
||||
// Handle the "Any Provider" case.
|
||||
if ($provider_id === ANY_PROVIDER)
|
||||
{
|
||||
$provider_id = $this->_search_any_provider($service_id, $selected_date_string);
|
||||
|
||||
if ($provider_id === null) {
|
||||
$current_date = new DateTime($selected_date_string);
|
||||
$current_date->add(new DateInterval('P1D'));
|
||||
|
||||
do
|
||||
{
|
||||
$provider_id = $this->_search_any_provider($service_id, $current_date->format('Y-m-d H:i:s'));
|
||||
|
||||
if ($provider_id)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
$current_date->add(new DateInterval('P1D'));
|
||||
} while ((int)$current_date->format('d') <= $number_of_days_in_month);
|
||||
}
|
||||
|
||||
if ($provider_id === NULL)
|
||||
{
|
||||
// No provider is available in the selected date.
|
||||
|
@ -653,10 +675,10 @@ class Appointments extends CI_Controller {
|
|||
|
||||
$empty_periods = $this->_get_provider_available_time_periods($provider_id,
|
||||
$service_id,
|
||||
$current_date->format('Y-m-d'));
|
||||
$current_date->format('Y-m-d'), $exclude_appointments);
|
||||
|
||||
$available_hours = $this->_calculate_available_hours($empty_periods, $current_date->format('Y-m-d'),
|
||||
$service['duration'], FALSE, $service['availabilities_type']);
|
||||
$service['duration'], $manage_mode, $service['availabilities_type']);
|
||||
|
||||
if ($service['attendants_number'] > 1)
|
||||
{
|
||||
|
@ -871,6 +893,11 @@ class Appointments extends CI_Controller {
|
|||
$remove_current_period = TRUE;
|
||||
}
|
||||
|
||||
if ($break_start == $period_start && $break_end == $period_end)
|
||||
{
|
||||
$remove_current_period = TRUE;
|
||||
}
|
||||
|
||||
if ($remove_current_period)
|
||||
{
|
||||
unset($periods[$key]);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.1.0
|
||||
|
@ -93,7 +93,7 @@ class Installation extends CI_Controller {
|
|||
|
||||
// Insert admin
|
||||
$this->load->model('admins_model');
|
||||
$admin = json_decode($this->input->post('admin'), TRUE);
|
||||
$admin = $this->input->post('admin');
|
||||
$admin['settings']['username'] = $admin['username'];
|
||||
$admin['settings']['password'] = $admin['password'];
|
||||
$admin['settings']['calendar_view'] = CALENDAR_VIEW_DEFAULT;
|
||||
|
@ -108,7 +108,7 @@ class Installation extends CI_Controller {
|
|||
|
||||
// Save company settings
|
||||
$this->load->model('settings_model');
|
||||
$company = json_decode($this->input->post('company'), TRUE);
|
||||
$company = $this->input->post('company');
|
||||
$this->settings_model->set_setting('company_name', $company['company_name']);
|
||||
$this->settings_model->set_setting('company_email', $company['company_email']);
|
||||
$this->settings_model->set_setting('company_link', $company['company_link']);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
@ -50,8 +50,16 @@ class Appointments extends API_V1_Controller {
|
|||
{
|
||||
try
|
||||
{
|
||||
$condition = $id !== NULL ? 'id = ' . $id : NULL;
|
||||
$appointments = $this->appointments_model->get_batch($condition, array_key_exists('aggregates', $_GET));
|
||||
$conditions = [
|
||||
'is_unavailable' => FALSE
|
||||
];
|
||||
|
||||
if ($id !== NULL)
|
||||
{
|
||||
$conditions['id'] = $id;
|
||||
}
|
||||
|
||||
$appointments = $this->appointments_model->get_batch($conditions, array_key_exists('aggregates', $_GET));
|
||||
|
||||
if ($id !== NULL && count($appointments) === 0)
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.3.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.3.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.1.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.1.0
|
||||
|
|
|
@ -34,7 +34,7 @@ $lang['reason'] = 'Motif';
|
|||
$lang['appointment_removed_from_schedule'] = 'Le rendez-vous suivant a été supprimé de l\'agenda.';
|
||||
$lang['appointment_details_was_sent_to_you'] = 'Un email reprennant les détails de votre rendez-vous vient de vous être envoyé';
|
||||
$lang['add_to_google_calendar'] = 'Ajouter à Google Calendar';
|
||||
$lang['appointment_booked'] = 'Votre rendez-vous a été confimé avec succès !';
|
||||
$lang['appointment_booked'] = 'Votre rendez-vous a été confirmé avec succès !';
|
||||
$lang['thank_you_for_appointment'] = 'Merci de votre prise de rendez-vous avec nous. Vous trouvez ci-joint les détails de votre rendez-vous. Si nécessaire, faites les changements souhaités en cliquant sur le lien du rendez-vous.';
|
||||
$lang['appointment_details_title'] = 'Détails du rendez-vous';
|
||||
$lang['customer_details_title'] = 'Vos informations';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.3.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.1.0
|
||||
|
@ -15,12 +15,21 @@ class Migration_Add_google_analytics_setting extends CI_Migration {
|
|||
public function up()
|
||||
{
|
||||
$this->load->model('settings_model');
|
||||
$this->settings_model->set_setting('google_analytics_code', '');
|
||||
|
||||
try
|
||||
{
|
||||
$this->settings_model->get_setting('google_analytics_code');
|
||||
}
|
||||
catch (Exception $exception)
|
||||
{
|
||||
$this->settings_model->set_setting('google_analytics_code', '');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->load->model('settings_model');
|
||||
|
||||
$this->settings_model->remove_setting('google_analytics_code');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.1.0
|
||||
|
@ -15,12 +15,21 @@ class Migration_Add_customer_notifications_setting extends CI_Migration {
|
|||
public function up()
|
||||
{
|
||||
$this->load->model('settings_model');
|
||||
$this->settings_model->set_setting('customer_notifications', '1');
|
||||
|
||||
try
|
||||
{
|
||||
$this->settings_model->get_setting('customer_notifications');
|
||||
}
|
||||
catch (Exception $exception)
|
||||
{
|
||||
$this->settings_model->set_setting('customer_notifications', '1');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->load->model('settings_model');
|
||||
|
||||
$this->settings_model->remove_setting('customer_notifications');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.1.0
|
||||
|
@ -15,12 +15,21 @@ class Migration_Add_date_format_setting extends CI_Migration {
|
|||
public function up()
|
||||
{
|
||||
$this->load->model('settings_model');
|
||||
$this->settings_model->set_setting('date_format', DATE_FORMAT_DMY);
|
||||
|
||||
try
|
||||
{
|
||||
$this->settings_model->get_setting('date_format');
|
||||
}
|
||||
catch (Exception $exception)
|
||||
{
|
||||
$this->settings_model->set_setting('date_format', DATE_FORMAT_DMY);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->load->model('settings_model');
|
||||
|
||||
$this->settings_model->remove_setting('date_format');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.1.0
|
||||
|
@ -15,12 +15,21 @@ class Migration_Add_require_captcha_setting extends CI_Migration {
|
|||
public function up()
|
||||
{
|
||||
$this->load->model('settings_model');
|
||||
$this->settings_model->set_setting('require_captcha', '1');
|
||||
|
||||
try
|
||||
{
|
||||
$this->settings_model->get_setting('require_captcha');
|
||||
}
|
||||
catch (Exception $exception)
|
||||
{
|
||||
$this->settings_model->set_setting('require_captcha', '1');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->load->model('settings_model');
|
||||
|
||||
$this->settings_model->remove_setting('require_captcha');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
@ -14,11 +14,8 @@
|
|||
class Migration_Add_calendar_view_setting extends CI_Migration {
|
||||
public function up()
|
||||
{
|
||||
$this->load->dbforge();
|
||||
|
||||
$fields = $this->db->list_fields('ea_user_settings');
|
||||
|
||||
if (!in_array('calendar_view', $fields, true)) {
|
||||
if ( ! $this->db->field_exists('calendar_view', 'ea_user_settings'))
|
||||
{
|
||||
$fields = [
|
||||
'calendar_view' => [
|
||||
'type' => 'VARCHAR',
|
||||
|
@ -35,7 +32,9 @@ class Migration_Add_calendar_view_setting extends CI_Migration {
|
|||
|
||||
public function down()
|
||||
{
|
||||
$this->load->dbforge();
|
||||
$this->dbforge->drop_column('ea_user_settings', 'calendar_view');
|
||||
if ($this->db->field_exists('calendar_view', 'ea_user_settings'))
|
||||
{
|
||||
$this->dbforge->drop_column('ea_user_settings', 'calendar_view_calendar');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
@ -14,7 +14,8 @@
|
|||
class Migration_Add_service_availabilities_type extends CI_Migration {
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->field_exists('availabilities_type', 'ea_services')) {
|
||||
if ( ! $this->db->field_exists('availabilities_type', 'ea_services'))
|
||||
{
|
||||
$fields = [
|
||||
'availabilities_type' => [
|
||||
'type' => 'VARCHAR',
|
||||
|
@ -32,7 +33,8 @@ class Migration_Add_service_availabilities_type extends CI_Migration {
|
|||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->field_exists('availabilities_type', 'ea_services')) {
|
||||
if ($this->db->field_exists('availabilities_type', 'ea_services'))
|
||||
{
|
||||
$this->dbforge->drop_column('ea_services', 'availabilities_type');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
@ -14,7 +14,8 @@
|
|||
class Migration_Add_service_attendants_number extends CI_Migration {
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->field_exists('attendants_number', 'ea_services')) {
|
||||
if ( ! $this->db->field_exists('attendants_number', 'ea_services'))
|
||||
{
|
||||
$fields = [
|
||||
'attendants_number' => [
|
||||
'type' => 'INT',
|
||||
|
@ -32,7 +33,8 @@ class Migration_Add_service_attendants_number extends CI_Migration {
|
|||
|
||||
public function down()
|
||||
{
|
||||
if (!$this->db->field_exists('attendants_number', 'ea_services')) {
|
||||
if ($this->db->field_exists('attendants_number', 'ea_services'))
|
||||
{
|
||||
$this->dbforge->drop_column('ea_services', 'attendants_number');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.3.0
|
||||
|
@ -14,6 +14,18 @@
|
|||
class Migration_Change_column_types extends CI_Migration {
|
||||
public function up()
|
||||
{
|
||||
// Drop table constraints.
|
||||
$this->db->query('ALTER TABLE ea_appointments DROP FOREIGN KEY ea_appointments_ibfk_2');
|
||||
$this->db->query('ALTER TABLE ea_appointments DROP FOREIGN KEY ea_appointments_ibfk_3');
|
||||
$this->db->query('ALTER TABLE ea_appointments DROP FOREIGN KEY ea_appointments_ibfk_4');
|
||||
$this->db->query('ALTER TABLE ea_secretaries_providers DROP FOREIGN KEY fk_ea_secretaries_providers_1');
|
||||
$this->db->query('ALTER TABLE ea_secretaries_providers DROP FOREIGN KEY fk_ea_secretaries_providers_2');
|
||||
$this->db->query('ALTER TABLE ea_services_providers DROP FOREIGN KEY ea_services_providers_ibfk_1');
|
||||
$this->db->query('ALTER TABLE ea_services_providers DROP FOREIGN KEY ea_services_providers_ibfk_2');
|
||||
$this->db->query('ALTER TABLE ea_services DROP FOREIGN KEY ea_services_ibfk_1');
|
||||
$this->db->query('ALTER TABLE ea_users DROP FOREIGN KEY ea_users_ibfk_1');
|
||||
$this->db->query('ALTER TABLE ea_user_settings DROP FOREIGN KEY ea_user_settings_ibfk_1');
|
||||
|
||||
// Appointments
|
||||
$fields = [
|
||||
'id' => [
|
||||
|
@ -97,7 +109,7 @@ class Migration_Change_column_types extends CI_Migration {
|
|||
]
|
||||
];
|
||||
|
||||
$this->dbforge->modify_column('ea_roles', $fields);
|
||||
$this->dbforge->modify_column('ea_secretaries_providers', $fields);
|
||||
|
||||
// Services
|
||||
$fields = [
|
||||
|
@ -165,7 +177,7 @@ class Migration_Change_column_types extends CI_Migration {
|
|||
'auto_increment' => TRUE
|
||||
],
|
||||
'id_roles' => [
|
||||
'name' => 'id',
|
||||
'name' => 'id_roles',
|
||||
'type' => 'int',
|
||||
'constraint' => '11'
|
||||
]
|
||||
|
@ -183,10 +195,65 @@ class Migration_Change_column_types extends CI_Migration {
|
|||
];
|
||||
|
||||
$this->dbforge->modify_column('ea_user_settings', $fields);
|
||||
|
||||
// Add table constraints again.
|
||||
$this->db->query('ALTER TABLE `ea_appointments`
|
||||
ADD CONSTRAINT `ea_appointments_ea_users_customer` FOREIGN KEY (`id_users_customer`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_appointments_ea_services` FOREIGN KEY (`id_services`) REFERENCES `ea_services` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_appointments_ea_users_provider` FOREIGN KEY (`id_users_provider`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_secretaries_providers`
|
||||
ADD CONSTRAINT `ea_secretaries_ea_users_secretary` FOREIGN KEY (`id_users_secretary`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_secretaries_ea_users_provider` FOREIGN KEY (`id_users_provider`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_services`
|
||||
ADD CONSTRAINT `ea_services_ea_service_categories` FOREIGN KEY (`id_service_categories`) REFERENCES `ea_service_categories` (`id`)
|
||||
ON DELETE SET NULL
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_services_providers`
|
||||
ADD CONSTRAINT `ea_services_providers_ea_users_provider` FOREIGN KEY (`id_users`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_services_providers_ea_services` FOREIGN KEY (`id_services`) REFERENCES `ea_services` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_users`
|
||||
ADD CONSTRAINT `ea_users_ea_roles` FOREIGN KEY (`id_roles`) REFERENCES `ea_roles` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_user_settings`
|
||||
ADD CONSTRAINT `ea_user_settings_ea_users` FOREIGN KEY (`id_users`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
// Drop table constraints.
|
||||
$this->db->query('ALTER TABLE ea_appointments DROP FOREIGN KEY ea_appointments_ea_services');
|
||||
$this->db->query('ALTER TABLE ea_appointments DROP FOREIGN KEY ea_appointments_ea_users_customer');
|
||||
$this->db->query('ALTER TABLE ea_appointments DROP FOREIGN KEY ea_appointments_ea_users_provider');
|
||||
$this->db->query('ALTER TABLE ea_secretaries_providers DROP FOREIGN KEY ea_secretaries_ea_users_secretary');
|
||||
$this->db->query('ALTER TABLE ea_secretaries_providers DROP FOREIGN KEY ea_secretaries_ea_users_provider');
|
||||
$this->db->query('ALTER TABLE ea_services_providers DROP FOREIGN KEY ea_services_providers_ea_users_provider');
|
||||
$this->db->query('ALTER TABLE ea_services_providers DROP FOREIGN KEY ea_services_providers_ea_services');
|
||||
$this->db->query('ALTER TABLE ea_services DROP FOREIGN KEY ea_services_ea_service_categories');
|
||||
$this->db->query('ALTER TABLE ea_users DROP FOREIGN KEY ea_users_ea_roles');
|
||||
$this->db->query('ALTER TABLE ea_user_settings DROP FOREIGN KEY ea_user_settings_ea_users');
|
||||
|
||||
// Appointments
|
||||
$fields = [
|
||||
'id' => [
|
||||
|
@ -356,5 +423,28 @@ class Migration_Change_column_types extends CI_Migration {
|
|||
];
|
||||
|
||||
$this->dbforge->modify_column('ea_user_settings', $fields);
|
||||
|
||||
// Add database constraints.
|
||||
$this->db->query('ALTER TABLE `ea_appointments`
|
||||
ADD CONSTRAINT `ea_appointments_ibfk_2` FOREIGN KEY (`id_users_customer`) REFERENCES `ea_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_appointments_ibfk_3` FOREIGN KEY (`id_services`) REFERENCES `ea_services` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_appointments_ibfk_4` FOREIGN KEY (`id_users_provider`) REFERENCES `ea_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_secretaries_providers`
|
||||
ADD CONSTRAINT `fk_ea_secretaries_providers_1` FOREIGN KEY (`id_users_secretary`) REFERENCES `ea_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `fk_ea_secretaries_providers_2` FOREIGN KEY (`id_users_provider`) REFERENCES `ea_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_services`
|
||||
ADD CONSTRAINT `ea_services_ibfk_1` FOREIGN KEY (`id_service_categories`) REFERENCES `ea_service_categories` (`id`) ON DELETE SET NULL ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_services_providers`
|
||||
ADD CONSTRAINT `ea_services_providers_ibfk_1` FOREIGN KEY (`id_users`) REFERENCES `ea_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_services_providers_ibfk_2` FOREIGN KEY (`id_services`) REFERENCES `ea_services` (`id`) ON DELETE CASCADE ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_users`
|
||||
ADD CONSTRAINT `ea_users_ibfk_1` FOREIGN KEY (`id_roles`) REFERENCES `ea_roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_user_settings`
|
||||
ADD CONSTRAINT `ea_user_settings_ibfk_1` FOREIGN KEY (`id_users`) REFERENCES `ea_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,14 +14,22 @@
|
|||
class Migration_Add_time_format_setting extends CI_Migration {
|
||||
public function up()
|
||||
{
|
||||
$this->db->insert('ea_settings', [
|
||||
'name' => 'time_format',
|
||||
'value' => 'regular'
|
||||
]);
|
||||
$this->load->model('settings_model');
|
||||
|
||||
try
|
||||
{
|
||||
$this->settings_model->get_setting('time_format');
|
||||
}
|
||||
catch (Exception $exception)
|
||||
{
|
||||
$this->settings_model->set_setting('time_format', 'regular');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->db->delete('ea_settings', ['name' => 'time_format']);
|
||||
$this->load->model('settings_model');
|
||||
|
||||
$this->settings_model->remove_setting('time_format');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,130 @@
|
|||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Easy!Appointments - Open Source Web Scheduler
|
||||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.3.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
class Migration_Remove_prefix_from_fkey_constraints extends CI_Migration {
|
||||
public function up()
|
||||
{
|
||||
// Drop table constraints.
|
||||
$this->db->query('ALTER TABLE ea_appointments DROP FOREIGN KEY ea_appointments_ea_services');
|
||||
$this->db->query('ALTER TABLE ea_appointments DROP FOREIGN KEY ea_appointments_ea_users_customer');
|
||||
$this->db->query('ALTER TABLE ea_appointments DROP FOREIGN KEY ea_appointments_ea_users_provider');
|
||||
$this->db->query('ALTER TABLE ea_secretaries_providers DROP FOREIGN KEY ea_secretaries_ea_users_secretary');
|
||||
$this->db->query('ALTER TABLE ea_secretaries_providers DROP FOREIGN KEY ea_secretaries_ea_users_provider');
|
||||
$this->db->query('ALTER TABLE ea_services_providers DROP FOREIGN KEY ea_services_providers_ea_users_provider');
|
||||
$this->db->query('ALTER TABLE ea_services_providers DROP FOREIGN KEY ea_services_providers_ea_services');
|
||||
$this->db->query('ALTER TABLE ea_services DROP FOREIGN KEY ea_services_ea_service_categories');
|
||||
$this->db->query('ALTER TABLE ea_users DROP FOREIGN KEY ea_users_ea_roles');
|
||||
$this->db->query('ALTER TABLE ea_user_settings DROP FOREIGN KEY ea_user_settings_ea_users');
|
||||
|
||||
// Add table constraints again without the "ea" prefix.
|
||||
$this->db->query('ALTER TABLE `ea_appointments`
|
||||
ADD CONSTRAINT `appointments_users_customer` FOREIGN KEY (`id_users_customer`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `appointments_services` FOREIGN KEY (`id_services`) REFERENCES `ea_services` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `appointments_users_provider` FOREIGN KEY (`id_users_provider`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_secretaries_providers`
|
||||
ADD CONSTRAINT `secretaries_users_secretary` FOREIGN KEY (`id_users_secretary`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `secretaries_users_provider` FOREIGN KEY (`id_users_provider`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_services`
|
||||
ADD CONSTRAINT `services_service_categories` FOREIGN KEY (`id_service_categories`) REFERENCES `ea_service_categories` (`id`)
|
||||
ON DELETE SET NULL
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_services_providers`
|
||||
ADD CONSTRAINT `services_providers_users_provider` FOREIGN KEY (`id_users`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `services_providers_services` FOREIGN KEY (`id_services`) REFERENCES `ea_services` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_users`
|
||||
ADD CONSTRAINT `users_roles` FOREIGN KEY (`id_roles`) REFERENCES `ea_roles` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_user_settings`
|
||||
ADD CONSTRAINT `user_settings_users` FOREIGN KEY (`id_users`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
// Drop table constraints.
|
||||
$this->db->query('ALTER TABLE ea_appointments DROP FOREIGN KEY appointments_services');
|
||||
$this->db->query('ALTER TABLE ea_appointments DROP FOREIGN KEY appointments_users_customer');
|
||||
$this->db->query('ALTER TABLE ea_appointments DROP FOREIGN KEY appointments_users_provider');
|
||||
$this->db->query('ALTER TABLE ea_secretaries_providers DROP FOREIGN KEY secretaries_users_secretary');
|
||||
$this->db->query('ALTER TABLE ea_secretaries_providers DROP FOREIGN KEY secretaries_users_provider');
|
||||
$this->db->query('ALTER TABLE ea_services_providers DROP FOREIGN KEY services_providers_users_provider');
|
||||
$this->db->query('ALTER TABLE ea_services_providers DROP FOREIGN KEY services_providers_services');
|
||||
$this->db->query('ALTER TABLE ea_services DROP FOREIGN KEY services_service_categories');
|
||||
$this->db->query('ALTER TABLE ea_users DROP FOREIGN KEY users_roles');
|
||||
$this->db->query('ALTER TABLE ea_user_settings DROP FOREIGN KEY user_settings_users');
|
||||
|
||||
// Add table constraints again.
|
||||
$this->db->query('ALTER TABLE `ea_appointments`
|
||||
ADD CONSTRAINT `ea_appointments_ea_users_customer` FOREIGN KEY (`id_users_customer`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_appointments_ea_services` FOREIGN KEY (`id_services`) REFERENCES `ea_services` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_appointments_ea_users_provider` FOREIGN KEY (`id_users_provider`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_secretaries_providers`
|
||||
ADD CONSTRAINT `ea_secretaries_ea_users_secretary` FOREIGN KEY (`id_users_secretary`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_secretaries_ea_users_provider` FOREIGN KEY (`id_users_provider`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_services`
|
||||
ADD CONSTRAINT `ea_services_ea_service_categories` FOREIGN KEY (`id_service_categories`) REFERENCES `ea_service_categories` (`id`)
|
||||
ON DELETE SET NULL
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_services_providers`
|
||||
ADD CONSTRAINT `ea_services_providers_ea_users_provider` FOREIGN KEY (`id_users`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `ea_services_providers_ea_services` FOREIGN KEY (`id_services`) REFERENCES `ea_services` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_users`
|
||||
ADD CONSTRAINT `ea_users_ea_roles` FOREIGN KEY (`id_roles`) REFERENCES `ea_roles` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `ea_user_settings`
|
||||
ADD CONSTRAINT `ea_user_settings_ea_users` FOREIGN KEY (`id_users`) REFERENCES `ea_users` (`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE');
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
2
src/assets/ext/moment/locales.min.js
vendored
2
src/assets/ext/moment/locales.min.js
vendored
File diff suppressed because one or more lines are too long
2
src/assets/ext/moment/moment.min.js
vendored
2
src/assets/ext/moment/moment.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
@ -106,7 +106,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
|||
|
||||
// Define error callback.
|
||||
var errorCallback = function () {
|
||||
$dialog.find('.modal-message').text(EALang.server_communication_error);
|
||||
$dialog.find('.modal-message').text(EALang.service_communication_error);
|
||||
$dialog.find('.modal-message').addClass('alert-danger').removeClass('hidden');
|
||||
$dialog.find('.modal-body').scrollTop(0);
|
||||
};
|
||||
|
@ -391,7 +391,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
|||
|
||||
$dialog.find('#start-datetime').datetimepicker({
|
||||
dateFormat: dateFormat,
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : GlobalVariables.timeFormat,
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm TT' : 'HH:mm',
|
||||
|
||||
// Translation
|
||||
dayNames: [EALang.sunday, EALang.monday, EALang.tuesday, EALang.wednesday,
|
||||
|
@ -421,7 +421,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
|||
|
||||
$dialog.find('#end-datetime').datetimepicker({
|
||||
dateFormat: dateFormat,
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : GlobalVariables.timeFormat,
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm TT' : 'HH:mm',
|
||||
|
||||
// Translation
|
||||
dayNames: [EALang.sunday, EALang.monday, EALang.tuesday, EALang.wednesday,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
@ -97,17 +97,19 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
|||
|
||||
// Replace string date values with actual date objects.
|
||||
unavailable.start_datetime = lastFocusedEventData.start.format('YYYY-MM-DD HH:mm:ss');
|
||||
var startDatetime = Date.parseExact(unavailable.start_datetime, 'yyyy-MM-dd HH:mm:ss');
|
||||
unavailable.end_datetime = lastFocusedEventData.end.format('YYYY-MM-DD HH:mm:ss');
|
||||
var endDatetime = Date.parseExact(unavailable.end_datetime, 'yyyy-MM-dd HH:mm:ss');
|
||||
|
||||
$dialog = $('#manage-unavailable');
|
||||
BackendCalendarUnavailabilitiesModal.resetUnavailableDialog();
|
||||
|
||||
// Apply unavailable data to dialog.
|
||||
$dialog.find('.modal-header h3').text('Edit Unavailable Period');
|
||||
$dialog.find('#unavailable-start').datetimepicker('setDate', unavailable.start_datetime);
|
||||
$dialog.find('#unavailable-start').datetimepicker('setDate', startDatetime);
|
||||
$dialog.find('#unavailable-id').val(unavailable.id);
|
||||
$dialog.find('#unavailable-provider').val(unavailable.id_users_provider);
|
||||
$dialog.find('#unavailable-end').datetimepicker('setDate', unavailable.end_datetime);
|
||||
$dialog.find('#unavailable-end').datetimepicker('setDate', endDatetime);
|
||||
$dialog.find('#unavailable-notes').val(unavailable.notes);
|
||||
}
|
||||
|
||||
|
@ -209,13 +211,6 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
|||
* Load the appointments that correspond to the select filter item and display them on the calendar.
|
||||
*/
|
||||
$('#select-filter-item').change(function () {
|
||||
_refreshCalendarAppointments(
|
||||
$('#calendar'),
|
||||
$('#select-filter-item').val(),
|
||||
$('#select-filter-item option:selected').attr('type'),
|
||||
$('#calendar').fullCalendar('getView').start,
|
||||
$('#calendar').fullCalendar('getView').end);
|
||||
|
||||
// If current value is service, then the sync buttons must be disabled.
|
||||
if ($('#select-filter-item option:selected').attr('type') === FILTER_TYPE_SERVICE) {
|
||||
$('#google-sync, #enable-sync, #insert-appointment, #insert-unavailable').prop('disabled', true);
|
||||
|
@ -789,6 +784,16 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
|||
$calendar.fullCalendar('removeEvents');
|
||||
$calendar.fullCalendar('addEventSource', calendarEvents);
|
||||
|
||||
var weekDays = [
|
||||
'sunday',
|
||||
'monday',
|
||||
'tuesday',
|
||||
'wednesday',
|
||||
'thursday',
|
||||
'friday',
|
||||
'saturday'
|
||||
];
|
||||
|
||||
// :: ADD PROVIDER'S UNAVAILABLE TIME PERIODS
|
||||
var calendarView = $calendar.fullCalendar('getView').name;
|
||||
|
||||
|
@ -800,7 +805,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
|||
|
||||
switch (calendarView) {
|
||||
case 'agendaDay':
|
||||
var selectedDayName = $calendar.fullCalendar('getView').start.format('dddd').toLowerCase();
|
||||
var selectedDayName = weekDays[$calendar.fullCalendar('getView').start.format('d')];
|
||||
|
||||
// Add custom unavailable periods.
|
||||
$.each(response.unavailables, function (index, unavailable) {
|
||||
|
@ -997,7 +1002,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
|||
allDay: false,
|
||||
color: '#BEBEBE',
|
||||
editable: false,
|
||||
className: 'fc-unavailable fc-brake'
|
||||
className: 'fc-unavailable fc-break'
|
||||
};
|
||||
|
||||
$calendar.fullCalendar('renderEvent', unavailablePeriod, false);
|
||||
|
@ -1072,8 +1077,8 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
|||
slotTimeFormat = 'H(:mm)';
|
||||
break;
|
||||
case 'regular':
|
||||
timeFormat = 'h:mm A';
|
||||
slotTimeFormat = 'h(:mm) A';
|
||||
timeFormat = 'h:mm a';
|
||||
slotTimeFormat = 'h(:mm) a';
|
||||
break;
|
||||
default:
|
||||
throw new Error('Invalid time format setting provided!', GlobalVariables.timeFormat);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
@ -686,7 +686,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
|||
|
||||
$event.html(
|
||||
appointment.customer.first_name.charAt(0) + '. ' + appointment.customer.last_name +
|
||||
' <span class="hour">' + startDate.toString(GlobalVariables.timeFormat) + '</span> '
|
||||
' <span class="hour">' + startDate.toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm') + '</span> '
|
||||
+ (eventDuration !== parseInt(appointment.service.duration) ? '(' + eventDuration + '\')' : '')
|
||||
);
|
||||
|
||||
|
@ -708,7 +708,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
|||
$event.appendTo($(tr).prev().find('td').eq(cellIndex));
|
||||
|
||||
// Remove the hour from the event if it is the same as the row.
|
||||
if (eventDate.toString(GlobalVariables.timeFormat) === $(tr).prev().find('td').eq(0).text()) {
|
||||
if (eventDate.toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm') === $(tr).prev().find('td').eq(0).text()) {
|
||||
$event.find('.hour').remove();
|
||||
}
|
||||
|
||||
|
@ -747,7 +747,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
|||
var $event = $('<div class="event unavailability" />');
|
||||
|
||||
$event.html((unavailability.notes || EALang.unavailable) +
|
||||
' <span class="hour">' + eventDate.toString(GlobalVariables.timeFormat) + '</span> (' + eventDuration + '\')');
|
||||
' <span class="hour">' + eventDate.toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm') + '</span> (' + eventDuration + '\')');
|
||||
|
||||
$event.data(unavailability);
|
||||
|
||||
|
@ -763,7 +763,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
|||
$event.appendTo($(tr).prev().find('td').eq(1));
|
||||
|
||||
// Remove the hour from the event if it is the same as the row.
|
||||
if (eventDate.toString(GlobalVariables.timeFormat) === $(tr).prev().find('td').eq(0).text()) {
|
||||
if (eventDate.toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm') === $(tr).prev().find('td').eq(0).text()) {
|
||||
$event.find('.hour').remove();
|
||||
}
|
||||
|
||||
|
@ -798,7 +798,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
|||
|
||||
$event.html(
|
||||
EALang.break +
|
||||
' <span class="hour">' + eventDate.toString(GlobalVariables.timeFormat) + '</span> (' + eventDuration + '\')');
|
||||
' <span class="hour">' + eventDate.toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm') + '</span> (' + eventDuration + '\')');
|
||||
|
||||
$event.data(entry);
|
||||
|
||||
|
@ -812,7 +812,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
|||
|
||||
if (eventDate < cellDate) {
|
||||
// Remove the hour from the event if it is the same as the row.
|
||||
if (eventDate.toString(GlobalVariables.timeFormat) === $(tr).prev().find('td').eq(0).text()) {
|
||||
if (eventDate.toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm') === $(tr).prev().find('td').eq(0).text()) {
|
||||
$event.find('.hour').remove();
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.2.0
|
||||
|
@ -183,7 +183,7 @@ window.BackendCalendarUnavailabilitiesModal = window.BackendCalendarUnavailabili
|
|||
|
||||
$dialog.find('#unavailable-start').datetimepicker({
|
||||
dateFormat: dateFormat,
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : GlobalVariables.timeFormat,
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm TT' : 'HH:mm',
|
||||
|
||||
// Translation
|
||||
dayNames: [EALang.sunday, EALang.monday, EALang.tuesday, EALang.wednesday,
|
||||
|
@ -213,7 +213,7 @@ window.BackendCalendarUnavailabilitiesModal = window.BackendCalendarUnavailabili
|
|||
|
||||
$dialog.find('#unavailable-end').datetimepicker({
|
||||
dateFormat: dateFormat,
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : GlobalVariables.timeFormat,
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm TT' : 'HH:mm',
|
||||
|
||||
// Translation
|
||||
dayNames: [EALang.sunday, EALang.monday, EALang.tuesday, EALang.wednesday,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
@ -207,12 +207,16 @@ window.FrontendBookApi = window.FrontendBookApi || {};
|
|||
return;
|
||||
}
|
||||
|
||||
var appointmentId = FrontendBook.manageMode ? GlobalVariables.appointmentData.id : undefined;
|
||||
|
||||
var url = GlobalVariables.baseUrl + '/index.php/appointments/ajax_get_unavailable_dates';
|
||||
var data = {
|
||||
provider_id: providerId,
|
||||
service_id: serviceId,
|
||||
selected_date: encodeURIComponent(selectedDateString),
|
||||
csrfToken: GlobalVariables.csrfToken
|
||||
csrfToken: GlobalVariables.csrfToken,
|
||||
manage_mode: FrontendBook.manageMode,
|
||||
appointment_id: appointmentId
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
|
@ -242,7 +246,7 @@ window.FrontendBookApi = window.FrontendBookApi || {};
|
|||
var selectedDate = Date.parse(selectedDateString);
|
||||
var numberOfDays = new Date(selectedDate.getFullYear(), selectedDate.getMonth() + 1, 0).getDate();
|
||||
|
||||
if (setDate) {
|
||||
if (setDate && !GlobalVariables.manageMode) {
|
||||
for (var i = 1; i <= numberOfDays; i++) {
|
||||
var currentDate = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), i);
|
||||
if (unavailableDates.indexOf(currentDate.toString('yyyy-MM-dd')) === -1) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
|
|
@ -3,18 +3,18 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
$(document).ready(function () {
|
||||
$(function () {
|
||||
'use strict';
|
||||
|
||||
var MIN_PASSWORD_LENGTH = 7;
|
||||
var AJAX_SUCCESS = 'SUCCESS';
|
||||
var AJAX_FAILURE = 'FAILURE';
|
||||
|
||||
var $alert = $('.alert');
|
||||
|
||||
$(document).ajaxStart(function () {
|
||||
$('#loading').removeClass('hidden');
|
||||
|
@ -32,45 +32,34 @@ $(document).ready(function () {
|
|||
return;
|
||||
}
|
||||
|
||||
var postUrl = GlobalVariables.baseUrl + '/index.php/installation/ajax_install';
|
||||
var postData = {
|
||||
var url = GlobalVariables.baseUrl + '/index.php/installation/ajax_install';
|
||||
var data = {
|
||||
csrfToken: GlobalVariables.csrfToken,
|
||||
admin: JSON.stringify(getAdminData()),
|
||||
company: JSON.stringify(getCompanyData())
|
||||
admin: getAdminData(),
|
||||
company: getCompanyData()
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: postUrl,
|
||||
url: url,
|
||||
type: 'POST',
|
||||
data: postData,
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
data: data,
|
||||
dataType: 'json'
|
||||
})
|
||||
.done(function (response) {
|
||||
if (!GeneralFunctions.handleAjaxExceptions(response)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('.alert').text('Easy!Appointments has been successfully installed!');
|
||||
$('.alert').addClass('alert-success');
|
||||
$('.alert').show();
|
||||
$alert
|
||||
.text('Easy!Appointments has been successfully installed!')
|
||||
.addClass('alert-success')
|
||||
.show();
|
||||
|
||||
setTimeout(function () {
|
||||
window.location.href = GlobalVariables.baseUrl + '/index.php/backend';
|
||||
}, 1000);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
// Treat the error the same way as php exceptions.
|
||||
var exc = {
|
||||
exceptions: [
|
||||
JSON.stringify({
|
||||
message: 'The installation could not be completed due to an ' +
|
||||
'unexpected issue. Please check the browser\'s console for ' +
|
||||
'more information.'
|
||||
})
|
||||
]
|
||||
};
|
||||
GeneralFunctions.handleAjaxExceptions(exc);
|
||||
console.log(exc.exceptions[0].message, jqXHR, textStatus, errorThrown);
|
||||
}
|
||||
});
|
||||
})
|
||||
.fail(GeneralFunctions.ajaxFailureHandler);
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -82,7 +71,7 @@ $(document).ready(function () {
|
|||
*/
|
||||
function validate() {
|
||||
try {
|
||||
$('.alert').hide();
|
||||
$alert.hide();
|
||||
$('input').closest('.form-group').removeClass('has-error');
|
||||
|
||||
// Check for empty fields.
|
||||
|
@ -123,9 +112,11 @@ $(document).ready(function () {
|
|||
}
|
||||
|
||||
return true;
|
||||
} catch (exc) {
|
||||
$('.alert').text(exc);
|
||||
$('.alert').show();
|
||||
} catch (error) {
|
||||
$alert
|
||||
.text(error)
|
||||
.show();
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
||||
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
|
@ -234,7 +234,7 @@
|
|||
// Make all cells in current row editable.
|
||||
$(this).parent().parent().children().trigger('edit');
|
||||
$(this).parent().parent().find('.break-start input, .break-end input').timepicker({
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm',
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm TT' : 'HH:mm',
|
||||
currentText: EALang.now,
|
||||
closeText: EALang.close,
|
||||
timeOnlyTitle: EALang.select_time,
|
||||
|
@ -295,7 +295,7 @@
|
|||
end = Date.parse($modifiedRow.find('.break-end input').val());
|
||||
|
||||
if (start > end) {
|
||||
$modifiedRow.find('.break-end input').val(start.addHours(1).toString(GlobalVariables.timeFormat));
|
||||
$modifiedRow.find('.break-end input').val(start.addHours(1).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm'));
|
||||
}
|
||||
|
||||
this.enableSubmit = true;
|
||||
|
@ -361,7 +361,7 @@
|
|||
if (disabled == false) {
|
||||
// Set timepickers where needed.
|
||||
$('.working-plan input:text').timepicker({
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : GlobalVariables.timeFormat,
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm TT' : 'HH:mm',
|
||||
currentText: EALang.now,
|
||||
closeText: EALang.close,
|
||||
timeOnlyTitle: EALang.select_time,
|
||||
|
@ -375,7 +375,7 @@
|
|||
end = Date.parse($(this).parent().parent().find('.work-end').val());
|
||||
|
||||
if (start > end) {
|
||||
$(this).parent().parent().find('.work-end').val(start.addHours(1).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : GlobalVariables.timeFormat));
|
||||
$(this).parent().parent().find('.work-end').val(start.addHours(1).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm'));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue