mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: timer field (#5349)
* feat: wip timer field * feat: timer field fixing errors * feat: wip timer field frontend * fix: parsing TimerCellDataPB * feat: parse time string to minutes * fix: don't allow none number input * fix: timer filter * style: cargo fmt * fix: clippy errors * refactor: rename field type timer to time * refactor: missed some variable and files to rename * style: cargo fmt fix * feat: format time field type data in frontend * style: fix cargo fmt * fix: fixes after merge --------- Co-authored-by: Mathias Mogensen <mathiasrieckm@gmail.com>
This commit is contained in:
committed by
GitHub
parent
2d4300e931
commit
aa621a8d84
@ -202,6 +202,30 @@ class FilterBackendService {
|
||||
);
|
||||
}
|
||||
|
||||
Future<FlowyResult<void, FlowyError>> insertTimeFilter({
|
||||
required String fieldId,
|
||||
String? filterId,
|
||||
required NumberFilterConditionPB condition,
|
||||
String content = "",
|
||||
}) {
|
||||
final filter = TimeFilterPB()
|
||||
..condition = condition
|
||||
..content = content;
|
||||
|
||||
return filterId == null
|
||||
? insertFilter(
|
||||
fieldId: fieldId,
|
||||
fieldType: FieldType.Time,
|
||||
data: filter.writeToBuffer(),
|
||||
)
|
||||
: updateFilter(
|
||||
filterId: filterId,
|
||||
fieldId: fieldId,
|
||||
fieldType: FieldType.Time,
|
||||
data: filter.writeToBuffer(),
|
||||
);
|
||||
}
|
||||
|
||||
Future<FlowyResult<void, FlowyError>> insertFilter({
|
||||
required String fieldId,
|
||||
required FieldType fieldType,
|
||||
|
Reference in New Issue
Block a user