diff --git a/resources/jscomposition/cases/casesDetail/components/CaseDetail.vue b/resources/jscomposition/cases/casesDetail/components/CaseDetail.vue index d959e90082..7965f826ee 100644 --- a/resources/jscomposition/cases/casesDetail/components/CaseDetail.vue +++ b/resources/jscomposition/cases/casesDetail/components/CaseDetail.vue @@ -13,6 +13,7 @@ import TabHistory from "./TabHistory.vue"; import CompletedForms from "./CompletedForms.vue"; import TabFiles from "./TabFiles.vue"; import Overview from "./Overview.vue"; +import { getRequestCount } from "../variables/index"; const translate = ProcessMaker.i18n; @@ -35,7 +36,7 @@ const tabs = [ name: translate.t("History"), href: "#history", current: "history", show: true, content: TabHistory, }, { - name: translate.t("Requests"), href: "#requests", current: "requests", show: true, content: RequestTable, + name: translate.t("Requests"), href: "#requests", current: "requests", show: getRequestCount() !== 1, content: RequestTable, }, ]; diff --git a/resources/jscomposition/cases/casesDetail/variables/index.js b/resources/jscomposition/cases/casesDetail/variables/index.js index 9cdc442349..1b835cd81d 100644 --- a/resources/jscomposition/cases/casesDetail/variables/index.js +++ b/resources/jscomposition/cases/casesDetail/variables/index.js @@ -1,5 +1,9 @@ export default {}; +export const api = window.ProcessMaker?.apiClient; + +export const useStore = () => Vue.globalStore; + export const getRequestId = () => requestId; export const getCaseNumber = () => request.case_number; @@ -12,6 +16,4 @@ export const getComentableType = () => comentable_type; export const getProcessName = () => request.process.name; -export const api = window.ProcessMaker?.apiClient; - -export const useStore = () => Vue.globalStore; +export const getRequestCount = () => requestCount; diff --git a/resources/views/cases/edit.blade.php b/resources/views/cases/edit.blade.php index a2d1163935..19029694fa 100644 --- a/resources/views/cases/edit.blade.php +++ b/resources/views/cases/edit.blade.php @@ -127,6 +127,7 @@ class="tw-grow tw-overflow-hidden" const processId = @json($request->process->id); const canViewComments = @json($canViewComments); const comentable_type = @json(get_class($request)); + const requestCount = @json($requestCount); @if (hasPackage('package-files'))