diff --git a/testreactdatatype-demot1-f/authsec_react_materail_ui/src/App.js b/testreactdatatype-demot1-f/authsec_react_materail_ui/src/App.js index 3374976..c21c9bc 100644 --- a/testreactdatatype-demot1-f/authsec_react_materail_ui/src/App.js +++ b/testreactdatatype-demot1-f/authsec_react_materail_ui/src/App.js @@ -1,3 +1,9 @@ +import Basicp3 from "./components/BuilderComponents/angulardatatype/Basicp3/Basicp3"; + +import Basicp2 from "./components/BuilderComponents/angulardatatype/Basicp2/Basicp2"; + +import Basicp1 from "./components/BuilderComponents/angulardatatype/Basicp1/Basicp1"; + import React from "react"; import { SystemParameterProvider } from './context/SystemParameterContext'; import { @@ -107,6 +113,15 @@ const App = () => { } /> {/* buildercomponents */} + } /> + + + } /> + + + } /> + + diff --git a/testreactdatatype-demot1-f/authsec_react_materail_ui/src/components/BuilderComponents/angulardatatype/Basicp1/Basicp1.js b/testreactdatatype-demot1-f/authsec_react_materail_ui/src/components/BuilderComponents/angulardatatype/Basicp1/Basicp1.js new file mode 100644 index 0000000..12a1b48 --- /dev/null +++ b/testreactdatatype-demot1-f/authsec_react_materail_ui/src/components/BuilderComponents/angulardatatype/Basicp1/Basicp1.js @@ -0,0 +1,1153 @@ +import React, { useEffect, useState ,useRef } from "react"; +import axios from "axios"; +import { + Button, + Dialog, + Autocomplete, + DialogActions, + DialogContent, + DialogTitle, + Snackbar, + Alert, + Typography, + TextField, + Table, + TableBody, + Switch, + TableCell, + TableContainer, + TableHead, + TableRow, + CardMedia, + Card, + LinearProgress, +Grid, +Container, + TablePagination, + Paper, + IconButton, + InputAdornment +} from "@mui/material"; +import Radio from '@mui/material/Radio'; +import RadioGroup from '@mui/material/RadioGroup'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import FormControl from '@mui/material/FormControl'; +import FormLabel from '@mui/material/FormLabel'; + +import FormGroup from '@mui/material/FormGroup'; +import Checkbox from '@mui/material/Checkbox'; + +import InputLabel from '@mui/material/InputLabel'; +import MenuItem from '@mui/material/MenuItem'; +import Select from '@mui/material/Select'; + +import Box from '@mui/material/Box'; +import OutlinedInput from '@mui/material/OutlinedInput'; +import Chip from '@mui/material/Chip'; + +import { makeStyles } from '@mui/styles'; +import { QRCode } from "react-qrcode-logo"; +import Barcode from "react-barcode"; + import { ToastContainer, toast } from "react-toastify"; +import "react-toastify/dist/ReactToastify.css"; +import ReCAPTCHA from 'react-google-recaptcha'; + import { getToken } from '../../../../utils/tokenService';import SearchIcon from '@mui/icons-material/Search'; + +const FILE_API_URL = `${process.env.REACT_APP_API_BASE_URL}/FileUpload/Uploadeddocs`; +const API_URL = `${process.env.REACT_APP_API_BASE_URL}/Basicp1/Basicp1`; +const token = localStorage.getItem("authToken"); +// Custom styles using makeStyles +const useStyles = makeStyles((theme) => ({ + tableHeader: { + backgroundColor: "#000000", + color: "#ffffff", + }, + searchContainer: { + display: 'flex', + alignItems: 'center', + marginBottom: theme.spacing(2), + }, + searchInput: { + marginRight: theme.spacing(2), + flex: 1, + }, + tableContainer: { + marginTop: theme.spacing(2), + }, + dialogContent: { + display: 'flex', + flexDirection: 'column', + gap: theme.spacing(2), + }, + formControl: { + marginBottom: theme.spacing(2), + }, + button: { + margin: theme.spacing(1), + }, +})); + + + + + + + + + + + + + + + + + + + + + + + + + + +const EntityTable = () => { + const classes = useStyles(); + const [data, setData] = useState([]); + const [filteredData, setFilteredData] = useState([]); + + + + + + + + + + + + + + + + + + + + + + + + + const [newEntity, setNewEntity] = useState({ + name: "", + + name2: "", + + number1: "", + + number2: "", + + phone_number: "", + + phone_number2: "", + + paragraph_field: "", + + paragraph_field2: "", + +password_field:"", +confirmpassword_field:"", + + textarea: "", + + textarea_field: "", + + textarea_field2: "", + + }); + const [editEntity, setEditEntity] = useState(null); + const [showEditModal, setShowEditModal] = useState(false); + const [showAddModal, setShowAddModal] = useState(false); + const [showDeleteModal, setShowDeleteModal] = useState(false); + const [deleteEntityId, setDeleteEntityId] = useState(null); + const [currentPage, setCurrentPage] = useState(0); + const [itemsPerPage] = useState(5); // Adjust this value as needed + const [searchQuery, setSearchQuery] = useState(""); + const [openSnackbar, setOpenSnackbar] = useState(false); + const [snackbarMessage, setSnackbarMessage] = useState(""); + const [qrText, setQrText] = useState(""); + const [showQrCode, setShowQrCode] = useState(false); + const qrCodeRef = useRef(); + const [barcodeText, setBarcodeText] = useState(""); + const barcodeRef = useRef(); + const [showBarcode, setShowBarcode] = useState(false); + const [captchaValue, setCaptchaValue] = useState(null); + const [alertMessage, setAlertMessage] = useState(""); + const [showPaymentOptions, setShowPaymentOptions] = useState(false); + const [uploadProgress, setUploadProgress] = useState(0); + const [serverData, setServerData] = useState([]); + const [showValulistModal, setShowValulistModal] = useState(false); + const [snackbarSeverity, setSnackbarSeverity] = useState("success"); + + const handlePageChange = (event, newPage) => { + setCurrentPage(newPage); + }; + + useEffect(() => { + fetchData(); + }, []); + + useEffect(() => { + handleSearch(); + }, [searchQuery, data]); + + const fetchData = async () => { + try { + const token = getToken(); + const response = await axios.get(API_URL, { + headers: { Authorization: `Bearer ${token}` }, + }); + setData(response.data); + } catch (error) { + console.error("Error fetching data:", error); + } + }; + + const handleDelete = async () => { + try { + const token = getToken(); + await axios.delete(`${API_URL}/${deleteEntityId}`, { + headers: { Authorization: `Bearer ${token}` }, + }); + fetchData(); + setSnackbarMessage("Successfully deleted!"); + setSnackbarSeverity("success"); + setOpenSnackbar(true); + setShowDeleteModal(false); + } catch (error) { + console.error("Error deleting data:", error); + setSnackbarMessage("Failed to delete!"); + setSnackbarSeverity("error"); + setOpenSnackbar(true); + } + }; + + const handleAdd = async () => { + + + + + + + + + + + + + + + + + if (newEntity.password_field !== newEntity.confirmpassword_field) { + setSnackbarMessage("Passwords do not match!"); + setSnackbarSeverity("error"); + setOpenSnackbar(true); + return; + } + + + + + + + + try { + const token = getToken(); + await axios.post(API_URL, newEntity, { + headers: { Authorization: `Bearer ${token}` }, + }); + fetchData(); + setNewEntity({ + name: "", + + name2: "", + + number1: "", + + number2: "", + + phone_number: "", + + phone_number2: "", + + paragraph_field: "", + + paragraph_field2: "", + +password_field:"", +confirmpassword_field:"", + + textarea: "", + + textarea_field: "", + + textarea_field2: "", + + }); + setShowAddModal(false); + setSnackbarMessage("Successfully added!"); + setSnackbarSeverity("success"); + setOpenSnackbar(true); + } catch (error) { + console.error("Error adding data:", error); + setSnackbarMessage("Failed to add!"); + setSnackbarSeverity("error"); + setOpenSnackbar(true); + } + }; + + const handleChange = (e) => { + const { name, value } = e.target; + setNewEntity({ ...newEntity, [name]: value }); + + + + + + + + + + + + + + + + + + + + + + + + + }; + + const handleChangeCheckbox = (e) => { + const { name, value, checked } = e.target; + setNewEntity({ ...newEntity, [value]: checked }); + }; + +const handleChangeSelectMulti = (e) => { + const { name, value } = e.target; + setNewEntity({ ...newEntity, [name]: String(value) }); + }; + + const handleEditChange = (e) => { + const { name, value } = e.target; + setEditEntity({ ...editEntity, [name]: value }); + }; + + const handleEdit = (entity) => { + let requiredKeys = Object.keys(newEntity); + let newObj = {}; + requiredKeys.forEach((key) => { + newObj[key] = entity[key]; + }); + setEditEntity(entity); + setNewEntity(newObj); + setShowEditModal(true); + }; + + const handleUpdate = async () => { + + + + + + + + + + + + + + + + + if (newEntity.password_field !== newEntity.confirmpassword_field) { + setSnackbarMessage("Passwords do not match!"); + setSnackbarSeverity("error"); + setOpenSnackbar(true); + return; + } + + + + + + + + try { + const token = getToken(); + await axios.put(`${API_URL}/${editEntity.id}`, newEntity, { + headers: { Authorization: `Bearer ${token}` }, + }); + fetchData(); + setShowEditModal(false); + setSnackbarMessage("Successfully updated!"); + setSnackbarSeverity("success"); + setOpenSnackbar(true); + } catch (error) { + console.error("Error updating data:", error); + setSnackbarMessage("Failed to update!"); + setSnackbarSeverity("error"); + setOpenSnackbar(true); + } + }; + + const handleSearch = () => { + const filtered = data; + setFilteredData(filtered); + }; + + + + + + + + + + + + + + + + + + + + + + + + + + return ( +
+ + Entity Table + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + setSearchQuery(e.target.value)} + InputProps={{ + endAdornment: ( + + + + + + ), + }} + /> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {filteredData.slice(currentPage * itemsPerPage, (currentPage + 1) * itemsPerPage).map((entity) => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ))} + +
namename2number1number2phone_numberphone_number2paragraph_fieldparagraph_field2password_fieldtextareatextarea_fieldtextarea_field2{entity.name}{entity.name2}{entity.number1}{entity.number2}{entity.phone_number}{entity.phone_number2}{entity.paragraph_field}{entity.paragraph_field2}{entity.password_field}{entity.textarea}{entity.textarea_field}{entity.textarea_field2}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + setShowEditModal(false)}> + Edit Entity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setShowAddModal(false)}> + Add Entity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setShowDeleteModal(false)}> + Confirm Delete + + Are you sure you want to delete this entity? + + + + + + + setOpenSnackbar(false)} + > + setOpenSnackbar(false)} severity={snackbarSeverity}> + {snackbarMessage} + + +
+ ); +}; + +export default EntityTable; diff --git a/testreactdatatype-demot1-f/authsec_react_materail_ui/src/components/BuilderComponents/angulardatatype/Basicp2/Basicp2.js b/testreactdatatype-demot1-f/authsec_react_materail_ui/src/components/BuilderComponents/angulardatatype/Basicp2/Basicp2.js new file mode 100644 index 0000000..572df6a --- /dev/null +++ b/testreactdatatype-demot1-f/authsec_react_materail_ui/src/components/BuilderComponents/angulardatatype/Basicp2/Basicp2.js @@ -0,0 +1,945 @@ +import React, { useEffect, useState ,useRef } from "react"; +import axios from "axios"; +import { + Button, + Dialog, + Autocomplete, + DialogActions, + DialogContent, + DialogTitle, + Snackbar, + Alert, + Typography, + TextField, + Table, + TableBody, + Switch, + TableCell, + TableContainer, + TableHead, + TableRow, + CardMedia, + Card, + LinearProgress, +Grid, +Container, + TablePagination, + Paper, + IconButton, + InputAdornment +} from "@mui/material"; +import Radio from '@mui/material/Radio'; +import RadioGroup from '@mui/material/RadioGroup'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import FormControl from '@mui/material/FormControl'; +import FormLabel from '@mui/material/FormLabel'; + +import FormGroup from '@mui/material/FormGroup'; +import Checkbox from '@mui/material/Checkbox'; + +import InputLabel from '@mui/material/InputLabel'; +import MenuItem from '@mui/material/MenuItem'; +import Select from '@mui/material/Select'; + +import Box from '@mui/material/Box'; +import OutlinedInput from '@mui/material/OutlinedInput'; +import Chip from '@mui/material/Chip'; + +import { makeStyles } from '@mui/styles'; +import { QRCode } from "react-qrcode-logo"; +import Barcode from "react-barcode"; + import { ToastContainer, toast } from "react-toastify"; +import "react-toastify/dist/ReactToastify.css"; +import ReCAPTCHA from 'react-google-recaptcha'; + import { getToken } from '../../../../utils/tokenService';import SearchIcon from '@mui/icons-material/Search'; + +const FILE_API_URL = `${process.env.REACT_APP_API_BASE_URL}/FileUpload/Uploadeddocs`; +const API_URL = `${process.env.REACT_APP_API_BASE_URL}/Basicp2/Basicp2`; +const token = localStorage.getItem("authToken"); +// Custom styles using makeStyles +const useStyles = makeStyles((theme) => ({ + tableHeader: { + backgroundColor: "#000000", + color: "#ffffff", + }, + searchContainer: { + display: 'flex', + alignItems: 'center', + marginBottom: theme.spacing(2), + }, + searchInput: { + marginRight: theme.spacing(2), + flex: 1, + }, + tableContainer: { + marginTop: theme.spacing(2), + }, + dialogContent: { + display: 'flex', + flexDirection: 'column', + gap: theme.spacing(2), + }, + formControl: { + marginBottom: theme.spacing(2), + }, + button: { + margin: theme.spacing(1), + }, +})); + + + + + + + + + + + + + + + + + + + + +const EntityTable = () => { + const classes = useStyles(); + const [data, setData] = useState([]); + const [filteredData, setFilteredData] = useState([]); + + + + + + + + + + + + + + + + + + + const [newEntity, setNewEntity] = useState({ + about: "", + + textarea2: "", + + date_field: "", + + date_field2: "", + + datetime_field: "", + + datetime_field2: "", + + email_field: "", + + email_field2: "", + + userid_field: "", + + }); + const [editEntity, setEditEntity] = useState(null); + const [showEditModal, setShowEditModal] = useState(false); + const [showAddModal, setShowAddModal] = useState(false); + const [showDeleteModal, setShowDeleteModal] = useState(false); + const [deleteEntityId, setDeleteEntityId] = useState(null); + const [currentPage, setCurrentPage] = useState(0); + const [itemsPerPage] = useState(5); // Adjust this value as needed + const [searchQuery, setSearchQuery] = useState(""); + const [openSnackbar, setOpenSnackbar] = useState(false); + const [snackbarMessage, setSnackbarMessage] = useState(""); + const [qrText, setQrText] = useState(""); + const [showQrCode, setShowQrCode] = useState(false); + const qrCodeRef = useRef(); + const [barcodeText, setBarcodeText] = useState(""); + const barcodeRef = useRef(); + const [showBarcode, setShowBarcode] = useState(false); + const [captchaValue, setCaptchaValue] = useState(null); + const [alertMessage, setAlertMessage] = useState(""); + const [showPaymentOptions, setShowPaymentOptions] = useState(false); + const [uploadProgress, setUploadProgress] = useState(0); + const [serverData, setServerData] = useState([]); + const [showValulistModal, setShowValulistModal] = useState(false); + const [snackbarSeverity, setSnackbarSeverity] = useState("success"); + + const handlePageChange = (event, newPage) => { + setCurrentPage(newPage); + }; + + useEffect(() => { + fetchData(); + }, []); + + useEffect(() => { + handleSearch(); + }, [searchQuery, data]); + + const fetchData = async () => { + try { + const token = getToken(); + const response = await axios.get(API_URL, { + headers: { Authorization: `Bearer ${token}` }, + }); + setData(response.data); + } catch (error) { + console.error("Error fetching data:", error); + } + }; + + const handleDelete = async () => { + try { + const token = getToken(); + await axios.delete(`${API_URL}/${deleteEntityId}`, { + headers: { Authorization: `Bearer ${token}` }, + }); + fetchData(); + setSnackbarMessage("Successfully deleted!"); + setSnackbarSeverity("success"); + setOpenSnackbar(true); + setShowDeleteModal(false); + } catch (error) { + console.error("Error deleting data:", error); + setSnackbarMessage("Failed to delete!"); + setSnackbarSeverity("error"); + setOpenSnackbar(true); + } + }; + + const handleAdd = async () => { + + + + + + + + + + + + + + + + + + + try { + const token = getToken(); + await axios.post(API_URL, newEntity, { + headers: { Authorization: `Bearer ${token}` }, + }); + fetchData(); + setNewEntity({ + about: "", + + textarea2: "", + + date_field: "", + + date_field2: "", + + datetime_field: "", + + datetime_field2: "", + + email_field: "", + + email_field2: "", + + userid_field: "", + + }); + setShowAddModal(false); + setSnackbarMessage("Successfully added!"); + setSnackbarSeverity("success"); + setOpenSnackbar(true); + } catch (error) { + console.error("Error adding data:", error); + setSnackbarMessage("Failed to add!"); + setSnackbarSeverity("error"); + setOpenSnackbar(true); + } + }; + + const handleChange = (e) => { + const { name, value } = e.target; + setNewEntity({ ...newEntity, [name]: value }); + + + + + + + + + + + + + + + + + + + }; + + const handleChangeCheckbox = (e) => { + const { name, value, checked } = e.target; + setNewEntity({ ...newEntity, [value]: checked }); + }; + +const handleChangeSelectMulti = (e) => { + const { name, value } = e.target; + setNewEntity({ ...newEntity, [name]: String(value) }); + }; + + const handleEditChange = (e) => { + const { name, value } = e.target; + setEditEntity({ ...editEntity, [name]: value }); + }; + + const handleEdit = (entity) => { + let requiredKeys = Object.keys(newEntity); + let newObj = {}; + requiredKeys.forEach((key) => { + newObj[key] = entity[key]; + }); + setEditEntity(entity); + setNewEntity(newObj); + setShowEditModal(true); + }; + + const handleUpdate = async () => { + + + + + + + + + + + + + + + + + + + try { + const token = getToken(); + await axios.put(`${API_URL}/${editEntity.id}`, newEntity, { + headers: { Authorization: `Bearer ${token}` }, + }); + fetchData(); + setShowEditModal(false); + setSnackbarMessage("Successfully updated!"); + setSnackbarSeverity("success"); + setOpenSnackbar(true); + } catch (error) { + console.error("Error updating data:", error); + setSnackbarMessage("Failed to update!"); + setSnackbarSeverity("error"); + setOpenSnackbar(true); + } + }; + + const handleSearch = () => { + const filtered = data; + setFilteredData(filtered); + }; + + + + + + + + + + + + + + + + + + + + return ( +
+ + Entity Table + +
+ + + + + + + + + + + + + + + + + + + + setSearchQuery(e.target.value)} + InputProps={{ + endAdornment: ( + + + + + + ), + }} + /> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + {filteredData.slice(currentPage * itemsPerPage, (currentPage + 1) * itemsPerPage).map((entity) => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ))} + +
abouttextarea2date_fielddate_field2datetime_fielddatetime_field2email_fieldemail_field2userid_field{entity.about}{entity.textarea2}{entity.date_field}{entity.date_field2}{entity.datetime_field}{entity.datetime_field2}{entity.email_field}{entity.email_field2}{entity.userid_field}
+
+ + + + + + + + + + + + + + + + + + + + setShowEditModal(false)}> + Edit Entity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setShowAddModal(false)}> + Add Entity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setShowDeleteModal(false)}> + Confirm Delete + + Are you sure you want to delete this entity? + + + + + + + setOpenSnackbar(false)} + > + setOpenSnackbar(false)} severity={snackbarSeverity}> + {snackbarMessage} + + +
+ ); +}; + +export default EntityTable; diff --git a/testreactdatatype-demot1-f/authsec_react_materail_ui/src/components/BuilderComponents/angulardatatype/Basicp3/Basicp3.js b/testreactdatatype-demot1-f/authsec_react_materail_ui/src/components/BuilderComponents/angulardatatype/Basicp3/Basicp3.js new file mode 100644 index 0000000..11182e3 --- /dev/null +++ b/testreactdatatype-demot1-f/authsec_react_materail_ui/src/components/BuilderComponents/angulardatatype/Basicp3/Basicp3.js @@ -0,0 +1,1209 @@ +import React, { useEffect, useState ,useRef } from "react"; +import axios from "axios"; +import { + Button, + Dialog, + Autocomplete, + DialogActions, + DialogContent, + DialogTitle, + Snackbar, + Alert, + Typography, + TextField, + Table, + TableBody, + Switch, + TableCell, + TableContainer, + TableHead, + TableRow, + CardMedia, + Card, + LinearProgress, +Grid, +Container, + TablePagination, + Paper, + IconButton, + InputAdornment +} from "@mui/material"; +import Radio from '@mui/material/Radio'; +import RadioGroup from '@mui/material/RadioGroup'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import FormControl from '@mui/material/FormControl'; +import FormLabel from '@mui/material/FormLabel'; + +import FormGroup from '@mui/material/FormGroup'; +import Checkbox from '@mui/material/Checkbox'; + +import InputLabel from '@mui/material/InputLabel'; +import MenuItem from '@mui/material/MenuItem'; +import Select from '@mui/material/Select'; + +import Box from '@mui/material/Box'; +import OutlinedInput from '@mui/material/OutlinedInput'; +import Chip from '@mui/material/Chip'; + +import { makeStyles } from '@mui/styles'; +import { QRCode } from "react-qrcode-logo"; +import Barcode from "react-barcode"; + import { ToastContainer, toast } from "react-toastify"; +import "react-toastify/dist/ReactToastify.css"; +import ReCAPTCHA from 'react-google-recaptcha'; + import { getToken } from '../../../../utils/tokenService';import SearchIcon from '@mui/icons-material/Search'; + +const FILE_API_URL = `${process.env.REACT_APP_API_BASE_URL}/FileUpload/Uploadeddocs`; +const API_URL = `${process.env.REACT_APP_API_BASE_URL}/Basicp3/Basicp3`; +const token = localStorage.getItem("authToken"); +// Custom styles using makeStyles +const useStyles = makeStyles((theme) => ({ + tableHeader: { + backgroundColor: "#000000", + color: "#ffffff", + }, + searchContainer: { + display: 'flex', + alignItems: 'center', + marginBottom: theme.spacing(2), + }, + searchInput: { + marginRight: theme.spacing(2), + flex: 1, + }, + tableContainer: { + marginTop: theme.spacing(2), + }, + dialogContent: { + display: 'flex', + flexDirection: 'column', + gap: theme.spacing(2), + }, + formControl: { + marginBottom: theme.spacing(2), + }, + button: { + margin: theme.spacing(1), + }, +})); + + + + + + + + + + + + + + + + + + + + + + + + +const EntityTable = () => { + const classes = useStyles(); + const [data, setData] = useState([]); + const [filteredData, setFilteredData] = useState([]); + const handlesChange = (e) => { + const { name, checked } = e.target; + setNewEntity({ ...newEntity, [name]: checked }); + }; + + const handlesChange = (e) => { + const { name, checked } = e.target; + setNewEntity({ ...newEntity, [name]: checked }); + }; + + + + + + + + + + + + + + + + + + + + const [newEntity, setNewEntity] = useState({ +toggle_switch:false, + +toggle_switch2:false, + + url_field: "", + + url_field2: "", + + decimal_field: "", + + decimal_field2: "", + + percentage_field: "", + + percentage_field2: "", + + documentsequenc: "", + + recaptcha: "", + + recaptcha2: "", + + }); + const [editEntity, setEditEntity] = useState(null); + const [showEditModal, setShowEditModal] = useState(false); + const [showAddModal, setShowAddModal] = useState(false); + const [showDeleteModal, setShowDeleteModal] = useState(false); + const [deleteEntityId, setDeleteEntityId] = useState(null); + const [currentPage, setCurrentPage] = useState(0); + const [itemsPerPage] = useState(5); // Adjust this value as needed + const [searchQuery, setSearchQuery] = useState(""); + const [openSnackbar, setOpenSnackbar] = useState(false); + const [snackbarMessage, setSnackbarMessage] = useState(""); + const [qrText, setQrText] = useState(""); + const [showQrCode, setShowQrCode] = useState(false); + const qrCodeRef = useRef(); + const [barcodeText, setBarcodeText] = useState(""); + const barcodeRef = useRef(); + const [showBarcode, setShowBarcode] = useState(false); + const [captchaValue, setCaptchaValue] = useState(null); + const [alertMessage, setAlertMessage] = useState(""); + const [showPaymentOptions, setShowPaymentOptions] = useState(false); + const [uploadProgress, setUploadProgress] = useState(0); + const [serverData, setServerData] = useState([]); + const [showValulistModal, setShowValulistModal] = useState(false); + const [snackbarSeverity, setSnackbarSeverity] = useState("success"); + + const handlePageChange = (event, newPage) => { + setCurrentPage(newPage); + }; + + useEffect(() => { + fetchData(); + }, []); + + useEffect(() => { + handleSearch(); + }, [searchQuery, data]); + + const fetchData = async () => { + try { + const token = getToken(); + const response = await axios.get(API_URL, { + headers: { Authorization: `Bearer ${token}` }, + }); + setData(response.data); + } catch (error) { + console.error("Error fetching data:", error); + } + }; + + const handleDelete = async () => { + try { + const token = getToken(); + await axios.delete(`${API_URL}/${deleteEntityId}`, { + headers: { Authorization: `Bearer ${token}` }, + }); + fetchData(); + setSnackbarMessage("Successfully deleted!"); + setSnackbarSeverity("success"); + setOpenSnackbar(true); + setShowDeleteModal(false); + } catch (error) { + console.error("Error deleting data:", error); + setSnackbarMessage("Failed to delete!"); + setSnackbarSeverity("error"); + setOpenSnackbar(true); + } + }; + + const handleAdd = async () => { + + + + + + + + + newEntity.decimal_field = Math.round(newEntity.decimal_field); + + newEntity.decimal_field2 = Math.round(newEntity.decimal_field2); + + + + + + + + if (!captchaValid) { + setSnackbarMessage("Please complete CAPTCHA validation before adding!"); + setSnackbarSeverity("warning"); + setOpenSnackbar(true); + return; + } + + if (!captchaValid) { + setSnackbarMessage("Please complete CAPTCHA validation before adding!"); + setSnackbarSeverity("warning"); + setOpenSnackbar(true); + return; + } + + try { + const token = getToken(); + await axios.post(API_URL, newEntity, { + headers: { Authorization: `Bearer ${token}` }, + }); + fetchData(); + setNewEntity({ +toggle_switch:false, + +toggle_switch2:false, + + url_field: "", + + url_field2: "", + + decimal_field: "", + + decimal_field2: "", + + percentage_field: "", + + percentage_field2: "", + + documentsequenc: "", + + recaptcha: "", + + recaptcha2: "", + + }); + setShowAddModal(false); + setSnackbarMessage("Successfully added!"); + setSnackbarSeverity("success"); + setOpenSnackbar(true); + } catch (error) { + console.error("Error adding data:", error); + setSnackbarMessage("Failed to add!"); + setSnackbarSeverity("error"); + setOpenSnackbar(true); + } + }; + + const handleChange = (e) => { + const { name, value } = e.target; + setNewEntity({ ...newEntity, [name]: value }); + + + + + + + + + + + + + + + + + + + + + + + }; + + const handleChangeCheckbox = (e) => { + const { name, value, checked } = e.target; + setNewEntity({ ...newEntity, [value]: checked }); + }; + +const handleChangeSelectMulti = (e) => { + const { name, value } = e.target; + setNewEntity({ ...newEntity, [name]: String(value) }); + }; + + const handleEditChange = (e) => { + const { name, value } = e.target; + setEditEntity({ ...editEntity, [name]: value }); + }; + + const handleEdit = (entity) => { + let requiredKeys = Object.keys(newEntity); + let newObj = {}; + requiredKeys.forEach((key) => { + newObj[key] = entity[key]; + }); + setEditEntity(entity); + setNewEntity(newObj); + setShowEditModal(true); + }; + + const handleUpdate = async () => { + + + + + + + + + + + + + + + + + + + + + + + try { + const token = getToken(); + await axios.put(`${API_URL}/${editEntity.id}`, newEntity, { + headers: { Authorization: `Bearer ${token}` }, + }); + fetchData(); + setShowEditModal(false); + setSnackbarMessage("Successfully updated!"); + setSnackbarSeverity("success"); + setOpenSnackbar(true); + } catch (error) { + console.error("Error updating data:", error); + setSnackbarMessage("Failed to update!"); + setSnackbarSeverity("error"); + setOpenSnackbar(true); + } + }; + + const handleSearch = () => { + const filtered = data; + setFilteredData(filtered); + }; + + + + + + + + + + + + + + + + + + + +const [randomCaptcha, setRandomCaptcha] = useState(""); + const [captchaInput, setCaptchaInput] = useState(""); + const [captchaValid, setCaptchaValid] = useState(false); + const generateRandomString = (length) => { + const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + let result = ""; + for (let i = 0; i < length; i++) { + result += characters.charAt(Math.floor(Math.random() * characters.length)); + } + return result; + }; + + useEffect(() => { + + setRandomCaptcha(generateRandomString(7)); + }, []); + + const handleCaptchaInput = (e) => { + setCaptchaInput(e.target.value); + }; + +const validateCaptcha = () => { + if (captchaInput === randomCaptcha) { + setNewEntity((prev) => ({ ...prev, recaptcha: randomCaptcha })); + setSnackbarMessage("CAPTCHA validated successfully!"); + setSnackbarSeverity("success"); + setCaptchaValid(true); + } else { + setSnackbarMessage("CAPTCHA validation failed, try again!"); + setSnackbarSeverity("error"); + setCaptchaValid(false); + setRandomCaptcha(generateRandomString(7)); // Regenerate CAPTCHA if it fails + } + setOpenSnackbar(true); + }; + + +const [randomCaptcha, setRandomCaptcha] = useState(""); + const [captchaInput, setCaptchaInput] = useState(""); + const [captchaValid, setCaptchaValid] = useState(false); + const generateRandomString = (length) => { + const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + let result = ""; + for (let i = 0; i < length; i++) { + result += characters.charAt(Math.floor(Math.random() * characters.length)); + } + return result; + }; + + useEffect(() => { + + setRandomCaptcha(generateRandomString(7)); + }, []); + + const handleCaptchaInput = (e) => { + setCaptchaInput(e.target.value); + }; + +const validateCaptcha = () => { + if (captchaInput === randomCaptcha) { + setNewEntity((prev) => ({ ...prev, recaptcha2: randomCaptcha })); + setSnackbarMessage("CAPTCHA validated successfully!"); + setSnackbarSeverity("success"); + setCaptchaValid(true); + } else { + setSnackbarMessage("CAPTCHA validation failed, try again!"); + setSnackbarSeverity("error"); + setCaptchaValid(false); + setRandomCaptcha(generateRandomString(7)); // Regenerate CAPTCHA if it fails + } + setOpenSnackbar(true); + }; + + + return ( +
+ + Entity Table + +
+ + + + + + + + + + + + + + + + + + + + + + + + setSearchQuery(e.target.value)} + InputProps={{ + endAdornment: ( + + + + + + ), + }} + /> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {filteredData.slice(currentPage * itemsPerPage, (currentPage + 1) * itemsPerPage).map((entity) => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ))} + +
toggle_switchtoggle_switch2url_fieldurl_field2decimal_fielddecimal_field2percentage_fieldpercentage_field2documentsequencrecaptcharecaptcha2{entity.toggle_switch ? "Yes" : "No"}{entity.toggle_switch2 ? "Yes" : "No"}{entity.url_field}{entity.url_field2}{entity.decimal_field}{entity.decimal_field2}{entity.percentage_field}{entity.percentage_field2}{entity.documentsequenc}{entity.recaptcha}{entity.recaptcha2}
+
+ + + + + + + + + + + + + + + + + + + + + + + + setShowEditModal(false)}> + Edit Entity + + + + + + + + + + + + + + + + + + + + + + + + + + } + label="Toggle Switch" + /> + + + + + } + label="Toggle Switch2" + /> + + + + + + + + + + + + + + + + + + Please type the following CAPTCHA: + + {randomCaptcha} + + + + + + + Please type the following CAPTCHA: + + {randomCaptcha} + + + + + + + + + + + + + setShowAddModal(false)}> + Add Entity + + + + } + label="Toggle Switch" + /> + + + + + } + label="Toggle Switch2" + /> + + + + + + + + + + + + + + + + + + Please type the following CAPTCHA: + + {randomCaptcha} + + + + + + + Please type the following CAPTCHA: + + {randomCaptcha} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setShowDeleteModal(false)}> + Confirm Delete + + Are you sure you want to delete this entity? + + + + + + + setOpenSnackbar(false)} + > + setOpenSnackbar(false)} severity={snackbarSeverity}> + {snackbarMessage} + + +
+ ); +}; + +export default EntityTable; diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java index 2ae85df..46b63e6 100644 --- a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java @@ -80,6 +80,15 @@ public class BuilderService { // } // ADD OTHER SERVICE +addCustomMenu( "Basicp3","Basicp3", "Transcations"); + + +addCustomMenu( "Basicp2","Basicp2", "Transcations"); + + +addCustomMenu( "Basicp1","Basicp1", "Transcations"); + + System.out.println("dashboard and menu inserted..."); diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/Basicp1Controller.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/Basicp1Controller.java new file mode 100644 index 0000000..2be35e3 --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/Basicp1Controller.java @@ -0,0 +1,171 @@ +package com.realnet.angulardatatype.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.angulardatatype.Entity.Basicp1; +import com.realnet.angulardatatype.Services.Basicp1Service ; + + + + + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/Basicp1") + @CrossOrigin("*") +@RestController +public class Basicp1Controller { + @Autowired + private Basicp1Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Basicp1") + public Basicp1 Savedata(@RequestBody Basicp1 data) { + Basicp1 save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Basicp1/{id}") + public Basicp1 update(@RequestBody Basicp1 data,@PathVariable Integer id ) { + Basicp1 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Basicp1/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Basicp1") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Basicp1") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Basicp1/{id}") + public Basicp1 getdetailsbyId(@PathVariable Integer id ) { + Basicp1 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Basicp1/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/Basicp2Controller.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/Basicp2Controller.java new file mode 100644 index 0000000..0ed5536 --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/Basicp2Controller.java @@ -0,0 +1,147 @@ +package com.realnet.angulardatatype.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.angulardatatype.Entity.Basicp2; +import com.realnet.angulardatatype.Services.Basicp2Service ; + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/Basicp2") + @CrossOrigin("*") +@RestController +public class Basicp2Controller { + @Autowired + private Basicp2Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + @PostMapping("/Basicp2") + public Basicp2 Savedata(@RequestBody Basicp2 data) { + Basicp2 save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Basicp2/{id}") + public Basicp2 update(@RequestBody Basicp2 data,@PathVariable Integer id ) { + Basicp2 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Basicp2/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Basicp2") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Basicp2") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Basicp2/{id}") + public Basicp2 getdetailsbyId(@PathVariable Integer id ) { + Basicp2 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Basicp2/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/Basicp3Controller.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/Basicp3Controller.java new file mode 100644 index 0000000..7e1b203 --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/Basicp3Controller.java @@ -0,0 +1,163 @@ +package com.realnet.angulardatatype.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.angulardatatype.Entity.Basicp3; +import com.realnet.angulardatatype.Services.Basicp3Service ; + + + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/Basicp3") + @CrossOrigin("*") +@RestController +public class Basicp3Controller { + @Autowired + private Basicp3Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Basicp3") + public Basicp3 Savedata(@RequestBody Basicp3 data) { + Basicp3 save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Basicp3/{id}") + public Basicp3 update(@RequestBody Basicp3 data,@PathVariable Integer id ) { + Basicp3 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Basicp3/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Basicp3") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Basicp3") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Basicp3/{id}") + public Basicp3 getdetailsbyId(@PathVariable Integer id ) { + Basicp3 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Basicp3/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/tokenFree_Basicp1Controller.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/tokenFree_Basicp1Controller.java new file mode 100644 index 0000000..e5ce486 --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/tokenFree_Basicp1Controller.java @@ -0,0 +1,171 @@ +package com.realnet.angulardatatype.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.angulardatatype.Entity.Basicp1; +import com.realnet.angulardatatype.Services.Basicp1Service ; + + + + + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/token/Basicp1") + @CrossOrigin("*") +@RestController +public class tokenFree_Basicp1Controller { + @Autowired + private Basicp1Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Basicp1") + public Basicp1 Savedata(@RequestBody Basicp1 data) { + Basicp1 save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Basicp1/{id}") + public Basicp1 update(@RequestBody Basicp1 data,@PathVariable Integer id ) { + Basicp1 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Basicp1/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Basicp1") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Basicp1") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Basicp1/{id}") + public Basicp1 getdetailsbyId(@PathVariable Integer id ) { + Basicp1 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Basicp1/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/tokenFree_Basicp2Controller.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/tokenFree_Basicp2Controller.java new file mode 100644 index 0000000..1370e4c --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/tokenFree_Basicp2Controller.java @@ -0,0 +1,147 @@ +package com.realnet.angulardatatype.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.angulardatatype.Entity.Basicp2; +import com.realnet.angulardatatype.Services.Basicp2Service ; + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/token/Basicp2") + @CrossOrigin("*") +@RestController +public class tokenFree_Basicp2Controller { + @Autowired + private Basicp2Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + @PostMapping("/Basicp2") + public Basicp2 Savedata(@RequestBody Basicp2 data) { + Basicp2 save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Basicp2/{id}") + public Basicp2 update(@RequestBody Basicp2 data,@PathVariable Integer id ) { + Basicp2 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Basicp2/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Basicp2") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Basicp2") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Basicp2/{id}") + public Basicp2 getdetailsbyId(@PathVariable Integer id ) { + Basicp2 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Basicp2/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/tokenFree_Basicp3Controller.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/tokenFree_Basicp3Controller.java new file mode 100644 index 0000000..a44ab5b --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Controllers/tokenFree_Basicp3Controller.java @@ -0,0 +1,163 @@ +package com.realnet.angulardatatype.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.angulardatatype.Entity.Basicp3; +import com.realnet.angulardatatype.Services.Basicp3Service ; + + + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/token/Basicp3") + @CrossOrigin("*") +@RestController +public class tokenFree_Basicp3Controller { + @Autowired + private Basicp3Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Basicp3") + public Basicp3 Savedata(@RequestBody Basicp3 data) { + Basicp3 save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Basicp3/{id}") + public Basicp3 update(@RequestBody Basicp3 data,@PathVariable Integer id ) { + Basicp3 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Basicp3/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Basicp3") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Basicp3") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Basicp3/{id}") + public Basicp3 getdetailsbyId(@PathVariable Integer id ) { + Basicp3 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Basicp3/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Entity/Basicp1.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Entity/Basicp1.java new file mode 100644 index 0000000..75f1105 --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Entity/Basicp1.java @@ -0,0 +1,77 @@ +package com.realnet.angulardatatype.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + + + + + + + + + + + + + + + @Entity + @Data + public class Basicp1 extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +private String name2; + +private int number1; + +private int number2; + + private String phone_number; + + private String phone_number2; + + +@Column(length = 2000) +private String paragraph_field; + + +@Column(length = 2000) +private String paragraph_field2; + +private String password_field; +@Transient +private String confirmpassword_field; + +@Column(length = 2000) +private String textarea; + +@Column(length = 2000) +private String textarea_field; + +@Column(length = 2000) +private String textarea_field2; + + +} diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Entity/Basicp2.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Entity/Basicp2.java new file mode 100644 index 0000000..6fb3d3d --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Entity/Basicp2.java @@ -0,0 +1,59 @@ +package com.realnet.angulardatatype.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + + + + + + + + + @Entity + @Data + public class Basicp2 extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +@Column(length = 2000) +private String about; + +@Column(length = 2000) +private String textarea2; + +private String date_field; + +private String date_field2; + +private String datetime_field; + +private String datetime_field2; + +private String email_field; + +private String email_field2; + + private Long user_id; + private String user_name; + + +} diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Entity/Basicp3.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Entity/Basicp3.java new file mode 100644 index 0000000..8ab08b6 --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Entity/Basicp3.java @@ -0,0 +1,64 @@ +package com.realnet.angulardatatype.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + + + + + + + + + + + + + @Entity + @Data + public class Basicp3 extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private Boolean toggle_switch; + +private Boolean toggle_switch2; + +private String url_field; + +private String url_field2; + + private double decimal_field; + + private double decimal_field2; + +private int percentage_field; + +private int percentage_field2; + +private String documentsequenc; + +private String recaptcha; + +private String recaptcha2; + + +} diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Repository/Basicp1Repository.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Repository/Basicp1Repository.java new file mode 100644 index 0000000..fd659f8 --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Repository/Basicp1Repository.java @@ -0,0 +1,48 @@ +package com.realnet.angulardatatype.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + + + + + + + + + + + + + + + + + +import com.realnet.angulardatatype.Entity.Basicp1; + +@Repository +public interface Basicp1Repository extends JpaRepository { + +@Query(value = "select * from basicp1 where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from basicp1 where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Repository/Basicp2Repository.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Repository/Basicp2Repository.java new file mode 100644 index 0000000..d0a7f01 --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Repository/Basicp2Repository.java @@ -0,0 +1,42 @@ +package com.realnet.angulardatatype.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + + + + + + + + + + + +import com.realnet.angulardatatype.Entity.Basicp2; + +@Repository +public interface Basicp2Repository extends JpaRepository { + +@Query(value = "select * from basicp2 where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from basicp2 where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Repository/Basicp3Repository.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Repository/Basicp3Repository.java new file mode 100644 index 0000000..29d7f24 --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Repository/Basicp3Repository.java @@ -0,0 +1,46 @@ +package com.realnet.angulardatatype.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + + + + + + + + + + + + + + + +import com.realnet.angulardatatype.Entity.Basicp3; + +@Repository +public interface Basicp3Repository extends JpaRepository { + +@Query(value = "select * from basicp3 where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from basicp3 where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Services/Basicp1Service.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Services/Basicp1Service.java new file mode 100644 index 0000000..7db69c0 --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Services/Basicp1Service.java @@ -0,0 +1,183 @@ +package com.realnet.angulardatatype.Services; +import com.realnet.angulardatatype.Repository.Basicp1Repository; +import com.realnet.angulardatatype.Entity.Basicp1 +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + + + + + + + + + + + + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class Basicp1Service { +@Autowired +private Basicp1Repository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + + + + + + + + + + + + + + + + + +public Basicp1 Savedata(Basicp1 data) { + + + + + + + + + + + + + + + + + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Basicp1 save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Basicp1 getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Basicp1 update(Basicp1 data,Integer id) { + Basicp1 old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setName2(data.getName2()); + +old.setNumber1(data.getNumber1()); + +old.setNumber2(data.getNumber2()); + +old.setPhone_number(data.getPhone_number()); + +old.setPhone_number2(data.getPhone_number2()); + +old.setParagraph_field(data.getParagraph_field()); + +old.setParagraph_field2(data.getParagraph_field2()); + +old.setPassword_field(data.getPassword_field()); + +old.setTextarea(data.getTextarea()); + +old.setTextarea_field(data.getTextarea_field()); + +old.setTextarea_field2(data.getTextarea_field2()); + +final Basicp1 test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + + + + + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Services/Basicp2Service.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Services/Basicp2Service.java new file mode 100644 index 0000000..be91c5f --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Services/Basicp2Service.java @@ -0,0 +1,154 @@ +package com.realnet.angulardatatype.Services; +import com.realnet.angulardatatype.Repository.Basicp2Repository; +import com.realnet.angulardatatype.Entity.Basicp2 +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + + + + + + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class Basicp2Service { +@Autowired +private Basicp2Repository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + + + + + + + + + + + +public Basicp2 Savedata(Basicp2 data) { + + + + + + + + + + + + + + + + +data.setUser_id(getUser().getUserId()); + data.setUser_name(getUser().getFullName()); + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Basicp2 save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Basicp2 getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Basicp2 update(Basicp2 data,Integer id) { + Basicp2 old = Repository.findById(id).get(); +old.setAbout(data.getAbout()); + +old.setTextarea2(data.getTextarea2()); + +old.setDate_field(data.getDate_field()); + +old.setDate_field2(data.getDate_field2()); + +old.setDatetime_field(data.getDatetime_field()); + +old.setDatetime_field2(data.getDatetime_field2()); + +old.setEmail_field(data.getEmail_field()); + +old.setEmail_field2(data.getEmail_field2()); + + + +final Basicp2 test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Services/Basicp3Service.java b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Services/Basicp3Service.java new file mode 100644 index 0000000..9b00ad6 --- /dev/null +++ b/testreactdatatype-test2-b/authsec_springboot/backend/src/main/java/com/realnet/angulardatatype/Services/Basicp3Service.java @@ -0,0 +1,174 @@ +package com.realnet.angulardatatype.Services; +import com.realnet.angulardatatype.Repository.Basicp3Repository; +import com.realnet.angulardatatype.Entity.Basicp3 +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + + + + + + + + + + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class Basicp3Service { +@Autowired +private Basicp3Repository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + + + + + + + + + +@Autowired + private SequenceService documentsequencsequenceService; + + + + + +public Basicp3 Savedata(Basicp3 data) { + + + + + + + + + + + + + + + + +data.setDocumentsequenc (documentsequencsequenceService.GenerateSequence("ff")); + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Basicp3 save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Basicp3 getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Basicp3 update(Basicp3 data,Integer id) { + Basicp3 old = Repository.findById(id).get(); +old.setToggle_switch (data.getToggle_switch()); + +old.setToggle_switch2 (data.getToggle_switch2()); + +old.setUrl_field(data.getUrl_field()); + +old.setUrl_field2(data.getUrl_field2()); + +old.setDecimal_field(data.getDecimal_field()); + +old.setDecimal_field2(data.getDecimal_field2()); + +old.setPercentage_field(data.getPercentage_field()); + +old.setPercentage_field2(data.getPercentage_field2()); + +old.setDocumentsequenc(data.getDocumentsequenc()); + +old.setRecaptcha(data.getRecaptcha()); + +old.setRecaptcha2(data.getRecaptcha2()); + +final Basicp3 test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + + + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/testreactdatatype-testtensep-d/authsec_mysql/mysql/wf_table/wf_table.sql b/testreactdatatype-testtensep-d/authsec_mysql/mysql/wf_table/wf_table.sql new file mode 100755 index 0000000..3554ffb --- /dev/null +++ b/testreactdatatype-testtensep-d/authsec_mysql/mysql/wf_table/wf_table.sql @@ -0,0 +1,6 @@ +CREATE TABLE testtensep.Basicp1(id BIGINT NOT NULL AUTO_INCREMENT, textarea_field VARCHAR(400), paragraph_field VARCHAR(400), textarea VARCHAR(400), paragraph_field2 VARCHAR(400), phone_number2 VARCHAR(400), name VARCHAR(400), number1 int, phone_number VARCHAR(400), number2 int, name2 VARCHAR(400), password_field VARCHAR(400), textarea_field2 VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE testtensep.Basicp2(id BIGINT NOT NULL AUTO_INCREMENT, datetime_field2 VARCHAR(400), about VARCHAR(400), datetime_field VARCHAR(400), userid_field VARCHAR(400), email_field2 VARCHAR(400), date_field Date, email_field VARCHAR(400), textarea2 VARCHAR(400), date_field2 Date, PRIMARY KEY (id)); + +CREATE TABLE testtensep.Basicp3(id BIGINT NOT NULL AUTO_INCREMENT, toggle_switch2 VARCHAR(400), decimal_field2 double, documentsequenc VARCHAR(400), toggle_switch VARCHAR(400), recaptcha VARCHAR(400), percentage_field int, percentage_field2 int, url_field VARCHAR(400), url_field2 VARCHAR(400), decimal_field double, recaptcha2 VARCHAR(400), PRIMARY KEY (id)); +