Spaces:
Running
Running
remove the specialty of users in their login section
Browse files- worker-dashboard.html +2 -4
- worker-login.html +1 -23
worker-dashboard.html
CHANGED
|
@@ -64,9 +64,8 @@
|
|
| 64 |
<div class="profile-card">
|
| 65 |
<img id="profilePhoto" src="http://static.photos/people/150x150/1" class="profile-img" alt="Profile Photo">
|
| 66 |
<h3 id="workerName" class="text-center">Worker Name</h3>
|
| 67 |
-
<p class="text-center"><strong id="workerSpecialty">Specialty</strong></p>
|
| 68 |
<p class="text-center" id="workerLocation">Location</p>
|
| 69 |
-
|
| 70 |
<button class="btn btn-primary">Update Profile</button>
|
| 71 |
</div>
|
| 72 |
</div>
|
|
@@ -167,9 +166,8 @@
|
|
| 167 |
const workerData = JSON.parse(localStorage.getItem('workerData'));
|
| 168 |
if (workerData) {
|
| 169 |
document.getElementById('workerName').textContent = `${workerData.firstName} ${workerData.lastName}`;
|
| 170 |
-
document.getElementById('workerSpecialty').textContent = workerData.specialty;
|
| 171 |
document.getElementById('workerLocation').textContent = `${workerData.district}, ${workerData.state}`;
|
| 172 |
-
|
| 173 |
document.getElementById('profilePhoto').src = workerData.photo;
|
| 174 |
}
|
| 175 |
}
|
|
|
|
| 64 |
<div class="profile-card">
|
| 65 |
<img id="profilePhoto" src="http://static.photos/people/150x150/1" class="profile-img" alt="Profile Photo">
|
| 66 |
<h3 id="workerName" class="text-center">Worker Name</h3>
|
|
|
|
| 67 |
<p class="text-center" id="workerLocation">Location</p>
|
| 68 |
+
<div class="d-grid mt-3">
|
| 69 |
<button class="btn btn-primary">Update Profile</button>
|
| 70 |
</div>
|
| 71 |
</div>
|
|
|
|
| 166 |
const workerData = JSON.parse(localStorage.getItem('workerData'));
|
| 167 |
if (workerData) {
|
| 168 |
document.getElementById('workerName').textContent = `${workerData.firstName} ${workerData.lastName}`;
|
|
|
|
| 169 |
document.getElementById('workerLocation').textContent = `${workerData.district}, ${workerData.state}`;
|
| 170 |
+
if (workerData.photo) {
|
| 171 |
document.getElementById('profilePhoto').src = workerData.photo;
|
| 172 |
}
|
| 173 |
}
|
worker-login.html
CHANGED
|
@@ -78,27 +78,6 @@
|
|
| 78 |
<option value="">Select District</option>
|
| 79 |
</select>
|
| 80 |
</div>
|
| 81 |
-
<div class="mb-3">
|
| 82 |
-
<label for="specialty" class="form-label">Specialty</label>
|
| 83 |
-
<select class="form-select" id="specialty" required>
|
| 84 |
-
<option value="">Select Specialty</option>
|
| 85 |
-
<option value="Electrician">Electrician</option>
|
| 86 |
-
<option value="Plumber">Plumber</option>
|
| 87 |
-
<option value="Carpenter">Carpenter</option>
|
| 88 |
-
<option value="Painter">Painter</option>
|
| 89 |
-
<option value="Mason">Mason</option>
|
| 90 |
-
<option value="Welder">Welder</option>
|
| 91 |
-
<option value="Mechanic">Mechanic</option>
|
| 92 |
-
<option value="Driver">Driver</option>
|
| 93 |
-
<option value="Gardener">Gardener</option>
|
| 94 |
-
<option value="Cook">Cook</option>
|
| 95 |
-
<option value="Housekeeper">Housekeeper</option>
|
| 96 |
-
<option value="Security Guard">Security Guard</option>
|
| 97 |
-
<option value="Technician">Technician</option>
|
| 98 |
-
<option value="Tailor">Tailor</option>
|
| 99 |
-
<option value="Other">Other</option>
|
| 100 |
-
</select>
|
| 101 |
-
</div>
|
| 102 |
<div class="mb-3">
|
| 103 |
<label for="photo" class="form-label">Upload Photo</label>
|
| 104 |
<input type="file" class="form-control" id="photo" accept="image/*" required>
|
|
@@ -122,9 +101,8 @@
|
|
| 122 |
mobile: document.getElementById('mobile').value,
|
| 123 |
state: document.getElementById('state').value,
|
| 124 |
district: document.getElementById('district').value,
|
| 125 |
-
specialty: document.getElementById('specialty').value,
|
| 126 |
photo: document.getElementById('photoPreview').src
|
| 127 |
-
|
| 128 |
|
| 129 |
// Store in localStorage
|
| 130 |
localStorage.setItem('workerData', JSON.stringify(formData));
|
|
|
|
| 78 |
<option value="">Select District</option>
|
| 79 |
</select>
|
| 80 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
<div class="mb-3">
|
| 82 |
<label for="photo" class="form-label">Upload Photo</label>
|
| 83 |
<input type="file" class="form-control" id="photo" accept="image/*" required>
|
|
|
|
| 101 |
mobile: document.getElementById('mobile').value,
|
| 102 |
state: document.getElementById('state').value,
|
| 103 |
district: document.getElementById('district').value,
|
|
|
|
| 104 |
photo: document.getElementById('photoPreview').src
|
| 105 |
+
};
|
| 106 |
|
| 107 |
// Store in localStorage
|
| 108 |
localStorage.setItem('workerData', JSON.stringify(formData));
|