This commit is contained in:
jackiettran
2025-09-02 16:15:09 -04:00
parent b52104c3fa
commit b59fc07fc3
23 changed files with 1080 additions and 417 deletions

View File

@@ -40,12 +40,14 @@ const ReviewRenterModal: React.FC<ReviewRenterModalProps> = ({
setRating(5);
setReview("");
setPrivateMessage("");
// Show success modal with appropriate message
if (response.data.reviewVisible) {
setSuccessMessage("Review published successfully!");
} else {
setSuccessMessage("Review submitted! It will be published when both parties have reviewed or after 10 minutes.");
setSuccessMessage(
"Review submitted! It will be published when both parties have reviewed or after 10 minutes."
);
}
setShowSuccessModal(true);
} catch (err: any) {
@@ -114,8 +116,8 @@ const ReviewRenterModal: React.FC<ReviewRenterModalProps> = ({
</h6>
<p className="mb-1 text-muted small">{rental.item.name}</p>
<small className="text-muted">
{new Date(rental.startDate).toLocaleDateString()} to{" "}
{new Date(rental.endDate).toLocaleDateString()}
{new Date(rental.startDateTime).toLocaleDateString()} to{" "}
{new Date(rental.endDateTime).toLocaleDateString()}
</small>
</div>
)}
@@ -210,7 +212,7 @@ const ReviewRenterModal: React.FC<ReviewRenterModalProps> = ({
</form>
</div>
</div>
<SuccessModal
show={showSuccessModal}
onClose={handleSuccessModalClose}