mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
3 files changed
+13
-5
No files matched your search
@@ -47,10 +47,6 @@ externalPort = 6000
|
|||||||
localPort = 44549
|
localPort = 44549
|
||||||
externalPort = 5173
|
externalPort = 5173
|
||||||
|
|
||||||
[[ports]]
|
|
||||||
localPort = 44701
|
|
||||||
externalPort = 8000
|
|
||||||
|
|
||||||
[[ports]]
|
[[ports]]
|
||||||
localPort = 44965
|
localPort = 44965
|
||||||
externalPort = 6800
|
externalPort = 6800
|
||||||
|
|||||||
@@ -41,6 +41,11 @@ export function DlcAlertModal({ isOpen, onClose, dlcStats, selectedStoreId }: Dl
|
|||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const [snoozeUntil, setSnoozeUntil] = useState<Date | null>(null);
|
const [snoozeUntil, setSnoozeUntil] = useState<Date | null>(null);
|
||||||
|
|
||||||
|
// Invalider les queries DLC quand le magasin change
|
||||||
|
useEffect(() => {
|
||||||
|
queryClient.invalidateQueries({ queryKey: ["/api/dlc-products"] });
|
||||||
|
}, [selectedStoreId, queryClient]);
|
||||||
|
|
||||||
// Fetch detailed DLC products for the modal
|
// Fetch detailed DLC products for the modal
|
||||||
const { data: expiredProducts = [] } = useQuery<DlcProduct[]>({
|
const { data: expiredProducts = [] } = useQuery<DlcProduct[]>({
|
||||||
queryKey: ["/api/dlc-products", "expires", selectedStoreId],
|
queryKey: ["/api/dlc-products", "expires", selectedStoreId],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
import { useAuthUnified } from "@/hooks/useAuthUnified";
|
import { useAuthUnified } from "@/hooks/useAuthUnified";
|
||||||
import { useStore } from "@/contexts/StoreContext";
|
import { useStore } from "@/contexts/StoreContext";
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
@@ -15,9 +15,16 @@ import { DlcAlertModal } from "@/components/DlcAlertModal";
|
|||||||
export default function Dashboard() {
|
export default function Dashboard() {
|
||||||
const { user } = useAuthUnified();
|
const { user } = useAuthUnified();
|
||||||
const { selectedStoreId } = useStore();
|
const { selectedStoreId } = useStore();
|
||||||
|
const queryClient = useQueryClient();
|
||||||
const [showAnnouncementModal, setShowAnnouncementModal] = useState(false);
|
const [showAnnouncementModal, setShowAnnouncementModal] = useState(false);
|
||||||
const [showDlcAlertModal, setShowDlcAlertModal] = useState(false);
|
const [showDlcAlertModal, setShowDlcAlertModal] = useState(false);
|
||||||
|
|
||||||
|
// Invalider les queries DLC quand le magasin change
|
||||||
|
useEffect(() => {
|
||||||
|
queryClient.invalidateQueries({ queryKey: ["/api/dlc-products"] });
|
||||||
|
queryClient.invalidateQueries({ queryKey: ["/api/dlc-products/stats"] });
|
||||||
|
}, [selectedStoreId, queryClient]);
|
||||||
|
|
||||||
const { data: stats } = useQuery({
|
const { data: stats } = useQuery({
|
||||||
queryKey: ['/api/stats/monthly', selectedStoreId],
|
queryKey: ['/api/stats/monthly', selectedStoreId],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
|
|||||||
Reference in new issue
Block a user