forked from jebaGem/AngularRedux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch-customer.state.ts
45 lines (41 loc) · 1.21 KB
/
search-customer.state.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
export enum SearchLoadingState {
loading = 'loading',
complete = 'loadingComplete',
searchInProgress = 'searchInProgress',
error = 'errorOccurred',
searchError = 'searchError'
}
export interface ISearchCustomerState {
// store/search customer model
//
// 'searchCustomerResult'
// contains the search customer result items
//
// 'searchCustomerResultLastUpdate'
// contain the information when the searchCustomerResult array has been updated
//
// 'showSelectedCustomerTooltip'
// stores selected customerId
//
// 'showSelectedCustomerTooltip'
// shows whether to display/hide the tooltip for customer selection
searchResult: string[];
searchType: string;
searchKey: string;
customerId?: string;
consentSelected: boolean;
showSelectCustomerTooltip: boolean;
showConsentToolTip: boolean;
loadingState: SearchLoadingState;
displayLockedBubble?: boolean;
}
export const initialSearchCustomerState: ISearchCustomerState = {
searchResult: undefined,
searchType: 'id',
searchKey: '',
consentSelected: false,
showSelectCustomerTooltip: false,
showConsentToolTip: false,
customerId: null,
loadingState: SearchLoadingState.loading
};