54 lines
1.1 KiB
TypeScript
54 lines
1.1 KiB
TypeScript
import { createSlice } from "@reduxjs/toolkit";
|
|
|
|
interface AdvancedSearchState {
|
|
keyword: string;
|
|
transactionID: string;
|
|
transactionReferenceId: string;
|
|
user: string;
|
|
currency: string;
|
|
state: string;
|
|
statusDescription: string;
|
|
transactionType: string;
|
|
paymentMethod: string;
|
|
psps: string;
|
|
initialPsps: string;
|
|
merchants: string;
|
|
startDate: null | string;
|
|
endDate: null | string;
|
|
lastUpdatedFrom: null | string;
|
|
lastUpdatedTo: null | string;
|
|
minAmount: string;
|
|
maxAmount: string;
|
|
channel: string;
|
|
}
|
|
|
|
const initialState: AdvancedSearchState = {
|
|
keyword: "",
|
|
transactionID: "",
|
|
transactionReferenceId: "",
|
|
user: "",
|
|
currency: "",
|
|
state: "",
|
|
statusDescription: "",
|
|
transactionType: "",
|
|
paymentMethod: "",
|
|
psps: "",
|
|
initialPsps: "",
|
|
merchants: "",
|
|
startDate: null,
|
|
endDate: null,
|
|
lastUpdatedFrom: null,
|
|
lastUpdatedTo: null,
|
|
minAmount: "",
|
|
maxAmount: "",
|
|
channel: "",
|
|
};
|
|
|
|
const advancedSearchSlice = createSlice({
|
|
name: "advancedSearch",
|
|
initialState,
|
|
reducers: {},
|
|
});
|
|
|
|
export default advancedSearchSlice.reducer;
|