Owner should only be able to complete an active rental not a confirmed rental. Removed an icon
This commit is contained in:
@@ -85,7 +85,10 @@ const ConditionCheckModal: React.FC<ConditionCheckModalProps> = ({
|
||||
setError(null);
|
||||
|
||||
// Upload photos to S3 first (with resizing)
|
||||
const uploadResults = await uploadImagesWithVariants("condition-check", photos);
|
||||
const uploadResults = await uploadImagesWithVariants(
|
||||
"condition-check",
|
||||
photos
|
||||
);
|
||||
const imageFilenames = uploadResults.map((result) => result.baseKey);
|
||||
|
||||
// Submit condition check with S3 keys
|
||||
@@ -154,7 +157,9 @@ const ConditionCheckModal: React.FC<ConditionCheckModalProps> = ({
|
||||
<div className="mb-3">
|
||||
<label className="form-label">
|
||||
Photos <span className="text-danger">*</span>
|
||||
<small className="text-muted ms-2">(Maximum {IMAGE_LIMITS.conditionChecks} photos)</small>
|
||||
<small className="text-muted ms-2">
|
||||
(Maximum {IMAGE_LIMITS.conditionChecks} photos)
|
||||
</small>
|
||||
</label>
|
||||
<input
|
||||
type="file"
|
||||
@@ -247,10 +252,7 @@ const ConditionCheckModal: React.FC<ConditionCheckModalProps> = ({
|
||||
Submitting...
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<i className="bi bi-check-lg me-2" />
|
||||
Submit Condition Check
|
||||
</>
|
||||
<>Submit Condition Check</>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -513,20 +513,12 @@ const Owning: React.FC = () => {
|
||||
</>
|
||||
)}
|
||||
{rental.status === "confirmed" && (
|
||||
<>
|
||||
<button
|
||||
className="btn btn-sm btn-success"
|
||||
onClick={() => handleCompleteClick(rental)}
|
||||
>
|
||||
Complete
|
||||
</button>
|
||||
<button
|
||||
className="btn btn-sm btn-outline-danger"
|
||||
onClick={() => handleCancelClick(rental)}
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
</>
|
||||
<button
|
||||
className="btn btn-sm btn-outline-danger"
|
||||
onClick={() => handleCancelClick(rental)}
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
)}
|
||||
{rental.status === "active" && (
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user