ajout du dossier php pour mettre tout les fichiers php

This commit is contained in:
2025-08-13 10:09:47 +02:00
parent e4eb8a945c
commit 9fb0c0a27f
18 changed files with 16 additions and 16 deletions

View File

@@ -290,7 +290,7 @@ const NewLeaveRequestModal = ({
formDataToSend.append(`medicalDocuments[]`, file); formDataToSend.append(`medicalDocuments[]`, file);
}); });
const response = await fetch('http://localhost/GTA/project/public/submitLeaveRequest.php', { const response = await fetch('http://localhost/GTA/project/public/php/submitLeaveRequest.php', {
method: 'POST', method: 'POST',
body: formDataToSend body: formDataToSend
}); });

View File

@@ -52,10 +52,10 @@ export const AuthProvider = ({ children }) => {
const login = async (email, password) => { const login = async (email, password) => {
try { try {
const possibleUrls = [ const possibleUrls = [
'http://localhost/GTA/project/public/login.php', 'http://localhost/GTA/project/public/php/login.php',
'http://localhost:80/GTA/project/public/login.php', 'http://localhost:80/GTA/project/public/php/login.php',
'http://localhost/GTA/public/login.php', 'http://localhost/GTA/public/php/login.php',
'http://localhost/public/login.php' 'http://localhost/public/php/login.php'
]; ];
let response = null; let response = null;

View File

@@ -88,7 +88,7 @@ const Calendar = () => {
const loadTeamLeaves = async () => { const loadTeamLeaves = async () => {
if (user?.id) { if (user?.id) {
try { try {
const response = await fetch(`http://localhost/GTA/project/public/getTeamLeaves.php?user_id=${user.id}`); const response = await fetch(`http://localhost/GTA/project/public/php/getTeamLeaves.php?user_id=${user.id}`);
const data = await response.json(); const data = await response.json();
if (data.success) { if (data.success) {
setTeamLeaves(data.leaves || []); setTeamLeaves(data.leaves || []);

View File

@@ -29,7 +29,7 @@ const Dashboard = () => {
const fetchLeaveCounters = async () => { const fetchLeaveCounters = async () => {
try { try {
const url = `http://localhost/GTA/project/public/getLeaveCounters.php?user_id=${user.id}`; const url = `http://localhost/GTA/project/public/php/getLeaveCounters.php?user_id=${user.id}`;
console.log(' Dashboard - Récupération des compteurs:', url); console.log(' Dashboard - Récupération des compteurs:', url);
console.log(' Dashboard - User ID utilisé:', user.id); console.log(' Dashboard - User ID utilisé:', user.id);
@@ -84,7 +84,7 @@ const Dashboard = () => {
console.log(' Dashboard - Début fetchAllRequests pour user:', user?.id); console.log(' Dashboard - Début fetchAllRequests pour user:', user?.id);
try { try {
const url = `http://localhost/GTA/project/public/getRequests.php?user_id=${user.id}`; const url = `http://localhost/GTA/project/public/php/getRequests.php?user_id=${user.id}`;
console.log(' Dashboard - URL appelée:', url); console.log(' Dashboard - URL appelée:', url);
const response = await fetch(url); const response = await fetch(url);
@@ -121,7 +121,7 @@ const Dashboard = () => {
} }
try { try {
const response = await fetch('http://localhost/GTA/project/public/resetLeaveCounters.php', { const response = await fetch('http://localhost/GTA/project/public/php/resetLeaveCounters.php', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@@ -144,7 +144,7 @@ const Dashboard = () => {
}; };
const openManualResetPage = () => { const openManualResetPage = () => {
window.open('http://localhost/GTA/project/public/manualResetCounters.php', '_blank'); window.open('http://localhost/GTA/project/public/php/manualResetCounters.php', '_blank');
}; };
const getStatusColor = (status) => { const getStatusColor = (status) => {

View File

@@ -44,7 +44,7 @@ const Manager = () => {
const fetchTeamMembers = async () => { const fetchTeamMembers = async () => {
try { try {
const response = await fetch(`http://localhost/GTA/project/public/getTeamMembers.php?manager_id=${user.id}`); const response = await fetch(`http://localhost/GTA/project/public/php/getTeamMembers.php?manager_id=${user.id}`);
const text = await response.text(); const text = await response.text();
console.log('Réponse équipe:', text); console.log('Réponse équipe:', text);
@@ -60,7 +60,7 @@ const Manager = () => {
const fetchPendingRequests = async () => { const fetchPendingRequests = async () => {
try { try {
const response = await fetch(`http://localhost/GTA/project/public/getPendingRequests.php?manager_id=${user.id}`); const response = await fetch(`http://localhost/GTA/project/public/php/getPendingRequests.php?manager_id=${user.id}`);
const text = await response.text(); const text = await response.text();
console.log('Réponse demandes en attente:', text); console.log('Réponse demandes en attente:', text);
@@ -76,7 +76,7 @@ const Manager = () => {
const fetchAllTeamRequests = async () => { const fetchAllTeamRequests = async () => {
try { try {
const response = await fetch(`http://localhost/GTA/project/public/getAllTeamRequests.php?SuperieurId=${user.id}`); const response = await fetch(`http://localhost/GTA/project/public/php/getAllTeamRequests.php?SuperieurId=${user.id}`);
const text = await response.text(); const text = await response.text();
console.log('Réponse toutes demandes équipe:', text); console.log('Réponse toutes demandes équipe:', text);
@@ -94,7 +94,7 @@ const Manager = () => {
const handleValidateRequest = async (requestId, action, comment = '') => { const handleValidateRequest = async (requestId, action, comment = '') => {
try { try {
const response = await fetch('http://localhost/GTA/project/public/validateRequest.php', { const response = await fetch('http://localhost/GTA/project/public/php/validateRequest.php', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',

View File

@@ -69,7 +69,7 @@ const Requests = () => {
const fetchLeaveCounters = async () => { const fetchLeaveCounters = async () => {
try { try {
const response = await fetch(`http://localhost/GTA/project/public/getLeaveCounters.php?user_id=${user.id}`); const response = await fetch(`http://localhost/GTA/project/public/php/getLeaveCounters.php?user_id=${user.id}`);
const text = await response.text(); const text = await response.text();
let data; let data;
try { try {
@@ -89,7 +89,7 @@ const Requests = () => {
const fetchAllRequests = async () => { const fetchAllRequests = async () => {
try { try {
const url = `http://localhost/GTA/project/public/getRequests.php?user_id=${user.id}`; const url = `http://localhost/GTA/project/public/php/getRequests.php?user_id=${user.id}`;
const response = await fetch(url); const response = await fetch(url);
const text = await response.text(); const text = await response.text();
let data; let data;