Добавлены отладочные логи для отслеживания значений SSD в компонентах QuickDetailSection и UnitDetailsSection. Обновлены GraphQL запросы для включения поля ssd. Отключено кэширование для получения актуальных данных SSD в UnitDetailsSection.
This commit is contained in:
@ -29,7 +29,22 @@ const UnitDetailsSection: React.FC<UnitDetailsSectionProps> = ({
|
||||
const [isBrandModalOpen, setIsBrandModalOpen] = useState(false);
|
||||
const [selectedDetail, setSelectedDetail] = useState<LaximoUnitDetail | null>(null);
|
||||
|
||||
// Отладочная информация для SSD
|
||||
console.log('🔍 UnitDetailsSection получил SSD:', {
|
||||
ssd: ssd ? `${ssd.substring(0, 50)}...` : 'отсутствует',
|
||||
ssdLength: ssd?.length,
|
||||
unitId,
|
||||
unitName
|
||||
});
|
||||
|
||||
// Получаем информацию об узле
|
||||
console.log('🔍 UnitDetailsSection - GET_LAXIMO_UNIT_INFO SSD:', {
|
||||
ssd: ssd ? `${ssd.substring(0, 50)}...` : 'отсутствует',
|
||||
ssdLength: ssd?.length,
|
||||
unitId,
|
||||
unitName
|
||||
});
|
||||
|
||||
const { data: unitInfoData, loading: unitInfoLoading, error: unitInfoError } = useQuery<{ laximoUnitInfo: LaximoUnitInfo }>(
|
||||
GET_LAXIMO_UNIT_INFO,
|
||||
{
|
||||
@ -40,11 +55,20 @@ const UnitDetailsSection: React.FC<UnitDetailsSectionProps> = ({
|
||||
ssd: ssd || ''
|
||||
},
|
||||
skip: !catalogCode || vehicleId === undefined || vehicleId === null || !unitId,
|
||||
errorPolicy: 'all'
|
||||
errorPolicy: 'all',
|
||||
fetchPolicy: 'no-cache', // Отключаем кэширование для получения актуального SSD
|
||||
notifyOnNetworkStatusChange: true
|
||||
}
|
||||
);
|
||||
|
||||
// Получаем детали узла
|
||||
console.log('🔍 UnitDetailsSection - GET_LAXIMO_UNIT_DETAILS SSD:', {
|
||||
ssd: ssd ? `${ssd.substring(0, 50)}...` : 'отсутствует',
|
||||
ssdLength: ssd?.length,
|
||||
unitId,
|
||||
unitName
|
||||
});
|
||||
|
||||
const { data: unitDetailsData, loading: unitDetailsLoading, error: unitDetailsError } = useQuery<{ laximoUnitDetails: LaximoUnitDetail[] }>(
|
||||
GET_LAXIMO_UNIT_DETAILS,
|
||||
{
|
||||
@ -55,11 +79,20 @@ const UnitDetailsSection: React.FC<UnitDetailsSectionProps> = ({
|
||||
ssd: ssd || ''
|
||||
},
|
||||
skip: !catalogCode || vehicleId === undefined || vehicleId === null || !unitId,
|
||||
errorPolicy: 'all'
|
||||
errorPolicy: 'all',
|
||||
fetchPolicy: 'no-cache', // Отключаем кэширование для получения актуального SSD
|
||||
notifyOnNetworkStatusChange: true
|
||||
}
|
||||
);
|
||||
|
||||
// Получаем карту изображений узла
|
||||
console.log('🔍 UnitDetailsSection - GET_LAXIMO_UNIT_IMAGE_MAP SSD:', {
|
||||
ssd: ssd ? `${ssd.substring(0, 50)}...` : 'отсутствует',
|
||||
ssdLength: ssd?.length,
|
||||
unitId,
|
||||
unitName
|
||||
});
|
||||
|
||||
const { data: unitImageMapData, loading: unitImageMapLoading, error: unitImageMapError } = useQuery<{ laximoUnitImageMap: LaximoUnitImageMap }>(
|
||||
GET_LAXIMO_UNIT_IMAGE_MAP,
|
||||
{
|
||||
@ -70,7 +103,9 @@ const UnitDetailsSection: React.FC<UnitDetailsSectionProps> = ({
|
||||
ssd: ssd || ''
|
||||
},
|
||||
skip: !catalogCode || vehicleId === undefined || vehicleId === null || !unitId,
|
||||
errorPolicy: 'all'
|
||||
errorPolicy: 'all',
|
||||
fetchPolicy: 'no-cache', // Отключаем кэширование для получения актуального SSD
|
||||
notifyOnNetworkStatusChange: true
|
||||
}
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user