done
This commit is contained in:
parent
bff2eb2041
commit
57af157957
|
@ -1,6 +1,9 @@
|
||||||
import mongoose from "mongoose";
|
import mongoose from "mongoose";
|
||||||
|
|
||||||
const propertySchema = mongoose.Schema({
|
const propertySchema = mongoose.Schema({
|
||||||
|
address: {type: String, required: true },
|
||||||
|
city: {type: String, required: true },
|
||||||
|
state: {type: String, required: true },
|
||||||
propertyType: {type: String, required: true },
|
propertyType: {type: String, required: true },
|
||||||
title: {type: String, required: true },
|
title: {type: String, required: true },
|
||||||
yearBuild: {type: String, required: true },
|
yearBuild: {type: String, required: true },
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script type="module" crossorigin src="/assets/index-CLTkCQKH.js"></script>
|
<script type="module" crossorigin src="/assets/index-CfJjKeZO.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-CAj3mSy-.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-CAj3mSy-.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,9 @@ const Addproperty = () => {
|
||||||
const { user } = useSelector((state) => ({ ...state.auth }));
|
const { user } = useSelector((state) => ({ ...state.auth }));
|
||||||
|
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
|
address:"",
|
||||||
|
city:"",
|
||||||
|
state:"",
|
||||||
propertyType: "",
|
propertyType: "",
|
||||||
title: "",
|
title: "",
|
||||||
yearBuild: "",
|
yearBuild: "",
|
||||||
|
@ -39,6 +42,9 @@ const Addproperty = () => {
|
||||||
|
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
if (
|
if (
|
||||||
|
formData.address &&
|
||||||
|
formData.city &&
|
||||||
|
formData.state &&
|
||||||
formData.propertyType &&
|
formData.propertyType &&
|
||||||
formData.title &&
|
formData.title &&
|
||||||
formData.yearBuild &&
|
formData.yearBuild &&
|
||||||
|
@ -111,10 +117,59 @@ const Addproperty = () => {
|
||||||
<div className="tab-content">
|
<div className="tab-content">
|
||||||
{activeTab === "propertydetails" && (
|
{activeTab === "propertydetails" && (
|
||||||
<div role="tabpanel" className="tab-pane active">
|
<div role="tabpanel" className="tab-pane active">
|
||||||
<h3>Property Details</h3>
|
|
||||||
<form>
|
<form>
|
||||||
<div className="row gy-3 overflow-hidden">
|
<h3>Property Location</h3>
|
||||||
<div className="col-12">
|
<div className="row gy-3">
|
||||||
|
<div className="col-md-4">
|
||||||
|
<div className="form-floating mb-3">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
className="form-control"
|
||||||
|
name="address"
|
||||||
|
placeholder="Property Address"
|
||||||
|
value={formData.address}
|
||||||
|
onChange={handleInputChange}
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<label htmlFor="title">Property Address</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="col-md-4">
|
||||||
|
<div className="form-floating mb-3">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
className="form-control"
|
||||||
|
name="city"
|
||||||
|
value={formData.city}
|
||||||
|
onChange={handleInputChange}
|
||||||
|
placeholder="city"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<label htmlFor="title">City</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="col-md-4">
|
||||||
|
<select
|
||||||
|
className="form-floating mb-3 form-control"
|
||||||
|
name="state"
|
||||||
|
value={formData.state}
|
||||||
|
onChange={handleInputChange}
|
||||||
|
required
|
||||||
|
>
|
||||||
|
<option value="">Please Select State</option>
|
||||||
|
<option value="Residential">Residential</option>
|
||||||
|
<option value="Land">Land</option>
|
||||||
|
<option value="Commercial">Commercial</option>
|
||||||
|
<option value="Industrial">Industrial</option>
|
||||||
|
<option value="Water">Water</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div className="row gy-3">
|
||||||
|
<div className="col-md-4">
|
||||||
<select
|
<select
|
||||||
className="form-floating mb-3 form-control"
|
className="form-floating mb-3 form-control"
|
||||||
name="propertyType"
|
name="propertyType"
|
||||||
|
@ -130,7 +185,7 @@ const Addproperty = () => {
|
||||||
<option value="Water">Water</option>
|
<option value="Water">Water</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-12">
|
<div className="col-md-4">
|
||||||
<div className="form-floating mb-3">
|
<div className="form-floating mb-3">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -138,15 +193,13 @@ const Addproperty = () => {
|
||||||
name="title"
|
name="title"
|
||||||
value={formData.title}
|
value={formData.title}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
placeholder="Property title"
|
placeholder="Property Title"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<label htmlFor="title" className="form-label">
|
<label htmlFor="title">Property Title</label>
|
||||||
Property Title
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-12">
|
<div className="col-md-4">
|
||||||
<div className="form-floating mb-3">
|
<div className="form-floating mb-3">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -154,15 +207,16 @@ const Addproperty = () => {
|
||||||
name="yearBuild"
|
name="yearBuild"
|
||||||
value={formData.yearBuild}
|
value={formData.yearBuild}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
placeholder="Year build"
|
placeholder="Year Build"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<label htmlFor="yearBuild" className="form-label">
|
<label htmlFor="yearBuild">Year Build</label>
|
||||||
Year Build
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<button
|
<button
|
||||||
className="btn btn-primary continue"
|
className="btn btn-primary continue"
|
||||||
|
@ -177,8 +231,8 @@ const Addproperty = () => {
|
||||||
<div role="tabpanel" className="tab-pane active">
|
<div role="tabpanel" className="tab-pane active">
|
||||||
<h3>Shipping Address</h3>
|
<h3>Shipping Address</h3>
|
||||||
<form>
|
<form>
|
||||||
<div className="row gy-3 overflow-hidden">
|
<div className="row gy-3">
|
||||||
<div className="col-12">
|
<div className="col-md-4">
|
||||||
<div className="form-floating mb-3">
|
<div className="form-floating mb-3">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -189,9 +243,7 @@ const Addproperty = () => {
|
||||||
placeholder="Total SQFT"
|
placeholder="Total SQFT"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<label htmlFor="totalSqft" className="form-label">
|
<label htmlFor="totalSqft">Total SQFT</label>
|
||||||
Total SQFT
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue