[WEB-682] feat: cycles list filtering and searching (#3910)

* chore: implemented cycles list filters and ordering

* chore: active cycle tab updated

* refactor: cycles folder structure

* fix: name search inout auto-focus

* fix: cycles ordering

* refactor: move cycle filters logic to mobx store from local storage

* chore: show completed cycles in a disclosure

* chore: added completed cycles count

* refactor: cycles mapping logic

---------

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
Aaryan Khandelwal
2024-03-11 21:00:05 +05:30
committed by GitHub
parent 4b30339a59
commit 535731141f
53 changed files with 1666 additions and 545 deletions

View File

@@ -1,7 +1,8 @@
export * from "./use-application";
export * from "./use-event-tracker";
export * from "./use-calendar-view";
export * from "./use-cycle-filter";
export * from "./use-cycle";
export * from "./use-event-tracker";
export * from "./use-dashboard";
export * from "./use-estimate";
export * from "./use-global-view";

View File

@@ -0,0 +1,11 @@
import { useContext } from "react";
// mobx store
import { StoreContext } from "contexts/store-context";
// types
import { ICycleFilterStore } from "store/cycle_filter.store";
export const useCycleFilter = (): ICycleFilterStore => {
const context = useContext(StoreContext);
if (context === undefined) throw new Error("useCycleFilter must be used within StoreProvider");
return context.cycleFilter;
};