mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +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
|
||||
- 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
|
||||
- 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)
|
||||
- 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
|
||||
|
||||
|
@ -5061,7 +5061,7 @@
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"manually",
|
||||
"dynamic-regular",
|
||||
"hourly",
|
||||
"daily",
|
||||
"weekly",
|
||||
"monthly"
|
||||
|
@ -15,9 +15,6 @@ msgstr ""
|
||||
msgid "manually"
|
||||
msgstr ""
|
||||
|
||||
msgid "dynamic-regular"
|
||||
msgstr ""
|
||||
|
||||
msgid "daily"
|
||||
msgstr ""
|
||||
|
||||
|
@ -16,9 +16,6 @@ msgstr ""
|
||||
msgid "manually"
|
||||
msgstr "Manually"
|
||||
|
||||
msgid "dynamic-regular"
|
||||
msgstr "Dynamic regular"
|
||||
|
||||
msgid "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;
|
||||
CREATE VIEW chores_current
|
||||
AS
|
||||
@ -32,7 +37,6 @@ SELECT
|
||||
ELSE
|
||||
CASE h.period_type
|
||||
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 'daily' THEN DATETIME(MAX(l.tracked_time), '+' || CAST(h.period_interval AS TEXT) || ' day')
|
||||
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'));
|
||||
}
|
||||
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')
|
||||
{
|
||||
$('#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_DYNAMIC_REGULAR = 'dynamic-regular';
|
||||
|
||||
const CHORE_PERIOD_TYPE_MANUALLY = 'manually';
|
||||
|
||||
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 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_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('Cleaned the kitchen floor')}', 'daily', 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('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) 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
|
||||
|
@ -87,7 +87,7 @@
|
||||
'value' => $value,
|
||||
'min' => '0',
|
||||
'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">
|
||||
|
Loading…
x
Reference in New Issue
Block a user