fix(dashboard): fix properties freeze, category/feature list views, and auth interceptor
deploy-chabokan / deploy (push) Canceled after 0s

This commit is contained in:
2026-08-19 07:08:43 +03:30
parent b81a85f672
commit 3723f801e7
14 changed files with 456 additions and 247 deletions
+24 -6
View File
@@ -163,7 +163,7 @@
</template>
<script setup>
import { ref, computed, watch, nextTick } from 'vue';
import { ref, computed, watch, nextTick, onBeforeUnmount } from 'vue';
import 'leaflet/dist/leaflet.css';
import L from 'leaflet';
import { LMap, LTileLayer, LMarker, LPopup, LControlLayers, LControlScale } from '@vue-leaflet/vue-leaflet';
@@ -190,6 +190,10 @@ const props = defineProps({
selectedPropertyId: {
type: [String, Number],
default: null
},
hoveredPropertyId: {
type: [String, Number],
default: null
}
});
@@ -313,12 +317,14 @@ const getCategoryName = (prop) => {
* Creates custom Airbnb-style Leaflet pin icon
*/
const getMarkerIcon = (prop) => {
const isSelected = props.selectedPropertyId === (prop._id || prop.id);
const propId = prop._id || prop.id;
const isSelected = props.selectedPropertyId === propId;
const isHovered = props.hoveredPropertyId === propId;
const code = prop.propertyCode ? `#${prop.propertyCode}` : '';
const cat = getCategoryName(prop) || 'ملک';
const html = `
<div class="airbnb-pin ${isSelected ? 'is-selected' : ''}">
<div class="airbnb-pin ${isSelected ? 'is-selected' : ''} ${isHovered ? 'is-hovered' : ''}">
<div class="pin-content">
<span class="pin-icon">🏠</span>
<span class="pin-label">${code || cat}</span>
@@ -421,9 +427,19 @@ const toggleFullscreen = () => {
}
};
document.addEventListener('fullscreenchange', () => {
const onFullscreenChange = () => {
isFullscreen.value = !!document.fullscreenElement;
nextTick(() => map.value?.leafletObject?.invalidateSize());
};
if (typeof document !== 'undefined') {
document.addEventListener('fullscreenchange', onFullscreenChange);
}
onBeforeUnmount(() => {
if (typeof document !== 'undefined') {
document.removeEventListener('fullscreenchange', onFullscreenChange);
}
});
// Watch for selected property changes to zoom to it
@@ -628,7 +644,8 @@ defineExpose({
transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.airbnb-pin:hover {
.airbnb-pin:hover,
.airbnb-pin.is-hovered {
transform: scale(1.15) translateY(-4px);
z-index: 1000 !important;
}
@@ -654,7 +671,8 @@ defineExpose({
transition: all 0.2s ease;
}
.airbnb-pin:hover .pin-content {
.airbnb-pin:hover .pin-content,
.airbnb-pin.is-hovered .pin-content {
background: #4f46e5;
color: #ffffff;
box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);