few tweaks to fix master image issue
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# VITE_DASHBOARD_API_URL=https://python.seekright.com
|
# VITE_DASHBOARD_API_URL=https://python.seekright.com
|
||||||
# VITE_AUDIT_API_URL=https://node-audit.seekright.com
|
# VITE_AUDIT_API_URL=https://node-audit.seekright.com
|
||||||
VITE_DASHBOARD_API_URL=https://sr-backend-api.takeleap.in
|
VITE_DASHBOARD_API_URL=https://sr-backend-api.takeleap.in
|
||||||
VITE_AUDIT_API_URL=https://sr-audit.takeleap.in
|
VITE_AUDIT_API_URL=https://psb7wrm5-7514.inc1.devtunnels.ms
|
||||||
|
|||||||
@@ -52,8 +52,9 @@ export const PreviewPanel: React.FC = () => {
|
|||||||
alt="Master"
|
alt="Master"
|
||||||
style={{ width: '100%', height: 'auto', display: 'block' }}
|
style={{ width: '100%', height: 'auto', display: 'block' }}
|
||||||
onError={(e) => {
|
onError={(e) => {
|
||||||
e.currentTarget.onerror = null;
|
if (!e.currentTarget.src.includes('master_image_not_available.png')) {
|
||||||
e.currentTarget.src = '/assets/images/master_image_not_available.png';
|
e.currentTarget.src = '/assets/images/master_image_not_available.png';
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Box sx={{ bgcolor: 'rgba(255,255,255,0.05)', color: 'text.primary', textAlign: 'center', py: 0.5 }}>
|
<Box sx={{ bgcolor: 'rgba(255,255,255,0.05)', color: 'text.primary', textAlign: 'center', py: 0.5 }}>
|
||||||
@@ -67,8 +68,9 @@ export const PreviewPanel: React.FC = () => {
|
|||||||
alt="Anomaly"
|
alt="Anomaly"
|
||||||
style={{ width: '100%', height: 'auto', display: 'block' }}
|
style={{ width: '100%', height: 'auto', display: 'block' }}
|
||||||
onError={(e) => {
|
onError={(e) => {
|
||||||
e.currentTarget.onerror = null;
|
if (!e.currentTarget.src.includes('anomaly-placeholder.png')) {
|
||||||
e.currentTarget.src = '/assets/images/anomaly-placeholder.png';
|
e.currentTarget.src = '/assets/images/anomaly-placeholder.png';
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Box sx={{ bgcolor: 'rgba(255,255,255,0.05)', color: 'text.primary', textAlign: 'center', py: 0.5 }}>
|
<Box sx={{ bgcolor: 'rgba(255,255,255,0.05)', color: 'text.primary', textAlign: 'center', py: 0.5 }}>
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ export const AuditSession: React.FC = () => {
|
|||||||
// Find correct index in filtered list
|
// Find correct index in filtered list
|
||||||
const origSelectedAnomaly = activeTab.anomalies[navState.startIndex || 0];
|
const origSelectedAnomaly = activeTab.anomalies[navState.startIndex || 0];
|
||||||
const newIdx = origSelectedAnomaly
|
const newIdx = origSelectedAnomaly
|
||||||
? filteredAnomalies.findIndex((a: any) => (a.id === origSelectedAnomaly.id || a._id === origSelectedAnomaly._id))
|
? filteredAnomalies.indexOf(origSelectedAnomaly)
|
||||||
: 0;
|
: 0;
|
||||||
setCurrentIndex(newIdx !== -1 ? newIdx : 0);
|
setCurrentIndex(newIdx !== -1 ? newIdx : 0);
|
||||||
setItemAuditStates(filteredAnomalies.map((a: any) => a.IsAudited === 1 ? 'audited' : 'pending'));
|
setItemAuditStates(filteredAnomalies.map((a: any) => a.IsAudited === 1 ? 'audited' : 'pending'));
|
||||||
@@ -763,8 +763,9 @@ export const AuditSession: React.FC = () => {
|
|||||||
transformOrigin: 'top left'
|
transformOrigin: 'top left'
|
||||||
}}
|
}}
|
||||||
onError={(e) => {
|
onError={(e) => {
|
||||||
e.currentTarget.onerror = null;
|
if (!e.currentTarget.src.includes('master_image_not_available.png')) {
|
||||||
e.currentTarget.src = '/assets/images/master_image_not_available.png';
|
e.currentTarget.src = '/assets/images/master_image_not_available.png';
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
@@ -809,8 +810,9 @@ export const AuditSession: React.FC = () => {
|
|||||||
transformOrigin: 'top left'
|
transformOrigin: 'top left'
|
||||||
}}
|
}}
|
||||||
onError={(e) => {
|
onError={(e) => {
|
||||||
e.currentTarget.onerror = null;
|
if (!e.currentTarget.src.includes('anomaly-placeholder.png')) {
|
||||||
e.currentTarget.src = '/assets/images/anomaly-placeholder.png';
|
e.currentTarget.src = '/assets/images/anomaly-placeholder.png';
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user