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