diff --git a/README.md b/README.md index 7ffb833..64287cb 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ views: | title | string | **Optional** | `"Todo"` | The title of the card. | | show_quantity | number | **Optional** | | The number of items you want to show in the card. The rest are either hidden or show in the overflow. | | show_days | number/range | **Optional** | | If an integer is specified (including `0`), overdue tasks and any occurring in the next `X` days are shown. E.g. `7` displays overdue tasks and any due in the next 7 days, whereas `0` only displays today's tasks and any overdue. If a range is specified, only tasks with a due date within that range are shown. E.g. `1..10` shows tasks due in the next 10 days, but not overdue tasks or tasks due today. If not specified, all items are shown. | +| show_due_date | bool | **Optional** | `true` | Show/hide the due date of chores and tasks. | | show_chores_without_due | bool | **Optional** | `true` | Show chores that do not have a due date. | | show_tasks_without_due | bool | **Optional** | `true` | Show tasks that do not have a due date. | | user_id | number/map | **Optional** | `1` | Id of the Grocy user performing the items. Default if not specified is `1`. A map may also be specified, see [here](#user_id)| diff --git a/grocy-chores-card.js b/grocy-chores-card.js index e1a82a7..2e04c4e 100644 --- a/grocy-chores-card.js +++ b/grocy-chores-card.js @@ -377,7 +377,7 @@ class GrocyChoresCard extends LitElement { } _shouldRenderDueInDays(item) { - return !this.hide_text_with_no_data || item.__due_date != null; + return this.show_due_date && (!this.hide_text_with_no_data || item.__due_date != null); } _renderDueInDays(item) { @@ -1602,6 +1602,7 @@ class GrocyChoresCard extends LitElement { this.show_unassigned = this.config.show_unassigned ?? false; this.show_enable_reschedule = this.config.show_enable_reschedule ?? false; this.show_skip_next = this.config.show_skip_next ?? false; + this.show_due_date = this.config.show_due_date ?? true; this.show_more_info_popup = this.config.show_more_info_popup ?? false; this.disable_show_assign_to_me = this.config.disable_show_assign_to_me ?? false; if (this.use_icons) {