mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Removed the dynamic regular chore period type (since it's the same as daily)
This commit is contained in:
parent
10d7d44825
commit
7d4c9fefa9
@ -51,8 +51,10 @@
|
|||||||
- Until now, the schedule starting point was the first tracked execution
|
- Until now, the schedule starting point was the first tracked execution
|
||||||
- For all existing chores, the start date will be set to the first tracked execution time (or today, for chores which were never tracked) on migration
|
- For all existing chores, the start date will be set to the first tracked execution time (or today, for chores which were never tracked) on migration
|
||||||
- The `Yearly` period type has been changed to be schedule the chore on the _same day_ each year
|
- The `Yearly` period type has been changed to be schedule the chore on the _same day_ each year
|
||||||
- This period type scheduled chores 1 year _after the last execution_ before, which is also possible by using the `Daily` period type and a period interval of 365 days - all existing `Yearly` schedules will be converted to that on migration
|
- This period type scheduled chores 1 year _after the last execution_ before, which is also possible by using the `Daily` period type and a period interval of 365 days - All existing `Yearly` schedules will be converted to that on migration
|
||||||
- Added a new `Hourly` period type (to schedule chores every `x` hours)
|
- Added a new `Hourly` period type (to schedule chores every `x` hours)
|
||||||
|
- Removed the period type `Dynamic regular`, since it's the same as `Daily`
|
||||||
|
- All existing `Dynamic regular` schedules will be converted to that on migration
|
||||||
|
|
||||||
### Calendar
|
### Calendar
|
||||||
|
|
||||||
|
@ -5061,7 +5061,7 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"manually",
|
"manually",
|
||||||
"dynamic-regular",
|
"hourly",
|
||||||
"daily",
|
"daily",
|
||||||
"weekly",
|
"weekly",
|
||||||
"monthly"
|
"monthly"
|
||||||
|
@ -15,9 +15,6 @@ msgstr ""
|
|||||||
msgid "manually"
|
msgid "manually"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "dynamic-regular"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "daily"
|
msgid "daily"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -16,9 +16,6 @@ msgstr ""
|
|||||||
msgid "manually"
|
msgid "manually"
|
||||||
msgstr "Manually"
|
msgstr "Manually"
|
||||||
|
|
||||||
msgid "dynamic-regular"
|
|
||||||
msgstr "Dynamic regular"
|
|
||||||
|
|
||||||
msgid "daily"
|
msgid "daily"
|
||||||
msgstr "Daily"
|
msgstr "Daily"
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
UPDATE chores
|
||||||
|
SET period_type = 'daily',
|
||||||
|
period_interval = period_days
|
||||||
|
WHERE period_type = 'dynamic-regular';
|
||||||
|
|
||||||
DROP VIEW chores_current;
|
DROP VIEW chores_current;
|
||||||
CREATE VIEW chores_current
|
CREATE VIEW chores_current
|
||||||
AS
|
AS
|
||||||
@ -32,7 +37,6 @@ SELECT
|
|||||||
ELSE
|
ELSE
|
||||||
CASE h.period_type
|
CASE h.period_type
|
||||||
WHEN 'manually' THEN '2999-12-31 23:59:59'
|
WHEN 'manually' THEN '2999-12-31 23:59:59'
|
||||||
WHEN 'dynamic-regular' THEN DATETIME(MAX(l.tracked_time), '+' || CAST(h.period_days AS TEXT) || ' day')
|
|
||||||
WHEN 'hourly' THEN DATETIME(MAX(l.tracked_time), '+' || CAST(h.period_interval AS TEXT) || ' hour')
|
WHEN 'hourly' THEN DATETIME(MAX(l.tracked_time), '+' || CAST(h.period_interval AS TEXT) || ' hour')
|
||||||
WHEN 'daily' THEN DATETIME(MAX(l.tracked_time), '+' || CAST(h.period_interval AS TEXT) || ' day')
|
WHEN 'daily' THEN DATETIME(MAX(l.tracked_time), '+' || CAST(h.period_interval AS TEXT) || ' day')
|
||||||
WHEN 'weekly' THEN (
|
WHEN 'weekly' THEN (
|
||||||
|
@ -152,13 +152,6 @@ $('.input-group-chore-period-type').on('change keyup', function(e)
|
|||||||
{
|
{
|
||||||
$('#chore-schedule-info').text(__t('This means the next execution of this chore is not scheduled'));
|
$('#chore-schedule-info').text(__t('This means the next execution of this chore is not scheduled'));
|
||||||
}
|
}
|
||||||
else if (periodType === 'dynamic-regular')
|
|
||||||
{
|
|
||||||
$("label[for='period_days']").text(__t("Period days"));
|
|
||||||
$("#period_days").attr("min", "0");
|
|
||||||
$("#period_days").removeAttr("max");
|
|
||||||
$('#chore-schedule-info').text(__n(periodDays, "This means the next execution of this chore is scheduled %s day after the last execution", "This means the next execution of this chore is scheduled %s days after the last execution"));
|
|
||||||
}
|
|
||||||
else if (periodType === 'hourly')
|
else if (periodType === 'hourly')
|
||||||
{
|
{
|
||||||
$('#chore-schedule-info').text(__n(periodInterval, "This means the next execution of this chore is scheduled %s hour after the last execution", "This means the next execution of this chore is scheduled %s hours after the last execution"));
|
$('#chore-schedule-info').text(__n(periodInterval, "This means the next execution of this chore is scheduled %s hour after the last execution", "This means the next execution of this chore is scheduled %s hours after the last execution"));
|
||||||
|
@ -16,8 +16,6 @@ class ChoresService extends BaseService
|
|||||||
|
|
||||||
const CHORE_PERIOD_TYPE_DAILY = 'daily';
|
const CHORE_PERIOD_TYPE_DAILY = 'daily';
|
||||||
|
|
||||||
const CHORE_PERIOD_TYPE_DYNAMIC_REGULAR = 'dynamic-regular';
|
|
||||||
|
|
||||||
const CHORE_PERIOD_TYPE_MANUALLY = 'manually';
|
const CHORE_PERIOD_TYPE_MANUALLY = 'manually';
|
||||||
|
|
||||||
const CHORE_PERIOD_TYPE_MONTHLY = 'monthly';
|
const CHORE_PERIOD_TYPE_MONTHLY = 'monthly';
|
||||||
|
@ -163,8 +163,8 @@ class DemoDataGeneratorService extends BaseService
|
|||||||
INSERT INTO meal_plan(day, type, note, section_id) VALUES ('{$saturdayThisWeek}', 'note', '{$this->__t_sql('Some good snacks')}', 3);
|
INSERT INTO meal_plan(day, type, note, section_id) VALUES ('{$saturdayThisWeek}', 'note', '{$this->__t_sql('Some good snacks')}', 3);
|
||||||
|
|
||||||
INSERT INTO chores (name, period_type, period_days) VALUES ('{$this->__t_sql('Changed towels in the bathroom')}', 'manually', 5); --1
|
INSERT INTO chores (name, period_type, period_days) VALUES ('{$this->__t_sql('Changed towels in the bathroom')}', 'manually', 5); --1
|
||||||
INSERT INTO chores (name, period_type, period_days, assignment_type, assignment_config, next_execution_assigned_to_user_id) VALUES ('{$this->__t_sql('Cleaned the kitchen floor')}', 'dynamic-regular', 7, 'random', '1,2,3,4', 1); --2
|
INSERT INTO chores (name, period_type, period_interval, assignment_type, assignment_config, next_execution_assigned_to_user_id) VALUES ('{$this->__t_sql('Cleaned the kitchen floor')}', 'daily', 7, 'random', '1,2,3,4', 1); --2
|
||||||
INSERT INTO chores (name, period_type, period_days, assignment_type, assignment_config, next_execution_assigned_to_user_id) VALUES ('{$this->__t_sql('Lawn mowed in the garden')}', 'dynamic-regular', 21, 'random', '1,2,3,4', 1); --3
|
INSERT INTO chores (name, period_type, period_interval, assignment_type, assignment_config, next_execution_assigned_to_user_id) VALUES ('{$this->__t_sql('Lawn mowed in the garden')}', 'daily', 21, 'random', '1,2,3,4', 1); --3
|
||||||
INSERT INTO chores (name, period_type, period_days) VALUES ('{$this->__t_sql('The thing which happens on the 5th of every month')}', 'monthly', 5); --4
|
INSERT INTO chores (name, period_type, period_days) VALUES ('{$this->__t_sql('The thing which happens on the 5th of every month')}', 'monthly', 5); --4
|
||||||
INSERT INTO chores (name, period_type) VALUES ('{$this->__t_sql('The thing which happens daily')}', 'daily'); --5
|
INSERT INTO chores (name, period_type) VALUES ('{$this->__t_sql('The thing which happens daily')}', 'daily'); --5
|
||||||
INSERT INTO chores (name, period_type, period_config) VALUES ('{$this->__t_sql('The thing which happens on Mondays and Wednesdays')}', 'weekly', 'monday,wednesday'); --6
|
INSERT INTO chores (name, period_type, period_config) VALUES ('{$this->__t_sql('The thing which happens on Mondays and Wednesdays')}', 'weekly', 'monday,wednesday'); --6
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
'value' => $value,
|
'value' => $value,
|
||||||
'min' => '0',
|
'min' => '0',
|
||||||
'additionalCssClasses' => 'input-group-chore-period-type',
|
'additionalCssClasses' => 'input-group-chore-period-type',
|
||||||
'additionalGroupCssClasses' => 'period-type-input period-type-dynamic-regular period-type-monthly'
|
'additionalGroupCssClasses' => 'period-type-input period-type-monthly'
|
||||||
))
|
))
|
||||||
|
|
||||||
<div class="form-group period-type-input period-type-weekly">
|
<div class="form-group period-type-input period-type-weekly">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user