Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #7

Merged
merged 108 commits into from
May 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
f84eecf
add default settings for language and timezone
tm8544 Mar 27, 2024
9a24fb6
Update 052_add_default_timezone_to_setting.php
tm8544 Mar 29, 2024
f3b9aa5
Update 053_add_default_language_to_settings.php
tm8544 Mar 29, 2024
1ab1f5b
Rename 052_add_default_timezone_to_setting.php to 054_add_default_tim…
tm8544 Mar 30, 2024
f47ce7a
Update Calendar.php
tm8544 Mar 30, 2024
db6c127
New lines moved to the end of file before // End
tm8544 Apr 8, 2024
3105ae6
Update 054_add_default_timezone_to_setting.php
tm8544 Apr 26, 2024
f02b276
Add missing lang() : Calendar view (default|table) selectors
sudwebdesign Apr 29, 2024
4f028d8
Fix refresh Appointments MONTH calendarView : current2active
sudwebdesign Apr 29, 2024
2cce9a8
Fix CodeIgniter creating a lot of session files
sudwebdesign Apr 29, 2024
3936b4e
Fix App lib Timezones::get_default_timezone() always UTC
sudwebdesign Apr 30, 2024
2bc5c5a
Installation labels translated in browser lang
sudwebdesign Apr 30, 2024
c81ba8d
Fix install alert msg not showed, pw confirm id + js errors lang
sudwebdesign Apr 30, 2024
8e415fc
Fix session::sess_regenerate $delete_old_session always null
sudwebdesign Apr 30, 2024
556b77c
Install: Admin Add Language selector + set timezone by server
sudwebdesign Apr 30, 2024
8bff8c0
Booking confirmation background by theme css + DRY
sudwebdesign Apr 30, 2024
174856f
Install: html lang + language & timezone provider same as admin
sudwebdesign Apr 30, 2024
8c3731a
Update composer and NPM dependencies
alextselegidis May 11, 2024
cc5331e
Make the search method order_by and offset use the provided values
alextselegidis May 11, 2024
bacea67
Create constant for future month search
alextselegidis May 11, 2024
c9bb9e8
Change the opacity of the datepicker while loading unavailable dates
alextselegidis May 11, 2024
0706d3f
The webhook actions are optional
alextselegidis May 11, 2024
88eda77
Expose the internal JS functions so that they be overriden
alextselegidis May 11, 2024
ea276bd
Move the allowed and optional fields to of CRUD controllers to new ov…
alextselegidis May 11, 2024
1fbe17a
Define get/set methods for related model resources (provider, secreta…
alextselegidis May 11, 2024
0041e29
Update exposed calendar page methods
alextselegidis May 11, 2024
b018542
Echo the slot as a comment so that it can be used by HTML replacement…
alextselegidis May 11, 2024
c1be588
Add slots to key positions in the app mark up
alextselegidis May 11, 2024
05ded5e
Wording
alextselegidis May 11, 2024
9afadc2
Rename the private switch label for more clarity
alextselegidis May 11, 2024
75d7d84
GitHub Actions with PHP 8.2
alextselegidis May 11, 2024
71ba82e
Restructure the links of the about page and add customize link
alextselegidis May 11, 2024
a00dd3f
Update 3rd party NPM libraries
alextselegidis May 11, 2024
09ac511
Add the matomo analytics site ID setting for the Matomo integration (…
alextselegidis May 11, 2024
2efff06
Merge pull request #1521 from sudwebdesign/booking-confirmation-backg…
alextselegidis May 11, 2024
89a74a2
Merge pull request #1520 from sudwebdesign/develop-view-page-installa…
alextselegidis May 11, 2024
9824095
Merge pull request #1519 from sudwebdesign/develop-get_default_timezo…
alextselegidis May 11, 2024
4c7ca40
Merge pull request #1518 from sudwebdesign/develop-config-sess_regene…
alextselegidis May 11, 2024
4542251
Merge pull request #1517 from sudwebdesign/develop-refreshCalendarApp…
alextselegidis May 11, 2024
d530aee
Merge pull request #1516 from sudwebdesign/develop-lang-calendar_view…
alextselegidis May 11, 2024
264f02b
Suppress session start warning
alextselegidis May 11, 2024
bbf8869
Automatically redirect logged in users to the calendar page
alextselegidis Mar 28, 2024
4570d08
Do not allow user to submit login without a username and a password
alextselegidis Apr 8, 2024
67a64e4
Include the status to the appointment notification
alextselegidis Apr 8, 2024
e81058a
Patch the empty month and year selection of blocked periods (#1494)
alextselegidis Apr 15, 2024
dfeb213
Reset the time selection when the user changes the non-working switch
alextselegidis Apr 15, 2024
01ddd00
Move the blocked period end date automatically on start date change (…
alextselegidis Apr 15, 2024
363ddee
Fix the array_find call
alextselegidis Apr 15, 2024
68431e3
Update CHANGELOG.md
alextselegidis Apr 26, 2024
07884d2
Update the Baikal Docker configuration and the related documentation …
alextselegidis Apr 26, 2024
a364e77
Update the HTTP client param comment
alextselegidis Apr 26, 2024
a9149ff
Add the Baikal credentials to docker.md
alextselegidis Apr 26, 2024
fe7b406
Return the message modal selector for better DOM handling if needed
alextselegidis Apr 26, 2024
ebb682f
Add additional handling for the next days filter
alextselegidis Apr 26, 2024
6304391
Various minor JS errors in calendar_default_view.js
alextselegidis Apr 26, 2024
eb19482
Various minor fixes in the appointment and provider models
alextselegidis Apr 26, 2024
8402868
Various fixes in the Calendar controller
alextselegidis Apr 26, 2024
5d82398
Add return types to all class methods
alextselegidis Apr 26, 2024
6e87789
Unset foreach variable
alextselegidis Apr 26, 2024
d8845ec
Allow users to edit events in all views
alextselegidis Apr 26, 2024
a8ac22f
Include the unavailabilities to the "all" display in the calendar
alextselegidis Apr 26, 2024
1e4fa88
Fix untranslated secretaries + providers js (errors)
sudwebdesign Apr 24, 2024
b9a4efc
Resolve conflicts
alextselegidis May 11, 2024
9ebeb89
Fix controller Booking : typo default phone_number
sudwebdesign Apr 24, 2024
d99709f
Add the reload button to the page notifications so that users can see…
alextselegidis Apr 26, 2024
39350c7
css layouts bg by theme
sudwebdesign Apr 23, 2024
3b5a2e7
Fix french typos, improve & add missing translations
sudwebdesign Apr 23, 2024
626d777
Idea : initialize calendar view scroll at time
sudwebdesign Apr 23, 2024
f3209b5
Slovak translations
krtcom Apr 17, 2024
a5aa7da
Revert scroll down
alextselegidis Apr 26, 2024
171623c
Fix the calendar drop and resize "undo" functionality
alextselegidis Apr 26, 2024
0784427
Set the Google attendee data only if all the values are available
alextselegidis Apr 26, 2024
55bdcf4
Added and improved Finnish translations
zikkee Feb 20, 2024
b0c0acd
French translation fixes
alextselegidis Apr 26, 2024
0d89bb7
Switch the duration with the appointment date time in the confirmatio…
alextselegidis May 8, 2024
2b49077
Suppress session warnings
alextselegidis May 9, 2024
f1a00b8
Update composer and NPM dependencies
alextselegidis May 11, 2024
949a73a
Make the search method order_by and offset use the provided values
alextselegidis May 11, 2024
37bfc08
Create constant for future month search
alextselegidis May 11, 2024
c33ebed
Change the opacity of the datepicker while loading unavailable dates
alextselegidis May 11, 2024
9007e97
The webhook actions are optional
alextselegidis May 11, 2024
e4ef2da
Expose the internal JS functions so that they be overriden
alextselegidis May 11, 2024
f1abeee
Move the allowed and optional fields to of CRUD controllers to new ov…
alextselegidis May 11, 2024
08998f3
Define get/set methods for related model resources (provider, secreta…
alextselegidis May 11, 2024
0e76641
Update exposed calendar page methods
alextselegidis May 11, 2024
3b01f9b
Echo the slot as a comment so that it can be used by HTML replacement…
alextselegidis May 11, 2024
fd57ddb
Add slots to key positions in the app mark up
alextselegidis May 11, 2024
8294dba
Wording
alextselegidis May 11, 2024
3e0f7e5
Rename the private switch label for more clarity
alextselegidis May 11, 2024
cde5801
GitHub Actions with PHP 8.2
alextselegidis May 11, 2024
6213471
Restructure the links of the about page and add customize link
alextselegidis May 11, 2024
3796843
Update 3rd party NPM libraries
alextselegidis May 11, 2024
33d189a
Add the matomo analytics site ID setting for the Matomo integration (…
alextselegidis May 11, 2024
79f4d50
Booking confirmation background by theme css + DRY
sudwebdesign Apr 30, 2024
ff599e2
Installation labels translated in browser lang
sudwebdesign Apr 30, 2024
a04c0ca
Fix install alert msg not showed, pw confirm id + js errors lang
sudwebdesign Apr 30, 2024
80ada71
Install: Admin Add Language selector + set timezone by server
sudwebdesign Apr 30, 2024
2e9bcac
Install: html lang + language & timezone provider same as admin
sudwebdesign Apr 30, 2024
1788f20
Fix App lib Timezones::get_default_timezone() always UTC
sudwebdesign Apr 30, 2024
97d9219
Fix CodeIgniter creating a lot of session files
sudwebdesign Apr 29, 2024
40cab55
Fix session::sess_regenerate $delete_old_session always null
sudwebdesign Apr 30, 2024
ea4be01
Fix refresh Appointments MONTH calendarView : current2active
sudwebdesign Apr 29, 2024
505abd0
Add missing lang() : Calendar view (default|table) selectors
sudwebdesign Apr 29, 2024
ffde07a
Suppress session start warning
alextselegidis May 11, 2024
9ad6608
Update translations for new timezone and language settings
alextselegidis May 11, 2024
4cf7c1e
Rename the migration classes
alextselegidis May 11, 2024
89c19e5
Merge branch 'refs/heads/tm8544-default_settings' into develop
alextselegidis May 11, 2024
8a7f6b1
Update CHANGELOG.md
alextselegidis May 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Install dependencies
uses: php-actions/composer@v6
with:
php_version: 8.1
php_version: 8.2
php_extensions: gd
version: 2
- name: PHPUnit Tests
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ developers to maintain and readjust their custom modifications on the main proje
- Add a SECURITY.md file to the repository (#1122)
- Add support for custom fields on customers (#1133)
- Add from email/name and reply-to settings in the email.php configuration file (#1465)
- Create a new setting that will define the default timezone of the application (#1390)

### Changed

Expand Down
2 changes: 1 addition & 1 deletion application/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
$config['sess_save_path'] = __DIR__ . '/../../storage/sessions';
$config['sess_match_ip'] = false;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = false;
$config['sess_regenerate_destroy'] = true;

/*
|--------------------------------------------------------------------------
Expand Down
37 changes: 20 additions & 17 deletions application/controllers/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@
*/
class Account extends EA_Controller
{
public array $allowed_user_fields = [
'id',
'first_name',
'last_name',
'email',
'mobile_number',
'phone_number',
'address',
'city',
'state',
'zip_code',
'notes',
'timezone',
'language',
'settings',
];
public array $allowed_user_setting_fields = ['username', 'password', 'notifications', 'calendar_view'];

/**
* Account constructor.
*/
Expand Down Expand Up @@ -90,24 +108,9 @@ public function save(): void

$account['id'] = session('user_id');

$this->users_model->only($account, [
'id',
'first_name',
'last_name',
'email',
'mobile_number',
'phone_number',
'address',
'city',
'state',
'zip_code',
'notes',
'timezone',
'language',
'settings',
]);
$this->users_model->only($account, $this->allowed_user_fields);

$this->users_model->only($account['settings'], ['username', 'password', 'notifications', 'calendar_view']);
$this->users_model->only($account['settings'], $this->allowed_user_setting_fields);

if (empty($account['password'])) {
unset($account['password']);
Expand Down
62 changes: 27 additions & 35 deletions application/controllers/Admins.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,25 @@
*/
class Admins extends EA_Controller
{
public array $allowed_admin_fields = [
'id',
'first_name',
'last_name',
'email',
'mobile_number',
'phone_number',
'address',
'city',
'state',
'zip_code',
'notes',
'timezone',
'language',
'settings',
];

public array $allowed_admin_setting_fields = ['username', 'password', 'notifications', 'calendar_view'];

/**
* Admins constructor.
*/
Expand Down Expand Up @@ -64,6 +83,8 @@ public function index(): void
'role_slug' => $role_slug,
'timezones' => $this->timezones->to_array(),
'min_password_length' => MIN_PASSWORD_LENGTH,
'default_language' => setting('default_language'),
'default_timezone' => setting('default_timezone'),
]);

html_vars([
Expand All @@ -89,11 +110,11 @@ public function search(): void

$keyword = request('keyword', '');

$order_by = 'update_datetime DESC';
$order_by = request('order_by', 'update_datetime DESC');

$limit = request('limit', 1000);

$offset = 0;
$offset = (int) request('offset', '0');

$admins = $this->admins_model->search($keyword, $limit, $offset, $order_by);

Expand All @@ -115,23 +136,9 @@ public function store(): void

$admin = request('admin');

$this->admins_model->only($admin, [
'first_name',
'last_name',
'email',
'mobile_number',
'phone_number',
'address',
'city',
'state',
'zip_code',
'notes',
'timezone',
'language',
'settings',
]);
$this->admins_model->only($admin, $this->allowed_admin_fields);

$this->admins_model->only($admin['settings'], ['username', 'password', 'notifications', 'calendar_view']);
$this->admins_model->only($admin['settings'], $this->allowed_admin_setting_fields);

$admin_id = $this->admins_model->save($admin);

Expand Down Expand Up @@ -180,24 +187,9 @@ public function update(): void

$admin = request('admin');

$this->admins_model->only($admin, [
'id',
'first_name',
'last_name',
'email',
'mobile_number',
'phone_number',
'address',
'city',
'state',
'zip_code',
'notes',
'timezone',
'language',
'settings',
]);
$this->admins_model->only($admin, $this->allowed_admin_fields);

$this->admins_model->only($admin['settings'], ['username', 'password', 'notifications', 'calendar_view']);
$this->admins_model->only($admin['settings'], $this->allowed_admin_setting_fields);

$admin_id = $this->admins_model->save($admin);

Expand Down
42 changes: 17 additions & 25 deletions application/controllers/Appointments.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@
*/
class Appointments extends EA_Controller
{
public array $allowed_appointment_fields = [
'id',
'start_datetime',
'end_datetime',
'location',
'notes',
'color',
'is_unavailability',
'id_users_provider',
'id_users_customer',
'id_services',
];

/**
* Appointments constructor.
*/
Expand Down Expand Up @@ -62,11 +75,11 @@ public function search(): void

$keyword = request('keyword', '');

$order_by = 'update_datetime DESC';
$order_by = request('order_by', 'update_datetime DESC');

$limit = request('limit', 1000);

$offset = 0;
$offset = (int) request('offset', '0');

$appointments = $this->appointments_model->search($keyword, $limit, $offset, $order_by);

Expand All @@ -88,17 +101,7 @@ public function store(): void

$appointment = json_decode(request('appointment'), true);

$this->appointments_model->only($appointment, [
'start_datetime',
'end_datetime',
'location',
'notes',
'color',
'is_unavailability',
'id_users_provider',
'id_users_customer',
'id_services',
]);
$this->appointments_model->only($appointment, $this->allowed_appointment_fields);

$appointment_id = $this->appointments_model->save($appointment);

Expand Down Expand Up @@ -147,18 +150,7 @@ public function update(): void

$appointment = json_decode(request('appointment'), true);

$this->appointments_model->only($appointment, [
'id',
'start_datetime',
'end_datetime',
'location',
'notes',
'color',
'is_unavailability',
'id_users_provider',
'id_users_customer',
'id_services',
]);
$this->appointments_model->only($appointment, $this->allowed_appointment_fields);

$appointment_id = $this->appointments_model->save($appointment);

Expand Down
16 changes: 6 additions & 10 deletions application/controllers/Blocked_periods.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*/
class Blocked_periods extends EA_Controller
{
public array $allowed_blocked_period_fields = ['id', 'name', 'start_datetime', 'end_datetime', 'notes'];

/**
* Blocked_periods constructor.
*/
Expand Down Expand Up @@ -90,11 +92,11 @@ public function search(): void

$keyword = request('keyword', '');

$order_by = 'update_datetime DESC';
$order_by = request('order_by', 'update_datetime DESC');

$limit = request('limit', 1000);

$offset = 0;
$offset = (int) request('offset', '0');

$blocked_periods = $this->blocked_periods_model->search($keyword, $limit, $offset, $order_by);

Expand All @@ -116,7 +118,7 @@ public function store(): void

$blocked_period = request('blocked_period');

$this->blocked_periods_model->only($blocked_period, ['name', 'start_datetime', 'end_datetime', 'notes']);
$this->blocked_periods_model->only($blocked_period, $this->allowed_blocked_period_fields);

$blocked_period_id = $this->blocked_periods_model->save($blocked_period);

Expand Down Expand Up @@ -165,13 +167,7 @@ public function update(): void

$blocked_period = request('blocked_period');

$this->blocked_periods_model->only($blocked_period, [
'id',
'name',
'start_datetime',
'end_datetime',
'notes',
]);
$this->blocked_periods_model->only($blocked_period, $this->allowed_blocked_period_fields);

$blocked_period_id = $this->blocked_periods_model->save($blocked_period);

Expand Down
Loading