diff --git a/src/application/controllers/Installation.php b/src/application/controllers/Installation.php index 29fab3d6..83a24f0e 100644 --- a/src/application/controllers/Installation.php +++ b/src/application/controllers/Installation.php @@ -84,6 +84,7 @@ class Installation extends CI_Controller { $admin = json_decode($_POST['admin'], true); $admin['settings']['username'] = $admin['username']; $admin['settings']['password'] = $admin['password']; + $admin['settings']['calendar_view'] = CALENDAR_VIEW_DEFAULT; unset($admin['username'], $admin['password']); $admin['id'] = $this->admins_model->add($admin); diff --git a/src/application/helpers/installation_helper.php b/src/application/helpers/installation_helper.php index fe2c2b12..b4b06931 100644 --- a/src/application/helpers/installation_helper.php +++ b/src/application/helpers/installation_helper.php @@ -40,6 +40,8 @@ function get_sample_service() { 'price' => 50.0, 'currency' => 'Euro', 'description' => 'This is a test service automatically inserted by the installer.', + 'availabilities_type' => 'flexible', + 'attendants_number' => 1, 'id_service_categories' => NULL ); } @@ -64,7 +66,8 @@ function get_sample_provider() { 'notifications' => FALSE, 'google_sync' => FALSE, 'sync_past_days' => 5, - 'sync_future_days' => 5 + 'sync_future_days' => 5, + 'calendar_view' => CALENDAR_VIEW_DEFAULT ) ); } diff --git a/src/assets/sql/structure.sql b/src/assets/sql/structure.sql index 40b9aeed..65681657 100644 --- a/src/assets/sql/structure.sql +++ b/src/assets/sql/structure.sql @@ -51,6 +51,8 @@ CREATE TABLE IF NOT EXISTS `ea_services` ( `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` bigint(20) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `id_service_categories` (`id_service_categories`) @@ -111,6 +113,7 @@ CREATE TABLE IF NOT EXISTS `ea_user_settings` ( `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;