We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8654a04 commit cf20142Copy full SHA for cf20142
frontend/src/features/sla/SlaBadge.vue
@@ -32,7 +32,7 @@
32
</template>
33
34
<script setup>
35
-import { ref } from 'vue'
+import { ref, watch } from 'vue'
36
import { useSla } from '@/composables/useSla'
37
import { AlertCircle, CheckCircle, Clock } from 'lucide-vue-next'
38
const props = defineProps({
@@ -45,10 +45,21 @@ const props = defineProps({
45
}
46
})
47
48
+const emit = defineEmits(['status'])
49
+
50
let sla = null
51
if (props.dueAt) {
52
sla = useSla(ref(props.dueAt), ref(props.actualAt))
53
54
55
+// Watch for status change and emit
56
+watch(
57
+ sla,
58
+ (newVal) => {
59
+ if (newVal?.status) emit('status', newVal.status)
60
+ },
61
+ { immediate: true }
62
+)
63
</script>
64
65
<style scoped>
0 commit comments