IKHSAN
ENID Baca dalam Bahasa Indonesia

opendesk

Public
Branch
main
Latest commit
08d9f3328 October 2026

Sla.vue

Open raw
<template>
  <SlaPolicies v-if="slaActiveScreen.screen == 'list'" />
  <SlaPolicyView v-else-if="slaActiveScreen.screen == 'view'" />
</template>

<script setup lang="ts">
import { slaActiveScreen } from "@/stores/sla";
import SlaPolicies from "./SlaPolicies.vue";
import SlaPolicyView from "./SlaPolicyView.vue";
import { createListResource } from "frappe-ui";
import { onUnmounted, provide, ref } from "vue";
import { SlaPolicyListResourceSymbol } from "@/types";

const slaPolicyListData = createListResource({
  doctype: "OD Service Level Agreement",
  fields: ["name", "default_sla", "enabled", "description", "rank", "creation"],
  cache: ["SLAPolicyList"],
  orderBy: "modified desc",
  start: 0,
  pageLength: 999,
  auto: true,
});
const slaSearchQuery = ref("");

provide("slaSearchQuery", slaSearchQuery);
provide(SlaPolicyListResourceSymbol, slaPolicyListData);

onUnmounted(() => {
  slaSearchQuery.value = "";
  slaPolicyListData.filters = {};
});
</script>
bytes
972
lines
33
Type
vue
Latest commit
28 October 2026