build issue resolved
This commit is contained in:
parent
bbae59e271
commit
ca3f6f33d1
@ -30,7 +30,7 @@ export function SLAProgressBar({
|
||||
// Pure presentational component - no business logic
|
||||
// If request is closed/approved/rejected or no SLA data, show status message
|
||||
// Check if SLA has required fields (percentageUsed or at least some data)
|
||||
const hasValidSLA = sla && (sla.percentageUsed !== undefined || sla.percent !== undefined || sla.elapsedHours !== undefined);
|
||||
const hasValidSLA = sla && (sla.percentageUsed !== undefined || sla.elapsedHours !== undefined);
|
||||
|
||||
if (!hasValidSLA || requestStatus === 'approved' || requestStatus === 'rejected' || requestStatus === 'closed') {
|
||||
return (
|
||||
@ -51,8 +51,7 @@ export function SLAProgressBar({
|
||||
// Use percentage-based colors to match approver SLA tracker
|
||||
// Green: 0-50%, Amber: 50-75%, Orange: 75-100%, Red: 100%+ (breached)
|
||||
// Grey: When paused (frozen state)
|
||||
// Handle both full format (percentageUsed) and simplified format (percent)
|
||||
const percentageUsed = sla.percentageUsed !== undefined ? sla.percentageUsed : (sla.percent || 0);
|
||||
const percentageUsed = sla.percentageUsed !== undefined ? sla.percentageUsed : 0;
|
||||
const rawStatus = sla.status || 'on_track';
|
||||
|
||||
// Determine colors based on percentage (matching ApprovalStepCard logic)
|
||||
|
||||
@ -343,8 +343,6 @@ export function DealerClaimWorkflowTab({
|
||||
// Waiting steps (future steps) should have elapsedHours = 0
|
||||
// This ensures that when in step 1, only step 1 shows elapsed time, others show 0
|
||||
const isWaiting = normalizedStatus === 'waiting';
|
||||
const isActive = normalizedStatus === 'pending' || normalizedStatus === 'in_progress';
|
||||
const isCompleted = normalizedStatus === 'approved' || normalizedStatus === 'rejected';
|
||||
|
||||
// Only calculate/show elapsed hours for active or completed steps
|
||||
// For waiting steps, elapsedHours should be 0 (they haven't started yet)
|
||||
|
||||
@ -139,7 +139,7 @@ export function CreditNoteSAPModal({
|
||||
</div>
|
||||
<Badge className="bg-green-600 text-white px-4 py-2 text-base">
|
||||
<CircleCheckBig className="w-4 h-4 mr-2" />
|
||||
{status === 'APPROVED' || status === 'CONFIRMED' ? 'Approved' : status === 'ISSUED' ? 'Issued' : status === 'SENT' ? 'Sent' : 'Pending'}
|
||||
{status === 'APPROVED' ? 'Approved' : status === 'ISSUED' ? 'Issued' : status === 'SENT' ? 'Sent' : 'Pending'}
|
||||
</Badge>
|
||||
</div>
|
||||
<div className="grid grid-cols-2 gap-4 mt-4">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user