Skip to content

Commit

Permalink
feat(frontend): added pending state for equipment OEE
Browse files Browse the repository at this point in the history
  • Loading branch information
scott181182 committed Jun 3, 2024
1 parent 8b3d9fe commit d432ee3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/components/metric-progress-circular.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
class="text-center mt-2"

:model-value="progressValue"
:indeterminate="pending"
:color="typeof props.value === 'number' ? getColorState(props.value) : 'grey'"
>
<div :class="props.labelClass">
<h3 class="font-weight-medium">{{ props.label }}</h3>
<span v-if="typeof props.value === 'number'">{{props.value.toFixed(1)}}%</span>
<span v-if="pending">...</span>
<span v-else-if="typeof props.value === 'number'">{{props.value.toFixed(1)}}%</span>
<span v-else-if="typeof props.value === null || props.value === undefined">No Value</span>
<span v-else>??</span>
</div>
Expand All @@ -31,6 +33,7 @@ interface Props {
label: string;
labelClass?: string;
value: number | undefined | null;
pending?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
size: 150,
Expand Down
1 change: 1 addition & 0 deletions frontend/pages/equipment/[equipmentID].vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
label="OEE"
label-class="text-h4"
:value="oeeValue"
:pending="pending"
:size="250"
/>
</v-col>
Expand Down

0 comments on commit d432ee3

Please sign in to comment.