@@ -19,6 +19,7 @@ export const fetchProjects = async () => {
1919
2020 return response . data || [ ] ;
2121 } catch ( error ) {
22+ // eslint-disable-next-line no-console
2223 console . error ( 'Error fetching projects:' , error ) ;
2324 throw new Error ( 'Failed to fetch projects' ) ;
2425 }
@@ -45,6 +46,7 @@ export const fetchPlannedCostBreakdown = async projectId => {
4546
4647 return response . data ;
4748 } catch ( error ) {
49+ // eslint-disable-next-line no-console
4850 console . error ( 'Error fetching planned cost breakdown:' , error ) ;
4951 throw new Error ( error . response ?. data ?. message || 'Failed to fetch planned cost breakdown' ) ;
5052 }
@@ -77,6 +79,7 @@ export const createOrUpdatePlannedCost = async (projectId, category, plannedCost
7779
7880 return response . data ;
7981 } catch ( error ) {
82+ // eslint-disable-next-line no-console
8083 console . error ( 'Error creating/updating planned cost:' , error ) ;
8184 throw new Error ( error . response ?. data ?. message || 'Failed to create/update planned cost' ) ;
8285 }
@@ -104,6 +107,7 @@ export const deletePlannedCost = async (projectId, category) => {
104107
105108 return response . data ;
106109 } catch ( error ) {
110+ // eslint-disable-next-line no-console
107111 console . error ( 'Error deleting planned cost:' , error ) ;
108112 throw new Error ( error . response ?. data ?. message || 'Failed to delete planned cost' ) ;
109113 }
@@ -127,6 +131,7 @@ export const getAllPlannedCostsForProject = async projectId => {
127131
128132 return response . data || [ ] ;
129133 } catch ( error ) {
134+ // eslint-disable-next-line no-console
130135 console . error ( 'Error fetching all planned costs:' , error ) ;
131136 throw new Error ( error . response ?. data ?. message || 'Failed to fetch planned costs' ) ;
132137 }
0 commit comments