mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2026-10-27 13:54:22 +00:00
Feature/persist state (#191)
* persist SP implementation * add account filter check after refresh * store recent calls and alerts filter --------- Co-authored-by: EgleHelms <e.helms@cognigy.com>
This commit is contained in:
1 parent
51c2285bfb
commit
af3e724240
17 files changed
+184
-6
No files matched your search
@@ -5,6 +5,7 @@ import { Icons } from "src/components/icons";
|
||||
|
||||
import type { Account } from "src/api/types";
|
||||
import { hasLength, sortLocaleName } from "src/utils";
|
||||
import { setAccountFilter } from "src/store/localStore";
|
||||
|
||||
export type AccountFilterProps = {
|
||||
label?: string;
|
||||
@@ -43,7 +44,10 @@ export const AccountFilter = ({
|
||||
id="account_filter"
|
||||
name="account_filter"
|
||||
value={accountSid}
|
||||
onChange={(e) => setAccountSid(e.target.value)}
|
||||
onChange={(e) => {
|
||||
setAccountSid(e.target.value);
|
||||
setAccountFilter(e.target.value);
|
||||
}}
|
||||
onFocus={() => setFocus(true)}
|
||||
onBlur={() => setFocus(false)}
|
||||
>
|
||||
|
||||
@@ -4,6 +4,8 @@ import { classNames } from "jambonz-ui";
|
||||
import { Icons } from "src/components/icons";
|
||||
|
||||
import type { SelectorOption } from "./forms/selector";
|
||||
import { setQueryFilter } from "src/store/localStore";
|
||||
import { createFilterString } from "src/utils";
|
||||
|
||||
type SelectFilterProps = {
|
||||
id: string;
|
||||
@@ -38,6 +40,11 @@ export const SelectFilter = ({
|
||||
value={filterValue}
|
||||
onChange={(e) => {
|
||||
setFilterValue(e.target.value);
|
||||
const advancedFilter = createFilterString(
|
||||
e.target.value,
|
||||
label as string
|
||||
);
|
||||
setQueryFilter(advancedFilter);
|
||||
|
||||
if (handleSelect) {
|
||||
handleSelect(e);
|
||||
|
||||
Reference in new issue
Block a user