commit new code

This commit is contained in:
Varun Kaushik 2025-05-28 16:33:02 +05:30
parent 183c4b9830
commit 209b32a621
23 changed files with 127 additions and 0 deletions

7
.gitignore vendored
View File

@ -1,5 +1,12 @@
<<<<<<< HEAD
/build
/node_modules
package-lock.json
/build
=======
node_modules/
node_modules/
/build
package-lock.json
>>>>>>> 1c0592d (commit new code)
.eslintcache

View File

@ -1,5 +1,9 @@
{
"name": "authsec-dashboard-react",
<<<<<<< HEAD
=======
"proxy": "http://157.66.191.31:33266",
>>>>>>> 1c0592d (commit new code)
"version": "1.2.4",
"description": "React version of Argon Dashboard by Creative Tim",
"main": "index.js",
@ -64,6 +68,10 @@
"bootstrap-switch-button-react": "^1.2.0",
"chart.js": "^4.4.8",
"classnames": "2.3.2",
<<<<<<< HEAD
=======
"cors-anywhere": "^0.4.4",
>>>>>>> 1c0592d (commit new code)
"file-saver": "^2.0.5",
"moment": "2.29.4",
"multiselect-react-dropdown": "^2.0.25",

View File

@ -47,7 +47,11 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<<<<<<< HEAD
<link href="https://fonts.googleapis.com/css2?family=GoogleFontName&display=swap" rel="stylesheet">
=======
<!-- <link href="https://fonts.googleapis.com/css2?family=GoogleFontName&display=swap" rel="stylesheet"> -->
>>>>>>> 1c0592d (commit new code)
<title>CloudNSure</title>
<!-- <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY_HERE"></script> -->

View File

@ -2,7 +2,11 @@
import apiService from '../APIRequestService/APIService';
<<<<<<< HEAD
const BASE_URL = `${process.env.REACT_APP_API_URL}/Rpt_builder2/Rpt_builder2`;
=======
const BASE_URL = `${process.env.REACT_APP_API_URL}Rpt_builder2/Rpt_builder2`;
>>>>>>> 1c0592d (commit new code)
export const addSQLReport = async (formData) => {

View File

@ -5,7 +5,11 @@ export const deleteReportSQL = async (id) => {
if (!id) {
throw new Error("ID is required for deletion.");
}
<<<<<<< HEAD
const BASE_URL = `${process.env.REACT_APP_API_URL}/Rpt_builder2/Rpt_builder2/${id}`;
=======
const BASE_URL = `${process.env.REACT_APP_API_URL}Rpt_builder2/Rpt_builder2/${id}`;
>>>>>>> 1c0592d (commit new code)
try {
const response = await apiService.delete(BASE_URL);
console.log("Delete response:", response.data);

View File

@ -4,7 +4,11 @@ import apiService from '../APIRequestService/APIService';// Assuming apiService
<<<<<<< HEAD
const BASE_URL = `${process.env.REACT_APP_API_URL}/Rpt_builder2/Rpt_builder2`;
=======
const BASE_URL = `${process.env.REACT_APP_API_URL}Rpt_builder2/Rpt_builder2`;
>>>>>>> 1c0592d (commit new code)
const ReportSqlBuilderApi = {
fetchUserDetails: async () => {

View File

@ -4,7 +4,11 @@ import apiService from '../APIRequestService/APIService';
export const UpdateReportSQLBuilder = async (id,formData) => {
<<<<<<< HEAD
const BASE_URL = `${process.env.REACT_APP_API_URL}/Rpt_builder2/Rpt_builder2/${id}`;
=======
const BASE_URL = `${process.env.REACT_APP_API_URL}Rpt_builder2/Rpt_builder2/${id}`;
>>>>>>> 1c0592d (commit new code)
try {
const response = await apiService.put(BASE_URL, formData);
console.log("update response: ",response.data);

View File

@ -4064,7 +4064,11 @@ input[type="button"].btn-block {
~ .custom-control-label::before {
border-color: #5e72e4;
background-color: #5e72e4;
<<<<<<< HEAD
box-shadow: ;
=======
box-shadow: 29;
>>>>>>> 1c0592d (commit new code)
}
.custom-checkbox

View File

@ -65,7 +65,11 @@ function APIRegistry() {
}, []);
const fetchApiEntries = async () => {
<<<<<<< HEAD
const apiUrl = `${process.env.REACT_APP_API_URL}/Api_registery_header/Api_registery_header`;
=======
const apiUrl = `${process.env.REACT_APP_API_URL}Api_registery_header/Api_registery_header`;
>>>>>>> 1c0592d (commit new code)
const token = localStorage.getItem("authToken");
if (!token) {

View File

@ -57,7 +57,11 @@ function AccessTypeManagement() {
useEffect(() => {
const fetchAccessTypes = async () => {
<<<<<<< HEAD
const apiUrl = `${process.env.REACT_APP_API_URL}/api/getAllAccessTypes`;
=======
const apiUrl = `${process.env.REACT_APP_API_URL}api/getAllAccessTypes`;
>>>>>>> 1c0592d (commit new code)
const token = localStorage.getItem("authToken");
if (!token) {

View File

@ -29,7 +29,11 @@
// useEffect(() => {
// const fetchData = async () => {
// try {
<<<<<<< HEAD
// const response = await fetch('http://localhost:9292/api/extension');
=======
// const response = await fetch('http://157.66.191.31:33266/api/extension');
>>>>>>> 1c0592d (commit new code)
// const data = await response.json();
// setMenuItems(data);
// } catch (error) {

View File

@ -420,7 +420,11 @@ function Dashboard() {
useEffect(() => {
const fetchMenuItems = async () => {
<<<<<<< HEAD
const apiUrl = `${process.env.REACT_APP_API_URL}/fndMenu/menuloadbyuser`;
=======
const apiUrl = `${process.env.REACT_APP_API_URL}fndMenu/menuloadbyuser`;
>>>>>>> 1c0592d (commit new code)
const token = localStorage.getItem("authToken");
if (!token) {

View File

@ -34,7 +34,11 @@ function DashboardView({onDashboardCharts}) {
}, [showTable]);
const fetchData = async () => {
<<<<<<< HEAD
const apiUrl = `${process.env.REACT_APP_API_URL}/getNotificationByUser`;
=======
const apiUrl = `${process.env.REACT_APP_API_URL}getNotificationByUser`;
>>>>>>> 1c0592d (commit new code)
const token = localStorage.getItem("authToken");
if (!token) {
@ -63,7 +67,11 @@ function DashboardView({onDashboardCharts}) {
};
const fetchDashboardCardData = async () => {
<<<<<<< HEAD
const apiUrl = `${process.env.REACT_APP_API_URL}/get_Dashboard_header`;
=======
const apiUrl = `${process.env.REACT_APP_API_URL}get_Dashboard_header`;
>>>>>>> 1c0592d (commit new code)
const token = localStorage.getItem("authToken");
if (!token) {

View File

@ -12,7 +12,11 @@ function DataType3() {
useEffect(() => {
const fetchData = async () => {
try {
<<<<<<< HEAD
const response = await fetch('http://localhost:9292/fndMenu/menuloadbyuser', {
=======
const response = await fetch(`${process.env.REACT_APP_API_URL}fndMenu/menuloadbyuser`, {
>>>>>>> 1c0592d (commit new code)
method: 'GET',
headers: {
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzeXNhZG1pbiIsInNjb3BlcyI6IlJPTEVfRGV2ZWxvcGVyLFJPTEVfQURNSU4iLCJpYXQiOjE3MTYzNDkyNTEsImV4cCI6MTcxODk0MTI1MX0.fLW0-Uvb6X1fLQNzdiNiYeHO3lMYa1bsFAmOJkGCdRY'

View File

@ -139,7 +139,11 @@ const DynamicForm2 = () => {
const handleBuild = async (id) => {
try {
<<<<<<< HEAD
const apiUrl = `${process.env.REACT_APP_API_URL}/api/dynamic_form_build`;
=======
const apiUrl = `${process.env.REACT_APP_API_URL}api/dynamic_form_build`;
>>>>>>> 1c0592d (commit new code)
const token = localStorage.getItem("authToken");
await axios.post(
apiUrl,

View File

@ -116,7 +116,11 @@ function MenuAccessControl({ selected, Sync }) {
useEffect(() => {
<<<<<<< HEAD
const apiUrl = `${process.env.REACT_APP_API_URL}/api/getAllUsrGrp`;
=======
const apiUrl = `${process.env.REACT_APP_API_URL}api/getAllUsrGrp`;
>>>>>>> 1c0592d (commit new code)
// const token = localStorage.getItem("CurrentUser");
const token = getToken()
const fetchMenuItems = async () => {

View File

@ -1225,7 +1225,11 @@ const MenuAccessControl = () => {
const fetchData = async () => {
<<<<<<< HEAD
const apiUrl = `${process.env.REACT_APP_API_URL}/api1/getusracces1/${usrgrp}`;
=======
const apiUrl = `${process.env.REACT_APP_API_URL}api1/getusracces1/${usrgrp}`;
>>>>>>> 1c0592d (commit new code)
const token = localStorage.getItem("authToken");
try {
setLoading(true); // Start loading

View File

@ -103,7 +103,11 @@
// const handleSubMenuClick = async (menuItemId) => {
// try {
<<<<<<< HEAD
// const apiUrl = `http://localhost:9292/api1/submenu1/${menuItemId}`;
=======
// const apiUrl = `http://157.66.191.31:33266/api1/submenu1/${menuItemId}`;
>>>>>>> 1c0592d (commit new code)
// const response = await fetch(apiUrl, {
// method: 'GET',
// headers: {

View File

@ -35,7 +35,11 @@ function TOKENRegistry() {
const [loading, setLoading] = useState(true);
useEffect(() => {
<<<<<<< HEAD
const apiUrl = `${process.env.REACT_APP_API_URL}/apiregistery/getall`;
=======
const apiUrl = `${process.env.REACT_APP_API_URL}apiregistery/getall`;
>>>>>>> 1c0592d (commit new code)
const token = localStorage.getItem("authToken");
const fetchTokens = async () => {

View File

@ -33,7 +33,11 @@
// const [isEditing, setIsEditing] = useState(false);
// useEffect(() => {
<<<<<<< HEAD
// const apiUrl = `${process.env.REACT_APP_API_URL}/api/getAllAppUser`;
=======
// const apiUrl = `${process.env.REACT_APP_API_URL}api/getAllAppUser`;
>>>>>>> 1c0592d (commit new code)
// const token = localStorage.getItem("authToken");
// const fetchAppUsers = async () => {
@ -373,7 +377,11 @@ function UserMaintenanceView() {
const [isEditing, setIsEditing] = useState(false);
const [loading, setLoading] = useState(true);
useEffect(() => {
<<<<<<< HEAD
const apiUrl = `${process.env.REACT_APP_API_URL}/api/getAllAppUser`;
=======
const apiUrl = `${process.env.REACT_APP_API_URL}api/getAllAppUser`;
>>>>>>> 1c0592d (commit new code)
const token = localStorage.getItem("authToken");
const fetchAppUsers = async () => {

View File

@ -68,10 +68,17 @@ const Login = () => {
}
try {
<<<<<<< HEAD
console.log("Attempting login API request to:", 'http://localhost:9292/token/session');
// API request to authentication endpoint
const response = await fetch('http://localhost:9292/token/session', {
=======
console.log("Attempting login API request to:", `${process.env.REACT_APP_API_URL}token/session`);
// API request to authentication endpoint
const response = await fetch(`${process.env.REACT_APP_API_URL}token/session`, {
>>>>>>> 1c0592d (commit new code)
method: "POST",
headers: {
"Content-Type": "application/json",

View File

@ -72,8 +72,13 @@ const Register = () => {
*/
const checkApiStatus = async () => {
try {
<<<<<<< HEAD
console.log("Making API status request to http://localhost:9292/auth/status");
const response = await fetch("http://localhost:9292/auth/status", {
=======
console.log("Making API status request to ${process.env.REACT_APP_API_URL}auth/status");
const response = await fetch(`${process.env.REACT_APP_API_URL}auth/status`, {
>>>>>>> 1c0592d (commit new code)
method: "GET",
}).catch(() => {
console.log("API status request failed");
@ -164,7 +169,11 @@ const Register = () => {
try {
console.log("Making API request to send OTP email");
// API call to verify email and send OTP
<<<<<<< HEAD
const response = await fetch(`http://localhost:9292/token/user/send_email`, {
=======
const response = await fetch(`${process.env.REACT_APP_API_URL}token/user/send_email `, {
>>>>>>> 1c0592d (commit new code)
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email }),
@ -222,7 +231,11 @@ const Register = () => {
try {
console.log("Making API request to verify OTP:", otp);
// API call to verify OTP
<<<<<<< HEAD
const response = await fetch(`http://localhost:9292/token/user/otp_verification?email=${email}&otp=${otp}`, {
=======
const response = await fetch(`${process.env.REACT_APP_API_URL}token/user/otp_verification?email=${email}&otp=${otp}`, {
>>>>>>> 1c0592d (commit new code)
method: "POST",
headers: { "Content-Type": "application/json" },
});
@ -313,7 +326,11 @@ const Register = () => {
console.log("Submitting registration data:", JSON.stringify(registrationData, null, 2));
// Make the registration request
<<<<<<< HEAD
const response = await fetch("http://localhost:9292/token/addOneAppUser", {
=======
const response = await fetch(`${process.env.REACT_APP_API_URL}token/addOneAppUser`, {
>>>>>>> 1c0592d (commit new code)
method: "POST",
headers: {
"Content-Type": "application/json",
@ -532,7 +549,11 @@ const Register = () => {
setError("");
try {
<<<<<<< HEAD
const response = await fetch(`http://localhost:9292/token/user/resend_otp?email=${email}`, {
=======
const response = await fetch(`${process.env.REACT_APP_API_URL}token/user/resend_otp?email=${email}`, {
>>>>>>> 1c0592d (commit new code)
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email }),

View File

@ -23,7 +23,11 @@ function ResetPassword() {
}
try {
<<<<<<< HEAD
const response = await fetch(`${process.env.REACT_APP_API_URL}/api/resources/forgotpassword`, {
=======
const response = await fetch(`${process.env.REACT_APP_API_URL}api/resources/forgotpassword`, {
>>>>>>> 1c0592d (commit new code)
method: "POST",
headers: {
"Content-Type": "application/json",