feat: revert hack for time card columns, use scripts instead

This commit is contained in:
Brendan Hagan
2022-06-20 21:06:27 -04:00
parent f9525fab82
commit 4173d5017b
5 changed files with 273 additions and 309 deletions
-18
View File
@@ -52,24 +52,6 @@ String Card::identification() const {
}
}
String Card::valueOfDataKey(FieldP fieldP) {
String columnName = fieldP.get()->name;
if (columnName == "time_created") {
return time_created.Format("%Y-%m-%d %H:%M:%S").ToStdString();
}
else if (columnName == "time_modified") {
return time_modified.Format("%Y-%m-%d %H:%M:%S").ToStdString();
}
else if (columnName == "has_notes") {
return notes.empty() ? "N" : "Y";
}
ValueP val = data[fieldP];
if (val) return val->toString();
else return wxEmptyString;
}
bool Card::contains(QuickFilterPart const& query) const {
FOR_EACH_CONST(v, data) {
if (query.match(v->fieldP->name, v->toString())) return true;
-3
View File
@@ -61,9 +61,6 @@ public:
/// Get the identification of this card, an identification is something like a name, title, etc.
/** May return "" */
String identification() const;
String valueOfDataKey(FieldP fieldP);
/// Does any field contains the given query string?
bool contains(QuickFilterPart const& query) const;