File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed
packages/forklift-console-plugin/src/modules/Plans/utils Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ export const planPhases: { id: PlanPhase; label: string }[] = [
1212 { id : PlanPhase . Error , label : PlanPhase . Error } ,
1313 { id : PlanPhase . vmError , label : PlanPhase . vmError } ,
1414 { id : PlanPhase . Unknown , label : PlanPhase . Unknown } ,
15- { id : PlanPhase . Archiving , label : PlanPhase . Archiving } ,
1615 { id : PlanPhase . Archived , label : PlanPhase . Archived } ,
1716 { id : PlanPhase . Failed , label : PlanPhase . Failed } ,
1817 { id : PlanPhase . Canceled , label : PlanPhase . Canceled } ,
Original file line number Diff line number Diff line change @@ -18,11 +18,7 @@ export const getPlanPhase = (data: PlanData): PlanPhase => {
1818 }
1919
2020 // Check for Archived
21- if ( plan ?. spec ?. archived && ! conditionTypes [ PlanConditionType . Archived ] ) {
22- return PlanPhase . Archiving ;
23- }
24-
25- if ( conditionTypes [ PlanConditionType . Archived ] ) {
21+ if ( plan ?. spec ?. archived || conditionTypes [ PlanConditionType . Archived ] ) {
2622 return PlanPhase . Archived ;
2723 }
2824
@@ -123,5 +119,5 @@ export const isPlanEditable = (plan: V1beta1Plan) => {
123119export const isPlanArchived = ( plan : V1beta1Plan ) => {
124120 const planStatus = getPlanPhase ( { obj : plan } ) ;
125121
126- return planStatus === PlanPhase . Archiving || planStatus === PlanPhase . Archived ;
122+ return planStatus === PlanPhase . Archived ;
127123} ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export const getPlanSummaryStatus = (data: PlanData): PlanSummaryStatus => {
2626 } = conditionTypes ;
2727
2828 // Archived
29- if ( ( plan ?. spec ?. archived && ! isArchived ) || isArchived ) {
29+ if ( plan ?. spec ?. archived || isArchived ) {
3030 return PlanSummaryStatus . Archived ;
3131 }
3232
You can’t perform that action at this time.
0 commit comments