@@ -102,9 +93,9 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
{renderTooltip('editPrivacy', 'تعديل سياسة الخصوصية')}
@@ -122,15 +113,15 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
-
+
{favorites.length > 0 && (
{favorites.length}
@@ -150,15 +141,15 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
-
+
{unreadCount > 0 && (
{unreadCount}
@@ -178,9 +169,9 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
-
+
{renderTooltip('payments', 'المدفوعات')}
@@ -195,9 +186,9 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
-
+
{renderTooltip('booked', 'حجوزاتي')}
@@ -212,9 +203,9 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
-
+
{renderTooltip('myRates', 'تقييماتي')}
@@ -229,9 +220,9 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
-
+
{renderTooltip('reports', 'البلاغات')}
@@ -246,9 +237,9 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
-
+
{renderTooltip('settings', 'الإعدادات')}
diff --git a/app/owner/properties/page.js b/app/owner/properties/page.js
index b6fc349..e2aa893 100644
--- a/app/owner/properties/page.js
+++ b/app/owner/properties/page.js
@@ -688,11 +688,16 @@ export default function OwnerPropertiesPage() {
const [properties, setProperties] = useState([]);
const [isLoading, setIsLoading] = useState(true);
const [showAddMenu, setShowAddMenu] = useState(false);
+ const [activeTab, setActiveTab] = useState('rent');
const [deleteModal, setDeleteModal] = useState({ isOpen: false, property: null });
const [viewModal, setViewModal] = useState({ isOpen: false, property: null });
const [editModal, setEditModal] = useState({ isOpen: false, property: null });
+ const filteredProperties = properties.filter(p => p.purpose === activeTab);
+ const rentCount = properties.filter(p => p.purpose === 'rent').length;
+ const saleCount = properties.filter(p => p.purpose === 'sale').length;
+
useEffect(() => {
const authUser = AuthService.getUser();
if (authUser && AuthService.isOwner()) {
@@ -740,7 +745,8 @@ export default function OwnerPropertiesPage() {
return {
id: item.id,
title: info.address || `عقار #${item.id}`,
- propertyType: { 0: 'apartment', 1: 'villa', 2: 'house' }[info.buildingType] || 'apartment',
+ propertyType: { 0: 'apartment', 1: 'villa', 2: 'sweet', 3: 'room', 4: 'studio', 5: 'office', 6: 'farms', 7: 'shop', 8: 'warehouse' }[info.buildingType] || 'apartment',
+ propertyTypeLabel: { 0: 'شقة', 1: 'فيلا', 2: 'سويت', 3: 'غرفة', 4: 'استوديو', 5: 'مكتب', 6: 'مزرعة', 7: 'متجر', 8: 'مستودع' }[info.buildingType] || 'عقار',
purpose: 'rent',
rentType: { 0: 'daily', 1: 'monthly' }[item.rentType] || 'daily',
dailyPrice: item.dailyRent || 0,
@@ -776,7 +782,8 @@ export default function OwnerPropertiesPage() {
return {
id: item.id,
title: info.address || `عقار للبيع #${item.id}`,
- propertyType: { 0: 'apartment', 1: 'villa', 2: 'house' }[info.buildingType] || 'apartment',
+ propertyType: { 0: 'apartment', 1: 'villa', 2: 'sweet', 3: 'room', 4: 'studio', 5: 'office', 6: 'farms', 7: 'shop', 8: 'warehouse' }[info.buildingType] || 'apartment',
+ propertyTypeLabel: { 0: 'شقة', 1: 'فيلا', 2: 'سويت', 3: 'غرفة', 4: 'استوديو', 5: 'مكتب', 6: 'مزرعة', 7: 'متجر', 8: 'مستودع' }[info.buildingType] || 'عقار',
purpose: 'sale',
dailyPrice: 0,
monthlyPrice: 0,
@@ -986,7 +993,27 @@ export default function OwnerPropertiesPage() {
- {properties.length === 0 ? (
+ {/* Tab Switcher */}
+
+
+
+
+
+ {filteredProperties.length === 0 ? (
@@ -1007,7 +1036,7 @@ export default function OwnerPropertiesPage() {
) : (
- {properties.map((property, index) => (
+ {filteredProperties.map((property, index) => (