mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 22:06:29 +02:00
Move database accessors in separate files to separate them from database definitions
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { PayloadAction, createSlice, createEntityAdapter } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, toastError, elementListFetch } from "./utils"
|
||||
import { JavGame, javGameListGet } from "../services/javGames"
|
||||
import { JavGame } from "../services/javGames"
|
||||
import { AppThunk, AppState } from "."
|
||||
import { javGameListGet } from "../services/javGamesAccessors"
|
||||
|
||||
const javGameAdapter = createEntityAdapter<JavGame>()
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
import { PayloadAction, createSlice, createEntityAdapter } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, elementAddFetch } from "./utils"
|
||||
import { PreVolunteer, preVolunteerAdd } from "../services/preVolunteers"
|
||||
import { PreVolunteer } from "../services/preVolunteers"
|
||||
import { preVolunteerAdd } from "../services/preVolunteersAccessors"
|
||||
|
||||
const preVolunteerAdapter = createEntityAdapter<PreVolunteer>()
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { PayloadAction, createSlice } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, toastError, elementValueFetch } from "./utils"
|
||||
import { preVolunteerCountGet } from "../services/preVolunteers"
|
||||
import { preVolunteerCountGet } from "../services/preVolunteersAccessors"
|
||||
import { AppThunk, AppState } from "."
|
||||
|
||||
export const initialState: StateRequest & { value?: number } = { readyStatus: "idle" }
|
||||
|
@@ -1,8 +1,9 @@
|
||||
import { PayloadAction, createSlice, createEntityAdapter, createSelector } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, toastError, elementListFetch } from "./utils"
|
||||
import { Team, teamListGet } from "../services/teams"
|
||||
import { Team } from "../services/teams"
|
||||
import { AppThunk, AppState, EntitiesRequest } from "."
|
||||
import { teamListGet } from "../services/teamsAccessors"
|
||||
|
||||
const teamAdapter = createEntityAdapter<Team>()
|
||||
|
||||
|
@@ -1,8 +1,9 @@
|
||||
import { PayloadAction, createSlice } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, toastError, elementFetch } from "./utils"
|
||||
import { Volunteer, volunteerGet } from "../services/volunteers"
|
||||
import { Volunteer } from "../services/volunteers"
|
||||
import { AppThunk, AppState } from "."
|
||||
import { volunteerGet } from "../services/volunteersAccessors"
|
||||
|
||||
type StateVolunteer = { entity?: Volunteer } & StateRequest
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
import { PayloadAction, createSlice, createEntityAdapter } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, toastError, toastSuccess, elementAddFetch } from "./utils"
|
||||
import { Volunteer, volunteerAdd } from "../services/volunteers"
|
||||
import { Volunteer } from "../services/volunteers"
|
||||
import { volunteerAdd } from "../services/volunteersAccessors"
|
||||
|
||||
const volunteerAdapter = createEntityAdapter<Volunteer>()
|
||||
|
||||
|
@@ -1,8 +1,9 @@
|
||||
import { PayloadAction, createSlice } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, toastError, elementFetch } from "./utils"
|
||||
import { VolunteerDayWishes, volunteerDayWishesSet } from "../services/volunteers"
|
||||
import { VolunteerDayWishes } from "../services/volunteers"
|
||||
import { AppThunk, AppState } from "."
|
||||
import { volunteerDayWishesSet } from "../services/volunteersAccessors"
|
||||
|
||||
type StateVolunteerDayWishesSet = { entity?: VolunteerDayWishes } & StateRequest
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
import { PayloadAction, createSlice } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, elementFetch } from "./utils"
|
||||
import { VolunteerForgot, volunteerForgot } from "../services/volunteers"
|
||||
import { VolunteerForgot } from "../services/volunteers"
|
||||
import { volunteerForgot } from "../services/volunteersAccessors"
|
||||
|
||||
type StateVolunteer = { entity?: VolunteerForgot } & StateRequest
|
||||
|
||||
|
@@ -1,8 +1,9 @@
|
||||
import { PayloadAction, createSlice, createEntityAdapter } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, toastError, elementListFetch } from "./utils"
|
||||
import { Volunteer, volunteerListGet } from "../services/volunteers"
|
||||
import { Volunteer } from "../services/volunteers"
|
||||
import { AppThunk, AppState } from "."
|
||||
import { volunteerListGet } from "../services/volunteersAccessors"
|
||||
|
||||
const volunteerAdapter = createEntityAdapter<Volunteer>()
|
||||
|
||||
|
@@ -1,11 +1,12 @@
|
||||
import { PayloadAction, createSlice } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, elementFetch } from "./utils"
|
||||
import { VolunteerLogin, volunteerLogin } from "../services/volunteers"
|
||||
import { VolunteerLogin } from "../services/volunteers"
|
||||
import { setJWT } from "../services/auth"
|
||||
import { AppDispatch } from "."
|
||||
import { setCurrentUser } from "./auth"
|
||||
import { fetchVolunteerNotifsSet } from "./volunteerNotifsSet"
|
||||
import { volunteerLogin } from "../services/volunteersAccessors"
|
||||
|
||||
type StateVolunteer = { entity?: VolunteerLogin } & StateRequest
|
||||
|
||||
|
@@ -1,8 +1,9 @@
|
||||
import { PayloadAction, createSlice } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, toastError, elementFetch } from "./utils"
|
||||
import { VolunteerNotifs, volunteerNotifsSet } from "../services/volunteers"
|
||||
import { VolunteerNotifs } from "../services/volunteers"
|
||||
import { AppThunk, AppState } from "."
|
||||
import { volunteerNotifsSet } from "../services/volunteersAccessors"
|
||||
|
||||
type StateVolunteerNotifsSet = { entity?: VolunteerNotifs } & StateRequest
|
||||
|
||||
|
@@ -1,11 +1,9 @@
|
||||
import { PayloadAction, createSlice } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, toastError, elementFetch } from "./utils"
|
||||
import {
|
||||
VolunteerParticipationDetails,
|
||||
volunteerParticipationDetailsSet,
|
||||
} from "../services/volunteers"
|
||||
import { VolunteerParticipationDetails } from "../services/volunteers"
|
||||
import { AppThunk, AppState } from "."
|
||||
import { volunteerParticipationDetailsSet } from "../services/volunteersAccessors"
|
||||
|
||||
type StateVolunteerParticipationDetailsSet = {
|
||||
entity?: VolunteerParticipationDetails
|
||||
|
@@ -1,7 +1,8 @@
|
||||
import { PayloadAction, createSlice, createEntityAdapter } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, toastError, toastSuccess, elementSet } from "./utils"
|
||||
import { Volunteer, volunteerSet } from "../services/volunteers"
|
||||
import { Volunteer } from "../services/volunteers"
|
||||
import { volunteerSet } from "../services/volunteersAccessors"
|
||||
|
||||
const volunteerAdapter = createEntityAdapter<Volunteer>()
|
||||
|
||||
|
@@ -1,8 +1,9 @@
|
||||
import { PayloadAction, createSlice } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, toastError, elementFetch } from "./utils"
|
||||
import { VolunteerTeamWishes, volunteerTeamWishesSet } from "../services/volunteers"
|
||||
import { VolunteerTeamWishes } from "../services/volunteers"
|
||||
import { AppThunk, AppState } from "."
|
||||
import { volunteerTeamWishesSet } from "../services/volunteersAccessors"
|
||||
|
||||
type StateVolunteerTeamWishesSet = { entity?: VolunteerTeamWishes } & StateRequest
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
import { PayloadAction, createSlice, createEntityAdapter } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, toastError, toastSuccess, elementAddFetch } from "./utils"
|
||||
import { Wish, wishAdd } from "../services/wishes"
|
||||
import { Wish } from "../services/wishes"
|
||||
import { wishAdd } from "../services/wishesAccessors"
|
||||
|
||||
const wishAdapter = createEntityAdapter<Wish>()
|
||||
|
||||
|
@@ -1,8 +1,9 @@
|
||||
import { PayloadAction, createSlice, createEntityAdapter } from "@reduxjs/toolkit"
|
||||
|
||||
import { StateRequest, toastError, elementListFetch } from "./utils"
|
||||
import { Wish, wishListGet } from "../services/wishes"
|
||||
import { Wish } from "../services/wishes"
|
||||
import { AppThunk, AppState } from "."
|
||||
import { wishListGet } from "../services/wishesAccessors"
|
||||
|
||||
const wishAdapter = createEntityAdapter<Wish>()
|
||||
|
||||
|
Reference in New Issue
Block a user