From 085c60ec3327d1f49c842e85b9928176c601a4ad Mon Sep 17 00:00:00 2001 From: mouazkh Date: Mon, 25 May 2026 23:55:02 +0300 Subject: [PATCH] editing the add rent property mouaz is the best in the west --- app/owner/properties/page.js | 997 +++++++++++++++++++--------- app/property/[id]/PropertyDetail.js | 11 +- 2 files changed, 697 insertions(+), 311 deletions(-) diff --git a/app/owner/properties/page.js b/app/owner/properties/page.js index bf831be..ef6f41f 100644 --- a/app/owner/properties/page.js +++ b/app/owner/properties/page.js @@ -1,9 +1,9 @@ -'use client'; +"use client"; -import { useState, useEffect } from 'react'; -import { motion, AnimatePresence } from 'framer-motion'; -import { useRouter } from 'next/navigation'; -import Link from 'next/link'; +import { useState, useEffect } from "react"; +import { motion, AnimatePresence } from "framer-motion"; +import { useRouter } from "next/navigation"; +import Link from "next/link"; import { PlusCircle, Building, @@ -45,13 +45,22 @@ import { X, Star, Ban, - Check -} from 'lucide-react'; -import toast, { Toaster } from 'react-hot-toast'; -import AuthService from '../../services/AuthService'; -import { getMyRentListings, getMySaleListings, editRentProperty } from '../../utils/api'; + Check, +} from "lucide-react"; +import toast, { Toaster } from "react-hot-toast"; +import AuthService from "../../services/AuthService"; +import { + getMyRentListings, + getMySaleListings, + editRentProperty, +} from "../../utils/api"; -const DeleteConfirmationModal = ({ isOpen, onClose, onConfirm, propertyTitle }) => { +const DeleteConfirmationModal = ({ + isOpen, + onClose, + onConfirm, + propertyTitle, +}) => { if (!isOpen) return null; return ( @@ -75,9 +84,12 @@ const DeleteConfirmationModal = ({ isOpen, onClose, onConfirm, propertyTitle })

تأكيد الحذف

- هل أنت متأكد من حذف العقار: "{propertyTitle}"؟ + هل أنت متأكد من حذف العقار:{" "} + "{propertyTitle}"؟ +

+

+ هذا الإجراء لا يمكن التراجع عنه

-

هذا الإجراء لا يمكن التراجع عنه

@@ -100,23 +112,45 @@ const DeleteConfirmationModal = ({ isOpen, onClose, onConfirm, propertyTitle }) }; const serviceLabels = { - Electricity: 'كهرباء', Internet: 'إنترنت', Heating: 'تدفئة', Water: 'ماء', - Pool: 'مسبح', PrivateGarden: 'حديقة خاصة', Parking: 'موقف سيارات', - Security247: 'حراسة 24 س', CentralHeating: 'تدفئة مركزية', - CentralAirConditioning: 'تكييف مركزي', EquippedKitchen: 'مطبخ مجهز', - MaidsRoom: 'غرفة خادمة', Elevator: 'مصعد', Gym: 'نادي رياضي', - Sauna: 'ساونا', Jacuzzi: 'جاكوزي', Balcony: 'بلكونة', - Rooftop: 'سطح', Furnished: 'مفروش', AirConditioning: 'تكييف', - SatelliteTV: 'تلفاز', Fireplace: 'مدفأة', StudyRoom: 'غرفة دراسة', - Storage: 'مستودع', Laundry: 'غرفة غسيل', SmartHome: 'منزل ذكي', + Electricity: "كهرباء", + Internet: "إنترنت", + Heating: "تدفئة", + Water: "ماء", + Pool: "مسبح", + PrivateGarden: "حديقة خاصة", + Parking: "موقف سيارات", + Security247: "حراسة 24 س", + CentralHeating: "تدفئة مركزية", + CentralAirConditioning: "تكييف مركزي", + EquippedKitchen: "مطبخ مجهز", + MaidsRoom: "غرفة خادمة", + Elevator: "مصعد", + Gym: "نادي رياضي", + Sauna: "ساونا", + Jacuzzi: "جاكوزي", + Balcony: "بلكونة", + Rooftop: "سطح", + Furnished: "مفروش", + AirConditioning: "تكييف", + SatelliteTV: "تلفاز", + Fireplace: "مدفأة", + StudyRoom: "غرفة دراسة", + Storage: "مستودع", + Laundry: "غرفة غسيل", + SmartHome: "منزل ذكي", }; const termLabels = { - NoSmoking: 'ممنوع التدخين', NoAnimals: 'ممنوع الحيوانات الأليفة', - NoParties: 'ممنوع الحفلات', NoAlcohol: 'ممنوع الكحول', - SuitableForChildren: 'مناسب للأطفال', SuitableForFamilies: 'مناسب للعائلات', - SuitableForStudents: 'مناسب للطلاب', SuitableForElderly: 'مناسب لكبار السن', - OnlyFemales: 'إناث فقط', OnlyMales: 'ذكور فقط', + NoSmoking: "ممنوع التدخين", + NoAnimals: "ممنوع الحيوانات الأليفة", + NoParties: "ممنوع الحفلات", + NoAlcohol: "ممنوع الكحول", + SuitableForChildren: "مناسب للأطفال", + SuitableForFamilies: "مناسب للعائلات", + SuitableForStudents: "مناسب للطلاب", + SuitableForElderly: "مناسب لكبار السن", + OnlyFemales: "إناث فقط", + OnlyMales: "ذكور فقط", }; const PropertyViewModal = ({ isOpen, onClose, property }) => { @@ -140,7 +174,10 @@ const PropertyViewModal = ({ isOpen, onClose, property }) => {

{property.title}

-

تم الإضافة: {new Date(property.createdAt).toLocaleDateString('ar-SA')}

+

+ تم الإضافة:{" "} + {new Date(property.createdAt).toLocaleDateString("ar-SA")} +