show columns/rows of tasks without specified fields

This commit is contained in:
marlon-erler
2026-04-01 09:33:30 +00:00
parent feb5364315
commit 2ef4454131
8 changed files with 45 additions and 33 deletions
+19 -14
View File
@@ -322,7 +322,7 @@
function createTimestamp() { function createTimestamp() {
return (/* @__PURE__ */ new Date()).toISOString(); return (/* @__PURE__ */ new Date()).toISOString();
} }
function checkDoesObjectMatchReference(reference, stringEntryObject) { function checkDoesObjectMatchReference(reference, stringEntryObject, explicitEmptyValue = false) {
reference_entry_loop: for (const referenceEntry of Object.entries( reference_entry_loop: for (const referenceEntry of Object.entries(
reference reference
)) { )) {
@@ -338,10 +338,12 @@
return false; return false;
} }
} else { } else {
if (referenceValue == "" && (stringEntryObjectValue == void 0 || stringEntryObjectValue == "")) { if (explicitEmptyValue == false) {
return false; if (referenceValue == "" && (stringEntryObjectValue == void 0 || stringEntryObjectValue == "")) {
} else if (referenceValue == "") { return false;
continue reference_entry_loop; } else if (referenceValue == "") {
continue reference_entry_loop;
}
} }
if (stringEntryObjectValue != referenceValue) { if (stringEntryObjectValue != referenceValue) {
return false; return false;
@@ -355,7 +357,7 @@
for (const object of objects) { for (const object of objects) {
const stringEntryObject = converter(object); const stringEntryObject = converter(object);
const stringEntryObjectValue = stringEntryObject[key]; const stringEntryObjectValue = stringEntryObject[key];
if (stringEntryObjectValue == void 0 || stringEntryObjectValue == "") if (stringEntryObjectValue == void 0)
continue; continue;
values.add(stringEntryObjectValue.toString()); values.add(stringEntryObjectValue.toString());
} }
@@ -2651,7 +2653,8 @@
/// ///
filterTasksHeadline: "Filter Tasks", filterTasksHeadline: "Filter Tasks",
/// ///
renameCategoryInputPlaceholder: "Rename category," renameCategoryInputPlaceholder: "Rename category",
renameStatusInputPlaceholder: "Rename status"
}, },
calendar: { calendar: {
eventsBoard: "Events", eventsBoard: "Events",
@@ -2825,7 +2828,8 @@
taskTimeLabel: "Uhrzeit", taskTimeLabel: "Uhrzeit",
deleteTaskButton: "Aufgabe l\xF6schen", deleteTaskButton: "Aufgabe l\xF6schen",
filterTasksHeadline: "Aufgaben filtern", filterTasksHeadline: "Aufgaben filtern",
renameCategoryInputPlaceholder: "Kategorie umbenennen" renameCategoryInputPlaceholder: "Kategorie umbenennen",
renameStatusInputPlaceholder: "Status umbenennen"
}, },
calendar: { calendar: {
eventsBoard: "Ereignisse", eventsBoard: "Ereignisse",
@@ -2995,7 +2999,8 @@
taskTimeLabel: "Hora", taskTimeLabel: "Hora",
deleteTaskButton: "Eliminar tarea", deleteTaskButton: "Eliminar tarea",
filterTasksHeadline: "Filtrar Tareas", filterTasksHeadline: "Filtrar Tareas",
renameCategoryInputPlaceholder: "Renombrar categor\xEDa" renameCategoryInputPlaceholder: "Renombrar categor\xEDa",
renameStatusInputPlaceholder: "Renombrar estado"
}, },
calendar: { calendar: {
eventsBoard: "Eventos", eventsBoard: "Eventos",
@@ -3898,9 +3903,8 @@
propertyValues.add(existingValue); propertyValues.add(existingValue);
} }
for (const displayedValue of propertyValues.value.values()) { for (const displayedValue of propertyValues.value.values()) {
if (values.includes(displayedValue) == false) { if (values.includes(displayedValue)) continue;
propertyValues.remove(displayedValue); propertyValues.remove(displayedValue);
}
} }
} }
function createSortedPropertyValueState(propertyValues) { function createSortedPropertyValueState(propertyValues) {
@@ -3922,7 +3926,8 @@
objects.handleAddition((newObject) => { objects.handleAddition((newObject) => {
const doesMatch = checkDoesObjectMatchReference( const doesMatch = checkDoesObjectMatchReference(
reference, reference,
stringEntryObjectConverter(newObject) stringEntryObjectConverter(newObject),
true
); );
if (doesMatch == false) return; if (doesMatch == false) return;
matchingObjects.add(newObject); matchingObjects.add(newObject);
@@ -4151,7 +4156,7 @@
const view = /* @__PURE__ */ createElement("div", { class: "flex-row" }, /* @__PURE__ */ createElement("div", { class: "property-input-wrapper" }, /* @__PURE__ */ createElement( const view = /* @__PURE__ */ createElement("div", { class: "flex-row" }, /* @__PURE__ */ createElement("div", { class: "property-input-wrapper" }, /* @__PURE__ */ createElement(
"input", "input",
{ {
placeholder: translations.chatPage.task.renameCategoryInputPlaceholder, placeholder: translations.chatPage.task.renameStatusInputPlaceholder,
"bind:value": viewModel.inputValue, "bind:value": viewModel.inputValue,
"on:enter": viewModel.set "on:enter": viewModel.set
} }
+13 -11
View File
@@ -40,6 +40,7 @@ export function filterObjectsByStringEntries<T>(
export function checkDoesObjectMatchReference( export function checkDoesObjectMatchReference(
reference: StringEntryObject, reference: StringEntryObject,
stringEntryObject: StringEntryObject, stringEntryObject: StringEntryObject,
explicitEmptyValue: boolean = false,
): boolean { ): boolean {
reference_entry_loop: for (const referenceEntry of Object.entries( reference_entry_loop: for (const referenceEntry of Object.entries(
reference, reference,
@@ -68,15 +69,17 @@ export function checkDoesObjectMatchReference(
return false; return false;
} }
} else { } else {
// property must exist but be anything if (explicitEmptyValue == false) {
if ( // property must exist but be anything
referenceValue == "" && if (
(stringEntryObjectValue == undefined || referenceValue == "" &&
stringEntryObjectValue == "") (stringEntryObjectValue == undefined ||
) { stringEntryObjectValue == "")
return false; ) {
} else if (referenceValue == "") { return false;
continue reference_entry_loop; } else if (referenceValue == "") {
continue reference_entry_loop;
}
} }
// property must match // property must match
@@ -99,8 +102,7 @@ export function collectObjectValuesForKey<T>(
const stringEntryObject: StringEntryObject = converter(object); const stringEntryObject: StringEntryObject = converter(object);
const stringEntryObjectValue: Stringifiable | undefined = const stringEntryObjectValue: Stringifiable | undefined =
stringEntryObject[key]; stringEntryObject[key];
if (stringEntryObjectValue == undefined || stringEntryObjectValue == "") if (stringEntryObjectValue == undefined) continue;
continue;
values.add(stringEntryObjectValue.toString()); values.add(stringEntryObjectValue.toString());
} }
+1 -2
View File
@@ -118,8 +118,7 @@ function StatusNameCell(
<div class="property-input-wrapper"> <div class="property-input-wrapper">
<input <input
placeholder={ placeholder={
translations.chatPage.task translations.chatPage.task.renameStatusInputPlaceholder
.renameCategoryInputPlaceholder
} }
bind:value={viewModel.inputValue} bind:value={viewModel.inputValue}
on:enter={viewModel.set} on:enter={viewModel.set}
+1
View File
@@ -17,6 +17,7 @@ export function FilteredList<T>(
const doesMatch: boolean = checkDoesObjectMatchReference( const doesMatch: boolean = checkDoesObjectMatchReference(
reference, reference,
stringEntryObjectConverter(newObject), stringEntryObjectConverter(newObject),
true,
); );
if (doesMatch == false) return; if (doesMatch == false) return;
+2 -3
View File
@@ -47,9 +47,8 @@ export function collectPropertyValuesToState<T>(
} }
for (const displayedValue of propertyValues.value.values()) { for (const displayedValue of propertyValues.value.values()) {
if (values.includes(displayedValue) == false) { if (values.includes(displayedValue)) continue;
propertyValues.remove(displayedValue); propertyValues.remove(displayedValue);
}
} }
} }
+4 -1
View File
@@ -53,7 +53,10 @@ export function TaskSettingsModal(taskViewModel: TaskViewModel) {
<span> <span>
{translations.chatPage.task.taskNameLabel} {translations.chatPage.task.taskNameLabel}
</span> </span>
<input bind:value={taskViewModel.name} id="focused"></input> <input
bind:value={taskViewModel.name}
id="focused"
></input>
</div> </div>
</label> </label>
+4 -1
View File
@@ -240,7 +240,8 @@ const englishTranslations = {
/// ///
renameCategoryInputPlaceholder: "Rename category,", renameCategoryInputPlaceholder: "Rename category",
renameStatusInputPlaceholder: "Rename status",
}, },
calendar: { calendar: {
@@ -493,6 +494,7 @@ const allTranslations: { [language: string]: typeof englishTranslations } = {
filterTasksHeadline: "Aufgaben filtern", filterTasksHeadline: "Aufgaben filtern",
renameCategoryInputPlaceholder: "Kategorie umbenennen", renameCategoryInputPlaceholder: "Kategorie umbenennen",
renameStatusInputPlaceholder: "Status umbenennen",
}, },
calendar: { calendar: {
@@ -739,6 +741,7 @@ const allTranslations: { [language: string]: typeof englishTranslations } = {
filterTasksHeadline: "Filtrar Tareas", filterTasksHeadline: "Filtrar Tareas",
renameCategoryInputPlaceholder: "Renombrar categoría", renameCategoryInputPlaceholder: "Renombrar categoría",
renameStatusInputPlaceholder: "Renombrar estado",
}, },
calendar: { calendar: {
+1 -1
View File
@@ -16,4 +16,4 @@ export function setFocus() {
export function setFocusWithDelay() { export function setFocusWithDelay() {
setTimeout(setFocus, 100); setTimeout(setFocus, 100);
} }