ajout du dossier php pour mettre tout les fichiers php
This commit is contained in:
@@ -290,7 +290,7 @@ const NewLeaveRequestModal = ({
|
||||
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',
|
||||
body: formDataToSend
|
||||
});
|
||||
|
||||
@@ -52,10 +52,10 @@ export const AuthProvider = ({ children }) => {
|
||||
const login = async (email, password) => {
|
||||
try {
|
||||
const possibleUrls = [
|
||||
'http://localhost/GTA/project/public/login.php',
|
||||
'http://localhost:80/GTA/project/public/login.php',
|
||||
'http://localhost/GTA/public/login.php',
|
||||
'http://localhost/public/login.php'
|
||||
'http://localhost/GTA/project/public/php/login.php',
|
||||
'http://localhost:80/GTA/project/public/php/login.php',
|
||||
'http://localhost/GTA/public/php/login.php',
|
||||
'http://localhost/public/php/login.php'
|
||||
];
|
||||
|
||||
let response = null;
|
||||
|
||||
@@ -88,7 +88,7 @@ const Calendar = () => {
|
||||
const loadTeamLeaves = async () => {
|
||||
if (user?.id) {
|
||||
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();
|
||||
if (data.success) {
|
||||
setTeamLeaves(data.leaves || []);
|
||||
|
||||
@@ -29,7 +29,7 @@ const Dashboard = () => {
|
||||
|
||||
const fetchLeaveCounters = async () => {
|
||||
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 - User ID utilisé:', user.id);
|
||||
|
||||
@@ -84,7 +84,7 @@ const Dashboard = () => {
|
||||
console.log(' Dashboard - Début fetchAllRequests pour user:', user?.id);
|
||||
|
||||
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);
|
||||
|
||||
const response = await fetch(url);
|
||||
@@ -121,7 +121,7 @@ const Dashboard = () => {
|
||||
}
|
||||
|
||||
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',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -144,7 +144,7 @@ const Dashboard = () => {
|
||||
};
|
||||
|
||||
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) => {
|
||||
|
||||
@@ -44,7 +44,7 @@ const Manager = () => {
|
||||
|
||||
const fetchTeamMembers = async () => {
|
||||
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();
|
||||
console.log('Réponse équipe:', text);
|
||||
|
||||
@@ -60,7 +60,7 @@ const Manager = () => {
|
||||
|
||||
const fetchPendingRequests = async () => {
|
||||
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();
|
||||
console.log('Réponse demandes en attente:', text);
|
||||
|
||||
@@ -76,7 +76,7 @@ const Manager = () => {
|
||||
|
||||
const fetchAllTeamRequests = async () => {
|
||||
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();
|
||||
console.log('Réponse toutes demandes équipe:', text);
|
||||
|
||||
@@ -94,7 +94,7 @@ const Manager = () => {
|
||||
|
||||
const handleValidateRequest = async (requestId, action, comment = '') => {
|
||||
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',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
@@ -69,7 +69,7 @@ const Requests = () => {
|
||||
|
||||
const fetchLeaveCounters = async () => {
|
||||
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();
|
||||
let data;
|
||||
try {
|
||||
@@ -89,7 +89,7 @@ const Requests = () => {
|
||||
|
||||
const fetchAllRequests = async () => {
|
||||
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 text = await response.text();
|
||||
let data;
|
||||
|
||||
Reference in New Issue
Block a user